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

2017-03-31 Thread Noel Grandin
 editeng/source/editeng/editundo.hxx  |1 +
 editeng/source/items/justifyitem.cxx |7 ---
 editeng/source/items/writingmodeitem.cxx |6 +++---
 editeng/source/misc/hangulhanja.cxx  |2 +-
 editeng/source/misc/svxacorr.cxx |2 +-
 editeng/source/uno/unoipset.cxx  |2 +-
 include/editeng/editeng.hxx  |1 +
 include/editeng/writingmodeitem.hxx  |3 ++-
 8 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 7acbf45fcc6e2f8672bbecc4787cbcea8967219b
Author: Noel Grandin 
Date:   Thu Mar 30 15:06:14 2017 +0200

use actual UNO enums in editeng

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

diff --git a/editeng/source/editeng/editundo.hxx 
b/editeng/source/editeng/editundo.hxx
index a21d609e70c5..30566f68d84f 100644
--- a/editeng/source/editeng/editundo.hxx
+++ b/editeng/source/editeng/editundo.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_EDITENG_SOURCE_EDITENG_EDITUNDO_HXX
 #define INCLUDED_EDITENG_SOURCE_EDITENG_EDITUNDO_HXX
 
+#include 
 #include 
 #include 
 #include 
diff --git a/editeng/source/items/justifyitem.cxx 
b/editeng/source/items/justifyitem.cxx
index 107c4308e658..b897fc5860d5 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -86,7 +86,7 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 //  ParagraphAdjust values, as in SvxAdjustItem
 //  (same value for ParaAdjust and ParaLastLineAdjust)
 
-sal_Int16 nAdjust = style::ParagraphAdjust_LEFT;
+style::ParagraphAdjust nAdjust = style::ParagraphAdjust_LEFT;
 switch ( (SvxCellHorJustify)GetValue() )
 {
 // ParagraphAdjust_LEFT is used for STANDARD and REPEAT
@@ -97,7 +97,7 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 case SvxCellHorJustify::Right:  nAdjust = 
style::ParagraphAdjust_RIGHT;  break;
 case SvxCellHorJustify::Block:  nAdjust = 
style::ParagraphAdjust_BLOCK;  break;
 }
-rVal <<= nAdjust;   // as sal_Int16
+rVal <<= (sal_Int16)nAdjust;   // as sal_Int16
 }
 break;
 }
@@ -141,7 +141,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 return false;
 
 SvxCellHorJustify eSvx = SvxCellHorJustify::Standard;
-switch (nVal)
+switch ((style::ParagraphAdjust)nVal)
 {
 //  STRETCH is treated as BLOCK
 case style::ParagraphAdjust_LEFT:eSvx = 
SvxCellHorJustify::Left;   break;
@@ -149,6 +149,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 case style::ParagraphAdjust_STRETCH:
 case style::ParagraphAdjust_BLOCK:   eSvx = 
SvxCellHorJustify::Block;  break;
 case style::ParagraphAdjust_CENTER:  eSvx = 
SvxCellHorJustify::Center; break;
+default: break;
 }
 SetValue( eSvx );
 }
diff --git a/editeng/source/items/writingmodeitem.cxx 
b/editeng/source/items/writingmodeitem.cxx
index a753ec372c15..57347f9dece7 100644
--- a/editeng/source/items/writingmodeitem.cxx
+++ b/editeng/source/items/writingmodeitem.cxx
@@ -69,7 +69,7 @@ bool SvxWritingModeItem::GetPresentation( SfxItemPresentation 
/*ePres*/,
 OUString &rText,
 const IntlWrapper *  ) const
 {
-rText = EditResId::GetString(RID_SVXITEMS_FRMDIR_BEGIN + GetValue());
+rText = EditResId::GetString(RID_SVXITEMS_FRMDIR_BEGIN + (int)GetValue());
 return true;
 }
 
@@ -91,7 +91,7 @@ bool SvxWritingModeItem::PutValue( const css::uno::Any& rVal, 
sal_uInt8 )
 
 if( bRet )
 {
-switch( nVal )
+switch( (WritingMode)nVal )
 {
 case WritingMode_LR_TB:
 case WritingMode_RL_TB:
@@ -117,7 +117,7 @@ bool SvxWritingModeItem::QueryValue( css::uno::Any& rVal,
 
 SvxWritingModeItem& SvxWritingModeItem::operator=( const SvxWritingModeItem& 
rItem )
 {
-SetValue( rItem.GetValue() );
+SetValue( (sal_uInt16)rItem.GetValue() );
 return *this;
 }
 
diff --git a/editeng/source/misc/hangulhanja.cxx 
b/editeng/source/misc/hangulhanja.cxx
index b2ee5df9b8f3..826f8ac9fa0c 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -599,7 +599,7 @@ namespace editeng
 
 // determine if it's Hangul
 CharClass aCharClassificaton( m_xContext, LanguageTag( 
m_aSourceLocale) );
-sal_Int16 nScript = aCharClassificaton.getScript( 
m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNex

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

2017-03-31 Thread Noel Grandin
 cui/source/inc/swpossizetabpage.hxx   |5 +-
 cui/source/tabpages/swpossizetabpage.cxx  |   19 --
 cui/source/tabpages/tpline.cxx|2 -
 include/svx/fillctrl.hxx  |2 -
 include/svx/swframeexample.hxx|   12 --
 include/svx/swframevalidation.hxx |6 ++-
 svx/source/accessibility/DescriptionGenerator.cxx |4 +-
 svx/source/dialog/rubydialog.cxx  |7 ++-
 svx/source/dialog/swframeexample.cxx  |2 -
 svx/source/form/formcontroller.cxx|2 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |2 -
 svx/source/styles/CommonStylePreviewRenderer.cxx  |2 -
 svx/source/table/svdotable.cxx|2 -
 svx/source/tbxctrls/fillctrl.cxx  |8 ++--
 svx/source/tbxctrls/itemwin.cxx   |2 -
 svx/source/tbxctrls/tbcontrl.cxx  |3 +
 svx/source/toolbars/extrusionbar.cxx  |2 -
 svx/source/unodraw/unoshap2.cxx   |   40 ++
 svx/source/xoutdev/xattr.cxx  |   14 ---
 svx/source/xoutdev/xattr2.cxx |   12 +++---
 sw/source/ui/frmdlg/frmpage.cxx   |   10 ++---
 sw/source/ui/frmdlg/wrap.cxx  |4 +-
 22 files changed, 77 insertions(+), 85 deletions(-)

New commits:
commit dcffc21805828ddff7de1282f3d40ffdf3fac38d
Author: Noel Grandin 
Date:   Thu Mar 30 15:47:26 2017 +0200

use actual UNO enums in svx

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

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index 4442250f19cf..c11050f778d5 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // SvxSwPosSizeTabPage - position and size page for Writer drawing objects
 struct FrmMap;
@@ -109,13 +110,13 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 DECL_LINK( ModifyHdl, Edit&, void );
 DECL_LINK(ProtectHdl, Button*, void);
 
-voidInitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel,
+voidInitPos(css::text::TextContentAnchorType nAnchorType, 
sal_uInt16 nH, sal_uInt16 nHRel,
 sal_uInt16 nV,  sal_uInt16 nVRel,
 long   nX,  long   nY);
 sal_uInt16  GetMapPos(FrmMap *pMap, ListBox &rAlignLB);
 static shortGetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox 
&rAlignLB, ListBox &rRelationLB);
 static shortGetRelation(FrmMap *pMap, ListBox &rRelationLB);
-short   GetAnchorType(bool* pbHasChanged = nullptr);
+css::text::TextContentAnchorType GetAnchorType(bool* pbHasChanged = 
nullptr);
 voidFillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, 
sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT);
 sal_uInt16  FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const 
sal_uInt16 _nRel, ListBox &rLB);
 
diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index 2a4deffed663..4e669fd6dcf3 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -772,11 +771,11 @@ const sal_uInt16* SvxSwPosSizeTabPage::GetRanges()
 bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
 {
 bool bAnchorChanged = false;
-short nAnchor = GetAnchorType(&bAnchorChanged);
+css::text::TextContentAnchorType nAnchor = GetAnchorType(&bAnchorChanged);
 bool bModified = false;
 if(bAnchorChanged)
 {
-rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
+rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, (sal_Int16)nAnchor));
 bModified = true;
 }
 if ( m_pPositionCB->IsValueChangedFromSaved() )
@@ -926,10 +925,10 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet)
 {
 const SfxPoolItem* pItem = GetItem( *rSet, SID_ATTR_TRANSFORM_ANCHOR );
 bool bInvalidateAnchor = false;
-short nAnchorType = TextContentAnchorType_AT_PARAGRAPH;
+TextContentAnchorType nAnchorType = TextContentAnchorType_AT_PARAGRAPH;
 if(pItem)
 {
-nAnchorType = static_cast(pItem)->GetValue();
+nAnchorType = (TextContentAnchorType) static_cast(pItem)->GetValue();
 switch(nAnchorType)
 {
 case  TextContentAnchorType_AT_PAGE:m_pToPageRB->Check();  
break;
@@ -1102,9 +1101,9 @@ void SvxSwPosSizeTabPage::EnableAnchorTypes(SvxAnchorIds 
nAnchorEnable)
 m_pToPageRB->Enable(false);
 }
 
-short SvxSwPosSizeTabPage::GetAnchorType(bool* pbHasChanged)
+Text

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

2017-03-31 Thread Noel Grandin
 include/sfx2/event.hxx  |8 
 sfx2/source/doc/printhelper.cxx |6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 7fca8e61ce992e9dc6f900b77142a123c0c10b6d
Author: Noel Grandin 
Date:   Thu Mar 30 15:32:16 2017 +0200

use actual UNO enums in sfx2

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

diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index f0fc85500c72..ec57c9d5bf55 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -116,11 +116,11 @@ class Printer;
 
 class SfxPrintingHint : public SfxViewEventHint
 {
-sal_Int32 mnPrintableState;
+css::view::PrintableState mnPrintableState;
 css::uno::Sequence < css::beans::PropertyValue > aOpts;
 public:
 SfxPrintingHint(
-sal_Int32 nState,
+css::view::PrintableState nState,
 const css::uno::Sequence < css::beans::PropertyValue >& rOpts,
 SfxObjectShell *pObj,
 const css::uno::Reference< css::frame::XController2 >& 
xController )
@@ -133,12 +133,12 @@ public:
 , aOpts( rOpts )
 {}
 
-SfxPrintingHint( sal_Int32 nState )
+SfxPrintingHint( css::view::PrintableState nState )
 : SfxViewEventHint( SfxEventHintId::PrintDoc, rtl::OUString(), 
nullptr, css::uno::Reference< css::frame::XController >() )
 , mnPrintableState( nState )
 {}
 
-sal_Int32 GetWhich() const { return mnPrintableState; }
+css::view::PrintableState GetWhich() const { return mnPrintableState; }
 const css::uno::Sequence < css::beans::PropertyValue >& GetOptions() const 
{ return aOpts; }
 };
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index f217aa73d642..f0d2bac19464 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -55,7 +55,7 @@
 #include 
 #include 
 
-#define SFX_PRINTABLESTATE_CANCELJOB-2
+#define SFX_PRINTABLESTATE_CANCELJOB(css::view::PrintableState)-2
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -240,7 +240,7 @@ namespace
 case view::PaperFormat_USER:
 eRet = PAPER_USER;
 break;
-case view::PaperFormat_MAKE_FIXED_SIZE:
+case view::PaperFormat::PaperFormat_MAKE_FIXED_SIZE:
 break;
 //deliberate no default to force warn on a new papersize
 }
@@ -812,7 +812,7 @@ void IMPL_PrintListener_DataContainer::Notify( 
SfxBroadcaster& rBC, const SfxHin
 
 view::PrintJobEvent aEvent;
 aEvent.Source = m_xPrintJob;
-aEvent.State = (css::view::PrintableState) pPrintHint->GetWhich();
+aEvent.State = pPrintHint->GetWhich();
 
 ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
 while (pIterator.hasMoreElements())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Noel Grandin
 include/xmloff/xmlement.hxx  |2 +-
 include/xmloff/xmluconv.hxx  |2 +-
 xmloff/source/forms/elementexport.cxx|2 +-
 xmloff/source/forms/formattributes.hxx   |4 ++--
 xmloff/source/forms/formenums.cxx|2 +-
 xmloff/source/forms/formenums.hxx|2 +-
 xmloff/source/forms/gridcolumnproptranslator.cxx |8 
 xmloff/source/style/adjushdl.cxx |2 +-
 8 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 9a165a86795c65c42a94bf6f7f48545c797f2db3
Author: Noel Grandin 
Date:   Thu Mar 30 16:02:15 2017 +0200

use actual UNO enums in xmloff

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

diff --git a/include/xmloff/xmlement.hxx b/include/xmloff/xmlement.hxx
index 5879324701bf..5a149f6335ad 100644
--- a/include/xmloff/xmlement.hxx
+++ b/include/xmloff/xmlement.hxx
@@ -37,7 +37,7 @@ private:
 sal_uInt16  nValue;
 public:
 SvXMLEnumMapEntry(::xmloff::token::XMLTokenEnum eToken_, EnumT nValue_)
-: eToken(eToken_), nValue(nValue_) {}
+: eToken(eToken_), nValue(static_cast(nValue_)) {}
 ::xmloff::token::XMLTokenEnum   GetToken() const { return eToken; }
 };
 
diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx
index e71880be867e..8eb234289011 100644
--- a/include/xmloff/xmluconv.hxx
+++ b/include/xmloff/xmluconv.hxx
@@ -161,7 +161,7 @@ public:
  enum ::xmloff::token::XMLTokenEnum eDefault =
  ::xmloff::token::XML_TOKEN_INVALID )
 {
-return convertEnumImpl(rBuffer, nValue,
+return convertEnumImpl(rBuffer, static_cast(nValue),
reinterpret_cast*>(pMap), eDefault);
 }
 
diff --git a/xmloff/source/forms/elementexport.cxx 
b/xmloff/source/forms/elementexport.cxx
index a2a1b10fc580..0048db73e6c1 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -663,7 +663,7 @@ namespace xmloff
 OAttributeMetaData::getCommonControlAttributeName( 
CCAFlags::Orientation ),
 PROPERTY_ORIENTATION,
 aOrientationMap,
-(sal_uInt16)ScrollBarOrientation::HORIZONTAL
+ScrollBarOrientation::HORIZONTAL
 );
 #if OSL_DEBUG_LEVEL > 0
 //  reset the bit for later checking
diff --git a/xmloff/source/forms/formattributes.hxx 
b/xmloff/source/forms/formattributes.hxx
index a5dd78959604..04575930942b 100644
--- a/xmloff/source/forms/formattributes.hxx
+++ b/xmloff/source/forms/formattributes.hxx
@@ -378,10 +378,10 @@ namespace xmloff
 template
 voidaddEnumProperty(
 const sal_Char* _pAttributeName, const OUString& _rPropertyName,
-const sal_uInt16 _nAttributeDefault, const 
SvXMLEnumMapEntry* _pValueMap,
+const EnumT _nAttributeDefault, const SvXMLEnumMapEntry* 
_pValueMap,
 const css::uno::Type* _pType = nullptr)
 {
-addEnumPropertyImpl(_pAttributeName, _rPropertyName, 
_nAttributeDefault,
+addEnumPropertyImpl(_pAttributeName, _rPropertyName, 
static_cast(_nAttributeDefault),
 reinterpret_cast*>(_pValueMap), _pType);
 }
 
diff --git a/xmloff/source/forms/formenums.cxx 
b/xmloff/source/forms/formenums.cxx
index 30b13cdb82e9..b0da002e7e60 100644
--- a/xmloff/source/forms/formenums.cxx
+++ b/xmloff/source/forms/formenums.cxx
@@ -150,7 +150,7 @@ const SvXMLEnumMapEntry aListLinkageMap[] =
 { XML_SELECTION_INDEXES,1 },
 { XML_TOKEN_INVALID, 0 }
 };
-const SvXMLEnumMapEntry aOrientationMap[] =
+const SvXMLEnumMapEntry aOrientationMap[] =
 {
 { XML_HORIZONTAL,   ScrollBarOrientation::HORIZONTAL },
 { XML_VERTICAL, ScrollBarOrientation::VERTICAL },
diff --git a/xmloff/source/forms/formenums.hxx 
b/xmloff/source/forms/formenums.hxx
index 7ed7dcf8acac..cc63e961f270 100644
--- a/xmloff/source/forms/formenums.hxx
+++ b/xmloff/source/forms/formenums.hxx
@@ -45,7 +45,7 @@ extern const SvXMLEnumMapEntry aBorderTypeMap[];
 extern const SvXMLEnumMapEntry aFontEmphasisMap[];
 extern const SvXMLEnumMapEntry aFontReliefMap[];
 extern const SvXMLEnumMapEntry  aListLinkageMap[];
-extern const SvXMLEnumMapEntry aOrientationMap[];
+extern const SvXMLEnumMapEntry  aOrientationMap[];
 extern const SvXMLEnumMapEntry  aVisualEffectMap[];
 extern const SvXMLEnumMapEntry  aImagePositionMap[];
 extern const SvXMLEnumMapEntry aImageAlignMap[];
diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx 
b/xmloff/source/forms/gridcolumnproptranslator.cxx
index b149d4f9665c..e1241a1e600b 100644
--- a/xmloff/source/forms/gridcolumnproptranslator.cxx
+++ b/xmloff/source/forms/gridcolumnproptransla

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

2017-03-31 Thread Noel Grandin
 chart2/qa/extras/chart2export.cxx|   15 
+++
 chart2/qa/extras/chart2import.cxx|   20 
++
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx  |2 -
 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx |2 -
 chart2/source/controller/dialogs/res_LegendPosition.cxx  |6 +--
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx|6 +--
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx   |2 -
 chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx  |2 -
 chart2/source/model/main/DataPointProperties.cxx |2 -
 chart2/source/tools/RelativePositionHelper.cxx   |8 
++--
 chart2/source/view/main/ChartItemPool.cxx|2 -
 chart2/source/view/main/OpenGLRender.cxx |   12 
+++---
 chart2/source/view/main/OpenGLRender.hxx |3 +
 chart2/source/view/main/VLegend.cxx  |2 -
 14 files changed, 60 insertions(+), 24 deletions(-)

New commits:
commit 8cd5002959c27e2e271d3897886a2ef504e41ff6
Author: Noel Grandin 
Date:   Thu Mar 30 16:27:50 2017 +0200

use actual UNO enums in chart2

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

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index 5975c7a3cfa2..eae08be7cf96 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -177,6 +177,21 @@ protected:
 
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, LineStyle n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+
+} } } }
+
 namespace {
 
 struct CheckForChartName
diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 871b41bc5376..ec82f813de56 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -154,6 +154,26 @@ private:
 
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace chart2 {
+
+std::ostream& operator<<(std::ostream& rStrm, CurveStyle n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+
+} } } }
+
 // error bar import
 // split method up into smaller chunks for more detailed tests
 void Chart2ImportTest::Fdo60083()
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 96f4f01360fa..b62f1705acd4 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1183,7 +1183,7 @@ void WrappedDataRowSourceProperty::setPropertyValue( 
const Any& rOuterValue, con
 css::chart::ChartDataRowSource eChartDataRowSource = 
css::chart::ChartDataRowSource_ROWS;
 if( ! (rOuterValue >>= eChartDataRowSource) )
 {
-sal_Int32 nNew = css::chart::ChartDataRowSource_ROWS;
+sal_Int32 nNew = (sal_Int32)css::chart::ChartDataRowSource_ROWS;
 if( !(rOuterValue >>= nNew) )
 throw lang::IllegalArgumentException( "Property DataRowSource 
requires css::chart::ChartDataRowSource value", nullptr, 0 );
 else
diff --git 
a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx 
b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index f7ef66fbd572..1336709da311 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -279,7 +279,7 @@ Any WrappedSplineTypeProperty::convertOuterToInnerValue( 
const Any& rOuterValue
 aInnerValue = chart2::CurveStyle_STEP_CENTER_Y;
 break;
 default:
-SAL_WARN_IF(chart2::CurveStyle_LINES != 0, "chart2", "Unknown line 
style");
+SAL_WARN_IF(nOuterValue != 0, "chart2", "Unknown line style");
 aInnerValue = chart2::CurveStyle_LINES;
 }
 
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx 
b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 23b89af61ef9..0589039c5eb3 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -182,7 +182,7 @@ void LegendPositionResources::initFromItemSet( const 
SfxItemSet& rInAttrs )
 const SfxPoolItem* pPoolItem = nullptr;
 if( rInAttrs.GetItemState( SCHATTR_LEG

[Libreoffice-commits] core.git: bin/list-dispatch-commands.php bin/list-dispatch-commands.py

2017-03-31 Thread Arkadiy Illarionov
 bin/list-dispatch-commands.php |  146 -
 bin/list-dispatch-commands.py  |  130 
 2 files changed, 130 insertions(+), 146 deletions(-)

New commits:
commit b57af3320fe7230dbcf5a0f6577e05bb5ec046cc
Author: Arkadiy Illarionov 
Date:   Thu Mar 30 11:04:38 2017 +0300

tdf#106737 Rewrite bin/list-dispatch-commands.php in Python

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

diff --git a/bin/list-dispatch-commands.php b/bin/list-dispatch-commands.php
deleted file mode 100755
index b3e5262b0adc..
--- a/bin/list-dispatch-commands.php
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/env php
-http://mozilla.org/MPL/2.0/.
- */
-
-/// Script to generate 
https://wiki.documentfoundation.org/Development/DispatchCommands
-
-function getFilesList($directory, $extension) {
-$arrayItems = array();
-$skipByExclude = false;
-$handle = opendir($directory);
-if ($handle) {
-while (false !== ($file = readdir($handle))) {
-if ($file !== "." && $file !== "..") {
-if (is_dir($directory. DIRECTORY_SEPARATOR . $file)) {
-$arrayItems = array_merge($arrayItems, 
getFilesList($directory. DIRECTORY_SEPARATOR . $file, $extension));
-} else {
-$file = $directory . DIRECTORY_SEPARATOR . $file;
-if (substr($file, -4) === $extension)
-$arrayItems[] = $file;
-}
-}
-}
-}
-closedir($handle);
-return $arrayItems;
-}
-
-function addMode(&$mode, $haystack, $needle, $letter) {
-$mode .= (strpos($haystack, $needle) === FALSE) ? " " : $letter;
-}
-
-function analyseFile($fileName) {
-global $allSlots;
-
-$lines = file($fileName);
-$index = 0;
-$count = count($lines);
-while ($index<$count) {
-$aLine = $lines[$index];
-if(substr($aLine, 0, 12) === "// Slot Nr. ") {
-$tmp = explode(':', $aLine);
-$slotId = trim($tmp[1]);
-$index++;
-$aLine = $lines[$index];
-$tmp = explode(',', $aLine);
-$slotRID = $tmp[1];
-
-$index += 3;
-$aLine = $lines[$index];
-$mode = "";
-addMode($mode, $aLine, "CACHABLE",  "C");
-addMode($mode, $aLine, "AUTOUPDATE","U");
-addMode($mode, $aLine, "MENUCONFIG","M");
-addMode($mode, $aLine, "TOOLBOXCONFIG", "T");
-addMode($mode, $aLine, "ACCELCONFIG",   "A");
-$index += 3;
-$aLine = $lines[$index];
-if (strpos($aLine, '"') === FALSE) {
-$index++;
-$aLine = $lines[$index];
-}
-$tmp = explode('"', $aLine);
-$slotName = ".uno:" . $tmp[1];
-if (array_key_exists($slotName, $allSlots))
-$slotDescription = $allSlots[$slotName];
-else
-$slotDescription = "No description";
-if (!array_key_exists($slotName, $allSlots)) {
-$allSlots[$slotName] = new StdClass;
-$allSlots[$slotName]->slotId = $slotId;
-$allSlots[$slotName]->slotRID = $slotRID;
-$allSlots[$slotName]->mode = $mode;
-$allSlots[$slotName]->slotDescription = "";
-}
-}
-$index++;
-}
-}
-
-function analyseXCU($fileName)
-{
-global $allSlots;
-
-$lines = file($fileName);
-$index = 0;
-$count = count($lines);
-
-while ($index < $count)
-{
-$aLine = $lines[$index];
-if (strpos($aLine, '') === FALSE ) {
-$index++;
-$aLine = $lines[$index];
-}
-$aLine = str_replace('', '', $aLine);
-$aLine = trim(str_replace('', '', $aLine));
-if (array_key_exists($slotName, $allSlots))
-$allSlots[$slotName]->slotDescription = str_replace('~', '', 
$aLine);
-}
-$index++;
-}
-}
-
-
-if (count($argv) != 2) {
-print "Syntax error: ids.php module\n\n";
-print "  Module is one of:\n";
-print " basslots\n";
-print " scslots\n";
-print " sdgslots\n";
-print " sdslots\n";
-print " sfxslots\n";
-print " smslots\n";
-print " svxslots\n";
-print " swslots\n";
-exit(1);
-}
-
-$allSlots = array();
-
-foreach (getFilesList("./workdir/SdiTarget", ".hxx") as $sdiFile)
-if (basename($sdiFile, ".hxx") === $argv[1])
-analyseFile($sdiFile);
-
-foreach (getFilesList("officecfg/registry/data/org/openoffice/Office/UI", 
".xcu") as $xcuFile)
-analyseXCU($xcuFile);
-
-ksort($allSlots);
-foreach ($allSlots as $name => $props) {
-printf("|-\n| %s\n| %s\n| %d\n| %s\n| %s\n",
-$

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

2017-03-31 Thread Miklos Vajna
 vcl/unx/kde4/KDESalGraphics.cxx |   18 +-
 vcl/unx/kde4/KDESalGraphics.hxx |8 
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 02ee5378ef95c54d83202468f939faf6d286ea42
Author: Miklos Vajna 
Date:   Fri Mar 31 09:17:08 2017 +0200

vcl kde4: adapt to tools::Rectangle

Change-Id: I047a69bd084f44c7bc7a132eddf2ee09e811d783

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index dff19790f96c..f58240ea3aec 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -63,11 +63,11 @@ QStyle::State vclStateValue2StateFlag( ControlState 
nControlState,
 }
 
 /**
- Convert VCL Rectangle to QRect.
- @param rControlRegion The Rectangle to convert.
+ Convert tools::Rectangle to QRect.
+ @param rControlRegion The tools::Rectangle to convert.
  @return The matching QRect
 */
-QRect region2QRect( const Rectangle& rControlRegion )
+QRect region2QRect( const tools::Rectangle& rControlRegion )
 {
 return QRect(rControlRegion.Left(), rControlRegion.Top(), 
rControlRegion.GetWidth(), rControlRegion.GetHeight());
 }
@@ -200,7 +200,7 @@ static QRegion XRegionToQRegion( Region xr )
 #endif
 
 bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-const Rectangle& rControlRegion, 
ControlState nControlState,
+const tools::Rectangle& 
rControlRegion, ControlState nControlState,
 const ImplControlValue& value,
 const OUString& )
 {
@@ -662,10 +662,10 @@ bool KDESalGraphics::drawNativeControl( ControlType type, 
ControlPart part,
 }
 
 bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart 
part,
- const Rectangle& controlRegion, 
ControlState controlState,
+ const tools::Rectangle& 
controlRegion, ControlState controlState,
  const ImplControlValue& val,
  const OUString&,
- Rectangle &nativeBoundingRegion, 
Rectangle &nativeContentRegion )
+ tools::Rectangle 
&nativeBoundingRegion, tools::Rectangle &nativeContentRegion )
 {
 bool retVal = false;
 
@@ -958,12 +958,12 @@ bool KDESalGraphics::getNativeControlRegion( ControlType 
type, ControlPart part,
 // Bounding region
 Point aBPoint( boundingRect.x(), boundingRect.y() );
 Size aBSize( boundingRect.width(), boundingRect.height() );
-nativeBoundingRegion = Rectangle( aBPoint, aBSize );
+nativeBoundingRegion = tools::Rectangle( aBPoint, aBSize );
 
 // vcl::Region of the content
 Point aPoint( contentRect.x(), contentRect.y() );
 Size  aSize( contentRect.width(), contentRect.height() );
-nativeContentRegion = Rectangle( aPoint, aSize );
+nativeContentRegion = tools::Rectangle( aPoint, aSize );
 }
 
 return retVal;
@@ -975,7 +975,7 @@ bool KDESalGraphics::getNativeControlRegion( ControlType 
type, ControlPart part,
 nType/nPart combination.
 */
 bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart 
nPart,
-   const Rectangle& rControlRegion, 
const Point& rPos,
+   const tools::Rectangle& 
rControlRegion, const Point& rPos,
bool& rIsInside )
 {
 if ( nType == ControlType::Scrollbar )
diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
index 501fbe3ba679..eb513388f369 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -36,14 +36,14 @@ public:
 virtual bool IsNativeControlSupported( ControlType, ControlPart ) override;
 
 virtual bool hitTestNativeControl( ControlType, ControlPart,
-   const Rectangle&, const Point&, bool& ) 
override;
+   const tools::Rectangle&, const Point&, 
bool& ) override;
 
-virtual bool drawNativeControl( ControlType, ControlPart, const Rectangle&,
+virtual bool drawNativeControl( ControlType, ControlPart, const 
tools::Rectangle&,
 ControlState, const ImplControlValue&, 
const OUString& ) override;
 
-virtual bool getNativeControlRegion( ControlType, ControlPart, const 
Rectangle&,
+virtual bool getNativeControlRegion( ControlType, ControlPart, const 
tools::Rectangle&,
  ControlState, const ImplControlValue&,
- const OUString&, Rectangle&, 
Rectangle& ) override;
+ const OUString&, tools::Rectangle&, 
tools::Rectangle& ) override;
 

Re: Seamonkey, LibrOffice and WIndows

2017-03-31 Thread Miklos Vajna
Hi,

On Thu, Mar 30, 2017 at 12:30:16PM -0500, Robert Steinmetz AIA 
 wrote:
> Is it possible to set SeaMonkey as the email program for LibreOffice and
> have it recognized as a functioning email client?

I guess we would welcome such a patch to detect it, sure.

> Other programs like Adobe Reader do recognize SeaMonkey as the default email
> program

The menu item is handled internally as e.g. SID_MAIL_SENDDOCASOOO in
SfxViewShell::ExecMisc_Impl(), sfx2/source/view/viewsh.cxx.

There is also shell/source/unix/misc/senddoc.sh and
shell/source/win32/simplemail/senddoc.cxx, those are probably related.

Assuming you're interested in implementing this yourself, since you
wrote here on the dev list. :-)

If not and you accidentally you used the wrong list, then please just go
to

and file a bug.

Regards,

Miklos


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


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

2017-03-31 Thread heiko tietze
 vcl/source/app/settings.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2039e2f25933bb93803c741ea79094227d40dc25
Author: heiko tietze 
Date:   Thu Mar 30 13:25:04 2017 +0200

tdf#106458 Color widget should list an exact number of items

mnColorValueSetMaximumRowCount set to 10
after decision from design team

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

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 703f835c9b1d..9422bab3b1a2 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -550,7 +550,7 @@ ImplStyleData::ImplStyleData() :
 maEdgeBlendingBottomRightColor = RGB_COLORDATA(0x40, 0x40, 0x40);
 mnListBoxMaximumLineCount = 25;
 mnColorValueSetColumnCount = 12;
-mnColorValueSetMaximumRowCount = 9;
+mnColorValueSetMaximumRowCount = 10;
 maListBoxPreviewDefaultLogicSize = Size(15, 7);
 maListBoxPreviewDefaultPixelSize = Size(0, 0); // on-demand calculated in 
GetListBoxPreviewDefaultPixelSize()
 mnListBoxPreviewDefaultLineWidth = 1;
___
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-2-1' - wsd/LOOLWSD.cpp

2017-03-31 Thread Andras Timar
 wsd/LOOLWSD.cpp |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8078e5b579bd8970bb3fbbb710a0a17ce9226cea
Author: Andras Timar 
Date:   Fri Mar 31 07:51:30 2017 +0200

add missing default config values

Change-Id: Ic7829c8f97f43bf8f4f2ba4eccdbdf1da89665e4
(cherry picked from commit ec5fb2a794738b84a4dae7790726be07ab56bfda)
Signed-off-by: Andras Timar 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 9a5920d2..f3a644c1 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -675,7 +675,9 @@ void LOOLWSD::initialize(Application& self)
 { "logging.file.property[2]", "true" },
 { "logging.file.property[3][@name]", "flush" },
 { "logging.file.property[3]", "false" },
-{ "trace[@enable]", "false" } };
+{ "trace[@enable]", "false" },
+{ "trace.path[@compress]", "true" },
+{ "trace.path[@snapshot]", "false" } };
 
 // Set default values, in case they are missing from the config file.
 AutoPtr defConfig(new AppConfigMap(DefAppConfig));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC 2017 Statement of Interest

2017-03-31 Thread Muhammet Kara

Hello LibreOffice devs and fellow GSoC applicants,

I am currently a Computer Engineering (undergraduate) student at Middle 
East Technical University, Ankara, Turkey. And I am interested in 
applying for GSoC with the idea "Revamp the Customization dialog", which 
-if accepted- will be mentored by Katarina Behrens (bubli), and the UX 
team.


I started contributing to LibreOffice just at the end of the last year's 
GSoC application period, thus I couldn't apply for GSoC 2016. Since 
then, I have been trying to develop, translate, and market LibreOffice. 
It has been a very good experience for me so far.


I mostly worked on the UI stuff, and you may also find a few of them on 
the release notes of 5.3: 
https://wiki.documentfoundation.org/ReleaseNotes/5.3


You may find all of my merged patches on gerrit: https://bit.ly/2ktej2r

Contact details:

 * Email: muhammet.k...@pardus.org.tr
 * IRC: mkara (Freenode)

Cheers,
Muhammet
--
*Muhammet Kara*
Pardus Grubu (Yazılım)
TÜBİTAK ULAKBİM
Mustafa Kemal Mahallesi Dumlupınar Bulvarı
(Eskişehir Yolu 7. Km) 2151. Cadde No:154
06510 Çankaya/ANKARA
www.pardus.org.tr 
muhammet.k...@pardus.org.tr
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-03-31 Thread Noel Grandin
 writerfilter/source/dmapper/ConversionHelper.cxx |5 ++---
 writerfilter/source/dmapper/ConversionHelper.hxx |4 +++-
 writerfilter/source/dmapper/DomainMapper.cxx |   12 ++--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |2 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   14 --
 writerfilter/source/dmapper/FormControlHelper.cxx|2 +-
 writerfilter/source/dmapper/GraphicHelpers.cxx   |5 ++---
 writerfilter/source/dmapper/GraphicHelpers.hxx   |3 ++-
 writerfilter/source/dmapper/GraphicImport.cxx|8 
 writerfilter/source/dmapper/OLEHandler.cxx   |4 ++--
 writerfilter/source/dmapper/OLEHandler.hxx   |4 ++--
 writerfilter/source/dmapper/PropertyMap.cxx  |4 ++--
 writerfilter/source/dmapper/PropertyMap.hxx  |7 ---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx   |2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.hxx   |3 ++-
 writerfilter/source/rtftok/rtfsdrimport.cxx  |2 +-
 16 files changed, 43 insertions(+), 38 deletions(-)

New commits:
commit 64b6e19323cdd80ac5469ff43cac263df7e18329
Author: Noel Grandin 
Date:   Thu Mar 30 16:28:56 2017 +0200

use actual UNO enums in writerfilter

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

diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx 
b/writerfilter/source/dmapper/ConversionHelper.cxx
index 805bac53d2e0..7560a8ff9ef5 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -424,9 +423,9 @@ sal_uInt32 convertTwipToMM100Unsigned(sal_Int32 _t)
 return convertTwipToMM100( _t );
 }
 
-sal_Int16 convertRubyAlign( sal_Int32 nIntValue )
+text::RubyAdjust convertRubyAlign( sal_Int32 nIntValue )
 {
-sal_Int16 rubyAdjust = text::RubyAdjust_LEFT;
+text::RubyAdjust rubyAdjust = text::RubyAdjust_LEFT;
 switch( nIntValue )
 {
 case NS_ooxml::LN_Value_ST_RubyAlign_center:
diff --git a/writerfilter/source/dmapper/ConversionHelper.hxx 
b/writerfilter/source/dmapper/ConversionHelper.hxx
index faf5c27d234a..25ca7f8b8ce9 100644
--- a/writerfilter/source/dmapper/ConversionHelper.hxx
+++ b/writerfilter/source/dmapper/ConversionHelper.hxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 #include 
+#include 
+
 namespace com{ namespace sun{ namespace star{
 namespace lang{
 struct Locale;
@@ -47,7 +49,7 @@ namespace ConversionHelper{
 SAL_DLLPUBLIC_EXPORT sal_Int32 convertTwipToMM100(sal_Int32 _t);
 SAL_DLLPUBLIC_EXPORT sal_uInt32 convertTwipToMM100Unsigned(sal_Int32 _t);
 sal_Int16 convertTableJustification( sal_Int32 nIntValue );
-sal_Int16 convertRubyAlign( sal_Int32 nIntValue );
+css::text::RubyAdjust convertRubyAlign( sal_Int32 nIntValue );
 sal_Int16 ConvertNumberingType(sal_Int32 nFmt);
 
 css::util::DateTime ConvertDateStringToDateTime(const OUString& rDateTime);
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 2c44cbbc141f..4e3ff7676b5e 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1773,7 +1773,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 /* 0 HoriLR 1 Vert TR 2 Vert TR 3 Vert TT 4 HoriLT
 only 0 and 1 can be imported correctly
   */
-sal_Int16 nDirection = text::WritingMode_LR_TB;
+text::WritingMode nDirection = text::WritingMode_LR_TB;
 switch( nIntValue )
 {
 case NS_ooxml::LN_Value_ST_TextDirection_lrTb:
@@ -2726,7 +2726,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 {
 rContext->Insert(PROP_RUBY_TEXT, uno::makeAny(aInfo.sRubyText));
 rContext->Insert(PROP_RUBY_STYLE, uno::makeAny(aInfo.sRubyStyle));
-rContext->Insert(PROP_RUBY_ADJUST, 
uno::makeAny(ConversionHelper::convertRubyAlign(aInfo.nRubyAlign)));
+rContext->Insert(PROP_RUBY_ADJUST, 
uno::makeAny(ConversionHelper::convertRubyAlign(aInfo.nRubyAlign)));
 m_pImpl->SetRubySprmId(0);
 }
 }
@@ -3498,8 +3498,8 @@ void DomainMapper::handleUnderlineType(const Id nId, 
const ::std::shared_ptr& rContext, const bool bExchangeLeftRight)
 {
-sal_Int16 nAdjust = 0;
-sal_Int16 nLastLineAdjust = 0;
+style::ParagraphAdjust nAdjust = style::ParagraphAdjust_LEFT;
+style::ParagraphAdjust nLastLineAdjust = style::ParagraphAdjust_LEFT;
 OUString aStringValue = "left";
 switch(nIntValue)
 {
@@ -3509,7 +3509,7 @@ void DomainMapper::handleParaJustification(con

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

2017-03-31 Thread Miklos Vajna
 vcl/unx/kde/salnativewidgets-kde.cxx |   86 +--
 1 file changed, 43 insertions(+), 43 deletions(-)

New commits:
commit 2e3a62a1950e068d0136dd508916cd7e8b2963f9
Author: Miklos Vajna 
Date:   Fri Mar 31 10:13:59 2017 +0200

vcl kde: adapt to tools::Rectangle

Blind fix, I have no idea how to install TDE today.

Change-Id: I9b6143ba09353d4f3cc09eb38327d73582506087

diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx 
b/vcl/unx/kde/salnativewidgets-kde.cxx
index c4e9d1030919..d829edaf70b3 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -364,19 +364,19 @@ class WidgetPainter
 
 @return valid push button.
 */
-QPushButton  *pushButton( const Rectangle& rControlRegion, bool bDefault );
+QPushButton  *pushButton( const tools::Rectangle& rControlRegion, bool 
bDefault );
 
 /** 'Get' method for radio button.
 
 @see pushButton()
 */
-QRadioButton *radioButton( const Rectangle& rControlRegion );
+QRadioButton *radioButton( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for check box.
 
 @see pushButton()
 */
-QCheckBox*checkBox( const Rectangle& rControlRegion );
+QCheckBox*checkBox( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for combo box.
 
@@ -385,79 +385,79 @@ class WidgetPainter
 
 @see pushButton(), m_pEditableComboBox
 */
-QComboBox*comboBox( const Rectangle& rControlRegion, bool bEditable );
+QComboBox*comboBox( const tools::Rectangle& rControlRegion, bool 
bEditable );
 
 /** 'Get' method for line edit box.
 
 @see pushButton()
 */
-QLineEdit*lineEdit( const Rectangle& rControlRegion );
+QLineEdit*lineEdit( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for spin box.
 
 @see pushButton()
 */
-QSpinWidget  *spinWidget( const Rectangle& rControlRegion );
+QSpinWidget  *spinWidget( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for tab bar.
 
 @see pushButton()
 */
-QTabBar  *tabBar( const Rectangle& rControlRegion );
+QTabBar  *tabBar( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for tab widget.
 
 @see pushButton()
 */
-QTabWidget   *tabWidget( const Rectangle& rControlRegion );
+QTabWidget   *tabWidget( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for list view.
 
 @see pushButton()
 */
-QListView*listView( const Rectangle& rControlRegion );
+QListView*listView( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for scroll bar.
 
 @see pushButton()
 */
-QScrollBar   *scrollBar( const Rectangle& rControlRegion,
+QScrollBar   *scrollBar( const tools::Rectangle& rControlRegion,
 bool bHorizontal, const ImplControlValue& aValue );
 
 /** 'Get' method for tool bar.
 
   @see pushButton()
 */
-QToolBar *toolBar( const Rectangle& rControlRegion, bool bHorizontal );
+QToolBar *toolBar( const tools::Rectangle& rControlRegion, bool 
bHorizontal );
 
 /** 'Get' method for tool button.
 
   @see pushButton()
 */
-QToolButton  *toolButton( const Rectangle& rControlRegion );
+QToolButton  *toolButton( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for menu bar.
 
   @see pushButton()
 */
-QMenuBar *menuBar( const Rectangle& rControlRegion );
+QMenuBar *menuBar( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for popup menu.
 
   @see pushButton()
 */
-QPopupMenu   *popupMenu( const Rectangle& rControlRegion );
+QPopupMenu   *popupMenu( const tools::Rectangle& rControlRegion );
 
 /** 'Get' method for progress bar
 
   @see pushButton()
 */
-QProgressBar *progressBar( const Rectangle& rControlRegion );
+QProgressBar *progressBar( const tools::Rectangle& rControlRegion );
 
 // TODO other widgets
 
 public:
-/** Convert VCL Rectangle to QRect.
+/** Convert tools::Rectangle to QRect.
 
 @param rControlRegion
 The region to convert.
@@ -465,7 +465,7 @@ class WidgetPainter
 @return
 The bounding box of the region.
 */
-static QRect region2QRect( const Rectangle& rControlRegion );
+static QRect region2QRect( const tools::Rectangle& rControlRegion );
 };
 
 WidgetPainter::WidgetPainter()
@@ -885,7 +885,7 @@ bool WidgetPainter::drawStyledWidget( QWidget *pWidget,
 return true;
 }
 
-QPushButton *WidgetPainter::pushButton( const Rectangle& rControlRegion,
+QPushButton *WidgetPainter::pushButton( const tools::Rectangle& rControlRegion,
 bool bDefault )
 {
 if ( !m_pPushButton )
@@ -922,7 +922,7 @@ QPushButton *WidgetPainter::pushButton( const Rectangle& 
rControlRegion,
 return m_pPushButton;
 }
 
-QRadioButton *WidgetPainter::rad

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

2017-03-31 Thread Stephan Bergmann
 comphelper/qa/unit/threadpooltest.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1fc76c4dfc196798eea24030a205d1e5f7922eb2
Author: Stephan Bergmann 
Date:   Thu Mar 30 16:28:15 2017 +0200

This only wants to check for Windows in general?

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

diff --git a/comphelper/qa/unit/threadpooltest.cxx 
b/comphelper/qa/unit/threadpooltest.cxx
index d71a1116897d..bb9aac0e1050 100644
--- a/comphelper/qa/unit/threadpooltest.cxx
+++ b/comphelper/qa/unit/threadpooltest.cxx
@@ -33,7 +33,7 @@ void ThreadPoolTest::testPreferredConcurrency() {
 sal_Int32 nExpected = 4; // UTs are capped to 4.
 CPPUNIT_ASSERT_MESSAGE("Expected no more than 4 threads", nExpected >= 
nThreads);
 
-#ifndef _WIN32_WINNT
+#ifndef _WIN32
 // The result should be cached, so this should change anything.
 nThreads = std::thread::hardware_concurrency() * 2;
 setenv("MAX_CONCURRENCY", std::to_string(nThreads).c_str(), true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Johnny_M
 sc/source/ui/docshell/docsh8.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a59352290a5d05c4236522b56124ac06cd591ad
Author: Johnny_M 
Date:   Thu Mar 30 19:45:39 2017 +

Fix German comment translation

This is a minor fix to the German comment translation made on the
commit 5ddef1648005756cfb811f9e6261851d4df712c2
(https://gerrit.libreoffice.org/35343). Specifically, it is a fix
according to the comment in
https://gerrit.libreoffice.org/#/c/35343/6/sc/source/ui/docshell/docsh8.cxx

Change-Id: I7462de4589856a58fda58d52583a0702ddec0a0d
Reviewed-on: https://gerrit.libreoffice.org/35928
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index e3f672d32edb..dd72ce19d7ef 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -958,7 +958,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& 
rFullFileName, rtl_TextEncodi
 case sdbc::DataType::DATE:
 {
 aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
-// no value differentiation between 0 with value 
and 0 no-value
+// differentiate between 0 with value and 0 
no-value
 bool bIsNull = (fVal == 0.0);
 if ( bIsNull )
 bIsNull = !aDocument.HasValueData( nDocCol, 
nDocRow, nTab );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/editeng include/filter include/formula include/svl include/svtools include/svx include/toolkit include/unotools include/vcl

2017-03-31 Thread Jens Carl
 include/editeng/brushitem.hxx   |2 
 include/filter/msfilter/msdffimp.hxx|2 
 include/filter/msfilter/msocximex.hxx   |4 -
 include/filter/msfilter/msoleexp.hxx|2 
 include/formula/formulahelper.hxx   |2 
 include/svl/filerec.hxx |2 
 include/svtools/parrtf.hxx  |2 
 include/svtools/ruler.hxx   |2 
 include/svtools/soerr.hxx   |4 -
 include/svtools/wizdlg.hxx  |   80 
 include/svx/cube3d.hxx  |2 
 include/svx/svdmrkv.hxx |2 
 include/svx/svdotext.hxx|2 
 include/svx/svxids.hrc  |   38 ++---
 include/svx/sxcaitm.hxx |   10 +--
 include/svx/sxcecitm.hxx|   12 ++--
 include/svx/sxmbritm.hxx|4 -
 include/svx/tbcontrl.hxx|2 
 include/toolkit/controls/unocontrolbase.hxx |4 -
 include/unotools/tempfile.hxx   |2 
 include/vcl/menu.hxx|4 -
 include/vcl/spinfld.hxx |2 
 include/vcl/vclenum.hxx |2 
 23 files changed, 88 insertions(+), 100 deletions(-)

New commits:
commit bb37c73bdc7544f67d1acb98af6248fb43140ca7
Author: Jens Carl 
Date:   Fri Mar 31 05:28:14 2017 +

tdf#39468 Translate German comments

Translate German comments in filter/

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

diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index daa379b690fa..350b4d6cd977 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -57,7 +57,7 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem
 mutable boolbLoadAgain;
 
 voidApplyGraphicTransparency_Impl();
-// wird nur von Create benutzt
+// only used by Create
 SvxBrushItem( SvStream& rStrm,
   sal_uInt16 nVersion, sal_uInt16 nWhich  );
 
diff --git a/include/filter/msfilter/msdffimp.hxx 
b/include/filter/msfilter/msdffimp.hxx
index 5016902e5994..b5362e61aef2 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -143,7 +143,7 @@ typedef ::std::multiset< std::shared_ptr,
 #define SP_FBACKGROUND  0x400   ///< Background shape
 
 // for the CreateSdrOLEFromStorage we need the information, how we handle
-// convert able OLE-Objects - this ist stored in
+// convert able OLE-Objects - this is stored in
 #define OLE_MATHTYPE_2_STARMATH 0x0001
 #define OLE_WINWORD_2_STARWRITER0x0002
 #define OLE_EXCEL_2_STARCALC0x0004
diff --git a/include/filter/msfilter/msocximex.hxx 
b/include/filter/msfilter/msocximex.hxx
index 262d6514bd2f..ae29caae8374 100644
--- a/include/filter/msfilter/msocximex.hxx
+++ b/include/filter/msfilter/msocximex.hxx
@@ -69,12 +69,12 @@ protected:
 
 css::uno::Reference< css::frame::XModel >   mxModel;
 
-// gecachte Interfaces
+// cached interfaces
 css::uno::Reference< css::drawing::XDrawPage >  xDrawPage;
 css::uno::Reference< css::drawing::XShapes >xShapes;
 css::uno::Reference< css::lang::XMultiServiceFactory >  xServiceFactory;
 
-// das einzige Formular
+// the only form
 css::uno::Reference< css::container::XIndexContainer >  xFormComps;
 
 virtual void GetDrawPage();
diff --git a/include/filter/msfilter/msoleexp.hxx 
b/include/filter/msfilter/msoleexp.hxx
index 6043bae832cd..dc7b17616516 100644
--- a/include/filter/msfilter/msoleexp.hxx
+++ b/include/filter/msfilter/msoleexp.hxx
@@ -34,7 +34,7 @@ namespace svt {
 class SotStorage;
 
 // for the CreateSdrOLEFromStorage we need the information, how we handle
-// convert able OLE-Objects - this ist stored in
+// convert able OLE-Objects - this is stored in
 #define OLE_STARMATH_2_MATHTYPE 0x0001
 #define OLE_STARWRITER_2_WINWORD0x0002
 #define OLE_STARCALC_2_EXCEL0x0004
diff --git a/include/formula/formulahelper.hxx 
b/include/formula/formulahelper.hxx
index 753ef8e8178e..8774bb332eb0 100644
--- a/include/formula/formulahelper.hxx
+++ b/include/formula/formulahelper.hxx
@@ -52,7 +52,7 @@ namespace formula
 
 boolGetNextFunc( const OUString& rFormula,
bool  bBack,
-   sal_Int32&rFStart, // Ein- 
und Ausgabe
+   sal_Int32&rFStart, // input 
and output
sal_Int32*pFEnd = nullptr,
  const IFunctionDescription** ppFDesc 
= nullptr,

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

2017-03-31 Thread Jens Carl
 rsc/inc/rscall.h |   28 ++--
 rsc/inc/rscclobj.hxx |9 -
 rsc/inc/rscdb.hxx|2 +-
 rsc/inc/rscerror.h   |4 ++--
 rsc/inc/rscmgr.hxx   |2 +-
 rsc/inc/rscpar.hxx   |   32 
 rsc/inc/rsctree.hxx  |2 +-
 rsc/source/parser/rsckey.cxx |5 ++---
 rsc/source/parser/rscyacc.y  |   28 ++--
 rsc/source/res/rscarray.cxx  |6 +++---
 rsc/source/rscpp/cpp.h   |2 +-
 rsc/source/rscpp/cpp1.c  |6 +++---
 rsc/source/rscpp/cpp3.c  |   35 +--
 13 files changed, 79 insertions(+), 82 deletions(-)

New commits:
commit e5bbb21b859e4191e323f25eee361a2d8cea6a08
Author: Jens Carl 
Date:   Fri Mar 31 06:37:28 2017 +

tdf#39468 Translate German comments

Translate German comments in rsc/

Change-Id: I8133f11566c0717fdfc796b79dca76f2365535ad
Reviewed-on: https://gerrit.libreoffice.org/35957
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/rsc/inc/rscall.h b/rsc/inc/rscall.h
index 3a043081658f..1591d1f114e3 100644
--- a/rsc/inc/rscall.h
+++ b/rsc/inc/rscall.h
@@ -27,7 +27,7 @@
 #include 
 
 /*** T y p e s ***/
-typedef char * CLASS_DATA;  // Zeiger auf die Daten einer Klasse
+typedef char * CLASS_DATA;  // Pointer to the data of a class
 
 /*** C l a s s e s   F o r w a r d s */
 class RscCompiler;
@@ -47,16 +47,16 @@ extern AtomContainer*   pHS;
 
 enum class CommandFlags {
 NONE = 0x,
-Help = 0x0001,  // Hilfe anzeigen
-NoPrePro = 0x0002,  // kein Preprozesor
-NoSyntax = 0x0004,  // keine Syntaxanalyse
-NoLink   = 0x0008,  // nicht linken
-NoResFile= 0x0010,  // keine .res-Datei erzeugen
-Define   = 0x0020,  // es wurde Definitionen angegeben
-Include  = 0x0040,  // der Include-Pfad wurde erweitert
-Preload  = 0x0200,  // Alle Resourcen Preloaden
-SrsDefault   = 0x1000,  // immer der Default geschrieben
-NoSysResTest = 0x2000   // ueberprueft nicht die Richtigkeit von (bmp, 
ico, cur)
+Help = 0x0001,  // show help
+NoPrePro = 0x0002,  // no preprocessor
+NoSyntax = 0x0004,  // no parsing
+NoLink   = 0x0008,  // no linking
+NoResFile= 0x0010,  // do not create .res file
+Define   = 0x0020,  // definitions stated
+Include  = 0x0040,  // include path extended
+Preload  = 0x0200,  // preload all resources
+SrsDefault   = 0x1000,  // always wrote the default
+NoSysResTest = 0x2000   // do not check the correctness of (bmp, ico, cur)
 };
 namespace o3tl {
 template<> struct typed_flags : is_typed_flags {};
@@ -88,9 +88,9 @@ struct RSCINST
 struct SUBINFO_STRUCT
 {
 SUBINFO_STRUCT(){ nPos = 0; pClass = nullptr; };
-RscIdaId;// Identifier der Resource
-sal_uInt32   nPos;   // Position der Resource
-RscTop * pClass; // Klasse des Eintrages
+RscIdaId;// resource identifier
+sal_uInt32   nPos;   // position of resource
+RscTop * pClass; // class of entry
 };
 
 /*** F u n c t i o n */
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx
index c8adca501b6d..61e350773d7d 100644
--- a/rsc/inc/rscclobj.hxx
+++ b/rsc/inc/rscclobj.hxx
@@ -26,9 +26,9 @@
 /*** O b j N o d e ***/
 class ObjNode : public IdNode
 {
-RscId   aRscId; // Id der Resource
-CLASS_DATA  pRscObj;// pointer to a resourceobject
-RscFileTab::Index lFileKey;// Dateischluessel
+RscId   aRscId; // resource ID
+CLASS_DATA  pRscObj;// pointer to a resourceobject
+RscFileTab::Index lFileKey;
 protected:
 using NameNode::Search;
 
@@ -67,7 +67,7 @@ protected:
 public:
 using NameNode::Insert;
 
-ObjNode*pObjBiTree; // Zeiger auf Objektbaum
+ObjNode*pObjBiTree; // pointer to object tree
 RefNode( Atom nTyp );
 sal_uInt32  GetId() const override;
 voidInsert( RefNode* pTN ) //< insert a new node in the b-tree
@@ -81,7 +81,6 @@ public:
 
 ObjNode *   GetObjNode() const
 {
-// hole  pObjBiTree
 return pObjBiTree;
 }
 };
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index b8d3be9d2958..0da0a6dbaac2 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -60,7 +60,7 @@ struct RscSysEntry
 class RscTypCont
 {
 rtl_TextEncodingnSourceCharSet;
-RSCBYTEORDER_TYPE   nByteOrder; // Intel oder
+RSCBYTEORDER_TYPE   nByteOrder; // Intel or
 OString aLanguage;  // output language
 std::vector< sal_uInt32 > aLangFallbacks;   // language fallback list 
(e

[Libreoffice-commits] online.git: Makefile.am test/Makefile.am

2017-03-31 Thread Pranav Kant
 Makefile.am  |   15 +++
 test/Makefile.am |2 +-
 2 files changed, 4 insertions(+), 13 deletions(-)

New commits:
commit 453a452ff9d1dcee7e26d0243ddd79dca32c0f13
Author: Pranav Kant 
Date:   Fri Mar 31 14:42:10 2017 +0530

Makefile: Simplify and link zlib properly

Without this, online doesn't link, atleast for me. The problem seems to
be because in presence of target specific _LDFLAGS, AM_LDFLAGS is
ignored and it is only the latter where we are specifying ZLIB_LIBS.

Further, since the LDFLAGS values are same for all targets, we can
simplify here and rather use AM_LDFLAGS and remove all target specific
LDFLAGS.

Change-Id: I2f1c30c7f34b32c638a4ac60fab709b32f1e6c9a
Reviewed-on: https://gerrit.libreoffice.org/35959
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/Makefile.am b/Makefile.am
index 0d9116b5..76f1dc8d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,20 +26,11 @@ AM_CPPFLAGS = -pthread 
-DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
  -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
  -DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \
  ${include_paths}
-AM_LDFLAGS = -pthread -Wl,-E $(ZLIB_LIBS)
-loolforkit_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
-loolforkit_nocaps_LDFLAGS = -pthread 
-Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
-loolmount_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
-loolnb_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
-loolwsd_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
-loolwsd_fuzzer_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib
+
+AM_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib $(ZLIB_LIBS)
 
 if ENABLE_SSL
-loolforkit_LDFLAGS += -lssl -lcrypto
-loolforkit_nocaps_LDFLAGS += -lssl -lcrypto
-loolnb_LDFLAGS += -lssl -lcrypto
-loolwsd_LDFLAGS += -lssl -lcrypto
-loolwsd_fuzzer_LDFLAGS += -lssl -lcrypto
+AM_LDFLAGS += -lssl -lcrypto
 endif
 
 loolwsd_fuzzer_CPPFLAGS = -DKIT_IN_PROCESS=1 -DFUZZER=1 
-DTDOC=\"$(abs_top_srcdir)/test/data\" $(AM_CPPFLAGS)
diff --git a/test/Makefile.am b/test/Makefile.am
index 9008efa1..6be2a535 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -20,7 +20,7 @@ noinst_LTLIBRARIES = \
unit-minsocketbuffersize.la
 
 MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
-AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION)
+AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS)
 
 # We work around some of the mess of using the same sources both on
 # the server side and here in unit tests with conditional compilation
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - 1098 commits - accessibility/inc accessibility/source android/Bootstrap android/source apple_remote/source avmedia/inc avmedia/source bas

2017-03-31 Thread Tomaž Vajngerl
Rebased ref, commits from common ancestor:
commit 85f9f06f5904b57a23a56416e4477bb5f6703369
Author: Tomaž Vajngerl 
Date:   Thu Mar 30 23:50:38 2017 +0200

chart2: pivot chart round-trip test, pivot table update test

Change-Id: Ia96bae4f24e7031929ceb9dc9fbeaa841def7547

diff --git a/chart2/CppunitTest_chart2_pivot_chart_test.mk 
b/chart2/CppunitTest_chart2_pivot_chart_test.mk
new file mode 100644
index ..418db1af9cc9
--- /dev/null
+++ b/chart2/CppunitTest_chart2_pivot_chart_test.mk
@@ -0,0 +1,131 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,chart2_pivot_chart_test))
+
+$(eval $(call gb_CppunitTest_use_externals,chart2_pivot_chart_test, \
+   boost_headers \
+   libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,chart2_pivot_chart_test, \
+chart2/qa/extras/PivotChartTest \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,chart2_pivot_chart_test, \
+basegfx \
+comphelper \
+cppu \
+cppuhelper \
+drawinglayer \
+editeng \
+for \
+forui \
+i18nlangtag \
+msfilter \
+vcl \
+oox \
+sal \
+salhelper \
+sax \
+sb \
+sc \
+sw \
+sd \
+sfx \
+sot \
+svl \
+svt \
+svx \
+svxcore \
+test \
+tl \
+tk \
+ucbhelper \
+unotest \
+utl \
+vbahelper \
+xo \
+sw \
+$(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,chart2_pivot_chart_test,\
+-I$(SRCDIR)/chart2/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,chart2_pivot_chart_test))
+$(eval $(call gb_CppunitTest_use_ure,chart2_pivot_chart_test))
+$(eval $(call gb_CppunitTest_use_vcl,chart2_pivot_chart_test))
+
+$(eval $(call gb_CppunitTest_use_components,chart2_pivot_chart_test,\
+basic/util/sb \
+animations/source/animcore/animcore \
+chart2/source/controller/chartcontroller \
+chart2/source/chartcore \
+comphelper/util/comphelp \
+configmgr/source/configmgr \
+dtrans/util/mcnttype \
+dbaccess/util/dba \
+embeddedobj/util/embobj \
+eventattacher/source/evtatt \
+filter/source/config/cache/filterconfig1 \
+filter/source/odfflatxml/odfflatxml \
+filter/source/storagefilterdetect/storagefd \
+filter/source/xmlfilteradaptor/xmlfa \
+filter/source/xmlfilterdetect/xmlfd \
+forms/util/frm \
+framework/util/fwk \
+i18npool/util/i18npool \
+linguistic/source/lng \
+oox/util/oox \
+package/source/xstor/xstor \
+package/util/package2 \
+sax/source/expatwrap/expwrap \
+sc/util/sc \
+sc/util/scd \
+sc/util/scfilt \
+sw/util/sw \
+sw/util/swd \
+sw/util/msword \
+sd/util/sd \
+sd/util/sdfilt \
+sd/util/sdd \
+$(call gb_Helper_optional,SCRIPTING, \
+   sc/util/vbaobj) \
+scaddins/source/analysis/analysis \
+scaddins/source/datefunc/date \
+scripting/source/basprov/basprov \
+scripting/util/scriptframe \
+sfx2/util/sfx \
+sot/util/sot \
+svl/source/fsstor/fsstorage \
+svl/util/svl \
+   svtools/util/svt \
+svx/util/svx \
+svx/util/svxcore \
+toolkit/util/tk \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+ucb/source/ucp/tdoc/ucptdoc1 \
+unotools/util/utl \
+unoxml/source/rdf/unordf \
+unoxml/source/service/unoxml \
+uui/util/uui \
+writerfilter/util/writerfilter \
+xmloff/util/xo \
+xmlscript/util/xmlscript \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,chart2_pivot_chart_test))
+
+# vim: set noet sw=4 ts=4:
diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index f39140d61002..3273055d5373 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,chart2,\
 CppunitTest_chart2_import \
 CppunitTest_chart2_trendcalculators \
 CppunitTest_chart2_dump \
+CppunitTest_chart2_pivot_chart_test \
 ))
 
 ifeq ($(ENABLE_CHART_TESTS),TRUE)
diff --git a/chart2/qa/extras/PivotChartTest.cxx 
b/chart2/qa/extras/PivotChartTest.cxx
new file mode 100644
index ..ad98c60869da
--- /dev/null
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -0,0 +1,244 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 22 commits - filter/source filter/uiconfig include/vcl include/xmlsecurity sw/qa vcl/CppunitTest_vcl_pdfexport.mk vcl/Library_vcl.mk

2017-03-31 Thread Miklos Vajna
 filter/source/pdf/impdialog.cxx   |5 
 filter/source/pdf/impdialog.hxx   |2 
 filter/source/pdf/pdfexport.cxx   |4 
 filter/source/pdf/pdfexport.hxx   |1 
 filter/uiconfig/ui/pdfgeneralpage.ui  |   17 
 include/vcl/filter/pdfdocument.hxx|  378 ++
 include/vcl/pdfwriter.hxx |5 
 include/xmlsecurity/pdfio/pdfdocument.hxx |  299 -
 sw/qa/extras/rtfimport/data/tdf106694.rtf |   10 
 sw/qa/extras/rtfimport/rtfimport.cxx  |8 
 vcl/CppunitTest_vcl_pdfexport.mk  |2 
 vcl/Library_vcl.mk|1 
 vcl/qa/cppunit/pdfexport/data/tdf106693.odt   |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|  111 
 vcl/source/filter/ipdf/pdfdocument.cxx| 3005 
 vcl/source/gdi/pdfwriter_impl.cxx |  365 +
 vcl/source/gdi/pdfwriter_impl.hxx |   13 
 writerfilter/source/rtftok/rtfsprm.cxx|   20 
 xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk |1 
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   22 
 xmlsecurity/source/helper/pdfsignaturehelper.cxx  |   10 
 xmlsecurity/source/pdfio/pdfdocument.cxx  | 4044 +++---
 xmlsecurity/workben/pdfverify.cxx |8 
 23 files changed, 4500 insertions(+), 3831 deletions(-)

New commits:
commit 3a8ba7cf23ebc89711a249a5105110ea8fdab713
Author: Miklos Vajna 
Date:   Thu Mar 30 17:04:19 2017 +0200

vcl PDF export, norefxobj: add test for this

Assert two important properties:

- the pdf image is described using the form xobject markup (not the
  reference xobject one)
- the form xobject refers to a vector image, not to a bitmap one

Change-Id: I94b88976c1e5392758d56254143fbba51412
Reviewed-on: https://gerrit.libreoffice.org/35901
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit 932f6a8f37fbd99fc2ed16aa37966658d388c975)

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf106693.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf106693.odt
new file mode 100644
index ..a2c18037833e
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf106693.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index fb0bd8b3c597..ede50077b62c 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -47,6 +47,8 @@ public:
 void testTdf105093();
 /// Tests export of non-PDF images.
 void testTdf106206();
+/// Tests export of PDF images without reference XObjects.
+void testTdf106693();
 #endif
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
@@ -55,6 +57,7 @@ public:
 CPPUNIT_TEST(testTdf105461);
 CPPUNIT_TEST(testTdf105093);
 CPPUNIT_TEST(testTdf106206);
+CPPUNIT_TEST(testTdf106693);
 #endif
 CPPUNIT_TEST_SUITE_END();
 };
@@ -118,6 +121,59 @@ void PdfExportTest::testTdf106059()
 CPPUNIT_ASSERT(pReferenceXObject->Lookup("Ref"));
 }
 
+void PdfExportTest::testTdf106693()
+{
+// Import the bugdoc and export as PDF.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf106693.odt";
+mxComponent = loadFromDesktop(aURL);
+CPPUNIT_ASSERT(mxComponent.is());
+
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result.
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(aTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+// Assert that the XObject in the page resources dictionary is a form 
XObject.
+std::vector aPages = aDocument.GetPages();
+// The document has one page.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+auto pXObjects = 
dynamic_cast(pResources->Lookup("XObject"));
+CPPUNIT_ASSERT(pXObjects);
+// The page has one image.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pXObjects->GetItems().size());
+vcl::filter::PDFObjectElement* pXObject = 
pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+CPPUNIT_ASSERT(pXObject);
+// The image is a form XObject.
+auto pSubtype = 
dynamic_cast(pXObject->Lookup("Subtype"));
+CPPUNIT_ASSERT(pSubtype);
+CPPUNIT_ASSERT_EQUAL(OString("Form"), pSubtype->GetValue());
+// This failed: UseReferenceXObject was ignored and Ref was always created.
+CPPUNIT_ASSERT(!pXObject->Lookup("Ref"));
+
+// Assert that the form object refers to an inner form

[Libreoffice-commits] core.git: o3tl/CppunitTest_o3tl_tests.mk

2017-03-31 Thread Stephan Bergmann
 o3tl/CppunitTest_o3tl_tests.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 19e63ddbc265771b07b79af981db1a4a0d989086
Author: Stephan Bergmann 
Date:   Fri Mar 31 11:46:20 2017 +0200

Sort lines lexicographically

Change-Id: I40cb900331493f7cdd13ceca1d5aec93f0c81aca

diff --git a/o3tl/CppunitTest_o3tl_tests.mk b/o3tl/CppunitTest_o3tl_tests.mk
index eb13966c5a2d..6d7a1a811adb 100644
--- a/o3tl/CppunitTest_o3tl_tests.mk
+++ b/o3tl/CppunitTest_o3tl_tests.mk
@@ -29,10 +29,10 @@ $(eval $(call gb_CppunitTest_use_libraries,o3tl_tests,\
 $(eval $(call gb_CppunitTest_add_exception_objects,o3tl_tests,\
o3tl/qa/cow_wrapper_clients \
o3tl/qa/test-cow_wrapper \
-   o3tl/qa/test-vector_pool \
+   o3tl/qa/test-lru_map \
o3tl/qa/test-sorted_vector \
o3tl/qa/test-typed_flags \
-   o3tl/qa/test-lru_map \
+   o3tl/qa/test-vector_pool \
 ))
 
 # vim: set noet sw=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Michael Stahl
 vcl/android/androidinst.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cb5b83e322ec3991fbc8e9edbb6389bda1749cac
Author: Michael Stahl 
Date:   Fri Mar 31 11:44:07 2017 +0200

vcl: attempt to blindly make androids properly rectangular

Change-Id: I5d43744b754817174401558a200a4cd204779515

diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index e54bc68dceb6..c976a7c89732 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -36,9 +36,9 @@ public:
 virtual bool ErrorTrapPop( bool ) { return false; }
 };
 
-void AndroidSalInstance::GetWorkArea( Rectangle& rRect )
+void AndroidSalInstance::GetWorkArea(tools::Rectangle& rRect)
 {
-rRect = Rectangle( Point( 0, 0 ),
+rRect = tools::Rectangle( Point( 0, 0 ),
Size( viewWidth, viewHeight ) );
 }
 
@@ -105,7 +105,7 @@ public:
 SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | 
SAL_FRAME_POSSIZE_HEIGHT);
 }
 
-virtual void GetWorkArea( Rectangle& rRect )
+virtual void GetWorkArea(tools::Rectangle& rRect)
 {
 AndroidSalInstance::getInstance()->GetWorkArea( rRect );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Caolán McNamara
 vcl/source/gdi/dibtools.cxx |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit d6eaa8aa5211f1c140d7e9ed27a7fef806b4af3b
Author: Caolán McNamara 
Date:   Fri Mar 31 11:04:16 2017 +0100

ofz: 0 bitcount bmps are unsupported

Change-Id: Ibd7b25546006506350f9fc009596f2989a305a4c

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 37408f408154..4cd7c5419199 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -772,6 +772,10 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, 
AlphaMask* pBmpAlpha, sal_uL
 if (!ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown, bMSOFormat) && 
aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount)
 return false;
 
+//BI_BITCOUNT_0 jpeg/png is unsupported
+if (aHeader.nBitCount == 0)
+return false;
+
 // In case ImplReadDIB() didn't call ImplReadDIBFileHeader() before
 // this method, nOffset is 0, that's OK.
 if (nOffset && aHeader.nSize > nOffset)
commit 473066c526ac1d970658b39381436b23d78676ac
Author: Caolán McNamara 
Date:   Fri Mar 31 09:36:05 2017 +0100

expand forcing to mono mask during load to non-indexed sources too

Change-Id: I38c1eec5e180d689de72413b1438c88a1085bbb5

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 576c38871918..37408f408154 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -337,6 +337,14 @@ namespace
 
 return nIndex;
 }
+
+BitmapColor SanitizeColor(const BitmapColor &rColor, bool 
bForceToMonoWhileReading)
+{
+if (!bForceToMonoWhileReading)
+return rColor;
+return BitmapColor(static_cast(rColor.GetLuminance() >= 
255));
+}
+
 }
 
 bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, 
BitmapWriteAccess& rAcc, BitmapPalette& rPalette, bool 
bForceToMonoWhileReading, bool bRLE4)
@@ -661,7 +669,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
 for( long nX = 0; nX < nWidth; nX++ )
 {
 aMask.GetColorFor16BitLSB( aColor, 
reinterpret_cast(pTmp16++) );
-rAcc.SetPixel( nY, nX, aColor );
+rAcc.SetPixel(nY, nX, SanitizeColor(aColor, 
bForceToMonoWhileReading));
 }
 }
 }
@@ -685,7 +693,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
 aPixelColor.SetBlue( *pTmp++ );
 aPixelColor.SetGreen( *pTmp++ );
 aPixelColor.SetRed( *pTmp++ );
-rAcc.SetPixel( nY, nX, aPixelColor );
+rAcc.SetPixel(nY, nX, SanitizeColor(aPixelColor, 
bForceToMonoWhileReading));
 }
 }
 }
@@ -723,7 +731,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
 for( long nX = 0; nX < nWidth; nX++ )
 {
 aMask.GetColorAndAlphaFor32Bit( aColor, 
aAlpha, reinterpret_cast(pTmp32++) );
-rAcc.SetPixel( nY, nX, aColor );
+rAcc.SetPixel(nY, nX, SanitizeColor(aColor, 
bForceToMonoWhileReading));
 pAccAlpha->SetPixelIndex(nY, nX, 
sal_uInt8(0xff) - aAlpha);
 rAlphaUsed |= bool(0xff != aAlpha);
 }
@@ -743,7 +751,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
 for( long nX = 0; nX < nWidth; nX++ )
 {
 aMask.GetColorFor32Bit( aColor, 
reinterpret_cast(pTmp32++) );
-rAcc.SetPixel( nY, nX, aColor );
+rAcc.SetPixel(nY, nX, SanitizeColor(aColor, 
bForceToMonoWhileReading));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Miklos Vajna
 vcl/inc/android/androidinst.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d5c27f34e8d764545dd1576922b4bcabfebc9e9d
Author: Miklos Vajna 
Date:   Fri Mar 31 12:07:14 2017 +0200

vcl android: more adaptions to tools::Rectangle

Change-Id: Id85ee2a943047c22f77a758238e51e580b7d079b

diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index 8a0e1b96efc1..30673ac8bd72 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -32,7 +32,7 @@ public:
 virtual SalSystem* CreateSalSystem();
 
 // frame management
-void GetWorkArea( Rectangle& rRect );
+void GetWorkArea( tools::Rectangle& rRect );
 SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
 SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags 
nStyle );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: common/Util.cpp

2017-03-31 Thread Michael Meeks
 common/Util.cpp |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e79c5f908321cd04acad75a79ab50d47db982e44
Author: Michael Meeks 
Date:   Fri Mar 31 11:21:35 2017 +0100

Use process name for a thread if no name is set (yet).

diff --git a/common/Util.cpp b/common/Util.cpp
index 70987c3b..8e9552b6 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -276,6 +276,13 @@ namespace Util
 
 const char *getThreadName()
 {
+// Main process and/or not set yet.
+if (ThreadName[0] == '\0')
+{
+if (prctl(PR_GET_NAME, reinterpret_cast(ThreadName), 0, 0, 0) != 0)
+ThreadName[0] = '\0';
+}
+
 // Avoid so many redundant system calls
 return ThreadName;
 }
@@ -290,7 +297,6 @@ namespace Util
 return ThreadTid;
 }
 
-
 void getVersionInfo(std::string& version, std::string& hash)
 {
 version = std::string(LOOLWSD_VERSION);
___
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-2-1' - common/Util.cpp

2017-03-31 Thread Michael Meeks
 common/Util.cpp |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 2a2f05f84bf16741198759ca5db25d7084dc3789
Author: Michael Meeks 
Date:   Fri Mar 31 11:21:35 2017 +0100

Use process name for a thread if no name is set (yet).

diff --git a/common/Util.cpp b/common/Util.cpp
index 70987c3b..8e9552b6 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -276,6 +276,13 @@ namespace Util
 
 const char *getThreadName()
 {
+// Main process and/or not set yet.
+if (ThreadName[0] == '\0')
+{
+if (prctl(PR_GET_NAME, reinterpret_cast(ThreadName), 0, 0, 0) != 0)
+ThreadName[0] = '\0';
+}
+
 // Avoid so many redundant system calls
 return ThreadName;
 }
@@ -290,7 +297,6 @@ namespace Util
 return ThreadTid;
 }
 
-
 void getVersionInfo(std::string& version, std::string& hash)
 {
 version = std::string(LOOLWSD_VERSION);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Justin Luth
 writerfilter/source/dmapper/PropertyMap.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 541b377a94fb1247dbf4c39b5bcf55deb8e5ef60
Author: Justin Luth 
Date:   Thu Mar 16 16:19:04 2017 +0300

writerfilter: default break type identified as _nextPage

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

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index af073bd5b758..9add77dea8a7 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1178,10 +1178,13 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
 }
 }
 
+// The default section type is nextPage.
+if( m_nBreakType == -1 )
+m_nBreakType = NS_ooxml::LN_Value_ST_SectionMark_nextPage;
+
 // depending on the break type no page styles should be created
-// If the section type is missing, but we have columns without new style 
info, then this should be
-// handled as a continuous section break.
-const bool bTreatAsContinuous = (m_nBreakType == -1 || m_nBreakType == 
NS_ooxml::LN_Value_ST_SectionMark_nextPage)
+// Continuous sections usually create only a section, and not a new page 
style
+const bool bTreatAsContinuous = m_nBreakType == 
NS_ooxml::LN_Value_ST_SectionMark_nextPage
 && m_nColumnCount > 0
 && !HasHeader(m_bTitlePage) && 
!HasFooter(m_bTitlePage)
 && (m_bIsFirstSection || 
m_sFollowPageStyleName.isEmpty() || (m_sFirstPageStyleName.isEmpty() && 
m_bTitlePage));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Katarina Behrens
 cui/source/tabpages/tpgradnt.cxx |9 -
 cui/source/tabpages/tphatch.cxx  |9 +++--
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit ff1f83dd08b7b0169301ffe0a53499a27af613b9
Author: Katarina Behrens 
Date:   Fri Mar 31 10:00:40 2017 +0200

tdf#105922: Apply custom gradient/hatch even if not saved as preset

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

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 6bd9788d296b..505d156b4b3c 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -227,7 +227,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 {
 std::unique_ptr pXGradient;
 OUString  aString;
-size_tnPos = m_pGradientLB->GetSelectItemPos();
+size_t nPos = m_pGradientLB->IsNoSelection() ? VALUESET_ITEM_NOTFOUND : 
m_pGradientLB->GetSelectItemPos();
 if( nPos != VALUESET_ITEM_NOTFOUND )
 {
 pXGradient.reset(new XGradient( m_pGradientList->GetGradient( 
static_cast(nPos) )->GetGradient() ));
@@ -236,6 +236,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 else
 // gradient was passed (unidentified)
 {
+aString = "gradient";
 pXGradient.reset(new XGradient( m_pLbColorFrom->GetSelectEntryColor(),
 m_pLbColorTo->GetSelectEntryColor(),
 (css::awt::GradientStyle) 
m_pLbGradientType->GetSelectEntryPos(),
@@ -282,21 +283,26 @@ VclPtr SvxGradientTabPage::Create( 
vcl::Window* pWindow,
 IMPL_LINK( SvxGradientTabPage, ModifiedListBoxHdl_Impl, ListBox&, rListBox, 
void )
 {
 ModifiedHdl_Impl(&rListBox);
+// gradient params changed, it is no longer one of the presets
+m_pGradientLB->SetNoSelection();
 }
 
 IMPL_LINK( SvxGradientTabPage, ModifiedColorListBoxHdl_Impl, SvxColorListBox&, 
rListBox, void )
 {
 ModifiedHdl_Impl(&rListBox);
+m_pGradientLB->SetNoSelection();
 }
 
 IMPL_LINK( SvxGradientTabPage, ModifiedEditHdl_Impl, Edit&, rBox, void )
 {
 ModifiedHdl_Impl(&rBox);
+m_pGradientLB->SetNoSelection();
 }
 
 IMPL_LINK( SvxGradientTabPage, ModifiedSliderHdl_Impl, Slider*, rSlider, void )
 {
 ModifiedHdl_Impl(rSlider);
+m_pGradientLB->SetNoSelection();
 }
 
 IMPL_LINK_NOARG( SvxGradientTabPage, ChangeAutoStepHdl_Impl, CheckBox&, void )
@@ -312,6 +318,7 @@ IMPL_LINK_NOARG( SvxGradientTabPage, 
ChangeAutoStepHdl_Impl, CheckBox&, void )
 m_pMtrIncrement->Enable();
 }
 ModifiedHdl_Impl(m_pMtrIncrement);
+m_pGradientLB->SetNoSelection();
 }
 
 void SvxGradientTabPage::ModifiedHdl_Impl( void* pControl )
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 3c0c382e3e7b..a6e61d264537 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -253,13 +253,13 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
 {
 std::unique_ptr pXHatch;
 OUString  aString;
-size_t nPos = m_pHatchLB->GetSelectItemPos();
+size_t nPos = m_pHatchLB->IsNoSelection() ? VALUESET_ITEM_NOTFOUND : 
m_pHatchLB->GetSelectItemPos();
 if( nPos != VALUESET_ITEM_NOTFOUND )
 {
 pXHatch.reset(new XHatch( m_pHatchingList->GetHatch( 
static_cast(nPos) )->GetHatch() ));
 aString = m_pHatchLB->GetItemText( m_pHatchLB->GetSelectItemId() );
 }
-// gradient has been (unidentified) passed
+// unidentified hatch has been passed
 else
 {
 pXHatch.reset(new XHatch( m_pLbLineColor->GetSelectEntryColor(),
@@ -309,11 +309,14 @@ VclPtr SvxHatchTabPage::Create( vcl::Window* 
pWindow,
 IMPL_LINK( SvxHatchTabPage, ModifiedListBoxHdl_Impl, ListBox&, rListBox, void )
 {
 ModifiedHdl_Impl(&rListBox);
+// hatch params have changed, it is no longer one of the presets
+m_pHatchLB->SetNoSelection();
 }
 
 IMPL_LINK( SvxHatchTabPage, ModifiedColorListBoxHdl_Impl, SvxColorListBox&, 
rListBox, void )
 {
 ModifiedHdl_Impl(&rListBox);
+m_pHatchLB->SetNoSelection();
 }
 
 IMPL_LINK_NOARG( SvxHatchTabPage, ToggleHatchBackgroundColor_Impl, CheckBox&, 
void )
@@ -344,11 +347,13 @@ IMPL_LINK_NOARG( SvxHatchTabPage, 
ModifiedBackgroundHdl_Impl, SvxColorListBox&,
 IMPL_LINK( SvxHatchTabPage, ModifiedEditHdl_Impl, Edit&, rEdit, void )
 {
 ModifiedHdl_Impl(&rEdit);
+m_pHatchLB->SetNoSelection();
 }
 
 IMPL_LINK( SvxHatchTabPage, ModifiedSliderHdl_Impl, Slider*, rSlider, void )
 {
 ModifiedHdl_Impl(rSlider);
+m_pHatchLB->SetNoSelection();
 }
 void SvxHatchTabPage::ModifiedHdl_Impl( void* p )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Noel Grandin
 sd/qa/unit/export-tests-ooxml1.cxx   |6 ++---
 sd/qa/unit/export-tests-ooxml2.cxx   |4 +--
 sd/qa/unit/import-tests.cxx  |   35 +++
 sd/qa/unit/misc-tests.cxx|6 ++---
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 -
 sd/source/filter/eppt/pptx-text.cxx  |2 -
 sd/source/ui/func/fuoaprms.cxx   |8 +++
 sd/source/ui/unoidl/unoobj.cxx   |2 -
 sd/source/ui/view/drviews9.cxx   |   10 
 9 files changed, 55 insertions(+), 20 deletions(-)

New commits:
commit 82025e7f7af562549a900b9f1d76ed73fe4f2a58
Author: Noel Grandin 
Date:   Fri Mar 31 12:21:44 2017 +0200

use actual UNO enums in sd

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

diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 2fc233bf836a..e7a29c25f6c4 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -507,12 +507,12 @@ void SdOOXMLExportTest1::testTableCellFillProperties()
 drawing::FillStyle aFillStyle( drawing::FillStyle_NONE );
 xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
 xCell->getPropertyValue("FillStyle") >>= aFillStyle;
-CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, aFillStyle);
+CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_BITMAP, (int)aFillStyle);
 
 // Test Gradient fill type for cell
 xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
 xCell->getPropertyValue("FillStyle") >>= aFillStyle;
-CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, aFillStyle);
+CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_GRADIENT, (int)aFillStyle);
 
 xDocShRef->DoClose();
 }
@@ -543,7 +543,7 @@ void SdOOXMLExportTest1::testLineStyle()
 
 const XLineStyleItem& rStyleItem = dynamic_cast(
 pShape->GetMergedItem(XATTR_LINESTYLE));
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong style",drawing::LineStyle_SOLID, 
rStyleItem.GetValue());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong style", (int)drawing::LineStyle_SOLID, 
(int)rStyleItem.GetValue());
 
 xDocShRef->DoClose();
 }
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index fa83615f268e..0e6bd2542814 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -768,12 +768,12 @@ void SdOOXMLExportTest2::testTdf105739()
 // Test fill type
 drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
 aXBackgroundPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
-CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, aFillStyle);
+CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_GRADIENT, 
(int)aFillStyle);
 
 // Test gradient properties
 com::sun::star::awt::Gradient aFillGradient;
 aXBackgroundPropSet->getPropertyValue("FillGradient") >>= 
aFillGradient;
-CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aFillGradient.Style);
+CPPUNIT_ASSERT_EQUAL((int)awt::GradientStyle_LINEAR, 
(int)aFillGradient.Style);
 CPPUNIT_ASSERT_EQUAL(util::Color(0xff), aFillGradient.StartColor);
 CPPUNIT_ASSERT_EQUAL(util::Color(0x00b050), aFillGradient.EndColor);
 }
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c4dfd192dd09..f45ae187d0db 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -623,6 +623,41 @@ std::ostream& operator<<(std::ostream& rStrm, const 
uno::Reference& xRef)
 
 } } } }
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, LineStyle n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace presentation {
+
+std::ostream& operator<<(std::ostream& rStrm, ClickAction n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n)
+{
+rStrm << (int) n;
+return rStrm;
+}
+
+} } } }
+
 void SdImportTest::testTdf97808()
 {
 sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf97808.fodp"), FODP);
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 87c6beb66ca0..014869cb0790 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -228,7 +228,7 @@ void SdMiscTest::testTdf99396TextEdit()
 uno::Reference xTable = pTableObject->getTable();
 uno::Reference xCell(xTable->getCellByPosition(0, 
0), uno::UNO_QUERY);
 drawing::TextVerticalAdjust eAdjust = 
xCell->getPropertyValue("TextVerticalAdjust").get();
-  

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

2017-03-31 Thread Noel Grandin
 include/oox/drawingml/drawingmltypes.hxx  |3 ++-
 include/oox/export/drawingml.hxx  |3 ++-
 include/oox/ppt/slidetransition.hxx   |3 ++-
 oox/inc/drawingml/textparagraphproperties.hxx |7 ---
 oox/source/drawingml/drawingmltypes.cxx   |5 ++---
 oox/source/export/chartexport.cxx |4 ++--
 oox/source/export/drawingml.cxx   |8 
 oox/source/helper/propertymap.cxx |8 
 oox/source/ole/axcontrol.cxx  |4 ++--
 oox/source/ppt/slidetransition.cxx|1 -
 oox/source/vml/vmlshape.cxx   |4 ++--
 11 files changed, 26 insertions(+), 24 deletions(-)

New commits:
commit 657702108f3e06e7e90411838cd37f9e6a8b1471
Author: Noel Grandin 
Date:   Fri Mar 31 11:08:13 2017 +0200

use actual UNO enums in oox

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

diff --git a/include/oox/drawingml/drawingmltypes.hxx 
b/include/oox/drawingml/drawingmltypes.hxx
index 2aac13c669a7..6a4a99f426fe 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -129,7 +130,7 @@ sal_Int16 GetFontStrikeout( sal_Int32 nToken );
 sal_Int16 GetCaseMap( sal_Int32 nToken );
 
 /** converts a paragraph align to a ParaAdjust */
-sal_Int16 GetParaAdjust( sal_Int32 nAlign );
+css::style::ParagraphAdjust GetParaAdjust( sal_Int32 nAlign );
 
 // Converts vertical adjust tokens to a TextVerticalAdjust item
 css::drawing::TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken );
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 94ccc6aac24d..4ee841d33eb2 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -226,7 +227,7 @@ public:
 
 static sal_uInt32 ColorWithIntensity( sal_uInt32 nColor, sal_uInt32 
nIntensity );
 
-static const char* GetAlignment( sal_Int32 nAlignment );
+static const char* GetAlignment( css::style::ParagraphAdjust nAlignment );
 
 sax_fastparser::FSHelperPtr CreateOutputStream (
 const OUString& sFullStream,
diff --git a/include/oox/ppt/slidetransition.hxx 
b/include/oox/ppt/slidetransition.hxx
index 41df7b2f7948..e11298a0a04e 100644
--- a/include/oox/ppt/slidetransition.hxx
+++ b/include/oox/ppt/slidetransition.hxx
@@ -22,6 +22,7 @@
 #define INCLUDED_OOX_PPT_SLIDETRANSITION_HXX
 
 #include 
+#include 
 #include 
 #include 
 
@@ -64,7 +65,7 @@ namespace oox { namespace ppt {
 ::sal_Int16 mnTransitionType;
 ::sal_Int16 mnTransitionSubType;
 bool  mbTransitionDirectionNormal;
-::sal_Int16 mnAnimationSpeed;
+css::presentation::AnimationSpeed mnAnimationSpeed;
 ::sal_Int32 mnFadeColor;
 bool  mbMode; /**< 
http://api.libreoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html
 Mode property */
 ::sal_Int32 mnAdvanceTime;
diff --git a/oox/inc/drawingml/textparagraphproperties.hxx 
b/oox/inc/drawingml/textparagraphproperties.hxx
index 4b869f5929cd..c85a4f84905b 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -93,8 +94,8 @@ public:
 boost::optional< sal_Int32 >&   getParaLeftMargin(){ return 
moParaLeftMargin; }
 boost::optional< sal_Int32 >&   getFirstLineIndentation(){ return 
moFirstLineIndentation; }
 
-boost::optional< sal_Int16 >&   getParaAdjust() { return moParaAdjust; 
}
-voidsetParaAdjust( sal_Int16 nParaAdjust ) 
{ moParaAdjust = nParaAdjust; }
+boost::optional< css::style::ParagraphAdjust >&   getParaAdjust() { 
return moParaAdjust; }
+voidsetParaAdjust( 
css::style::ParagraphAdjust nParaAdjust ) { moParaAdjust = nParaAdjust; }
 
 voidapply( const TextParagraphProperties& 
rSourceProps );
 voidpushToPropSet( const 
::oox::core::XmlFilterBase* pFilterBase,
@@ -123,7 +124,7 @@ protected:
 TextSpacing maParaBottomMargin;
 boost::optional< sal_Int32 >moParaLeftMargin;
 boost::optional< sal_Int32 >moFirstLineIndentation;
-boost::optional< sal_Int16 >moParaAdjust;
+boost::optional< css::style::ParagraphAdjust >moParaAdjust;
 sal_Int16   mnLevel;
 };
 
diff --git a/oox/source/drawingml/drawingmltypes.cxx 
b/oox/source/drawingml/drawingmltypes.cxx
index 288749b7358c..725d7af84c87 100644
--- a/oox/source/

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - svx/source

2017-03-31 Thread Caolán McNamara
 svx/source/table/tablelayouter.cxx |   31 +--
 1 file changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 17c2f64e03476697d19f224fc9b08aa6cbc6cd03
Author: Caolán McNamara 
Date:   Fri Mar 31 11:23:04 2017 +0100

ofz#974 check SetBorder bounds like the other maHorizontalBorders users

Change-Id: Iac113433ac2317ddfebc68ed793c481384d56551
Reviewed-on: https://gerrit.libreoffice.org/35965
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index e90c1fcf..24f0f17a04f9 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -916,36 +916,40 @@ bool TableLayouter::HasPriority( const SvxBorderLine* 
pThis, const SvxBorderLine
 }
 }
 
-
 void TableLayouter::SetBorder( sal_Int32 nCol, sal_Int32 nRow, bool 
bHorizontal, const SvxBorderLine* pLine )
 {
-if( pLine == nullptr )
+if (!pLine)
 pLine = &gEmptyBorder;
 
-SvxBorderLine *pOld = bHorizontal ? maHorizontalBorders[nCol][nRow] : 
maVerticalBorders[nCol][nRow];
+BorderLineMap& rMap = bHorizontal ? maHorizontalBorders : 
maVerticalBorders;
 
-if( HasPriority( pLine, pOld ) )
+if( (nCol >= 0) && (nCol < sal::static_int_cast(rMap.size())) &&
+(nRow >= 0) && (nRow < 
sal::static_int_cast(rMap[nCol].size())) )
 {
-if( (pOld != nullptr) && (pOld != &gEmptyBorder) )
-delete pOld;
+SvxBorderLine *pOld = rMap[nCol][nRow];
 
-SvxBorderLine* pNew = ( pLine != &gEmptyBorder ) ?  new 
SvxBorderLine(*pLine) : &gEmptyBorder;
+if (HasPriority(pLine, pOld))
+{
+if (pOld && pOld != &gEmptyBorder)
+delete pOld;
 
-if( bHorizontal )
-maHorizontalBorders[nCol][nRow] = pNew;
-else
-maVerticalBorders[nCol][nRow]  = pNew;
+SvxBorderLine* pNew = (pLine != &gEmptyBorder) ?  new 
SvxBorderLine(*pLine) : &gEmptyBorder;
+
+rMap[nCol][nRow] = pNew;
+}
+}
+else
+{
+OSL_FAIL( "sdr::table::TableLayouter::SetBorder(), invalid border!" );
 }
 }
 
-
 void TableLayouter::ClearBorderLayout()
 {
 ClearBorderLayout(maHorizontalBorders);
 ClearBorderLayout(maVerticalBorders);
 }
 
-
 void TableLayouter::ClearBorderLayout(BorderLineMap& rMap)
 {
 const sal_Int32 nColCount = rMap.size();
@@ -967,7 +971,6 @@ void TableLayouter::ClearBorderLayout(BorderLineMap& rMap)
 }
 }
 
-
 void TableLayouter::ResizeBorderLayout()
 {
 ClearBorderLayout();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svx/source

2017-03-31 Thread Caolán McNamara
 svx/source/table/tablelayouter.cxx |   31 +--
 1 file changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 8deb8ccdcfc06099a8a293a1ad16d1966f131007
Author: Caolán McNamara 
Date:   Fri Mar 31 11:23:04 2017 +0100

ofz#974 check SetBorder bounds like the other maHorizontalBorders users

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

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index ae87f5044ad3..0328adaea4d1 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -916,36 +916,40 @@ bool TableLayouter::HasPriority( const SvxBorderLine* 
pThis, const SvxBorderLine
 }
 }
 
-
 void TableLayouter::SetBorder( sal_Int32 nCol, sal_Int32 nRow, bool 
bHorizontal, const SvxBorderLine* pLine )
 {
-if( pLine == nullptr )
+if (!pLine)
 pLine = &gEmptyBorder;
 
-SvxBorderLine *pOld = bHorizontal ? maHorizontalBorders[nCol][nRow] : 
maVerticalBorders[nCol][nRow];
+BorderLineMap& rMap = bHorizontal ? maHorizontalBorders : 
maVerticalBorders;
 
-if( HasPriority( pLine, pOld ) )
+if( (nCol >= 0) && (nCol < sal::static_int_cast(rMap.size())) &&
+(nRow >= 0) && (nRow < 
sal::static_int_cast(rMap[nCol].size())) )
 {
-if( (pOld != nullptr) && (pOld != &gEmptyBorder) )
-delete pOld;
+SvxBorderLine *pOld = rMap[nCol][nRow];
 
-SvxBorderLine* pNew = ( pLine != &gEmptyBorder ) ?  new 
SvxBorderLine(*pLine) : &gEmptyBorder;
+if (HasPriority(pLine, pOld))
+{
+if (pOld && pOld != &gEmptyBorder)
+delete pOld;
 
-if( bHorizontal )
-maHorizontalBorders[nCol][nRow] = pNew;
-else
-maVerticalBorders[nCol][nRow]  = pNew;
+SvxBorderLine* pNew = (pLine != &gEmptyBorder) ?  new 
SvxBorderLine(*pLine) : &gEmptyBorder;
+
+rMap[nCol][nRow] = pNew;
+}
+}
+else
+{
+OSL_FAIL( "sdr::table::TableLayouter::SetBorder(), invalid border!" );
 }
 }
 
-
 void TableLayouter::ClearBorderLayout()
 {
 ClearBorderLayout(maHorizontalBorders);
 ClearBorderLayout(maVerticalBorders);
 }
 
-
 void TableLayouter::ClearBorderLayout(BorderLineMap& rMap)
 {
 const sal_Int32 nColCount = rMap.size();
@@ -967,7 +971,6 @@ void TableLayouter::ClearBorderLayout(BorderLineMap& rMap)
 }
 }
 
-
 void TableLayouter::ResizeBorderLayout()
 {
 ClearBorderLayout();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: minutes of ESC call ...

2017-03-31 Thread David Tardon
On Thu, Mar 30, 2017 at 04:08:18PM +0100, Michael Meeks wrote:
> * Crashtest update (Caolan)
> + Google / ossfuzz: 24 fuzzers active now, unchanged
> + not added any more tests – existing giving out enough noise
> + lots of horsepower: they are also testing for local leaks & hangs
>  + previously ignoring those; lots in this category.
> + fast-hangs are more interesting than timeout – but fixing ...

As I missed the call yesterday...

I've started adding DLP libraries to oss-fuzz. There are 2 active
fuzzers so far: for libmspub and OLE2 parser in librevenge. I have
submitted pull requests for 3 more: libcdr, libpagemaker and libwpd.
Another 2, libwpg and libvisio, are in progress. I plan to add all the
libraries ultimately (if Google allows :-)

The yield is rather low, which is good. After all, the libraries have
been fuzzed quite extensively in the past...

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


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - writerfilter/source

2017-03-31 Thread Michael Stahl
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7d7d21cfa53c8e80fd4dd0938579d8377da5a840
Author: Michael Stahl 
Date:   Thu Mar 30 23:11:41 2017 +0200

writerfilter: DOCX import: fix handling of w:hideMark vs. w:vMerge

The problem is that Writer's layout can't handle the case where cells
are vertically merged and the last row has a fixed height; the vertically
merged cell will grow up to the height of the other cells in the non-
fixed rows plus the fixed row height, but no larger.

So for now, avoid setting fixed row heights in this case.

(regression from d1278ef4849661b9ae0eb7aaf4d74fbf91ccaf11)

Change-Id: Iac3689e0bb0d5b8a62115ca0fb1f2c553a6e6bbc
(cherry picked from commit c382c998ffdaf80c10a3f078fb4f0a37224d1158)
Reviewed-on: https://gerrit.libreoffice.org/35960
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 81220bdfec2d..36f30a36c39c 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -875,8 +875,12 @@ CellPropertyValuesSeq_t 
DomainMapperTableHandler::endTableGetCellProperties(Tabl
 bool lcl_hideMarks(PropertyMapVector1& rCellProperties)
 {
 for (PropertyMapPtr & p : rCellProperties)
-if (!p->isSet(PROP_CELL_HIDE_MARK))
+{
+// if anything is vertically merged, the row must not be set to fixed
+// as Writer's layout doesn't handle that well
+if (!p->isSet(PROP_CELL_HIDE_MARK) || p->isSet(PROP_VERTICAL_MERGE))
 return false;
+}
 return true;
 }
 
___
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

2017-03-31 Thread Vitaliy Anderson
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx|3 +
 writerfilter/source/dmapper/NumberingManager.cxx |   35 ++-
 writerfilter/source/dmapper/NumberingManager.hxx |4 ++
 writerfilter/source/dmapper/PropertyIds.cxx  |1 
 writerfilter/source/dmapper/PropertyIds.hxx  |1 
 5 files changed, 30 insertions(+), 14 deletions(-)

New commits:
commit df30caea7979235b5d1a6a038133dbac2ef7ecac
Author: Vitaliy Anderson 
Date:   Tue Mar 21 18:31:37 2017 +0300

tdf#106849: don't reduce quality of picture in bullet list.

An image saved in cache when NS_ooxml::LN_CT_NumPicBullet_pict
property is processed should not to be resized. It reduce quality
the image.

Just set the property "GraphicSize" of current level of the NumRule
instead of resize the image when processing
NS_ooxml::LN_CT_Lvl_lvlPicBulletId property.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 874f9f80f966..1d94e25938aa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -350,7 +350,8 @@ DECLARE_OOXMLEXPORT_TEST(testFDO74215, "FDO74215.docx")
 xmlDocPtr pXmlDoc = parseExport("word/numbering.xml");
 if (!pXmlDoc)
 return;
-assertXPath(pXmlDoc, "/w:numbering/w:numPicBullet[2]/w:pict/v:shape", 
"style", "width:7.9pt;height:7.9pt");
+// tdf#106849 NumPicBullet xShape should not to be resized.
+assertXPath(pXmlDoc, "/w:numbering/w:numPicBullet[2]/w:pict/v:shape", 
"style", "width:6.4pt;height:6.4pt");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testColumnBreak_ColumnCountIsZero,"fdo74153.docx")
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index 87c30c5bd336..325cef9fd982 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -279,7 +279,10 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 if (!m_sGraphicURL.isEmpty())
 aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_URL, 
m_sGraphicURL));
 if (m_sGraphicBitmap.is())
+{
 
aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_BITMAP, 
m_sGraphicBitmap));
+aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_SIZE, 
m_aGraphicSize));
+}
 }
 
 aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, 
m_nTabstop));
@@ -867,19 +870,6 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
 {
 uno::Reference xShape = 
m_rDMapper.PopPendingShape();
 
-// Respect only the aspect ratio of the picture, not its size.
-awt::Size aPrefSize = xShape->getSize();
-// See SwDefBulletConfig::InitFont(), default height is 14.
-const int nFontHeight = 14;
-// Point -> mm100.
-const int nHeight = nFontHeight * 35;
-if (aPrefSize.Height * aPrefSize.Width != 0)
-{
-int nWidth = (nHeight * aPrefSize.Width) / 
aPrefSize.Height;
-awt::Size aSize(nWidth, nHeight);
-xShape->setSize(aSize);
-}
-
 m_pCurrentNumPicBullet->SetShape(xShape);
 }
 break;
@@ -911,6 +901,25 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
 
m_pCurrentDefinition->GetCurrentLevel()->SetGraphicBitmap( gr );
 } catch(const beans::UnknownPropertyException&)
 {}
+
+// Respect only the aspect ratio of the picture, not its 
size.
+awt::Size aPrefSize = xShape->getSize();
+// See SwDefBulletConfig::InitFont(), default height is 14.
+const int nFontHeight = 14;
+// Point -> mm100.
+const int nHeight = nFontHeight * 35;
+if ( aPrefSize.Height * aPrefSize.Width != 0 )
+{
+int nWidth = (nHeight * aPrefSize.Width) / 
aPrefSize.Height;
+
+awt::Size aSize( convertMm100ToTwip(nWidth), 
convertMm100ToTwip(nHeight) );
+
m_pCurrentDefinition->GetCurrentLevel()->SetGraphicSize( aSize );
+}
+else
+{
+awt::Size aSize( convertMm100ToTwip(aPrefSize.Width), 
convertMm100ToTwip(aPrefSize.Height) );
+
m_pCurrentDefinition->GetCurrentLevel()->SetGraphicSize( aSize );
+}
 }
 }
 break;
diff --git a/writerfilter/source/dmapper/NumberingMana

[Libreoffice-commits] online.git: loleaflet/src

2017-03-31 Thread Pranav Kant
 loleaflet/src/control/Control.Menubar.js |5 +
 1 file changed, 5 insertions(+)

New commits:
commit ca8bc37657a355b6ea1f124f41c5377f532a5352
Author: Pranav Kant 
Date:   Fri Mar 31 17:45:01 2017 +0530

loleaflet: Close mobile-mode menu upon clicking any menuitem

Change-Id: Iaea20a9b364fc9f1b10d95694aa9b7e465249ca1

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index c3a51d5f..4cbc6b71 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -365,6 +365,11 @@ L.Control.Menubar = L.Control.extend({
if ($(menu).hasClass('highlighted')) {
$('#main-menu').smartmenus('menuHideAll');
}
+
+   var $mainMenuState = $('#main-menu-state');
+   if (!$(menu).hasClass('has-submenu') && 
$mainMenuState[0].checked) {
+   $mainMenuState[0].click();
+   }
},
 
_beforeShow: function(e, menu) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2017-03-31 Thread Marco Cecchetti
 loleaflet/src/control/Control.Scroll.js |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 1e24c77c8212c35e4a5fe8f0242c6a531be94c4f
Author: Marco Cecchetti 
Date:   Fri Mar 31 14:38:05 2017 +0200

Loleaflet - Calc: horizontal scroll bar not updated on changed doc width

For big spreadsheet (> 100k rows) when the doc width is extended the
horizontal scroll-bar is not updated, causing to not be able toscroll
the document up to the whole width.

This was due to the fact that the old doc height was obtained through
L.DomUtil.getStyle, but the precision of the retrieved value is 6
digits only.

Change-Id: I430b08dd4c864cec09b62c61420414ad306da225

diff --git a/loleaflet/src/control/Control.Scroll.js 
b/loleaflet/src/control/Control.Scroll.js
index f59c3938..3d076f34 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -13,6 +13,9 @@ L.Control.Scroll = L.Control.extend({
this._prevScrollX = 0;
this._prevScrollY = 0;
 
+   this._prevDocWidth = 0;
+   this._prevDocHeight = 0;
+
map.on('scrollto', this._onScrollTo, this);
map.on('scrollby', this._onScrollBy, this);
map.on('scrollvelocity', this._onScrollVelocity, this);
@@ -171,13 +174,11 @@ L.Control.Scroll = L.Control.extend({
}
 
// we need to avoid precision issues in comparison (in the end 
values are pixels)
-   var prevDocWidth = 
Math.ceil(parseFloat(L.DomUtil.getStyle(this._mockDoc, 'width')));
-   var prevDocHeight = 
Math.ceil(parseFloat(L.DomUtil.getStyle(this._mockDoc, 'height')));
var newDocWidth = Math.ceil(e.x);
var newDocHeight = Math.ceil(e.y);
 
// for writer documents, ignore scroll while document size is 
being reduced
-   if (this._map.getDocType() === 'text' && newDocHeight < 
prevDocHeight) {
+   if (this._map.getDocType() === 'text' && newDocHeight < 
this._prevDocHeight) {
this._ignoreScroll = true;
}
L.DomUtil.setStyle(this._mockDoc, 'width', e.x + 'px');
@@ -186,9 +187,13 @@ L.Control.Scroll = L.Control.extend({
// custom scrollbar plugin checks automatically for content 
height changes but not for content width changes
// so we need to update scrollbars explicitly; moreover we want 
to avoid to have 'update' invoked twice
// in case prevDocHeight !== newDocHeight
-   if (prevDocWidth !== newDocWidth && prevDocHeight === 
newDocHeight) {
+   if (this._prevDocWidth !== newDocWidth && this._prevDocHeight 
=== newDocHeight) {
$('.scroll-container').mCustomScrollbar('update');
}
+
+   // Don't get them through L.DomUtil.getStyle because precision 
is no more than 6 digits
+   this._prevDocWidth = newDocWidth;
+   this._prevDocHeight = newDocHeight;
},
 
_onUpdateScrollOffset: function (e) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Oliver Specht
 sw/source/core/text/txtfrm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3aa0e4c567afc734c45c715e44d9e3040cb9f29
Author: Oliver Specht 
Date:   Fri Mar 31 11:48:28 2017 +0200

tdf#101846: update spelling on URL changes

call setWrong if URL attributes
are applied to force re-spelling

Change-Id: I8a5fa20c45cdf1df33975c4d6bee5e2c0f3f272f
Reviewed-on: https://gerrit.libreoffice.org/35962
Tested-by: Jenkins 
Reviewed-by: Oliver Specht 

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 60bc86cf9293..7100e0dfcaa9 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1029,7 +1029,7 @@ void SwTextFrame::Modify( const SfxPoolItem* pOld, const 
SfxPoolItem *pNew )
 InvalidateRange_( SwCharRange( nPos, nLen) );
 const sal_uInt16 nTmp = static_cast(pNew)->getWhichAttr();
 
-if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_AUTOFMT 
== nTmp ||
+if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_INETFMT 
== nTmp || RES_TXTATR_AUTOFMT == nTmp ||
 RES_FMT_CHG == nTmp || RES_ATTRSET_CHG == nTmp )
 {
 lcl_SetWrong( *this, nPos, nPos + nLen, false );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libvisio.git: src/lib

2017-03-31 Thread David Tardon
 src/lib/VSDParser.cpp  |   17 +
 src/lib/libvisio_utils.cpp |   27 +++
 src/lib/libvisio_utils.h   |2 ++
 3 files changed, 46 insertions(+)

New commits:
commit cf0303b0ca57d3f54aa50686d38aaa149c02d034
Author: David Tardon 
Date:   Fri Mar 31 15:29:25 2017 +0200

oss-fuzz: avoid big allocations

Change-Id: I852f5359241975931b384800042760723db05b3a

diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 8ac21eb..9f87e51 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -21,6 +21,18 @@
 #include "VSDStylesCollector.h"
 #include "VSDMetaData.h"
 
+namespace
+{
+
+void sanitizeListLength(uint32_t &length, const std::size_t elem, 
librevenge::RVNGInputStream *const input)
+{
+  const unsigned long maxLength = libvisio::getRemainingLength(input) / elem;
+  if (length > maxLength)
+length = maxLength;
+}
+
+}
+
 libvisio::VSDParser::VSDParser(librevenge::RVNGInputStream *input, 
librevenge::RVNGDrawingInterface *painter, librevenge::RVNGInputStream 
*container)
   : m_input(input), m_painter(painter), m_container(container), m_header(), 
m_collector(0), m_shapeList(), m_currentLevel(0),
 m_stencils(), m_currentStencil(0), m_shape(), m_isStencilStarted(false), 
m_isInStyles(false),
@@ -914,6 +926,7 @@ void 
libvisio::VSDParser::readGeomList(librevenge::RVNGInputStream *input)
 uint32_t childrenListLength = readU32(input);
 input->seek(subHeaderLength, librevenge::RVNG_SEEK_CUR);
 std::vector geometryOrder;
+sanitizeListLength(childrenListLength, 4, input);
 geometryOrder.reserve(childrenListLength / sizeof(uint32_t));
 for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++)
   geometryOrder.push_back(readU32(input));
@@ -938,6 +951,7 @@ void 
libvisio::VSDParser::readCharList(librevenge::RVNGInputStream *input)
 uint32_t subHeaderLength = readU32(input);
 uint32_t childrenListLength = readU32(input);
 input->seek(subHeaderLength, librevenge::RVNG_SEEK_CUR);
+sanitizeListLength(childrenListLength, 4, input);
 std::vector characterOrder;
 characterOrder.reserve(childrenListLength / sizeof(uint32_t));
 for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++)
@@ -958,6 +972,7 @@ void 
libvisio::VSDParser::readParaList(librevenge::RVNGInputStream *input)
 uint32_t subHeaderLength = readU32(input);
 uint32_t childrenListLength = readU32(input);
 input->seek(subHeaderLength, librevenge::RVNG_SEEK_CUR);
+sanitizeListLength(childrenListLength, 4, input);
 std::vector paragraphOrder;
 paragraphOrder.reserve(childrenListLength / sizeof(uint32_t));
 for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++)
@@ -982,6 +997,7 @@ void 
libvisio::VSDParser::readTabsDataList(librevenge::RVNGInputStream *input)
 uint32_t subHeaderLength = readU32(input);
 uint32_t childrenListLength = readU32(input);
 input->seek(subHeaderLength, librevenge::RVNG_SEEK_CUR);
+sanitizeListLength(childrenListLength, 4, input);
 std::vector tabsOrder;
 tabsOrder.reserve(childrenListLength / sizeof(uint32_t));
 for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++)
@@ -1000,6 +1016,7 @@ void 
libvisio::VSDParser::readLayerList(librevenge::RVNGInputStream *input)
 uint32_t subHeaderLength = readU32(input);
 uint32_t childrenListLength = readU32(input);
 input->seek(subHeaderLength, librevenge::RVNG_SEEK_CUR);
+sanitizeListLength(childrenListLength, 4, input);
 std::vector layerOrder;
 layerOrder.reserve(childrenListLength / sizeof(uint32_t));
 for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++)
diff --git a/src/lib/libvisio_utils.cpp b/src/lib/libvisio_utils.cpp
index 08b5b2d..a46f833 100644
--- a/src/lib/libvisio_utils.cpp
+++ b/src/lib/libvisio_utils.cpp
@@ -109,6 +109,33 @@ const librevenge::RVNGString 
libvisio::getColourString(const Colour &c)
   return sColour;
 }
 
+unsigned long libvisio::getRemainingLength(librevenge::RVNGInputStream *const 
input)
+{
+  if (!input)
+throw EndOfStreamException();
+
+  const unsigned long begin = (unsigned long) input->tell();
+  unsigned long end = begin;
+
+  if (0 == input->seek(0, librevenge::RVNG_SEEK_END))
+  {
+end = (unsigned long) input->tell();
+  }
+  else
+  {
+// librevenge::RVNG_SEEK_END does not work. Use the harder way.
+while (!input->isEnd())
+{
+  readU8(input);
+  ++end;
+}
+  }
+
+  input->seek(begin, librevenge::RVNG_SEEK_SET);
+
+  return end - begin;
+}
+
 void libvisio::appendUCS4(librevenge::RVNGString &text, UChar32 ucs4Character)
 {
   // Convert carriage returns to new line characters
diff --git a/src/lib/libvisio_utils.h b/src/lib/libvisio_utils.h
index 2a4880e..ea63867 100644
--- a/src/lib/libvisio_utils.h
+++ b/src/lib/libvisio_utils.h
@@ -88,6 +88,8 @@ double readDouble(librevenge::RVNGInputStream *input);
 
 const librevenge::RVNGString getCol

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

2017-03-31 Thread Michael Meeks
 net/Socket.hpp   |   23 +--
 net/WebSocketHandler.hpp |6 ++
 2 files changed, 7 insertions(+), 22 deletions(-)

New commits:
commit 194c169f6811d0a00e04108ef2f3e4061ca4fac8
Author: Michael Meeks 
Date:   Fri Mar 31 12:25:21 2017 +0100

Remove obsolete write-lock.

The lock was used incompletely & inconsistently, and we should
always and only ever write in the associated SocketPoll's thread.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 0b765731..c45caf77 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -617,10 +617,9 @@ public:
 /// Send data to the socket peer.
 void send(const char* data, const int len, const bool flush = true)
 {
-assert(isCorrectThread());
+assert(isCorrectThread(true));
 if (data != nullptr && len > 0)
 {
-auto lock = getWriteLock();
 _outBuffer.insert(_outBuffer.end(), data, data + len);
 if (flush)
 writeOutgoingData();
@@ -700,7 +699,7 @@ protected:
 HandleResult handlePoll(std::chrono::steady_clock::time_point now,
 const int events) override
 {
-assert(isCorrectThread());
+assert(isCorrectThread(true));
 
 _socketHandler->checkTimeout(now);
 
@@ -746,14 +745,9 @@ protected:
 oldSize = _outBuffer.size();
 
 // Write if we can and have data to write.
-if ((events & POLLOUT) || !_outBuffer.empty())
+if ((events & POLLOUT) && !_outBuffer.empty())
 {
-std::unique_lock lock(_writeMutex, 
std::defer_lock);
-
-// The buffer could have been flushed while we waited for the 
lock.
-if (lock.try_lock() && !_outBuffer.empty())
-writeOutgoingData();
-
+writeOutgoingData();
 closed = closed || (errno == EPIPE);
 }
 }
@@ -773,9 +767,7 @@ protected:
 /// Override to write data out to socket.
 virtual void writeOutgoingData()
 {
-assert(isCorrectThread());
-
-Util::assertIsLocked(_writeMutex);
+assert(isCorrectThread(true));
 assert(!_outBuffer.empty());
 do
 {
@@ -826,9 +818,6 @@ protected:
 
 void dumpState(std::ostream& os) override;
 
-/// Get the Write Lock.
-std::unique_lock getWriteLock() { return 
std::unique_lock(_writeMutex); }
-
 protected:
 /// Client handling the actual data.
 std::shared_ptr _socketHandler;
@@ -842,8 +831,6 @@ protected:
 std::vector< char > _inBuffer;
 std::vector< char > _outBuffer;
 
-std::mutex _writeMutex;
-
 // To be able to access _inBuffer and _outBuffer.
 // TODO we probably need accessors to the _inBuffer & _outBuffer
 // instead of this many friends...
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index ac04da53..a7cae8f4 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -123,7 +123,6 @@ public:
 const unsigned char flags = static_cast(WSFrameMask::Fin)
   | static_cast(WSOpCode::Close);
 
-auto lock = socket->getWriteLock();
 sendFrame(socket, buf.data(), buf.size(), flags);
 }
 
@@ -316,8 +315,7 @@ public:
 if (socket == nullptr)
 return -1; // no socket == error.
 
-assert(socket->isCorrectThread());
-auto lock = socket->getWriteLock();
+assert(socket->isCorrectThread(true));
 std::vector& out = socket->_outBuffer;
 
 //TODO: Support fragmented messages.
@@ -349,7 +347,7 @@ protected:
 if (!socket || data == nullptr || len == 0)
 return -1;
 
-assert(socket->isCorrectThread());
+assert(socket->isCorrectThread(true));
 std::vector& out = socket->_outBuffer;
 
 out.push_back(flags);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Caolán McNamara
 cui/source/dialogs/cuicharmap.cxx   |7 ++
 cui/source/tabpages/numpages.cxx|   10 
 svx/source/dialog/svxbmpnumvalueset.cxx |2 -
 svx/source/sidebar/nbdtmg.cxx   |   37 ++--
 4 files changed, 20 insertions(+), 36 deletions(-)

New commits:
commit 011e1cdbf33e50626f1fefa8b7b4031fa368f3e8
Author: Caolán McNamara 
Date:   Fri Mar 31 15:15:31 2017 +0100

Related: tdf#106515 show OpenSymbol if unavailable StarSymbol requested

Change-Id: I442df1c44839642bd1f91afedee577214032466b

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index a92f99b6d00c..8d1180a9e9b3 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -380,6 +380,13 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont )
 // like "Times New Roman;Times" resolved
 vcl::Font aTmp( GetFontMetric( rFont ) );
 
+if (aTmp.GetFamilyName() == "StarSymbol" && 
m_pFontLB->GetEntryPos(aTmp.GetFamilyName()) == LISTBOX_ENTRY_NOTFOUND)
+{
+//if for some reason, like font in an old document, StarSymbol is 
requested and its not available, then
+//try OpenSymbol instead
+aTmp.SetFamilyName("OpenSymbol");
+}
+
 if ( m_pFontLB->GetEntryPos( aTmp.GetFamilyName() ) == 
LISTBOX_ENTRY_NOTFOUND )
 return;
 
commit 286e907cd42015f8311ecbb8568d75bf21da4f88
Author: Caolán McNamara 
Date:   Fri Mar 31 15:10:32 2017 +0100

can use a reference here

Change-Id: I042baab66ff67d0599cffcbfe2db374eb182ea5b

diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 318ebb4dcbd9..6f9ef286743d 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -266,7 +266,7 @@ void BulletsTypeMgr::Init()
 {
 pActualBullets[i] = new BulletsSettings;
 pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
-pActualBullets[i]->aFont =rActBulletFont;
+pActualBullets[i]->aFont = rActBulletFont;
 pActualBullets[i]->sDescription = SVX_RESSTR( 
RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
 }
 }
@@ -377,7 +377,7 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 if ( nIndex >= DEFAULT_BULLET_TYPES )
 return;
 sal_Unicode cChar = pActualBullets[nIndex]->cBulletChar;
-vcl::Font rActBulletFont = pActualBullets[nIndex]->aFont;
+const vcl::Font& rActBulletFont = pActualBullets[nIndex]->aFont;
 
 sal_uInt16 nMask = 1;
 OUString sBulletCharFormatName = GetBulCharFmtName();
commit 54f8ed8b8386c03922e7a98e0125309eca264d04
Author: Caolán McNamara 
Date:   Fri Mar 31 15:03:04 2017 +0100

const these up

Change-Id: If79187b8e2624da132ed47f5baf374211cc6e449

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4516054ff2c8..794e012f230f 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -157,7 +157,7 @@ static bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 
nLevelMask)
 return bRet;
 }
 
-static vcl::Font& lcl_GetDefaultBulletFont()
+static const vcl::Font& lcl_GetDefaultBulletFont()
 {
 static bool bInit = false;
 static vcl::Font aDefBulletFont("OpenSymbol", "", Size(0, 14));
@@ -490,7 +490,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, 
ValueSet*, void)
 bPreset = false;
 bModified = true;
 sal_Unicode cChar = aBulletTypes[m_pExamplesVS->GetSelectItemId() - 1];
-vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
+const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
 
 sal_uInt16 nMask = 1;
 for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
@@ -695,7 +695,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, 
ValueSet*, void)
 
 SvxNumSettingsArr_Impl& rItemArr = 
aNumSettingsArrays[m_pExamplesVS->GetSelectItemId() - 1];
 
-vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
+const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
 SvxNumSettings_Impl* pLevelSettings = nullptr;
 for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
 {
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 170032fea9a5..318ebb4dcbd9 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -63,7 +63,7 @@ using namespace com::sun::star::style;
 
 namespace svx { namespace sidebar {
 
-vcl::Font& lcl_GetDefaultBulletFont()
+const vcl::Font& lcl_GetDefaultBulletFont()
 {
 static bool bInit = false;
 static vcl::Font aDefBulletFont("OpenSymbol", "", Size(0, 14));
@@ -260,7 +260,7 @@ BulletsTypeMgr& BulletsTypeMgr::GetInstance()
 
 void BulletsTypeMgr::Init()
 {
-vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
+const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
 
 for (sal_uInt16 i=0;i= nLength )
-return sal

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

2017-03-31 Thread Katarina Behrens
 basic/source/comp/exprtree.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 351dead74b4c213b13102f81b5ae9bb47ad8ca39
Author: Katarina Behrens 
Date:   Fri Mar 17 15:12:32 2017 +0100

tdf#106529: Revert "tdf#80731 Closing parenthesis is now detected"

This reverts commit 65e294e221e0ad1d37c6667eecb995817ace870d, which
breaks several widely used Basic extensions and hundreds of anonymous
macros that miss closing parenthesis here and there

(cherry picked from commit 660e394b893a045a077ccded263f94a1be03fcf9)

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

diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 0a8b665e4ecb..c3b064da6325 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -1055,11 +1055,6 @@ SbiExprListPtr SbiExprList::ParseParameters( SbiParser* 
pParser, bool bStandalon
 {
 if( ( pExprList->bBracket && eTok == RPAREN ) || 
SbiTokenizer::IsEoln( eTok ) )
 {
-if ( SbiTokenizer::IsEoln( eTok ) && pExprList->bBracket)
-{
-pParser->Error( ERRCODE_BASIC_EXPECTED, RPAREN );
-pExprList->bError = true;
-}
 break;
 }
 pParser->Error( pExprList->bBracket ? ERRCODE_BASIC_BAD_BRACKETS : 
ERRCODE_BASIC_EXPECTED, COMMA );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2017-03-31 Thread Pranav Kant
 loleaflet/src/map/Map.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2bd1dd964614a7041ad21eeb55597f6a6d13636b
Author: Pranav Kant 
Date:   Fri Mar 31 19:56:58 2017 +0530

loleaflet: There's another socket object inside

Change-Id: I952b548e11b2456e3c9d64182444377190062b89

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index adeb8a83..11240be6 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -929,7 +929,7 @@ L.Map = L.Evented.extend({
 
_onUpdateProgress: function (e) {
if (e.statusType === 'start') {
-   if (this._socket.readyState === 1) {
+   if (this._socket.socket.readyState === 1) {
// auto-save
this.showBusy(_('Saving...'), true);
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Patrick Jaap
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit da18188c359dee813fa1d4c7000490f1512c277b
Author: Patrick Jaap 
Date:   Wed Mar 29 11:35:25 2017 +0200

tdf#101627 disable shrinking for footer textboxes

the shrinking patch a4dee94afed9ade6ac50237c8d99a6e49d3bebc1
causes problems, if the textboxes are anchored in the
footer. Therefore, disable it in this case.
For details, see comments in bug tracker.

Change-Id: I117a99041ff67c19a9de17803ff7864c62afdb50
Reviewed-on: https://gerrit.libreoffice.org/34517
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 80b9b6761e8cb974e0cdc0c7be0eb95f8745d86f)
Reviewed-on: https://gerrit.libreoffice.org/35844

diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index 4b300ce8bf3f..c1e7808517c1 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -486,8 +486,12 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustVertRelPos( 
const SwTwips nTopOfAnch
 nAdjustedRelPosY = aPgAlignArea.Top() - nTopOfAnch;
 }
 
-// tdf#91260 - allow textboxes extending beyond the page bottom
-if ( nAdjustedRelPosY < nProposedRelPosY )
+// tdf#91260  - allow textboxes extending beyond the page bottom
+// tdf#101627 - the patch a4dee94afed9ade6ac50237c8d99a6e49d3bebc1
+//  for tdf#91260 causes problems if the textbox
+//  is anchored in the footer, so exclude this case
+if ( !( GetAnchorFrame().GetUpper() && 
GetAnchorFrame().GetUpper()->IsFooterFrame() )
+ && nAdjustedRelPosY < nProposedRelPosY )
 {
 const SwFrameFormat* pFormat = &(GetFrameFormat());
 if ( SwTextBoxHelper::isTextBox(&GetObject()) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Patrick Jaap
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit cbbe5c471cad37ab434a11b804c66e0b424af8a7
Author: Patrick Jaap 
Date:   Wed Mar 29 11:35:25 2017 +0200

tdf#101627 disable shrinking for footer textboxes

the shrinking patch a4dee94afed9ade6ac50237c8d99a6e49d3bebc1
causes problems, if the textboxes are anchored in the
footer. Therefore, disable it in this case.
For details, see comments in bug tracker.

Change-Id: I117a99041ff67c19a9de17803ff7864c62afdb50
Reviewed-on: https://gerrit.libreoffice.org/34517
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 80b9b6761e8cb974e0cdc0c7be0eb95f8745d86f)
Reviewed-on: https://gerrit.libreoffice.org/35845
Tested-by: Michael Stahl 

diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index afd00eb3389a..d369ac46132a 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -486,8 +486,12 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustVertRelPos( 
const SwTwips nTopOfAnch
 nAdjustedRelPosY = aPgAlignArea.Top() - nTopOfAnch;
 }
 
-// tdf#91260 - allow textboxes extending beyond the page bottom
-if ( nAdjustedRelPosY < nProposedRelPosY )
+// tdf#91260  - allow textboxes extending beyond the page bottom
+// tdf#101627 - the patch a4dee94afed9ade6ac50237c8d99a6e49d3bebc1
+//  for tdf#91260 causes problems if the textbox
+//  is anchored in the footer, so exclude this case
+if ( !( GetAnchorFrame().GetUpper() && 
GetAnchorFrame().GetUpper()->IsFooterFrame() )
+ && nAdjustedRelPosY < nProposedRelPosY )
 {
 const SwFrameFormat* pFormat = &(GetFrameFormat());
 if ( SwTextBoxHelper::isTextBox(&GetObject()) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Michael Meeks
 wsd/LOOLWSD.cpp |4 
 1 file changed, 4 insertions(+)

New commits:
commit ca24df225ef1d6cf4a609137989f04c3e954cfb9
Author: Michael Meeks 
Date:   Fri Mar 31 15:42:45 2017 +0100

Prefork children correctly on start, rather than after a delay.

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 325d42b1..e51bf921 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2400,6 +2400,9 @@ int LOOLWSD::innerMain()
 }
 #endif
 
+// Prefork initial children
+prespawnChildren();
+
 // Start the server.
 srv.start(ClientPortNumber);
 
@@ -2464,6 +2467,7 @@ int LOOLWSD::innerMain()
 
 #ifndef KIT_IN_PROCESS
 // Wait for forkit process finish.
+LOG_INF("Waiting for forkit process to exit");
 int status = 0;
 waitpid(ForKitProcId, &status, WUNTRACED);
 close(ForKitWritePipe);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: test/Makefile.am test/UnitMinSocketBufferSize.cpp

2017-03-31 Thread Michael Meeks
 test/Makefile.am |6 --
 test/UnitMinSocketBufferSize.cpp |   86 ---
 2 files changed, 2 insertions(+), 90 deletions(-)

New commits:
commit b70b17130435da4ea1b1ddacd46297407a3858df
Author: Michael Meeks 
Date:   Fri Mar 31 15:54:26 2017 +0100

Tests: enable tilecache test and bin socket buffer size test.

diff --git a/test/Makefile.am b/test/Makefile.am
index 6be2a535..41aa6781 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -16,8 +16,7 @@ noinst_LTLIBRARIES = \
 unit-timeout.la unit-prefork.la \
 unit-storage.la \
 unit-admin.la unit-tilecache.la \
-   unit-fuzz.la unit-oob.la \
-   unit-minsocketbuffersize.la
+   unit-fuzz.la unit-oob.la
 
 MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy
 AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS)
@@ -61,7 +60,6 @@ unit_timeout_la_SOURCES = UnitTimeout.cpp
 unit_prefork_la_SOURCES = UnitPrefork.cpp
 unit_storage_la_SOURCES = UnitStorage.cpp
 unit_tilecache_la_SOURCES = UnitTileCache.cpp
-unit_minsocketbuffersize_la_SOURCES = UnitMinSocketBufferSize.cpp
 
 if HAVE_LO_PATH
 SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
@@ -74,7 +72,7 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la # unit-tilecache.la unit-storage.la unit-timeout.la 
unit-admin.la unit-minsocketbuffersize.la
+TESTS = unit-prefork.la unit-tilecache.la # unit-timeout.la # unit-storage.la 
unit-admin.la
 else
 TESTS = ${top_builddir}/test/test
 endif
diff --git a/test/UnitMinSocketBufferSize.cpp b/test/UnitMinSocketBufferSize.cpp
deleted file mode 100644
index 6bfb678b..
--- a/test/UnitMinSocketBufferSize.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "config.h"
-
-#include "Log.hpp"
-#include "Protocol.hpp"
-#include "Unit.hpp"
-#include "UnitHTTP.hpp"
-#include "helpers.hpp"
-
-using namespace helpers;
-
-class UnitMinSocketBufferSize: public UnitWSD
-{
-enum class Phase {
-Load, // load the document
-Request,  // Request tiles etc.
-CheckResponse // Check if we got correct response
-} _phase;
-std::string _docURL, _docPath;
-std::unique_ptr _ws;
-public:
-UnitMinSocketBufferSize() :
-_phase(Phase::Load)
-{
-}
-
-virtual void invokeTest()
-{
-switch (_phase)
-{
-case Phase::Load:
-{
-getDocumentPathAndURL("Example.odt", _docPath, _docURL, 
"unitMinSocketBufferSize ");
-_ws = std::unique_ptr(new UnitWebSocket(_docURL));
-assert(_ws.get());
-
-_phase = Phase::Request;
-LOG_DBG("Document loaded successfully.");
-break;
-}
-case Phase::Request:
-{
-const std::string loadMsg = "load url=" + _docURL;
-const std::string tilecombineMsg = "tilecombine part=0 width=256 
height=256 
tileposx=0,3840,7680,11520,0,3840,7680,11520,0,3840,7680,11520,0,3840,7680,11520,0,3840,7680,11520
 
tileposy=0,0,0,0,3840,3840,3840,3840,7680,7680,7680,7680,11520,11520,11520,11520,15360,15360,15360,15360
 tilewidth=3840 tileheight=3840";
-_ws->getLOOLWebSocket()->sendFrame(loadMsg.data(), loadMsg.size());
-_ws->getLOOLWebSocket()->sendFrame(tilecombineMsg.data(), 
tilecombineMsg.size());
-
-LOG_DBG("Tilecombine request sent");
-_phase = Phase::CheckResponse;
-break;
-}
-case Phase::CheckResponse:
-LOG_DBG("Checking if get back all the tiles");
-int nTiles = 20;
-bool success = true;
-while (nTiles--)
-{
-const auto tile = getResponseMessage(*_ws->getLOOLWebSocket(), 
"tile: part=0 width=256 height=256", "Waiting for tiles ...");
-const auto firstLine = LOOLProtocol::getFirstLine(tile);
-LOG_DBG("Tile received " << firstLine);
-if (!LOOLProtocol::matchPrefix("tile:", firstLine))
-{
-success = false;
-}
-}
-
-exitTest(success ? TestResult::Ok : TestResult::Failed);
-break;
-}
-}
-};
-
-UnitBase *unit_create_wsd(void)
-{
-return new UnitMinSocketBufferSize();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing li

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

2017-03-31 Thread dennisroczek
 connectivity/source/drivers/firebird/Util.hxx |2 -
 dbaccess/source/ui/dlg/generalpage.cxx|2 -
 odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile |   20 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 12e88e3b28fd47c00c87583999053db6ad8660be
Author: dennisroczek 
Date:   Wed Mar 15 16:03:00 2017 +

fix typo: databse --> database

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

diff --git a/connectivity/source/drivers/firebird/Util.hxx 
b/connectivity/source/drivers/firebird/Util.hxx
index 9a452956e3b6..1900ed4b87d1 100644
--- a/connectivity/source/drivers/firebird/Util.hxx
+++ b/connectivity/source/drivers/firebird/Util.hxx
@@ -34,7 +34,7 @@ namespace connectivity
 };
 
 /**
- * Make sure an identifier is safe to use within the databse. Currently
+ * Make sure an identifier is safe to use within the database. 
Currently
  * firebird seems to return identifiers with 93 character (instead of
  * 31), whereby the name is simply padded with trailing whitespace.
  * This removes all trailing whitespace (i.e. if necessary so that
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 54d93741a1b0..e368ca681baf 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -616,7 +616,7 @@ namespace dbaui
 
 OUString OGeneralPageWizard::getDatasourceName(const SfxItemSet& _rSet)
 {
-// Sets jdbc as the default selected databse on startup.
+// Sets jdbc as the default selected database on startup.
 if (m_pRB_CreateDatabase->IsChecked() )
 return m_pCollection->getTypeDisplayName( "jdbc:" );
 
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile 
b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
index 373acacf9240..567ba11490d2 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
@@ -2,7 +2,7 @@
 #
 #  The Contents of this file are made available subject to the terms of
 #  the BSD license.
-#  
+#
 #  Copyright 2000, 2010 Oracle and/or its affiliates.
 #  All rights reserved.
 #
@@ -29,10 +29,10 @@
 #  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
 #  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 #  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# 
+#
 #**
 
-# Builds the Databse SDBC driver skeleton example of the Developers Guide.
+# Builds the Database SDBC driver skeleton example of the Developers Guide.
 
 PRJ=../../../..
 SETTINGS=$(PRJ)/settings
@@ -74,7 +74,7 @@ ALL : \
 include $(SETTINGS)/stdtarget.mk
 
 $(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
-   -$(MKDIR) $(subst /,$(PS),$(@D)) 
+   -$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) $(STL_INCLUDES) -I$(OUT_COMP_INC) 
$(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
 
 ifeq "$(OS)" "WIN"
@@ -87,7 +87,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
$(LINK_MANIFEST)
 else
 $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-   -$(MKDIR) $(subst /,$(PS),$(@D)) 
+   -$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB)
 ifeq "$(OS)" "MACOSX"
@@ -117,8 +117,8 @@ $(COMP_COMPONENTS) :
@echo $(OSEP)/components$(CSEP) >> $@
 
 $(COMP_PACKAGE) : $(COMP_LIBRARY) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-   -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst 
/,$(PS),$@)) 
-   -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC)/$(UNOPKG_PLATFORM))   
+   -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst 
/,$(PS),$@))
+   -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC)/$(UNOPKG_PLATFORM))
$(COPY) $(subst /,$(PS),$<) $(subst 
/,$(PS),$(OUT_COMP_MISC)/$(UNOPKG_PLATFORM))
cd $(subst /,$(PS),$(OUT_COMP_MISC)) && $(SDK_ZIP) ../../bin/$(@F) 
$(COMP_NAME).components
cd $(subst /,$(PS),$(OUT_COMP_MISC)) && $(SDK_ZIP) -u ../../bin/$(@F) 
$(UNOPKG_PLATFORM)/$( $(subst /,$(PS),$@)
 else
@echo 

@echo  If you want to install your component automatically, please set 
the environment
-   @echo  variable SDK_AUTO_DEPLOYMENT = YES. But note that auto 
deployment is only 
-   @echo  possible if no office instance is running. 
+   @echo  variable SDK_AUTO_DEPLOYMENT = YES. But note that auto 
deployment is only
+   

[Libreoffice-commits] online.git: test/Makefile.am wsd/LOOLWSD.cpp

2017-03-31 Thread Michael Meeks
 test/Makefile.am |2 +-
 wsd/LOOLWSD.cpp  |5 -
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 68bbd40bdc6626061b4d7fc7569fc7622f2bbb4d
Author: Michael Meeks 
Date:   Fri Mar 31 16:00:32 2017 +0100

UnitTimeout: repair unit test timeout fidelity.

diff --git a/test/Makefile.am b/test/Makefile.am
index 41aa6781..c70bfe84 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -72,7 +72,7 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la unit-tilecache.la # unit-timeout.la # unit-storage.la 
unit-admin.la
+TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la # unit-storage.la 
unit-admin.la
 else
 TESTS = ${top_builddir}/test/test
 endif
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index e51bf921..db5f55a2 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2419,7 +2419,10 @@ int LOOLWSD::innerMain()
 UnitWSD::get().invokeTest();
 
 // This timeout affects the recovery time of prespawned children.
-mainWait.poll(SocketPoll::DefaultPollTimeoutMs * 4);
+int msWait = UnitWSD::isUnitTesting() ?
+UnitWSD::get().getTimeoutMilliSeconds() / 4 :
+SocketPoll::DefaultPollTimeoutMs * 4;
+mainWait.poll(msWait);
 
 // Wake the prisoner poll to spawn some children, if necessary.
 PrisonerPoll.wakeup();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - 2 commits - chart2/qa sc/source xmloff/source

2017-03-31 Thread Tomaž Vajngerl
 chart2/qa/extras/PivotChartTest.cxx  |1 -
 sc/source/ui/unoobj/PivotChartDataSource.cxx |2 +-
 xmloff/source/chart/SchXMLChartContext.cxx   |4 
 xmloff/source/chart/SchXMLImport.cxx |   13 +
 4 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit abfaae8bf10b3bd18fe2155474cc861e934d7925
Author: Tomaž Vajngerl 
Date:   Fri Mar 31 17:56:35 2017 +0200

xmloff: assign the number format supplier at construction

Change-Id: Ieb6af6351312a15bb71bbd8534d021a805b194a7

diff --git a/xmloff/source/chart/SchXMLChartContext.cxx 
b/xmloff/source/chart/SchXMLChartContext.cxx
index 88420d62cdc0..aaddc433b8a7 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -257,10 +257,6 @@ void 
lcl_setDataProvider(uno::Reference xChartDoc, OUStr
 Reference xFact(xChild->getParent(), 
uno::UNO_QUERY);
 if (xFact.is())
 {
-//if the parent has a number formatter we will use the 
numberformatter of the parent
-Reference 
xNumberFormatsSupplier(xFact, uno::UNO_QUERY);
-
xDataReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier);
-
 if (!xChartDoc->getDataProvider().is())
 {
 bool bHasDataPilotSource = !sDataPilotSource.isEmpty();
diff --git a/xmloff/source/chart/SchXMLImport.cxx 
b/xmloff/source/chart/SchXMLImport.cxx
index a240a9344989..10d8fc105b39 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -591,6 +591,19 @@ void SAL_CALL SchXMLImport::setTargetDocument(const 
uno::ReferencelockControllers();
+
+uno::Reference xChild(xChartDoc, uno::UNO_QUERY);
+uno::Reference xDataReceiver(xChartDoc, 
uno::UNO_QUERY);
+if (xChild.is() && xDataReceiver.is())
+{
+Reference xFact(xChild->getParent(), 
uno::UNO_QUERY);
+if (xFact.is())
+{
+//if the parent has a number formatter we will use the 
numberformatter of the parent
+Reference 
xNumberFormatsSupplier(xFact, uno::UNO_QUERY);
+
xDataReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier);
+}
+}
 }
 catch (const uno::Exception & rEx)
 {
commit 841dad721392acab01e1b679dee5bb62014c6ed8
Author: Tomaž Vajngerl 
Date:   Fri Mar 31 17:56:06 2017 +0200

compile fixes

Change-Id: Ic1f67280b21c4b5343dee7f09e840f6e651daea8

diff --git a/chart2/qa/extras/PivotChartTest.cxx 
b/chart2/qa/extras/PivotChartTest.cxx
index ad98c60869da..b54888ef2a2f 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -188,7 +188,6 @@ void PivotChartTest::testChangePivotTable()
 uno::Reference xDataPilotTables = 
xDataPilotTablesSupplier->getDataPilotTables();
 uno::Reference 
xDataPilotTable(xDataPilotTables->getByName("DataPilot1"), UNO_QUERY_THROW);
 uno::Reference 
xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW);
-uno::Reference 
xPilotIndexAccess(xDataPilotDescriptor->getDataPilotFields(), UNO_QUERY_THROW);
 
 lclModifyOrientation(xDataPilotDescriptor, "Service Month", 
sheet::DataPilotFieldOrientation_ROW);
 lclModifyOrientation(xDataPilotDescriptor, "Group Segment", 
sheet::DataPilotFieldOrientation_COLUMN);
diff --git a/sc/source/ui/unoobj/PivotChartDataSource.cxx 
b/sc/source/ui/unoobj/PivotChartDataSource.cxx
index 2f95e2a4d329..00949a6b2e89 100644
--- a/sc/source/ui/unoobj/PivotChartDataSource.cxx
+++ b/sc/source/ui/unoobj/PivotChartDataSource.cxx
@@ -35,7 +35,7 @@ PivotChartDataSource::~PivotChartDataSource()
 {
 }
 
-void PivotChartDataSource::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
rHint)
+void PivotChartDataSource::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
/*rHint*/)
 {
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - writerfilter/source

2017-03-31 Thread Michael Stahl
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 64cc9de6665a5122b800bb478628d8aa76030dd6
Author: Michael Stahl 
Date:   Thu Mar 30 23:11:41 2017 +0200

writerfilter: DOCX import: fix handling of w:hideMark vs. w:vMerge

The problem is that Writer's layout can't handle the case where cells
are vertically merged and the last row has a fixed height; the vertically
merged cell will grow up to the height of the other cells in the non-
fixed rows plus the fixed row height, but no larger.

So for now, avoid setting fixed row heights in this case.

(regression from d1278ef4849661b9ae0eb7aaf4d74fbf91ccaf11)

Change-Id: Iac3689e0bb0d5b8a62115ca0fb1f2c553a6e6bbc
(cherry picked from commit c382c998ffdaf80c10a3f078fb4f0a37224d1158)
Reviewed-on: https://gerrit.libreoffice.org/35960
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 7d7d21cfa53c8e80fd4dd0938579d8377da5a840)
Reviewed-on: https://gerrit.libreoffice.org/35971

diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index a2e0495d97ff..12d22f321151 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -862,8 +862,12 @@ CellPropertyValuesSeq_t 
DomainMapperTableHandler::endTableGetCellProperties(Tabl
 bool lcl_hideMarks(PropertyMapVector1& rCellProperties)
 {
 for (PropertyMapPtr & p : rCellProperties)
-if (!p->isSet(PROP_CELL_HIDE_MARK))
+{
+// if anything is vertically merged, the row must not be set to fixed
+// as Writer's layout doesn't handle that well
+if (!p->isSet(PROP_CELL_HIDE_MARK) || p->isSet(PROP_VERTICAL_MERGE))
 return false;
+}
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 3 commits - common/FileUtil.cpp common/Unit.hpp net/Socket.cpp net/Socket.hpp test/Makefile.am test/UnitStorage.cpp wsd/DocumentBroker.cpp

2017-03-31 Thread Michael Meeks
 common/FileUtil.cpp|5 +
 common/Unit.hpp|7 +++
 net/Socket.cpp |   24 
 net/Socket.hpp |3 +++
 test/Makefile.am   |2 +-
 test/UnitStorage.cpp   |   44 ++--
 wsd/DocumentBroker.cpp |3 +++
 7 files changed, 65 insertions(+), 23 deletions(-)

New commits:
commit aeb204fb1480ac269fe4f0e9dac34b34aaf01e8b
Author: Michael Meeks 
Date:   Fri Mar 31 17:28:20 2017 +0100

Kill race during DocumentBroker shutdown over child process.

==20033== Invalid read of size 4
==20033==at 0x466504: ChildProcess::close(bool) (DocumentBroker.hpp:111)
==20033==by 0x44EA28: DocumentBroker::terminateChild(std::string 
const&, bool) (DocumentBroker.cpp:1313)
==20033==by 0x45F70E: DocumentBroker::pollThread() 
(DocumentBroker.cpp:264)
==20033==by 0x504B2F: SocketPoll::pollingThreadEntry() (Socket.hpp:486)
==20033==by 0x7310E6F: execute_native_thread_routine (thread.cc:84)
==20033==by 0x7AF60A3: start_thread (pthread_create.c:309)
==20033==by 0x7DF002C: clone (clone.S:111)
==20033==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

diff --git a/net/Socket.cpp b/net/Socket.cpp
index fdeb8677..39906bf7 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -61,14 +61,7 @@ SocketPoll::SocketPoll(const std::string& threadName)
 
 SocketPoll::~SocketPoll()
 {
-stop();
-if (_threadStarted && _thread.joinable())
-{
-if (_thread.get_id() == std::this_thread::get_id())
-LOG_ERR("DEADLOCK PREVENTED: joining own thread!");
-else
-_thread.join();
-}
+joinThread();
 
 {
 std::lock_guard lock(getPollWakeupsMutex());
@@ -104,6 +97,21 @@ void SocketPoll::startThread()
 }
 }
 
+void SocketPoll::joinThread()
+{
+stop();
+if (_threadStarted && _thread.joinable())
+{
+if (_thread.get_id() == std::this_thread::get_id())
+LOG_ERR("DEADLOCK PREVENTED: joining own thread!");
+else
+{
+_thread.join();
+_threadStarted = false;
+}
+}
+}
+
 void SocketPoll::wakeupWorld()
 {
 for (const auto& fd : getWakeupsArray())
diff --git a/net/Socket.hpp b/net/Socket.hpp
index c45caf77..4d723d99 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -451,6 +451,9 @@ public:
 /// Start the polling thread (if desired)
 void startThread();
 
+/// Stop and join the polling thread before returning (if active)
+void joinThread();
+
 private:
 /// Initialize the poll fds array with the right events
 void setupPollFds(std::chrono::steady_clock::time_point now,
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 7894805c..0a6d2f01 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -295,6 +295,9 @@ DocumentBroker::~DocumentBroker()
 LOG_INF("~DocumentBroker [" << _uriPublic.toString() <<
 "] destroyed with " << _sessions.size() << " sessions left.");
 
+// Do this early - to avoid operating on _childProcess from two threads.
+_poll->joinThread();
+
 if (!_sessions.empty())
 {
 LOG_WRN("DocumentBroker still has unremoved sessions.");
commit 2bca560feb3fa31ee341347ec5c91c788c7c1ed7
Author: Michael Meeks 
Date:   Fri Mar 31 17:18:41 2017 +0100

Add hook for disk space check.

diff --git a/common/FileUtil.cpp b/common/FileUtil.cpp
index 02d2e705..af6dfef5 100644
--- a/common/FileUtil.cpp
+++ b/common/FileUtil.cpp
@@ -27,6 +27,7 @@
 
 #include "Log.hpp"
 #include "Util.hpp"
+#include "Unit.hpp"
 
 namespace
 {
@@ -233,6 +234,10 @@ namespace FileUtil
 {
 assert(!path.empty());
 
+bool hookResult;
+if (UnitBase::get().filterCheckDiskSpace(path, hookResult))
+return hookResult;
+
 struct statfs sfs;
 if (statfs(path.c_str(), &sfs) == -1)
 return true;
diff --git a/common/Unit.hpp b/common/Unit.hpp
index 69d0b3bc..e8197fd1 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -95,6 +95,13 @@ public:
 return false;
 }
 
+/// Hook the disk space check
+virtual bool filterCheckDiskSpace(const std::string & /* path */,
+  bool & /* newResult */)
+{
+return false;
+}
+
 /// If the test times out this gets invoked, the default just exits.
 virtual void timeout();
 
diff --git a/test/UnitStorage.cpp b/test/UnitStorage.cpp
index e67118fc..525a2fd2 100644
--- a/test/UnitStorage.cpp
+++ b/test/UnitStorage.cpp
@@ -33,17 +33,11 @@ public:
 {
 }
 
-virtual bool filterLoad(const std::string &sessionId,
-const std::string &jailId,
-bool &/* result */)
+bool filterCheckDiskSpace(const std::string & /* path */,
+  bool &newResult) override
 {
-LOG_TRC("FilterLoad: " << sessionId << " jail " << jailId

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

2017-03-31 Thread Marco Cecchetti
 sc/qa/unit/tiledrendering/data/smile.png |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   44 +++
 sc/source/ui/inc/gridwin.hxx |5 +++
 sc/source/ui/view/gridwin4.cxx   |7 +---
 svx/source/svdraw/sdrpagewindow.cxx  |   20 +++-
 5 files changed, 70 insertions(+), 6 deletions(-)

New commits:
commit 325d211aae0ef54c8e0b90ca594c4af336818259
Author: Marco Cecchetti 
Date:   Tue Jan 3 11:56:05 2017 +0100

LOK: Calc: unit test for invalidation on insert image

Change-Id: Ie7c55c3a5c366618cafa51f9f1a102fb3cb26ec5

diff --git a/sc/qa/unit/tiledrendering/data/smile.png 
b/sc/qa/unit/tiledrendering/data/smile.png
new file mode 100644
index ..ba0b89172b25
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/smile.png differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 2510d161387a..06fda94ff40b 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -79,6 +79,7 @@ public:
 void testCommentCallback();
 void testUndoLimiting();
 void testUndoRepairDispatch();
+void testInsertGraphicInvalidations();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnSelections);
@@ -103,6 +104,7 @@ public:
 CPPUNIT_TEST(testCommentCallback);
 CPPUNIT_TEST(testUndoLimiting);
 CPPUNIT_TEST(testUndoRepairDispatch);
+CPPUNIT_TEST(testInsertGraphicInvalidations);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1264,7 +1266,49 @@ void ScTiledRenderingTest::testUndoRepairDispatch()
 
 mxComponent->dispose();
 mxComponent.clear();
+comphelper::LibreOfficeKit::setActive(false);
+}
+
+void ScTiledRenderingTest::testInsertGraphicInvalidations()
+{
+comphelper::LibreOfficeKit::setActive();
+
+ScModelObj* pModelObj = createDoc("small.ods");
+CPPUNIT_ASSERT(pModelObj);
+ScViewData* pViewData = ScDocShell::GetViewData();
+CPPUNIT_ASSERT(pViewData);
+
+// view
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+
+// we need to paint a tile in the view for triggering the tile 
invalidation solution
+int nCanvasWidth = 256;
+int nCanvasHeight = 256;
+std::vector aBuffer(nCanvasWidth * nCanvasHeight * 4);
+ScopedVclPtrInstance pDevice(nullptr, Size(1, 1), 
DeviceFormat::DEFAULT);
+pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nCanvasWidth, 
nCanvasHeight), Fraction(1.0), Point(), aBuffer.data());
+pModelObj->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, 
/*nTilePosX=*/0, /*nTilePosY=*/0, /*nTileWidth=*/3840, /*nTileHeight=*/3840);
+Scheduler::ProcessEventsToIdle();
+
+// insert an image in view and see if both views are invalidated
+aView.m_bInvalidateTiles = false;
+uno::Sequence aArgs(1);
+aArgs[0].Name = OUString::fromUtf8("FileName");
+aArgs[0].Value <<= (m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"smile.png");
+comphelper::dispatchCommand(".uno:InsertGraphic", aArgs);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
 
+// undo image insertion in view and see if both views are invalidated
+aView.m_bInvalidateTiles = false;
+uno::Sequence aArgs2;
+comphelper::dispatchCommand(".uno:Undo", aArgs2);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
+
+mxComponent->dispose();
+mxComponent.clear();
 comphelper::LibreOfficeKit::setActive(false);
 }
 
commit 83487c28d3e2d0b331dd161b97a804be8e9bc1b9
Author: Jan Holesovsky 
Date:   Fri Mar 31 18:17:23 2017 +0200

lok sc: Don't depend on the OutputDevice existence when invalidating.

We know that the drawinglayer operates in 100th of millimetre, and that we
need twips for LOK.

Change-Id: I8813f936ab66eaca4d6b9c03341e090d703decb8

diff --git a/svx/source/svdraw/sdrpagewindow.cxx 
b/svx/source/svdraw/sdrpagewindow.cxx
index add2130a32be..729c65ea997e 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -36,7 +36,7 @@
 #include 
 #include 
 #include 
-
+#include 
 
 using namespace ::com::sun::star;
 
@@ -409,7 +409,23 @@ void SdrPageWindow::RedrawLayer(const SdrLayerID* pId,
 // Invalidate call, used from ObjectContact(OfPageView) in 
InvalidatePartOfView(...)
 void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
 {
-if(GetPageView().IsVisible() && GetPaintWindow().OutputToWindow())
+if (comphelper::LibreOfficeKit::isActive())
+{
+// we don't really have a paint window with LOK; OTOH we know that the
+// drawinglayer units are 100ths of mm, so they are easy to convert to
+// twips
+const Rectangle aRect100thMM(
+static_cast(floor(rRange.getMinX())),
+static_cast(floor(rRange.getMinY

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

2017-03-31 Thread Marco Cecchetti
 sc/qa/unit/tiledrendering/data/smile.png |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   44 +++
 sc/source/ui/inc/gridwin.hxx |5 +++
 sc/source/ui/view/gridwin4.cxx   |7 +---
 svx/source/svdraw/sdrpagewindow.cxx  |   20 +++-
 5 files changed, 70 insertions(+), 6 deletions(-)

New commits:
commit 6b6b99bad355185169a87d724538cb9074285c65
Author: Marco Cecchetti 
Date:   Tue Jan 3 11:56:05 2017 +0100

LOK: Calc: unit test for invalidation on insert image

Change-Id: Ie7c55c3a5c366618cafa51f9f1a102fb3cb26ec5

diff --git a/sc/qa/unit/tiledrendering/data/smile.png 
b/sc/qa/unit/tiledrendering/data/smile.png
new file mode 100644
index ..ba0b89172b25
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/smile.png differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 5e1ba9b3cec1..cb0f5aea7b9b 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -74,6 +74,7 @@ public:
 void testCommentCallback();
 void testUndoLimiting();
 void testUndoRepairDispatch();
+void testInsertGraphicInvalidations();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnSelections);
@@ -98,6 +99,7 @@ public:
 CPPUNIT_TEST(testCommentCallback);
 CPPUNIT_TEST(testUndoLimiting);
 CPPUNIT_TEST(testUndoRepairDispatch);
+CPPUNIT_TEST(testInsertGraphicInvalidations);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1259,7 +1261,49 @@ void ScTiledRenderingTest::testUndoRepairDispatch()
 
 mxComponent->dispose();
 mxComponent.clear();
+comphelper::LibreOfficeKit::setActive(false);
+}
+
+void ScTiledRenderingTest::testInsertGraphicInvalidations()
+{
+comphelper::LibreOfficeKit::setActive();
+
+ScModelObj* pModelObj = createDoc("small.ods");
+CPPUNIT_ASSERT(pModelObj);
+ScViewData* pViewData = ScDocShell::GetViewData();
+CPPUNIT_ASSERT(pViewData);
+
+// view
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+
+// we need to paint a tile in the view for triggering the tile 
invalidation solution
+int nCanvasWidth = 256;
+int nCanvasHeight = 256;
+std::vector aBuffer(nCanvasWidth * nCanvasHeight * 4);
+ScopedVclPtrInstance pDevice(nullptr, Size(1, 1), 
DeviceFormat::DEFAULT);
+pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nCanvasWidth, 
nCanvasHeight), Fraction(1.0), Point(), aBuffer.data());
+pModelObj->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, 
/*nTilePosX=*/0, /*nTilePosY=*/0, /*nTileWidth=*/3840, /*nTileHeight=*/3840);
+Scheduler::ProcessEventsToIdle();
+
+// insert an image in view and see if both views are invalidated
+aView.m_bInvalidateTiles = false;
+uno::Sequence aArgs(1);
+aArgs[0].Name = OUString::fromUtf8("FileName");
+aArgs[0].Value <<= (m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"smile.png");
+comphelper::dispatchCommand(".uno:InsertGraphic", aArgs);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
 
+// undo image insertion in view and see if both views are invalidated
+aView.m_bInvalidateTiles = false;
+uno::Sequence aArgs2;
+comphelper::dispatchCommand(".uno:Undo", aArgs2);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
+
+mxComponent->dispose();
+mxComponent.clear();
 comphelper::LibreOfficeKit::setActive(false);
 }
 
commit 437612237aa31437dfcb639c72e349edd3ccef27
Author: Jan Holesovsky 
Date:   Fri Mar 31 18:17:23 2017 +0200

lok sc: Don't depend on the OutputDevice existence when invalidating.

We know that the drawinglayer operates in 100th of millimetre, and that we
need twips for LOK.

Change-Id: I8813f936ab66eaca4d6b9c03341e090d703decb8

diff --git a/svx/source/svdraw/sdrpagewindow.cxx 
b/svx/source/svdraw/sdrpagewindow.cxx
index e6db45293c4a..fcd8cbc678a1 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -36,7 +36,7 @@
 #include 
 #include 
 #include 
-
+#include 
 
 using namespace ::com::sun::star;
 
@@ -406,7 +406,23 @@ void SdrPageWindow::RedrawLayer( const SdrLayerID* pId, 
sdr::contact::ViewObject
 // Invalidate call, used from ObjectContact(OfPageView) in 
InvalidatePartOfView(...)
 void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
 {
-if(GetPageView().IsVisible() && GetPaintWindow().OutputToWindow())
+if (comphelper::LibreOfficeKit::isActive())
+{
+// we don't really have a paint window with LOK; OTOH we know that the
+// drawinglayer units are 100ths of mm, so they are easy to convert to
+// twips
+const Rectangle aRect100thMM(
+static_cast(floor(rRange.getMinX())),
+static_

[Libreoffice-commits] online.git: Changes to 'private/mmeeks/fixing'

2017-03-31 Thread Michael Meeks
New branch 'private/mmeeks/fixing' available with the following commits:
commit c29d67c51235684c1143673bd1755273be64a698
Author: Michael Meeks 
Date:   Fri Mar 31 20:58:33 2017 +0100

Join threads to force a reasonably sensible shutdown sequence.

ie. actually wait until documents are saved and sessions closed.

commit 715d5711f3a303d1a5f5325b3050192263ad5866
Author: Michael Meeks 
Date:   Fri Mar 31 17:55:26 2017 +0100

Remove sessions if exceptions occur during load.

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Miklos Vajna
 svx/source/svdraw/sdrpagewindow.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2e44b79233591a2b5f2f927b233f09b43c005e7a
Author: Miklos Vajna 
Date:   Fri Mar 31 22:11:01 2017 +0200

svx: fix missing namespace

Change-Id: Ibfd783f42b376952442e017537276a00f4dafc8e

diff --git a/svx/source/svdraw/sdrpagewindow.cxx 
b/svx/source/svdraw/sdrpagewindow.cxx
index 729c65ea997e..b88a1c48ffa8 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -414,13 +414,13 @@ void SdrPageWindow::InvalidatePageWindow(const 
basegfx::B2DRange& rRange)
 // we don't really have a paint window with LOK; OTOH we know that the
 // drawinglayer units are 100ths of mm, so they are easy to convert to
 // twips
-const Rectangle aRect100thMM(
+const tools::Rectangle aRect100thMM(
 static_cast(floor(rRange.getMinX())),
 static_cast(floor(rRange.getMinY())),
 static_cast(ceil(rRange.getMaxX())),
 static_cast(ceil(rRange.getMaxY(;
 
-const Rectangle aRectTwips = OutputDevice::LogicToLogic(aRect100thMM, 
MapUnit::Map100thMM, MapUnit::MapTwip);
+const tools::Rectangle aRectTwips = 
OutputDevice::LogicToLogic(aRect100thMM, MapUnit::Map100thMM, MapUnit::MapTwip);
 
 if (SfxViewShell* pViewShell = SfxViewShell::Current())
 SfxLokHelper::notifyInvalidation(pViewShell, 
aRectTwips.toString());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/mmeeks/fixing' - test/Makefile.am

2017-03-31 Thread Michael Meeks
 test/Makefile.am |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a80d9afbb5b46b11996794ab80e6cb0934970abc
Author: Michael Meeks 
Date:   Fri Mar 31 21:12:30 2017 +0100

Re-enable the updated storage test.

diff --git a/test/Makefile.am b/test/Makefile.am
index 2935e6a0..672737b2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -72,7 +72,7 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la # unit-storage.la # 
unit-admin.la
+TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la unit-storage.la # 
unit-admin.la
 else
 TESTS = ${top_builddir}/test/test
 endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Application to Google Summer of Code

2017-03-31 Thread Hoffer, Alex Daniel
Hi,

I have submitted the link to my draft proposal "Revamping the Customization
dialog for LibreOffice" via the Google SoC interface. However, I have
consulted the link you provided "How to Apply" and am wondering about these
two components of my application: "Present yourself" and "Prove that you
want to get involved". Do these have to be done BEFORE April 3?

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


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

2017-03-31 Thread Olivier Hallot
 AllLangHelp_shared.mk|1 
 source/text/shared/01/grid_and_helplines.xhp |   41 +++
 2 files changed, 42 insertions(+)

New commits:
commit 0d1048bd6a3ad7ca6b6827c74c70e4c65ea32c54
Author: Olivier Hallot 
Date:   Fri Mar 31 18:49:03 2017 -0300

Add missing embed file

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

diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index e5f29dd00..0deb8b212 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -332,6 +332,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 helpcontent2/source/text/shared/01/gallery \
 helpcontent2/source/text/shared/01/gallery_files \
 helpcontent2/source/text/shared/01/grid \
+helpcontent2/source/text/shared/01/grid_and_helplines \
 helpcontent2/source/text/shared/01/guides \
 helpcontent2/source/text/shared/01/mediaplayer \
 helpcontent2/source/text/shared/01/menu_edit_find \
diff --git a/source/text/shared/01/grid_and_helplines.xhp 
b/source/text/shared/01/grid_and_helplines.xhp
new file mode 100644
index 0..3f99c1296
--- /dev/null
+++ b/source/text/shared/01/grid_and_helplines.xhp
@@ -0,0 +1,41 @@
+
+
+
+
+
+  
+Grid and Help Lines
+/text/shared/01/grid_and_helplines.xhp
+  
+
+
+
+
+
+
+
+
+Grid and 
Help Lines
+Toggle the visibility of grid points and guide 
lines to help object moving and precise position in the current 
sheet.
+
+
+
+
+
+
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-03-31 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cdb75e0172d09d235f91c417fca0712add6b6e49
Author: Olivier Hallot 
Date:   Fri Mar 31 18:49:03 2017 -0300

Updated core
Project: help  0d1048bd6a3ad7ca6b6827c74c70e4c65ea32c54

Add missing embed file

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

diff --git a/helpcontent2 b/helpcontent2
index 9f6da2a058bb..0d1048bd6a3a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9f6da2a058bbd85ed331724e0b81986508c84ac5
+Subproject commit 0d1048bd6a3ad7ca6b6827c74c70e4c65ea32c54
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Kohei Yoshida
 sc/source/ui/docshell/docfunc.cxx |   16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

New commits:
commit c0ba76030ab03f9a424d36113a2def38eca3fb7c
Author: Kohei Yoshida 
Date:   Fri Mar 31 21:10:48 2017 -0400

This is a prime candidate for unique_ptr.

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

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index e822dcd4dfe5..18f12cfe728f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -2670,7 +2671,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 SCTAB nDestEndTab = nDestTab+nSrcTabCount-1;
 SCTAB nTab;
 
-ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
+std::unique_ptr pClipDoc = 
o3tl::make_unique(SCDOCMODE_CLIP);
 
 ScMarkData aSourceMark;
 for (nTab=nStartTab; nTab<=nEndTab; nTab++)
@@ -2686,7 +2687,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 ScDrawLayer::SetGlobalDrawPersist( aDragShellRef.get() );
 
 ScClipParam aClipParam(ScRange(nStartCol, nStartRow, nStartTab, nEndCol, 
nEndRow, nStartTab), bCut);
-rDoc.CopyToClip(aClipParam, pClipDoc, &aSourceMark, bScenariosAdded, true);
+rDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, bScenariosAdded, 
true);
 
 ScDrawLayer::SetGlobalDrawPersist(nullptr);
 
@@ -2726,7 +2727,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 {
 if (!bApi)
 rDocShell.ErrorMessage(STR_PASTE_FULL);
-delete pClipDoc;
 return false;
 }
 
@@ -2743,7 +2743,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 {
 if (!bApi)
 rDocShell.ErrorMessage(aTester.GetMessageId());
-delete pClipDoc;
 return false;
 }
 
@@ -2755,7 +2754,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 {   // "Merge of already merged cells not possible"
 if (!bApi)
 rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
-delete pClipDoc;
 return false;
 }
 
@@ -2811,7 +2809,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 nUndoEndCol,nUndoEndRow,nDestEndTab,
 HasAttrFlags::Merged | 
HasAttrFlags::Overlapped ))
 {
-rDoc.CopyFromClip( rSource, aSourceMark, 
InsertDeleteFlags::ALL, nullptr, pClipDoc );
+rDoc.CopyFromClip( rSource, aSourceMark, 
InsertDeleteFlags::ALL, nullptr, pClipDoc.get() );
 for (nTab=nStartTab; nTab<=nEndTab; nTab++)
 {
 SCCOL nTmpEndCol = nEndCol;
@@ -2824,7 +2822,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
 
 delete pUndoDoc;
-delete pClipDoc;
 return false;
 }
 
@@ -2843,7 +2840,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 ScDrawLayer::MoveCells() which may move away inserted objects to wrong
 positions (e.g. if source and destination range overlaps).*/
 rDoc.CopyFromClip( aPasteDest, aDestMark, InsertDeleteFlags::ALL & 
~(InsertDeleteFlags::OBJECTS),
-nullptr, pClipDoc, true, false, bIncludeFiltered );
+nullptr, pClipDoc.get(), true, false, bIncludeFiltered 
);
 
 // skipped rows and merged cells don't mix
 if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
@@ -2858,7 +2855,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 clipdoc does not contain a drawing layer.*/
 if ( pClipDoc->GetDrawLayer() )
 rDoc.CopyFromClip( aPasteDest, aDestMark, InsertDeleteFlags::OBJECTS,
-   nullptr, pClipDoc, true, false, bIncludeFiltered );
+   nullptr, pClipDoc.get(), true, false, 
bIncludeFiltered );
 
 if (bRecord)
 {
@@ -2954,7 +2951,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 
 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
 
-delete pClipDoc;
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Autogen.sh cannot find ODBC

2017-03-31 Thread Nathaniel Brooks
Upon running autogen.sh on a new pull of master, I am unable to run make.
It states:
  checking which odbc headers to use... external
  checking for sqlext.h... no
  configure: error: odbc not found. install odbc

I know ODBC the program as a whole is installed since it is a core WIndows
component. I was wandering if this is a PATH variable issue with not being
able to find the ODBC headers.  I don't believe ODBC requires any variable
and it may have been caused by something I did to Visual Studio when
installing an optional feature (ex: SQL tools, web development tools,
etc.).  Obviously I can go through and uninstall Visual Studio and/or reset
Windows, but I would like to know if there is a specific cause to this or
if there is an autogen.input option for this.  Watch it be something
trivial I am overlooking.


make.log
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice