[Libreoffice-commits] core.git: desktop/source include/rtl sal/qa sal/rtl

2018-08-01 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx|4 +--
 include/rtl/alloc.h|   30 ++
 sal/qa/rtl/alloc/rtl_alloc.cxx |4 +--
 sal/rtl/strimp.cxx |   46 -
 4 files changed, 25 insertions(+), 59 deletions(-)

New commits:
commit e3c0b6e6eecdcd94b37d8bb126668ec0db52d487
Author: Stephan Bergmann 
AuthorDate: Wed Aug 1 20:39:18 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 2 08:19:49 2018 +0200

Revert rtl_alloc_preInit back to boolean argument

This effectively reverts 271a663d2f098f3f665cab6da2e13b265a7eab93 "rtl: 
support
start/stop threads around pre-init" again, now that
df6ba650469a6f2fda06ef1c2e107ccdd3570505 "Remove 'officially dead now' 
rtl_cache
slab allocator mechanism" removed the wsupdate thread.

(rtl_alloc_preInit is an internal-use-only C function, so changing its 
arguments
doesn't affect URE compatibility.)

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 04f586ce4eb3..3af3b54d015f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3815,9 +3815,9 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 return 1;
 
 if (eStage == PRE_INIT)
-rtl_alloc_preInit(rtlAllocPreInitStart);
+rtl_alloc_preInit(true);
 else if (eStage == SECOND_INIT)
-rtl_alloc_preInit(rtlAllocPreInitEnd);
+rtl_alloc_preInit(false);
 
 if (eStage != SECOND_INIT)
 comphelper::LibreOfficeKit::setActive();
diff --git a/include/rtl/alloc.h b/include/rtl/alloc.h
index cc3cec6ef292..74d4ea5c4339 100644
--- a/include/rtl/alloc.h
+++ b/include/rtl/alloc.h
@@ -289,38 +289,14 @@ SAL_DLLPUBLIC void SAL_CALL rtl_cache_free (
 #ifdef LIBO_INTERNAL_ONLY
 
 /** @cond INTERNAL */
-/** rtl_alloc_preInit_phase_t
- *
- * This is used to control the pre-init logic
- * in rtl_alloc_preInit. The reason for this is
- * to first initialize all caching and other memory
- * logic from WSD (the Online daemon) at startup.
- * All these pages will then be forked over when
- * spawning per-document instances. This is done
- * by calling rtl_alloc_preInit with rtlAllocPreInitStart.
- *
- * @since LibreOffice 6.1
- */
-typedef enum
-{
-// Start phase I of pre-init.
-rtlAllocPreInitStart,
-// Finish phase I of pre-init (before forking).
-rtlAllocPreInitEnd,
-// Post pre-init and after forking; no longer used.
-rtlAllocPostInit
-
-} rtl_alloc_preInit_phase_t;
-
-/** @cond INTERNAL */
 /** rtl_alloc_preInit
  *
  * This function, is called at the beginning and again
  * at the end of LibreOfficeKit pre-initialization to enable
  * various optimizations.
  *
- * Its function is to annotate a section @phase = rtlAllocPreInitStart
- * to end (@phase = rtlAllocPreInitEnd) via. two calls. Inside this
+ * Its function is to annotate a section @start = true
+ * to end (@start = false) via. two calls. Inside this
  * section string allocators are replaced with ones which cause the
  * strings to be staticized at the end of the section.
  *
@@ -341,7 +317,7 @@ typedef enum
  * @since LibreOffice 6.1
  */
 SAL_DLLPUBLIC void SAL_CALL rtl_alloc_preInit (
-rtl_alloc_preInit_phase_t phase
+sal_Bool start
 ) SAL_THROW_EXTERN_C();
 /** @endcond */
 
diff --git a/sal/qa/rtl/alloc/rtl_alloc.cxx b/sal/qa/rtl/alloc/rtl_alloc.cxx
index 37c7b41eb338..0e9b7c0f47a8 100644
--- a/sal/qa/rtl/alloc/rtl_alloc.cxx
+++ b/sal/qa/rtl/alloc/rtl_alloc.cxx
@@ -158,7 +158,7 @@ public:
 const char *sample = "Hello World";
 std::vector aStrings;
 
-rtl_alloc_preInit(rtlAllocPreInitStart);
+rtl_alloc_preInit(true);
 
 OUString aFoo("foo");
 
@@ -183,7 +183,7 @@ public:
 }
 
 // should static-ize all the strings.
-rtl_alloc_preInit(rtlAllocPreInitEnd);
+rtl_alloc_preInit(false);
 
 for (size_t i = 0; i < aStrings.size(); ++i)
 CPPUNIT_ASSERT_MESSAGE( "static after.", 
(aStrings[i].pData->refCount & SAL_STRING_STATIC_FLAG) );
diff --git a/sal/rtl/strimp.cxx b/sal/rtl/strimp.cxx
index e356a4e921a6..d1651a2ad1d7 100644
--- a/sal/rtl/strimp.cxx
+++ b/sal/rtl/strimp.cxx
@@ -94,36 +94,26 @@ static void mark_static(void *addr, sal_Size /* size */)
 str->refCount |= SAL_STRING_STATIC_FLAG;
 }
 
-void SAL_CALL rtl_alloc_preInit (rtl_alloc_preInit_phase_t phase) 
SAL_THROW_EXTERN_C()
+void SAL_CALL rtl_alloc_preInit (sal_Bool start) SAL_THROW_EXTERN_C()
 {
-switch (phase)
+if (start)
 {
-case rtlAllocPreInitStart:
-{
-rtl_allocateString = pre_allocateStringFn;
-rtl_freeString = pre_freeStringFn;
-pre_arena = rtl_arena_create("pre-init strings", 4, 0,
-

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

2018-08-01 Thread Libreoffice Gerrit user
 cui/source/customize/cfg.cxx   |5 ++---
 cui/source/inc/cfg.hxx |2 +-
 desktop/source/deployment/gui/dp_gui_dialog2.cxx   |   18 +++---
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx |   10 --
 desktop/source/deployment/gui/dp_gui_theextmgr.hxx |1 -
 desktop/source/migration/migration.cxx |4 +---
 desktop/source/migration/migration_impl.hxx|2 +-
 7 files changed, 12 insertions(+), 30 deletions(-)

New commits:
commit df6270e9c1d75a4865bf79043190669b74de71d3
Author: Noel Grandin 
AuthorDate: Wed Aug 1 16:13:29 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 2 08:03:16 2018 +0200

loplugin:returnconstant in cui,desktop

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 29f8641eacef..e7e4565e5d8b 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -449,14 +449,14 @@ MenuSaveInData::SetEntries( std::unique_ptr 
pNewEntries )
 pRootEntry->SetEntries( std::move(pNewEntries) );
 }
 
-bool SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess 
>& xMenuSettings,
+void SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess 
>& xMenuSettings,
 const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool 
bContextMenu )
 {
 SvxEntries* pEntries = pParentData->GetEntries();
 
 // Don't access non existing menu configuration!
 if ( !xMenuSettings.is() )
-return true;
+return;
 
 for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); ++nIndex )
 {
@@ -559,7 +559,6 @@ bool SaveInData::LoadSubMenus( const uno::Reference< 
container::XIndexAccess >&
 }
 }
 }
-return true;
 }
 
 bool MenuSaveInData::Apply()
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 5d85a87408b3..00ef79f0f552 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -122,7 +122,7 @@ protected:
 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
 SvxConfigEntry *pMenuData );
 
-bool LoadSubMenus(
+void LoadSubMenus(
 const css::uno::Reference< css::container::XIndexAccess >& 
xMenuSettings,
 const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool 
bContextMenu );
 
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 6d60fdf5d36f..c31088a88a8f 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1026,19 +1026,15 @@ IMPL_STATIC_LINK(ExtMgrDialog, Restart, void*, pParent, 
void)
 
 bool ExtMgrDialog::Close()
 {
-bool bRet = TheExtensionManager::queryTermination();
-if ( bRet )
+bool bRet = ModelessDialog::Close();
+m_pManager->terminateDialog();
+//only suggest restart if modified and this is the first close attempt
+if (!m_bClosed && m_pManager->isModified())
 {
-bRet = ModelessDialog::Close();
-m_pManager->terminateDialog();
-//only suggest restart if modified and this is the first close attempt
-if (!m_bClosed && m_pManager->isModified())
-{
-m_pManager->clearModified();
-Application::PostUserEvent(LINK(nullptr, ExtMgrDialog, Restart), 
m_xRestartParent);
-}
-m_bClosed = true;
+m_pManager->clearModified();
+Application::PostUserEvent(LINK(nullptr, ExtMgrDialog, Restart), 
m_xRestartParent);
 }
+m_bClosed = true;
 return bRet;
 }
 
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx 
b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index ae743357aa7f..407cf042fa64 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -250,16 +250,6 @@ bool TheExtensionManager::installPackage( const OUString 
&rPackageURL, bool bWar
 }
 
 
-bool TheExtensionManager::queryTermination()
-{
-if ( dp_misc::office_is_running() )
-return true;
-// the standalone application unopkg must not close ( and quit ) the dialog
-// when there are still actions in the queue
-return true;
-}
-
-
 void TheExtensionManager::terminateDialog()
 {
 if ( ! dp_misc::office_is_running() )
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx 
b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index d6755d83d135..4980458f0dfd 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -96,7 +96,6 @@ public:
 bool installPackage( const OUString &rPackageURL, bool bWarnUser = false );
 void createPackageList();
 
-static bool queryTermination();
 void terminate

New Defects reported by Coverity Scan for LibreOffice

2018-08-01 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

5 new defect(s) introduced to LibreOffice found with Coverity Scan.
7 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)


** CID 1438198:  API usage errors  (INVALIDATE_ITERATOR)
/editeng/source/editeng/impedit2.cxx: 1740 in 
ImpEditEngine::InitScriptTypes(int)()



*** CID 1438198:  API usage errors  (INVALIDATE_ITERATOR)
/editeng/source/editeng/impedit2.cxx: 1740 in 
ImpEditEngine::InitScriptTypes(int)()
1734 // Skip entries in ScriptArray which are not inside 
the RTL run:
1735 while ( nIdx < rTypes.size() && rTypes[nIdx].nStartPos 
< nStart )
1736 ++nIdx;
1737 
1738 // Remove any entries *inside* the current run:
1739 while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos 
<= nEnd )
>>> CID 1438198:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(rTypes->begin() + 
>>> nIdx)".
1740 rTypes.erase( rTypes.begin()+nIdx );
1741 
1742 // special case:
1743 if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < 
nStart && rTypes[nIdx].nEndPos > nEnd)
1744 {
1745 rTypes.insert( rTypes.begin()+nIdx, 
ScriptTypePosInfo( rTypes[nIdx].nScriptType, nEnd, rTypes[nIdx].nEndPos ) );

** CID 1438197:(DEADCODE)
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1317 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1329 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()



*** CID 1438197:(DEADCODE)
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1317 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()
1311 // the MetaActionType::POLYPOLYGON written by 
RenderPolygonHairlinePrimitive2D
1312 // below
1313 bool bSupportSvtGraphicStroke(false);
1314 
1315 if(bSupportSvtGraphicStroke)
1316 {
>>> CID 1438197:(DEADCODE)
>>> Execution cannot reach this statement: "pSvtGraphicStroke = this->i...".
1317 pSvtGraphicStroke = impTryToCreateSvtGraphicStroke(
1318 rHairlinePrimitive.getB2DPolygon(),
1319 &aLineColor,
1320 nullptr, nullptr, nullptr, nullptr);
1321 
1322 impStartSvtGraphicStroke(pSvtGraphicStroke);
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1329 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()
1323 }
1324 
1325 RenderPolygonHairlinePrimitive2D(rHairlinePrimitive, 
false);
1326 
1327 if(bSupportSvtGraphicStroke)
1328 {
>>> CID 1438197:(DEADCODE)
>>> Execution cannot reach this statement: "this->impEndSvtGraphicStrok...".
1329 impEndSvtGraphicStroke(pSvtGraphicStroke);
1330 }
1331 }
1332 }
1333 
1334 void 
VclMetafileProcessor2D::processPolygonStrokePrimitive2D(const 
primitive2d::PolygonStrokePrimitive2D& rStrokePrimitive)

** CID 1438196:(DEADCODE)
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1792 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const
 drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)()
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1819 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const
 drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)()
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1826 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const
 drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)()



*** CID 1438196:(DEADCODE)
/drawi

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

2018-08-01 Thread Libreoffice Gerrit user
 chart2/qa/extras/chart2export.cxx   |   14 ++
 chart2/qa/extras/data/odp/tdf119029.odp |binary
 include/oox/export/chartexport.hxx  |2 +-
 oox/source/export/chartexport.cxx   |   28 +---
 4 files changed, 36 insertions(+), 8 deletions(-)

New commits:
commit 8f90492812d1edac6c91e83b84f3512877dcd552
Author: Mike Kaganski 
AuthorDate: Wed Aug 1 12:52:10 2018 +0300
Commit: Mike Kaganski 
CommitDate: Thu Aug 2 06:13:36 2018 +0200

tdf#119029: also export rotation for data series

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

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index 25de7c1c3cc6..5da6eac373bb 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -117,6 +117,7 @@ public:
 void testChartTitlePropertiesGradientFillPPTX();
 void testChartTitlePropertiesBitmapFillPPTX();
 void testTdf116163();
+void testTdf119029();
 
 CPPUNIT_TEST_SUITE(Chart2ExportTest);
 CPPUNIT_TEST(testErrorBarXLSX);
@@ -196,6 +197,7 @@ public:
 CPPUNIT_TEST(testChartTitlePropertiesGradientFillPPTX);
 CPPUNIT_TEST(testChartTitlePropertiesBitmapFillPPTX);
 CPPUNIT_TEST(testTdf116163);
+CPPUNIT_TEST(testTdf119029);
 CPPUNIT_TEST_SUITE_END();
 
 protected:
@@ -1850,6 +1852,18 @@ void Chart2ExportTest::testTdf116163()
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot", "-540");
 }
 
+void Chart2ExportTest::testTdf119029()
+{
+load("/chart2/qa/extras/data/odp/", "tdf119029.odp");
+// Only use "chart", without number, because the number depends on the 
previous tests
+xmlDocPtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 
2007 XML");
+CPPUNIT_ASSERT(pXmlDoc);
+
+assertXPath(pXmlDoc,
+
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr", 
"rot",
+"-540");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/odp/tdf119029.odp 
b/chart2/qa/extras/data/odp/tdf119029.odp
new file mode 100644
index ..87e4a03c844a
Binary files /dev/null and b/chart2/qa/extras/data/odp/tdf119029.odp differ
diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index d6761bdea021..9deb8ff95bf7 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -174,7 +174,7 @@ private:
 void exportSeriesValues(
 const css::uno::Reference< css::chart2::data::XDataSequence >& 
xValueSeq, sal_Int32 nValueType = XML_val );
 void exportShapeProps( const css::uno::Reference< css::beans::XPropertySet 
>& xPropSet );
-void exportTextProps(const css::uno::Reference< css::beans::XPropertySet 
>& xPropSet, bool bAxis = false);
+void exportTextProps(const css::uno::Reference< css::beans::XPropertySet 
>& xPropSet);
 void exportDataPoints(
 const css::uno::Reference< css::beans::XPropertySet >& 
xSeriesProperties,
 sal_Int32 nSeriesLength, sal_Int32 eChartType );
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 142f8528c2f4..2ef2074aa068 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2313,18 +2313,32 @@ void ChartExport::exportShapeProps( const Reference< 
XPropertySet >& xPropSet )
 pFS->endElement( FSNS( XML_c, XML_spPr ) );
 }
 
-void ChartExport::exportTextProps(const Reference& xPropSet, 
bool bAxis)
+void ChartExport::exportTextProps(const Reference& xPropSet)
 {
 FSHelperPtr pFS = GetFS();
 pFS->startElement(FSNS(XML_c, XML_txPr), FSEND);
 
 sal_Int32 nRotation = 0;
-if (bAxis)
+if (auto xServiceInfo = uno::Reference(xPropSet, 
uno::UNO_QUERY))
 {
-double fTextRotation = 0;
-uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
-if (aAny.hasValue() && (aAny >>= fTextRotation))
-nRotation = fTextRotation * -600.0;
+double fMultiplier = 0;
+// We have at least two possible units of returned value: degrees 
(e.g., for data labels),
+// and 100ths of degree (e.g., for axes labels). The latter is 
returned as an Any wrapping
+// a sal_Int32 value (see 
WrappedTextRotationProperty::convertInnerToOuterValue), while
+// the former is double. So we could test the contained type to decide 
which multiplier to
+// use. But testing the service info should be more robust.
+if (xServiceInfo->supportsService("com.sun.star.chart.ChartAxis"))
+fMultiplier = -600.0;
+else if 
(xServiceInfo->supportsService("com.sun.star.chart2.DataSeries"))
+fMultiplier = -6.0;
+
+if (fMultiplier)
+{
+double fTe

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

2018-08-01 Thread Libreoffice Gerrit user
 loleaflet/src/map/Map.js |   20 +++-
 1 file changed, 3 insertions(+), 17 deletions(-)

New commits:
commit e4a7e2ddbb95103781ede9f777c1f814c408b844
Author: Henry Castro 
AuthorDate: Wed Aug 1 21:20:12 2018 -0400
Commit: Henry Castro 
CommitDate: Wed Aug 1 21:23:17 2018 -0400

loleaflet: mobile: fix panning inside max bounds

Change-Id: I5c08a529cb05471f3e248ab403dff5370de0ee46

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index f18ae861a..547915181 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -12,6 +12,7 @@ L.Map = L.Evented.extend({
zoom: 10,
minZoom: 1,
maxZoom: 20,
+   maxBounds: L.latLngBounds([0, 0], [-100, 100]),
fadeAnimation: false, // Not useful for typing.
trackResize: true,
markerZoomAnimation: true,
@@ -326,25 +327,14 @@ L.Map = L.Evented.extend({
return this.fire('moveend');
},
 
-   setMaxBounds: function (bounds, options) {
+   setMaxBounds: function (bounds) {
bounds = L.latLngBounds(bounds);
 
this.options.maxBounds = bounds;
-   options = options || {};
-
-   if (!bounds) {
-   return this.off('moveend', this._panInsideMaxBounds);
-   }
 
if (this._loaded) {
-   this._panInsideMaxBounds();
-   }
-
-   if (options.panInside === false) {
-   return this.off('moveend', this._panInsideMaxBounds);
+   this.panInsideBounds(this.options.maxBounds);
}
-
-   return this.on('moveend', this._panInsideMaxBounds);
},
 
setDocBounds: function (bounds) {
@@ -807,10 +797,6 @@ L.Map = L.Evented.extend({
return this.getMaxZoom() - this.getMinZoom();
},
 
-   _panInsideMaxBounds: function () {
-   this.panInsideBounds(this.options.maxBounds);
-   },
-
_checkIfLoaded: function () {
if (!this._loaded) {
throw new Error('Set map center and zoom first.');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 loleaflet/src/map/handler/Map.Drag.js |   40 --
 1 file changed, 5 insertions(+), 35 deletions(-)

New commits:
commit fdfd67c8c30ea8e616bfda0b9f82e248b69842b0
Author: Henry Castro 
AuthorDate: Wed Aug 1 21:14:02 2018 -0400
Commit: Henry Castro 
CommitDate: Wed Aug 1 21:22:20 2018 -0400

loleaflet: mobile: fix dragging the document layer

Change-Id: I7047781926581c84ea8f1cb6576799d91099f6b5

diff --git a/loleaflet/src/map/handler/Map.Drag.js 
b/loleaflet/src/map/handler/Map.Drag.js
index 9a54c7060..191516f50 100644
--- a/loleaflet/src/map/handler/Map.Drag.js
+++ b/loleaflet/src/map/handler/Map.Drag.js
@@ -10,9 +10,6 @@ L.Map.mergeOptions({
inertiaDeceleration: 3400, // px/s^2
inertiaMaxSpeed: Infinity, // px/s
easeLinearity: 0.2,
-
-   // TODO refactor, move to CRS
-   worldCopyJump: false
 });
 
 L.Map.Drag = L.Handler.extend({
@@ -26,16 +23,10 @@ L.Map.Drag = L.Handler.extend({
this._draggable.on({
down: this._onDown,
dragstart: this._onDragStart,
+   predrag: this._onPreDrag,
drag: this._onDrag,
dragend: this._onDragEnd
}, this);
-
-   if (map.options.worldCopyJump) {
-   this._draggable.on('predrag', this._onPreDrag, 
this);
-   map.on('viewreset', this._onViewReset, this);
-
-   map.whenReady(this._onViewReset, this);
-   }
}
this._draggable.enable();
},
@@ -93,17 +84,10 @@ L.Map.Drag = L.Handler.extend({
},
 
_onPreDrag: function () {
-   // TODO refactor to be able to adjust map pane position after 
zoom
-   var worldWidth = this._worldWidth,
-   halfWidth = Math.round(worldWidth / 2),
-   dx = this._initialWorldOffset,
-   x = this._draggable._newPos.x,
-   newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,
-   newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,
-   newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 
: newX2;
-
-   this._draggable._absPos = this._draggable._newPos.clone();
-   this._draggable._newPos.x = newX;
+   var org = this._map.getPixelOrigin();
+   var size = 
this._map.getLayerMaxBounds().getSize().subtract(this._map.getSize());
+   this._draggable._newPos.x = Math.max(Math.min(org.x, 
this._draggable._newPos.x), org.x - size.x);
+   this._draggable._newPos.y = Math.max(Math.min(org.y, 
this._draggable._newPos.y), org.y - size.y);
},
 
_onDragEnd: function (e) {
@@ -116,9 +100,7 @@ L.Map.Drag = L.Handler.extend({
 
if (noInertia) {
map.fire('moveend');
-
} else {
-
var direction = 
this._lastPos.subtract(this._positions[0]),
duration = (this._lastTime - this._times[0]) / 1000,
ease = options.easeLinearity,
@@ -134,18 +116,6 @@ L.Map.Drag = L.Handler.extend({
 
if (!offset.x || !offset.y) {
map.fire('moveend');
-
-   } else {
-   offset = map._limitOffset(offset, 
map.options.maxBounds);
-
-   L.Util.requestAnimFrame(function () {
-   map.panBy(offset, {
-   duration: decelerationDuration,
-   easeLinearity: ease,
-   noMoveStart: true,
-   animate: true
-   });
-   });
}
}
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sd/source

2018-08-01 Thread Libreoffice Gerrit user
 sd/source/ui/dlg/dlgsnap.src |  113 ++-
 1 file changed, 39 insertions(+), 74 deletions(-)

New commits:
commit 7223961287c78f848bc3f702a3c1b6340365e098
Author: Matthias Seidel 
AuthorDate: Wed Aug 1 23:34:07 2018 +
Commit: Matthias Seidel 
CommitDate: Wed Aug 1 23:34:07 2018 +

Cleaned up resource file for snap dialog.

Removed entries for MASKCOLOR.

diff --git a/sd/source/ui/dlg/dlgsnap.src b/sd/source/ui/dlg/dlgsnap.src
index c0f4e7676c16..e92a09c64292 100644
--- a/sd/source/ui/dlg/dlgsnap.src
+++ b/sd/source/ui/dlg/dlgsnap.src
@@ -31,55 +31,54 @@ ModalDialog DLG_SNAPLINE
 HelpID = CMD_SID_CAPTUREPOINT ;
 OutputSize = TRUE ;
 SVLook = TRUE ;
-Size = MAP_APPFONT ( 140 , 125 ) ;
+Size = MAP_APPFONT ( 140, 125 ) ;
 Text [ en-US ] = "New Snap Object" ;
 Moveable = TRUE ;
 OKButton BTN_OK
 {
-Pos = MAP_APPFONT ( 88 , 6  ) ;
-Size = MAP_APPFONT ( 46 , 14 ) ;
+Pos = MAP_APPFONT ( 88, 6 ) ;
+Size = MAP_APPFONT ( 46, 14 ) ;
 TabStop = TRUE ;
 DefButton = TRUE ;
 };
 CancelButton BTN_CANCEL
 {
-Pos = MAP_APPFONT ( 88 , 23  ) ;
-Size = MAP_APPFONT ( 46 , 14 ) ;
+Pos = MAP_APPFONT ( 88, 23 ) ;
+Size = MAP_APPFONT ( 46, 14 ) ;
 TabStop = TRUE ;
 };
 HelpButton BTN_HELP
 {
-Pos = MAP_APPFONT ( 88 , 43  ) ;
-Size = MAP_APPFONT ( 46 , 14 ) ;
+Pos = MAP_APPFONT ( 88, 43 ) ;
+Size = MAP_APPFONT ( 46, 14 ) ;
 TabStop = TRUE ;
 };
 PushButton BTN_DELETE
 {
-HelpID = "sd:PushButton:DLG_SNAPLINE:BTN_DELETE";
-Pos = MAP_APPFONT ( 88 , 63  ) ;
-Size = MAP_APPFONT ( 46 , 14 ) ;
-/* ### ACHTUNG: Neuer Text in Resource? ~L�schen : ~L�schen */
+HelpID = "sd:PushButton:DLG_SNAPLINE:BTN_DELETE" ;
+Pos = MAP_APPFONT ( 88, 63 ) ;
+Size = MAP_APPFONT ( 46, 14 ) ;
 Text [ en-US ] = "~Delete" ;
 TabStop = TRUE ;
 };
 FixedLine FL_POSITION
 {
-Pos = MAP_APPFONT ( 6 , 3  ) ;
-Size = MAP_APPFONT ( 76 , 8 ) ;
+Pos = MAP_APPFONT ( 6, 3 ) ;
+Size = MAP_APPFONT ( 76, 8 ) ;
 Text [ en-US ] = "Position" ;
 };
 FixedText FT_X
 {
-Pos = MAP_APPFONT ( 12 , 16  ) ;
-Size = MAP_APPFONT ( 7 , 10 ) ;
+Pos = MAP_APPFONT ( 12, 16 ) ;
+Size = MAP_APPFONT ( 7, 10 ) ;
 Text = "~X" ;
 };
 MetricField MTR_FLD_X
 {
-HelpID = "sd:MetricField:DLG_SNAPLINE:MTR_FLD_X";
+HelpID = "sd:MetricField:DLG_SNAPLINE:MTR_FLD_X" ;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 22 , 14  ) ;
-Size = MAP_APPFONT ( 54 , 12 ) ;
+Pos = MAP_APPFONT ( 22, 14 ) ;
+Size = MAP_APPFONT ( 54, 12 ) ;
 TabStop = TRUE ;
 Repeat = TRUE ;
 Spin = TRUE ;
@@ -94,16 +93,16 @@ ModalDialog DLG_SNAPLINE
 };
 FixedText FT_Y
 {
-Pos = MAP_APPFONT ( 12 , 32 ) ;
-Size = MAP_APPFONT ( 7 , 10 ) ;
+Pos = MAP_APPFONT ( 12, 32 ) ;
+Size = MAP_APPFONT ( 7, 10 ) ;
 Text = "~Y" ;
 };
 MetricField MTR_FLD_Y
 {
-HelpID = "sd:MetricField:DLG_SNAPLINE:MTR_FLD_Y";
+HelpID = "sd:MetricField:DLG_SNAPLINE:MTR_FLD_Y" ;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 22 , 30  ) ;
-Size = MAP_APPFONT ( 54 , 12 ) ;
+Pos = MAP_APPFONT ( 22, 30 ) ;
+Size = MAP_APPFONT ( 54, 12 ) ;
 TabStop = TRUE ;
 Repeat = TRUE ;
 Spin = TRUE ;
@@ -118,93 +117,59 @@ ModalDialog DLG_SNAPLINE
 };
 FixedLine FL_DIRECTION
 {
-Pos = MAP_APPFONT ( 6 , 50  ) ;
-Size = MAP_APPFONT ( 76 , 8 ) ;
+Pos = MAP_APPFONT ( 6, 50 ) ;
+Size = MAP_APPFONT ( 76, 8 ) ;
 Text [ en-US ] = "Type" ;
 };
 ImageRadioButton RB_POINT
 {
-HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_POINT";
-Pos = MAP_APPFONT ( 12 , 61  ) ;
-Size = MAP_APPFONT ( 64 , 16 ) ;
+HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_POINT" ;
+Pos = MAP_APPFONT ( 12, 61 ) ;
+Size = MAP_APPFONT ( 64, 16 ) ;
 Text [ en-US ] = "~Point" ;
 TabStop = TRUE ;
 RadioButtonImage = Image
 {
-MaskColor = IMAGE_MASK_STDCOLOR;
-ImageBitmap = Bitmap { File = "hlppoint.bmp" ; };
+ImageBitmap = Bitmap { File = "hlppoint.png" ; };
 };
 };
 ImageRadioButton RB_VERTICAL
 {
-HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_VERTICAL";
-Pos = MAP_APPFONT ( 12 , 81  ) ;
-Size = MAP_APPFONT ( 64 , 16 ) ;
+HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_VERTICAL" ;
+Pos = MAP_APPFONT ( 12, 81 ) ;
+Size = MAP_APPFONT ( 64, 16 ) ;
 Text [ en-US ] = "~Vertical" ;
 TabStop = TRUE ;
 RadioButtonImage = Image

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

2018-08-01 Thread Libreoffice Gerrit user
 include/svx/sdr/properties/defaultproperties.hxx  |3 
 svx/source/sdr/properties/attributeproperties.cxx |   81 --
 svx/source/sdr/properties/defaultproperties.cxx   |   25 ++
 3 files changed, 55 insertions(+), 54 deletions(-)

New commits:
commit ad79d17acc7487e476832287ddea9ebe3d067c6a
Author: Armin Le Grand 
AuthorDate: Tue Jul 17 15:16:39 2018 +0200
Commit: Armin Le Grand 
CommitDate: Thu Aug 2 01:24:51 2018 +0200

tdf#117707 Correctly Scale ItemSets when pasting from External

Change-Id: Id01777a786fa7bb75d46ee0f78da645e94f7b840
Reviewed-on: https://gerrit.libreoffice.org/57556
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 
(cherry picked from commit e244c2c56528dff0d4cfa4e46c3d24ca141bf2be)
Reviewed-on: https://gerrit.libreoffice.org/58439

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

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

2018-08-01 Thread Libreoffice Gerrit user
 sw/source/uibase/uiview/pview.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d0a481d09e696f6d5a2a0d40a9d5c48cfca559bf
Author: Mike Kaganski 
AuthorDate: Wed Aug 1 21:20:10 2018 +0200
Commit: Xisco Faulí 
CommitDate: Wed Aug 1 23:45:30 2018 +0200

tdf#119042: Also check if SfxViewFrame::Current() is nullptr

Change-Id: I5ac43ff626bfb4e2e754cacead5bf87115f3ce4b
Reviewed-on: https://gerrit.libreoffice.org/58447
Reviewed-by: Xisco Faulí 
Tested-by: Jenkins

diff --git a/sw/source/uibase/uiview/pview.cxx 
b/sw/source/uibase/uiview/pview.cxx
index d43a0460fd48..14fd822e1bf4 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1231,8 +1231,9 @@ SwPagePreview::~SwPagePreview()
 delete pVShell;
 
 m_pViewWin.disposeAndClear();
-if (auto& pBar = 
SfxViewFrame::Current()->GetWindow().GetSystemWindow()->GetNotebookBar())
-pBar->ControlListener(false);
+if (SfxViewFrame* pCurrent = SfxViewFrame::Current())
+if (auto& pBar = 
pCurrent->GetWindow().GetSystemWindow()->GetNotebookBar())
+pBar->ControlListener(false);
 m_pScrollFill.disposeAndClear();
 m_pHScrollbar.disposeAndClear();
 m_pVScrollbar.disposeAndClear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sc/uiconfig/scalc/ui/notebookbar_compact.ui | 9629 
 1 file changed, 9629 insertions(+)

New commits:
commit 89fd0dff73e2442dfabcdbef6a5ad8a6c28772d6
Author: andreas kainz 
AuthorDate: Sun Jul 29 17:06:06 2018 +0200
Commit: andreas_kainz 
CommitDate: Wed Aug 1 22:36:57 2018 +0200

NB calc: add tabbed compact layout to calc

similar to writer

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

diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
new file mode 100644
index ..8277fef28cae
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -0,0 +1,9629 @@
+
+
+
+  
+  
+  
+True
+
+  
+True
+.uno:DataSort
+  
+
+
+  
+True
+.uno:SortAscending
+  
+
+
+  
+True
+.uno:SortDescending
+  
+
+
+  
+True
+  
+
+
+  
+True
+.uno:DataFilterAutoFilter
+  
+
+
+  
+True
+.uno:DataFilterStandardFilter
+  
+
+
+  
+True
+.uno:DataFilterSpecialFilter
+  
+
+
+  
+True
+.uno:DataFilterRemoveFilter
+  
+
+
+  
+True
+.uno:DataFilterHideAutoFilter
+  
+
+
+  
+True
+  
+
+
+  
+True
+.uno:DefineDBName
+  
+
+
+  
+True
+.uno:SelectDB
+  
+
+
+  
+True
+.uno:DataAreaRefresh
+  
+
+
+  
+True
+  
+
+
+  
+True
+.uno:InsertPivotTable
+  
+
+
+  
+True
+.uno:RecalcPivotTable
+  
+
+
+  
+True
+.uno:DeletePivotTable
+  
+
+
+  
+True
+  
+
+
+  
+True
+.uno:Calculate
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+.uno:Validation
+  
+
+
+  
+True
+.uno:DataSubTotals
+  
+
+
+  
+True
+False
+.uno:DataForm
+  
+
+
+  
+True
+.uno:DataStreams
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+.uno:TableOperationDialog
+  
+
+
+  
+True
+.uno:TextToColumns
+  
+
+
+  
+True
+.uno:DataConsolidate
+  
+
+
+  
+True
+  
+
+
+  
+True
+.uno:Group
+  
+
+
+  
+True
+False
+.uno:Ungroup
+  
+
+
+  
+True
+.uno:AutoOutline
+  
+
+
+  
+True
+.uno:ClearOutline
+  
+
+
+  
+True
+.uno:HideDetail
+  
+
+
+  
+True
+.uno:ShowDetail
+  
+
+  
+  
+True
+
+  
+True
+.uno:Line
+  
+
+
+  
+True
+False
+.uno:Freeline_Unfilled
+  
+
+
+  
+True
+.uno:Freeline
+  
+
+
+  
+True
+False
+.uno:Bezier_Unfilled
+  
+
+
+  
+True
+.uno:BezierFill
+  
+
+
+  
+True
+.uno:Polygon_Unfilled
+  
+
+
+  
+True
+.uno:Polygon_Diagonal_Unfilled
+  
+
+
+  
+True
+.uno:Polygon_Diagonal
+  
+
+
+  
+True
+  
+
+
+  
+True
+False
+.uno:BasicShapes
+  
+
+
+  
+True
+.uno:SymbolShapes
+  
+
+
+  
+True
+False
+.uno:ArrowShapes
+  
+
+
+  
+True
+False
+.uno:StarShapes
+  
+
+
+  
+True
+False
+.uno:CalloutShapes
+  
+
+
+  
+True
+False
+.uno:FlowChartShapes
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:DrawCaption
+  
+
+
+  
+True
+False
+.uno:VerticalCaption
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:DrawText
+  
+
+
+  
+True
+False
+.uno:VerticalText
+  
+
+
+  
+True
+False
+.uno:InsertGraphic
+  
+
+
+  
+True
+False
+.uno:FontworkGalleryFloater
+  
+
+
+  
+True
+False
+.uno:

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

2018-08-01 Thread Libreoffice Gerrit user
 include/vcl/filter/pdfdocument.hxx |   16 
 vcl/source/filter/ipdf/pdfdocument.cxx |   21 -
 2 files changed, 24 insertions(+), 13 deletions(-)

New commits:
commit 84aa79f52c7d49f326d38d1782a9b91f57c78cff
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 15:05:45 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 21:48:20 2018 +0200

forcepoint#66 protect against infinite parse recurse

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

diff --git a/include/vcl/filter/pdfdocument.hxx 
b/include/vcl/filter/pdfdocument.hxx
index b19bfca6b408..03180fd0597f 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -51,9 +51,21 @@ class PDFNumberElement;
 /// A byte range in a PDF file.
 class VCL_DLLPUBLIC PDFElement
 {
+bool m_bVisiting;
+bool m_bParsing;
+
 public:
+PDFElement()
+: m_bVisiting(false)
+, m_bParsing(false)
+{
+}
 virtual bool Read(SvStream& rStream) = 0;
 virtual ~PDFElement() = default;
+void setVisiting(bool bVisiting) { m_bVisiting = bVisiting; }
+bool alreadyVisiting() const { return m_bVisiting; }
+void setParsing(bool bParsing) { m_bParsing = bParsing; }
+bool alreadyParsing() const { return m_bParsing; }
 };
 
 /// Indirect object: something with a unique ID.
@@ -63,7 +75,6 @@ class VCL_DLLPUBLIC PDFObjectElement : public PDFElement
 PDFDocument& m_rDoc;
 double m_fObjectValue;
 double m_fGenerationValue;
-bool m_bVisiting;
 std::map m_aDictionary;
 /// If set, the object contains this number element (outside any 
dictionary/array).
 PDFNumberElement* m_pNumberElement;
@@ -123,9 +134,6 @@ public:
 SvMemoryStream* GetStreamBuffer() const;
 void SetStreamBuffer(std::unique_ptr& pStreamBuffer);
 PDFDocument& GetDocument();
-
-/// Visits the page tree recursively, looking for page objects.
-void visitPages(std::vector& rRet);
 };
 
 /// Array object: a list.
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx 
b/vcl/source/filter/ipdf/pdfdocument.cxx
index 7d4efc9e0eb0..3d9008a22943 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -1815,16 +1815,16 @@ size_t PDFDocument::GetObjectOffset(size_t nIndex) const
 const std::vector>& PDFDocument::GetElements() { 
return m_aElements; }
 
 /// Visits the page tree recursively, looking for page objects.
-void PDFObjectElement::visitPages(std::vector& rRet)
+static void visitPages(PDFObjectElement* pPages, 
std::vector& rRet)
 {
-auto pKids = dynamic_cast(Lookup("Kids"));
+auto pKids = dynamic_cast(pPages->Lookup("Kids"));
 if (!pKids)
 {
 SAL_WARN("vcl.filter", "visitPages: pages has no kids");
 return;
 }
 
-m_bVisiting = true;
+pPages->setVisiting(true);
 
 for (const auto& pKid : pKids->GetElements())
 {
@@ -1837,7 +1837,7 @@ void 
PDFObjectElement::visitPages(std::vector& rRet)
 continue;
 
 // detect if visiting reenters itself
-if (pKidObject->m_bVisiting)
+if (pKidObject->alreadyVisiting())
 {
 SAL_WARN("vcl.filter", "visitPages: loop in hierarchy");
 continue;
@@ -1846,13 +1846,13 @@ void 
PDFObjectElement::visitPages(std::vector& rRet)
 auto pName = dynamic_cast(pKidObject->Lookup("Type"));
 if (pName && pName->GetValue() == "Pages")
 // Pages inside pages: recurse.
-pKidObject->visitPages(rRet);
+visitPages(pKidObject, rRet);
 else
 // Found an actual page.
 rRet.push_back(pKidObject);
 }
 
-m_bVisiting = false;
+pPages->setVisiting(false);
 }
 
 std::vector PDFDocument::GetPages()
@@ -1897,7 +1897,7 @@ std::vector PDFDocument::GetPages()
 return aRet;
 }
 
-pPages->visitPages(aRet);
+visitPages(pPages, aRet);
 
 return aRet;
 }
@@ -2133,7 +2133,6 @@ PDFObjectElement::PDFObjectElement(PDFDocument& rDoc, 
double fObjectValue, doubl
 : m_rDoc(rDoc)
 , m_fObjectValue(fObjectValue)
 , m_fGenerationValue(fGenerationValue)
-, m_bVisiting(false)
 , m_pNumberElement(nullptr)
 , m_nDictionaryOffset(0)
 , m_nDictionaryLength(0)
@@ -2163,6 +2162,8 @@ size_t PDFDictionaryElement::Parse(const 
std::vector
 if (!rDictionary.empty())
 return nRet;
 
+pThis->setParsing(true);
+
 auto pThisObject = dynamic_cast(pThis);
 // This is set to non-nullptr here for nested dictionaries only.
 auto pThisDictionary = dynamic_cast(pThis);
@@ -2208,7 +2209,7 @@ size_t PDFDictionaryElement::Parse(const 
std::vector
 pThisObject->SetDictionaryOffset(nDictionaryOffset);
 }
 }
-else
+else if (!pDictionary->already

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

2018-08-01 Thread Libreoffice Gerrit user
 connectivity/source/drivers/dbase/DIndex.cxx |9 +--
 connectivity/source/drivers/dbase/DIndexes.cxx   |3 -
 connectivity/source/drivers/dbase/DTable.cxx |9 +--
 connectivity/source/drivers/dbase/dindexnode.cxx |3 -
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx   |   26 +--
 connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx |   10 +---
 connectivity/source/drivers/mork/MDatabaseMetaDataHelper.hxx |4 -
 connectivity/source/drivers/mork/MorkParser.cxx  |   14 ++---
 connectivity/source/drivers/mork/MorkParser.hxx  |4 -
 connectivity/source/inc/dbase/DIndex.hxx |4 -
 connectivity/source/inc/dbase/DTable.hxx |4 -
 connectivity/source/inc/dbase/dindexnode.hxx |2 
 12 files changed, 32 insertions(+), 60 deletions(-)

New commits:
commit 4a779c4d01b0482457e189af991b3b1b7c1a47a9
Author: Noel Grandin 
AuthorDate: Wed Aug 1 16:13:12 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 1 21:40:49 2018 +0200

loplugin:returnconstant in connectivity

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

diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index 95c076357ad4..84047f811244 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -260,7 +260,8 @@ bool ODbaseIndex::Delete(sal_uInt32 nRec, const 
ORowSetValue& rValue)
 m_aRoot->PrintPage();
 #endif
 
-return m_aCurLeaf->Delete(m_nCurNode);
+m_aCurLeaf->Delete(m_nCurNode);
+return true;
 }
 
 void ODbaseIndex::Collect(ONDXPage* pPage)
@@ -423,7 +424,7 @@ void ODbaseIndex::createINFEntry()
 aInfFile.WriteKey(aNewEntry, OUStringToOString(sEntry, 
m_pTable->getConnection()->getTextEncoding()));
 }
 
-bool ODbaseIndex::DropImpl()
+void ODbaseIndex::DropImpl()
 {
 closeImpl();
 
@@ -463,7 +464,6 @@ bool ODbaseIndex::DropImpl()
 }
 }
 }
-return true;
 }
 
 void ODbaseIndex::impl_killFileAndthrowError_throw(const char* pErrorId, const 
OUString& _sFile)
@@ -474,7 +474,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(const 
char* pErrorId, const O
 m_pTable->getConnection()->throwGenericSQLException(pErrorId, *this);
 }
 
-bool ODbaseIndex::CreateImpl()
+void ODbaseIndex::CreateImpl()
 {
 // Create the Index
 const OUString sFile = getCompletePath();
@@ -610,7 +610,6 @@ bool ODbaseIndex::CreateImpl()
 }
 Release();
 createINFEntry();
-return true;
 }
 
 
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx 
b/connectivity/source/drivers/dbase/DIndexes.cxx
index 541eb3287634..416e05eaa576 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -95,8 +95,9 @@ sdbcx::ObjectType ODbaseIndexes::appendObject( const 
OUString& _rForName, const
 if(xTunnel.is())
 {
 ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( 
xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
-if(!pIndex || !pIndex->CreateImpl())
+if(!pIndex)
 throw SQLException();
+pIndex->CreateImpl();
 }
 
 return createObject( _rForName );
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index ee39a607ba83..b4c8a7c5fd5c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -544,7 +544,7 @@ void ODbaseTable::construct()
 }
 }
 
-bool ODbaseTable::ReadMemoHeader()
+void ODbaseTable::ReadMemoHeader()
 {
 m_pMemoStream->SetEndian(SvStreamEndian::LITTLE);
 m_pMemoStream->RefreshBuffer(); // make sure that the header 
information is actually read again
@@ -590,7 +590,6 @@ bool ODbaseTable::ReadMemoHeader()
 SAL_WARN( "connectivity.drivers", "ODbaseTable::ReadMemoHeader: 
unsupported memo type!" );
 break;
 }
-return true;
 }
 
 OUString ODbaseTable::getEntry(OConnection const * _pConnection,const 
OUString& _sName )
@@ -1916,8 +1915,9 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, 
const OValueRefRow& pOrgRo
 
 // Next initial character restore again:
 pData[nLen] = cNext;
-if (!m_pMemoStream || !WriteMemo(thisColVal, nBlockNo))
+if (!m_pMemoStream)
 break;
+WriteMemo(thisColVal, nBlockNo);
 
 OString aBlock(OString::number(nBlockNo));
 //align aBlock at the right of a nLen sequence, fill to 
the left with '0'
@@ -1969,7 +1969,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, 
const OValueRefRow& pOrgRo
 }
 

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

2018-08-01 Thread Libreoffice Gerrit user
 chart2/source/controller/dialogs/dlg_InsertLegend.cxx|3 +--
 chart2/source/controller/dialogs/res_DataLabel.cxx   |4 +---
 chart2/source/controller/dialogs/res_DataLabel.hxx   |2 +-
 chart2/source/controller/dialogs/res_ErrorBar.cxx|4 +---
 chart2/source/controller/dialogs/res_Trendline.cxx   |4 +---
 chart2/source/controller/dialogs/res_Trendline.hxx   |2 +-
 chart2/source/controller/dialogs/tp_DataLabel.cxx|3 ++-
 chart2/source/controller/dialogs/tp_ErrorBars.cxx|3 ++-
 chart2/source/controller/dialogs/tp_Trendline.cxx|3 ++-
 chart2/source/controller/inc/dlg_InsertLegend.hxx|2 +-
 chart2/source/controller/inc/res_ErrorBar.hxx|2 +-
 chart2/source/controller/main/ChartController_Insert.cxx |5 ++---
 chart2/source/inc/LifeTime.hxx   |2 +-
 chart2/source/model/main/ChartModel.cxx  |7 +--
 chart2/source/tools/LifeTime.cxx |4 ++--
 chart2/source/view/axes/VPolarAngleAxis.cxx  |9 +++--
 chart2/source/view/axes/VPolarAngleAxis.hxx  |2 +-
 17 files changed, 24 insertions(+), 37 deletions(-)

New commits:
commit d1ea4db02dac313a9836b26f05f00e9a34b25600
Author: Noel Grandin 
AuthorDate: Wed Aug 1 16:12:42 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 1 21:41:12 2018 +0200

loplugin:returnconstant in chart2

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

diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx 
b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx
index a2b9531f078c..32acbeac5784 100644
--- a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx
@@ -38,10 +38,9 @@ void SchLegendDlg::init( const uno::Reference< frame::XModel 
>& xChartModel )
 m_xLegendPositionResources->writeToResources( xChartModel );
 }
 
-bool SchLegendDlg::writeToModel( const uno::Reference< frame::XModel >& 
xChartModel ) const
+void SchLegendDlg::writeToModel( const uno::Reference< frame::XModel >& 
xChartModel ) const
 {
 m_xLegendPositionResources->writeToModel( xChartModel );
-return true;
 }
 
 } //namespace chart
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx 
b/chart2/source/controller/dialogs/res_DataLabel.cxx
index fb3cc7783eb8..547f081e155c 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -266,7 +266,7 @@ void DataLabelResources::EnableControls()
 m_pBxOrientation->Enable( bEnableRotation );
 }
 
-bool DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
+void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
 {
 if( m_pCBNumber->IsChecked() )
 {
@@ -312,8 +312,6 @@ bool DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs 
) const
 sal_Int32 nDegrees = m_pDC_Dial->GetRotation();
 rOutAttrs->Put(SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
 }
-
-return true;
 }
 
 void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx 
b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 4d779de5e9d7..94dd92696871 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -37,7 +37,7 @@ public:
 DataLabelResources( VclBuilderContainer* pWindow, vcl::Window* pParent, 
const SfxItemSet& rInAttrs );
 ~DataLabelResources();
 
-bool FillItemSet(SfxItemSet* rOutAttrs) const;
+void FillItemSet(SfxItemSet* rOutAttrs) const;
 void Reset(const SfxItemSet& rInAttrs);
 
 void SetNumberFormatter( SvNumberFormatter* pFormatter );
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx 
b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 15ce9829516a..c01cf63c7eeb 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -602,7 +602,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
 UpdateControlStates();
 }
 
-bool ErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) const
+void ErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) const
 {
 if( m_bErrorKindUnique )
 rOutAttrs.Put( SvxChartKindErrorItem( m_eErrorKind, 
SCHATTR_STAT_KIND_ERROR ));
@@ -656,8 +656,6 @@ bool ErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) 
const
 }
 
 rOutAttrs.Put( SfxBoolItem( SCHATTR_STAT_ERRORBAR_TYPE , m_eErrorBarType 
== ERROR_BAR_Y ));
-
-return true;
 }
 
 void ErrorBarResources::FillValueSets()
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx 
b/chart2/source/controller/dialogs/res_Trendline.cxx
index 0d6805af6155..a28a9da7f311 100644
--- a/chart2/source

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

2018-08-01 Thread Libreoffice Gerrit user
 sc/source/core/data/docpool.cxx |3 
 sc/source/core/data/drwlayer.cxx|3 
 sc/source/core/data/table3.cxx  |3 
 sc/source/core/tool/compiler.cxx|   30 +++---
 sc/source/core/tool/interpr2.cxx|9 --
 sc/source/core/tool/reffind.cxx |8 -
 sc/source/filter/excel/xehelper.cxx |   42 -
 sc/source/filter/excel/xicontent.cxx|   17 ++-
 sc/source/filter/excel/xiescher.cxx |   12 +-
 sc/source/filter/excel/xihelper.cxx |   16 +--
 sc/source/filter/excel/xistream.cxx |6 -
 sc/source/filter/html/htmlpars.cxx  |8 -
 sc/source/filter/oox/richstring.cxx |6 -
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx |8 -
 sc/source/ui/app/inputhdl.cxx   |   15 +--
 sc/source/ui/cctrl/checklistmenu.cxx|6 -
 sc/source/ui/dbgui/asciiopt.cxx |   54 ++--
 sc/source/ui/docshell/docsh8.cxx|   11 +-
 sc/source/ui/formdlg/dwfunctr.cxx   |8 -
 sc/source/ui/miscdlgs/crnrdlg.cxx   |   31 +++---
 sc/source/ui/miscdlgs/mvtabdlg.cxx  |3 
 sc/source/ui/optdlg/tpusrlst.cxx|   34 +++
 sc/source/ui/unoobj/PivotTableDataProvider.cxx  |8 -
 sc/source/ui/vba/vbanames.cxx   |8 -
 sc/source/ui/vba/vbarange.cxx   |   16 +--
 sc/source/ui/view/formatsh.cxx  |7 -
 sc/source/ui/view/output2.cxx   |   24 ++---
 sc/source/ui/view/tabvwsha.cxx  |4 
 28 files changed, 194 insertions(+), 206 deletions(-)

New commits:
commit 52f69445c55c9af8ad97bee6da335b4592d56d4d
Author: Noel Grandin 
AuthorDate: Wed Aug 1 17:03:18 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 1 21:40:17 2018 +0200

loplugin:stringloop in sc

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

diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 4b12fb9e1442..f117d783c35a 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -408,13 +408,12 @@ static bool lcl_HFPresentation
 
 SfxItemIter aIter( rSet );
 pItem = aIter.FirstItem();
-OUString aText;
 
 while( pItem )
 {
 sal_uInt16 nWhich = pItem->Which();
 
-aText.clear();
+OUString aText;
 
 switch( nWhich )
 {
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index a9cbb8ddcbaf..007a3a72f4fd 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1882,8 +1882,7 @@ OUString ScDrawLayer::GetNewGraphicName( long* pnCounter 
) const
 while (bThere)
 {
 ++nId;
-aGraphicName = aBase;
-aGraphicName += OUString::number( nId );
+aGraphicName = aBase + OUString::number( nId );
 bThere = ( GetNamedObject( aGraphicName, 0, nDummy ) != nullptr );
 }
 
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index edbd2de757fa..816851e8c9a0 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2005,7 +2005,6 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
 bool bTestPrevSub = ( nLevelCount > 1 );
 
 OUString  aSubString;
-OUString  aOutString;
 
 bool bIgnoreCase = !rParam.bCaseSens;
 
@@ -2111,7 +2110,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
 // collect formula positions
 aRowVector.push_back( aRowEntry );
 
-aOutString = aSubString;
+OUString aOutString = aSubString;
 if (aOutString.isEmpty())
 aOutString = ScResId( STR_EMPTYDATA );
 aOutString += " ";
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 1cd0cd515f9e..534c66491426 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -480,7 +480,8 @@ static bool lcl_parseExternalName(
 const sal_Unicode* const pStart = rSymbol.getStr();
 const sal_Unicode* p = pStart;
 sal_Int32 nLen = rSymbol.getLength();
-OUString aTmpFile, aTmpName;
+OUString aTmpFile;
+OUStringBuffer aTmpName;
 sal_Int32 i = 0;
 bool bInName = false;
 if (cSep == '!')
@@ -543,7 +544,7 @@ static bool lcl_parseExternalName(
 
   

[Libreoffice-commits] core.git: basctl/source basic/source cui/source dbaccess/source formula/source i18npool/source include/rtl io/source sc/inc svtools/source sw/source vcl/source xmloff/source

2018-08-01 Thread Libreoffice Gerrit user
 basctl/source/basicide/baside2b.cxx   |2 
 basic/source/runtime/methods.cxx  |2 
 cui/source/dialogs/SpellDialog.cxx|2 
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx|2 
 formula/source/core/api/FormulaCompiler.cxx   |2 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |4 
 include/rtl/ustrbuf.hxx   |   13 ++
 include/rtl/ustring.hxx   |   37 
+--
 io/source/acceptor/acc_socket.cxx |2 
 io/source/connector/ctr_socket.cxx|2 
 sc/inc/address.hxx|2 
 svtools/source/svhtml/parhtml.cxx |   51 
+++---
 svtools/source/svrtf/parrtf.cxx   |8 -
 sw/source/filter/html/parcss1.cxx |   18 
+--
 vcl/source/control/longcurr.cxx   |2 
 xmloff/source/draw/xexptran.cxx   |2 
 xmloff/source/forms/controlpropertyhdl.cxx|2 
 17 files changed, 106 insertions(+), 47 deletions(-)

New commits:
commit 28580110807a38e3ba6f8385f22871b8dfe0a910
Author: Noel Grandin 
AuthorDate: Tue Jul 31 13:13:36 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 1 21:39:28 2018 +0200

add operator+=(OUStringBuffer) method to OUString

to reduce needless object creation and copying some more

And fix what looks like a bug in CSS hex color parsing at line
609 in sw/../parcss1.cxx that has been there since
commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import"

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

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 26c8b5170bf0..bcd09142536c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2188,7 +2188,7 @@ void WatchTreeListBox::RequestingChildren( 
SvTreeListEntry * pParent )
 aDisplayName = pItem->maDisplayName;
 else
 aDisplayName = pItem->maName;
-aDisplayName += aIndexStr.makeStringAndClear();
+aDisplayName += aIndexStr;
 pChildItem->maDisplayName = aDisplayName;
 
 SvTreeListEntry* pChildEntry = SvTreeListBox::InsertEntry( 
aDisplayName, pEntry );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 756c9d044f87..4a1a6b66cd29 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3409,7 +3409,7 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
 {
 OUStringBuffer sBuf;
 comphelper::string::padToLength(sBuf, nNumDigitsAfterDecimal - 
nActualDigits, '0');
-aResult += sBuf.makeStringAndClear();
+aResult += sBuf;
 }
 }
 
diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 7552ce613fcb..d71f12a41ac6 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1897,7 +1897,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 }
 else
 {   // we just need to append the left-over text to the last 
portion (which had no errors)
-aRet[ aRet.size() - 1 ].sText += 
aLeftOverText.makeStringAndClear();
+aRet[ aRet.size() - 1 ].sText += aLeftOverText;
 }
 }
}
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 06a4dcfc4285..9a8eea35ed10 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1730,7 +1730,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( 
const Reference< XPropert
 sTemp += andCriteria ? OUString(STR_AND) : OUString(STR_OR);
 sFilter = sTemp;
 }
-sFilter += aSQL.makeStringAndClear();
+sFilter += aSQL;
 
 // add the filter and the sort order
 _aSetFunctor(this,sFilter);
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 3329db657812..019a4b292267 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2214,7 +2214,7 @@ const FormulaToken* 
FormulaCompiler::CreateStringFromToken( OUString& rFormula,
 {
 OUStringBuffer aBuffer;
 const Formul

Minutes from the design meeting 2018-Aug-01

2018-08-01 Thread Heiko Tietze
Present: Stuart, Nickson, Heiko

Tickets

 * Manual Column Breaks
   + https://bugs.documentfoundation.org/show_bug.cgi?id=118548 
   + WFM / colorize break symbol on type (Heiko)
   + color must not be the primary and only way of feedback (Stuart)
   + we have indicators for page and column break (dashed line)
   + suppressing of unusual workflows (disable the column break in one-col 
pages) is bad
   => current status is okay, WFM

 * Clear styles
   + https://bugs.documentfoundation.org/show_bug.cgi?id=118969 (all)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=118979 (character 
style)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=118980 (list style)
   + besides or additionally to 'clear direct formatting' users may look for 
'clear styles'
   + for lists we have ctrl+shift+f12 to remove the style / turn off numbering; 
congruent to f12
   + problems will occur with nested styles and when a character style is 
combined with direct formatting
   + users have to take care of putting DF on top of character styles; it's not 
the supposed workflow
   + we could think about disabling DF when a character style is set (Stuart)
   => there are more side effects and negative consequences than benefits = 
WF/WFM
   => about list style, we should add access to clear list style to the 
formatting toolbar

 * Styles & Formatting deck is overpopulated with styles
   + https://bugs.documentfoundation.org/show_bug.cgi?id=69551 (and tdf#118664)
   + bad generic statement, disagree with the idea of "too many" styles
   + what is a "good number of styles"?, what should to be dropped exactly? 
(Heiko)
   + we have several options to filter/sort styles (Stuart)
   => postponed

 * Introduce more text box styles in Draw/Impress
   * https://bugs.documentfoundation.org/show_bug.cgi?id=94369
   + what exactly (these styles are hard-coded)
   => postponed






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


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

2018-08-01 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|3 ++-
 sw/qa/extras/rtfexport/rtfexport.cxx |8 
 writerfilter/source/dmapper/DomainMapper.cxx |4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 58e266ae808dbf3e157b38eb2c8f24774131e0f8
Author: László Németh 
AuthorDate: Wed Aug 1 16:44:00 2018 +0200
Commit: László Németh 
CommitDate: Wed Aug 1 20:58:40 2018 +0200

tdf#118949 don't set zero auto top margin in every first paragraph

of sections, only in table cells.

Partially revert of the commit 0307a62790b33ee0c02c2323a8f759e53e2035a4.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index b3551e52ae89..fca3263616b9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1225,7 +1225,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, 
"tdf104354-2.docx")
 
 // bottom margin is not auto spacing
 uno::Reference xCell3(xTable->getCellByName("A3"), 
uno::UNO_QUERY);
-CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell3->getText()), 
"ParaTopMargin"));
+// FIXME next top margin will be 0 after fixing this, too
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraphOfText(1, xCell3->getText()), 
"ParaTopMargin"));
 CPPUNIT_ASSERT_EQUAL(static_cast(847), 
getProperty(getParagraphOfText(1, xCell3->getText()), 
"ParaBottomMargin"));
 
 // auto spacing, if the paragraph contains footnotes
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 5ebaa354112b..78a2c77a9e80 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -982,8 +982,8 @@ DECLARE_RTFEXPORT_TEST(testNumOverrideStart, 
"num-override-start.rtf")
 DECLARE_RTFEXPORT_TEST(testFdo82006, "fdo82006.rtf")
 {
 // These were 176 (100 twips), as \sbauto and \sbbefore were ignored.
-// Exception: first paragraph gets zero top margin, see also tdf#104354.
-CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(0)),
+// FIXME Exception: first paragraph gets zero top margin, see tdf#118533.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
  getProperty(getParagraph(1), 
"ParaTopMargin"));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
  getProperty(getParagraph(1), 
"ParaBottomMargin"));
@@ -1425,8 +1425,8 @@ DECLARE_RTFEXPORT_TEST(testTdf112507, "tdf112507.rtf")
 DECLARE_RTFEXPORT_TEST(testTdf107480, "tdf107480.rtf")
 {
 // These were 176 (100 twips), as \htmautsp was parsed too late.
-// Exception: first paragraph gets zero top margin, see also tdf#104354.
-CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(0)),
+// FIXME Exception: first paragraph gets zero top margin, see tdf#118533.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
  getProperty(getParagraph(1), 
"ParaTopMargin"));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
  getProperty(getParagraph(1), 
"ParaBottomMargin"));
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 45ae707e3b46..36baed7489ce 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -655,8 +655,8 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 default_spacing = 49;
 else
 {
-// tdf#104354, tdf#118533 first paragraph of sections and 
shapes got zero top margin
-if ((m_pImpl->GetIsFirstParagraphInSection() && 
!m_pImpl->IsInShape()) ||
+// tdf#104354 first paragraphs of table cells and shapes 
get zero top margin
+if ((m_pImpl->GetIsFirstParagraphInSection() && 
!m_pImpl->IsInShape() && m_pImpl->m_nTableDepth > 0) ||
  m_pImpl->GetIsFirstParagraphInShape())
 default_spacing = 0;
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Crash test update

2018-08-01 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/53aeb204feb665c4f2bd2220df5c12f09dc530a4/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


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


[Libreoffice-commits] core.git: chart2/CppunitTest_chart2_export.mk

2018-08-01 Thread Libreoffice Gerrit user
 chart2/CppunitTest_chart2_export.mk |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 45f4d02dd0129d20accc62b889d4e36968ee27b0
Author: Mike Kaganski 
AuthorDate: Wed Aug 1 18:49:15 2018 +0200
Commit: Mike Kaganski 
CommitDate: Wed Aug 1 20:54:55 2018 +0200

Tidy up used libraries

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

diff --git a/chart2/CppunitTest_chart2_export.mk 
b/chart2/CppunitTest_chart2_export.mk
index 647814ed4fc4..f59c5e349d49 100644
--- a/chart2/CppunitTest_chart2_export.mk
+++ b/chart2/CppunitTest_chart2_export.mk
@@ -32,7 +32,6 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_export, \
 forui \
 i18nlangtag \
 msfilter \
-vcl \
 oox \
 sal \
 salhelper \
@@ -54,8 +53,8 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_export, \
 unotest \
 utl \
 vbahelper \
+vcl \
 xo \
-sw \
 ))
 
 $(eval $(call gb_CppunitTest_set_include,chart2_export,\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dev-tools.git: help3/media

2018-08-01 Thread Libreoffice Gerrit user
 dev/null   |binary
 help3/media/README.txt |8 
 help3/media/brand/.directory   |4 
 help3/media/brand/flat_logo.svg|10751 -
 help3/media/brand/shell/.directory |4 
 help3/media/brand/shell/about.svg  | 9145 -
 help3/media/chart2/res/.directory  |4 
 help3/media/cmd/.directory |4 
 help3/media/cmd/pt-BR/.directory   |4 
 help3/media/database/.directory|4 
 help3/media/dbaccess/res/.directory|4 
 help3/media/desktop/res/.directory |4 
 help3/media/en-US/.directory   |4 
 help3/media/extensions/res/.directory  |4 
 help3/media/extensions/source/scanner/.directory   |4 
 help3/media/extensions/source/update/ui/.directory |4 
 help3/media/formula/res/.directory |4 
 help3/media/fpicker/res/.directory |4 
 help3/media/framework/res/.directory   |4 
 help3/media/helpimg/.directory |4 
 help3/media/links.txt  |   92 
 help3/media/padmin/source/.directory   |4 
 help3/media/reportdesign/res/.directory|4 
 help3/media/res/.directory |4 
 help3/media/res/helpimg/.directory |4 
 help3/media/res/helpimg/tdf97021-sample.htm|  690 -
 help3/media/sc/imglst/.directory   |4 
 help3/media/sc/res/.directory  |4 
 help3/media/sd/cmd/transition-icons.svg| 4818 -
 help3/media/sd/imglst/.directory   |4 
 help3/media/sd/res/.directory  |4 
 help3/media/sfx2/imglst/.directory |4 
 help3/media/sfx2/imglst/actiontemplates016.svg |  243 
 help3/media/sfx2/imglst/actiontemplates017.svg |  489 
 help3/media/sfx2/imglst/actiontemplates020.svg | 2732 -
 help3/media/sfx2/imglst/actionview010.svg  | 2700 -
 help3/media/sfx2/res/.directory|4 
 help3/media/sfx2/res/symphony/.directory   |4 
 help3/media/svtools/res/.directory |4 
 help3/media/svx/res/.directory |4 
 help3/media/svx/res/doc_modified.svg   |   87 
 help3/media/sw/imglst/.directory   |4 
 help3/media/sw/res/.directory  |4 
 help3/media/toolkit/tk/.directory  |4 
 help3/media/vcl/res/.directory |4 
 help3/media/wizards/res/.directory |4 
 help3/media/xmlsecurity/res/.directory |4 
 47 files changed, 31895 deletions(-)

New commits:
commit c20a4d8207fe180cf1652bad9b9c28ebbf054625
Author: Olivier Hallot 
AuthorDate: Wed Aug 1 15:10:01 2018 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 1 20:14:32 2018 +0200

Remove unused media files

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

diff --git a/help3/media/README.txt b/help3/media/README.txt
deleted file mode 100644
index 557cd2c..000
--- a/help3/media/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Branding is in brand/
-
-brand/* - splash/about
-   + used in desktop/source/splash/splash.cxx
-   + used in sfx2/source/dialog/about.cxx
-
-brand/shell/* - for the shell
-   + used in framework/source/services/backingwindow.cxx
diff --git a/help3/media/avmedia/res/av02048.png 
b/help3/media/avmedia/res/av02048.png
deleted file mode 100644
index 0855ddc..000
Binary files a/help3/media/avmedia/res/av02048.png and /dev/null differ
diff --git a/help3/media/avmedia/res/av02049.png 
b/help3/media/avmedia/res/av02049.png
deleted file mode 100644
index bcbbfef..000
Binary files a/help3/media/avmedia/res/av02049.png and /dev/null differ
diff --git a/help3/media/avmedia/res/av02050.png 
b/help3/media/avmedia/res/av02050.png
deleted file mode 100644
index e2c812d..000
Binary files a/help3/media/avmedia/res/av02050.png and /dev/null differ
diff --git a/help3/media/avmedia/res/av02051.png 
b/help3/media/avmedia/res/av02051.png
deleted file mode 100644
index 55158ba..000
Binary files a/help3/media/avmedia/res/av02051.png and /dev/null differ
diff --git a/help3/media/avmedia/res/av02052.png 
b/help3/media/avmedia/res/av02052.png
deleted file mode 100644
index 7f2db50..000
Binary files a/help3/media/avmedia/res/av02052.png and /dev/null differ
diff --git a/help3/media/avmedia/res/av02053.png 
b/help3/media/avmedia/res/av02053.png
deleted file mode 100644
index 9c7dba0..000
Binary files a/help3/media/avmedia/res/av02053.png and /dev/null differ
diff --git 

Re: Segmentation fault when compiling

2018-08-01 Thread slacka
This is not an issue specific to his environment. I'm also seeing the same
seg fault on a clean Windows 32-bit debug build. 

$ cat autogen.input
--enable-debug

After a 
$ make clean && git pull && ./autogen.sh && make check

I'm seeing: 
[build CUT] vcl_lifecycle
[build SLC] drawinglayer
[build DEP] LNK:CppunitTest/test_framework_dispatch.dll
[build LNK] CppunitTest/test_framework_dispatch.dll
   Creating library
C:/core/workdir/LinkTarget/CppunitTest/itest_framework_dispatch.lib and
object C:/core/workdir/LinkTarget/CppunitTest/itest_framework_dispatch.exp
[build LNK] Library/graphicfilterlo.dll
/usr/bin/sh: line 1:  6360 Segmentation fault  (
PATH="C:\core\instdir\program;C:\core\instdir\program;C:\core\workdir\LinkTarget\Library;C:\core\workdir\UnpackedTarball\cppunit\src\cppunit\ReleaseDll;$PATH"
$W/LinkTarget/Executable/cppunittester.exe
$W/LinkTarget/CppunitTest/test_vcl_lifecycle.dll --headless
"-env:BRAND_BASE_DIR=file:///$S/instdir" "-env:BRAND_SHARE_SUBDIR=share"
"-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource"
"-env:UserInstallation=file:///$W/CppunitTest/vcl_lifecycle.test.user"
"-env:CONFIGURATION_LAYERS=xcsxcu:file:///$I/share/registry
xcsxcu:file:///$W/unittest/registry"
"-env:UNO_TYPES=file:///$I/program/types.rdb
file:///$I/program/types/offapi.rdb"
"-env:UNO_SERVICES=file:///$W/Rdb/ure/services.rdb
file:///$W/ComponentTarget/configmgr/source/configmgr.component
file:///$W/ComponentTarget/i18npool/util/i18npool.component
file:///$W/ComponentTarget/ucb/source/core/ucb1.component
file:///$W/ComponentTarget/ucb/source/ucp/file/ucpfile1.component
file:///$W/ComponentTarget/framework/util/fwk.component
file:///$W/ComponentTarget/sfx2/util/sfx.component"
-env:URE_INTERNAL_LIB_DIR=file:///$I/program
-env:LO_LIB_DIR=file:///$I/program
-env:LO_JAVA_DIR=file:///$I/program/classes --protector
$W/LinkTarget/Library/unoexceptionprotector.dll unoexceptionprotector
--protector $W/LinkTarget/Library/unobootstrapprotector.dll
unobootstrapprotector --protector
$W/LinkTarget/Library/vclbootstrapprotector.dll vclbootstrapprotector
"-env:CPPUNITTESTTARGET=$W/CppunitTest/vcl_lifecycle.test" ) >
$W/CppunitTest/vcl_lifecycle.test.log 2>&1
warn:vcl.window:18848:3412:vcl/source/window/window.cxx:946:
Window::Window(): pParent == NULL
warn:vcl.opengl:18848:3412:vcl/opengl/win/WinDeviceInfo.cxx:506: use :
warn:vcl.fonts:18848:3412:vcl/win/gdi/salfont.cxx:1300:
WinSalGraphics::GetDevFontList(): enter
LifecycleTest::testPostDispose finished in: 2ms
LifecycleTest::testFocus finished in: 2ms
LifecycleTest::testLeakage finished in: 1544ms
LifecycleTest::testToolkit finished in: 2ms
OK (10)
warn:fwk.desktop:18848:3412:framework/source/services/desktop.cxx:1069:
Desktop disposed before terminating it
warn:fwk.desktop:18848:3412:framework/source/services/desktop.cxx:191:
Desktop not terminated before being destructed

Error: a unit test failed, please do one of:
make CppunitTest_vcl_lifecycle CPPUNITTRACE=TRUE # which is a shortcut for
the following line
make CppunitTest_vcl_lifecycle CPPUNITTRACE="'C:/Program Files
(x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/devenv.exe'
/debugexe" # for interactive debugging in Visual Studio
make CppunitTest_vcl_lifecycle CPPUNITTRACE="drmemory -free_max_frames 20" #
for memory checking (install Dr.Memory first, and put it to your PATH)

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

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

C:/core/solenv/gbuild/CppunitTest.mk:116: recipe for target
'C:/core/workdir/CppunitTest/vcl_lifecycle.test' failed
make[1]: *** [C:/core/workdir/CppunitTest/vcl_lifecycle.test] Error 1
make[1]: *** Waiting for unfinished jobs
   Creating library C:/core/workdir/LinkTarget/Library/iavmedia.lib and
object C:/core/workdir/LinkTarget/Library/iavmedia.exp
   Creating library C:/core/workdir/LinkTarget/Library/idbp.lib and object
C:/core/workdir/LinkTarget/Library/idbp.exp
   Creating library C:/core/workdir/LinkTarget/Library/ixo.lib and object
C:/core/workdir/LinkTarget/Library/ixo.exp
Makefile:286: recipe for target 'build' failed
make: *** [build] Error 2




--
Sent from: 
http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: 2 commits - wsd/ClientSession.cpp wsd/ClientSession.hpp wsd/DocumentBroker.cpp wsd/TestStubs.cpp wsd/TileCache.cpp wsd/TileCache.hpp

2018-08-01 Thread Libreoffice Gerrit user
 wsd/ClientSession.cpp  |   32 
 wsd/ClientSession.hpp  |   15 +--
 wsd/DocumentBroker.cpp |   19 +++
 wsd/TestStubs.cpp  |6 ++
 wsd/TileCache.cpp  |   17 +
 wsd/TileCache.hpp  |1 +
 6 files changed, 72 insertions(+), 18 deletions(-)

New commits:
commit 165e5b4e1cf4c62e4667c6ad118479062e49b1d2
Author: Tamás Zolnai 
AuthorDate: Tue Jul 31 15:42:58 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Jul 31 17:19:12 2018 +0200

Use a bigger number as a tiles-on-fly limit

So scrolling can be more smooth.

Change-Id: I7b029c0ccc2de6883db54493a9188ae54a346a1d

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index be51bb1c5..a0bb71902 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -41,7 +41,7 @@
 #include 
 #include 
 
-#define TILES_ON_FLY_MIN_UPPER_LIMIT 10u
+#define TILES_ON_FLY_MIN_UPPER_LIMIT 10.0f
 
 using namespace LOOLProtocol;
 
@@ -1368,13 +1368,13 @@ void DocumentBroker::sendRequestedTiles(const 
std::shared_ptr& se
 std::unique_lock lock(_mutex);
 
 // How many tiles we have on the visible area, set the upper limit 
accordingly
-const unsigned tilesFitOnWidth = 
static_cast(std::ceil(static_cast(session->getVisibleArea().getWidth())
 /
- 
static_cast(session->getTileWidthInTwips(;
-const unsigned tilesFitOnHeight = 
static_cast(std::ceil(static_cast(session->getVisibleArea().getHeight())
 /
-  
static_cast(session->getTileHeightInTwips(;
-const unsigned tilesInVisArea = tilesFitOnWidth * tilesFitOnHeight;
+const float tilesFitOnWidth = 
static_cast(session->getVisibleArea().getWidth()) /
+  
static_cast(session->getTileWidthInTwips());
+const float tilesFitOnHeight = 
static_cast(session->getVisibleArea().getHeight()) /
+   
static_cast(session->getTileHeightInTwips());
+const float tilesInVisArea = tilesFitOnWidth * tilesFitOnHeight;
 
-const unsigned tilesOnFlyUpperLimit = 
std::max(TILES_ON_FLY_MIN_UPPER_LIMIT, tilesInVisArea);
+const float tilesOnFlyUpperLimit = std::max(TILES_ON_FLY_MIN_UPPER_LIMIT, 
tilesInVisArea * 1.5f);
 
 // Update client's tilesBeingRendered list
 session->removeOutdatedTileSubscriptions();
commit 8d95ca716568272f6246d959aeda5109adefa5a3
Author: Tamás Zolnai 
AuthorDate: Tue Jul 31 14:47:27 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Jul 31 15:44:15 2018 +0200

Make client tilesBeingRendered tracking more robust

Store the tile cache names and drop outdated tiles
times to times, so we can avoid tile rendering / sending to
stuck.

Change-Id: Ibff001307c7c660cbc57ab20c29c430e0090444d

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 886a3dcec..6f8e26aed 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1256,6 +1256,38 @@ void ClientSession::traceTileBySend(const TileDesc& tile)
 addTileOnFly(tile);
 }
 
+void ClientSession::traceSubscribeToTile(const std::string& cacheName)
+{
+_tilesBeingRendered.insert(cacheName);
+}
+
+void ClientSession::traceUnSubscribeToTile(const std::string& cacheName)
+{
+_tilesBeingRendered.erase(cacheName);
+}
+
+void ClientSession::removeOutdatedTileSubscriptions()
+{
+const std::shared_ptr docBroker = getDocumentBroker();
+if(!docBroker)
+return;
+
+auto iterator = _tilesBeingRendered.begin();
+while(iterator != _tilesBeingRendered.end())
+{
+double elapsedTime = 
docBroker->tileCache().getTileBeingRenderedElapsedTimeMs(*iterator);
+if(elapsedTime < 0.0 && elapsedTime > 5000.0)
+_tilesBeingRendered.erase(iterator);
+else
+++iterator;
+}
+}
+
+void ClientSession::clearTileSubscription()
+{
+_tilesBeingRendered.clear();
+}
+
 std::string ClientSession::generateTileID(const TileDesc& tile)
 {
 std::ostringstream tileID;
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index 8d434f44a..29618a6cd 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class DocumentBroker;
 
@@ -140,11 +141,13 @@ public:
 /// Call this method anytime when a new tile is sent to the client
 void traceTileBySend(const TileDesc& tile);
 
-void traceSubscribe() { ++_tilesBeingRendered; }
-void traceUnSubscribe() { --_tilesBeingRendered; }
-void clearSubscription() { _tilesBeingRendered = 0; }
+/// Trask tiles what we a subscription to
+void traceSubscribeToTile(const std::string& tileCacheName);
+void traceUnSubscribeToTile(const std::string& tileCacheName);
+void removeOutdatedTileSubscriptions();
+void clearTileSubscription();
 
-int getTilesBeingRendered() const {ret

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 480428e0e95453ff6abbc8f90255d3f00e4f0b7b
Author: Mike Kaganski 
AuthorDate: Tue Jul 24 08:36:02 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Aug 1 18:17:44 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Revert "tdf#118187 Text for INDIRECT() in wrong place"

... and clarify the context in the example instead.

This reverts commit 184324625ea1e803007b9c41ce625ae6014573f1.

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

diff --git a/helpcontent2 b/helpcontent2
index 814d9dc38a99..3dd9b7fb5e45 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 814d9dc38a99f64b05d32e402295a3db8f91eb6b
+Subproject commit 3dd9b7fb5e45ee88299457e397683baec80abb9e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 source/text/scalc/01/04060109.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3dd9b7fb5e45ee88299457e397683baec80abb9e
Author: Mike Kaganski 
AuthorDate: Tue Jul 24 08:36:02 2018 +0200
Commit: Olivier Hallot 
CommitDate: Wed Aug 1 18:17:44 2018 +0200

Revert "tdf#118187 Text for INDIRECT() in wrong place"

... and clarify the context in the example instead.

This reverts commit 184324625ea1e803007b9c41ce625ae6014573f1.

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

diff --git a/source/text/scalc/01/04060109.xhp 
b/source/text/scalc/01/04060109.xhp
index 3e2aa6f9b..e5a72c21d 100644
--- a/source/text/scalc/01/04060109.xhp
+++ b/source/text/scalc/01/04060109.xhp
@@ -73,6 +73,7 @@
  Example:
  
 =ADDRESS(1;1;2;;"Sheet2") returns the 
following: Sheet2.A$1i 101187
+ If 
the formula above is in cell B2 of current sheet, and the cell A1 in sheet 2 
contains the value -6, you can refer indirectly to 
the referenced cell using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the 
cell reference specified in B2, which in this case is 6.
   
   
 AREAS function
@@ -221,7 +222,6 @@
 =INDIRECT(A1) equals 100 if A1 contains 
C108 as a reference and cell C108 contains a value of 100.
  
 =SUM(INDIRECT("a1:" & ADDRESS(1;3))) 
totals the cells in the area of A1 up to the cell with the address defined by 
row 1 and column 3. This means that area A1:C1 is totaled.
-If the 
cell A1 in sheet 2 contains the value -6, you can 
refer indirectly to the referenced cell using a function in B2 by entering 
=ABS(INDIRECT(B2)). The result is the absolute value 
of the cell reference specified in B2, which in this case is 6.
   
   
 COLUMN function
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Jan Holesovsky
Hi all,

Apparently it was on Wednesday the last week, people on the IRC agreed
that it should be on Thursday this week, and nobody (but me) appeared
in the call today - so let's try tomorrow ;-)

All the best,
Kendy

Michael Meeks píše v Út 31. 07. 2018 v 12:08 +0100:
> Hi guys,
> 
>   I won't be around for the next couple of weeks - so, someone
> to build the next set of bug stats and of course to run the meeting
> much appreciated.
> 
>   Prototype agenda below, bug metrics also at the link below;
> extra items appreciated as last-week:
> 
>   https://demo.collaboracloudsuite.com/tdf/
> 
>   Lets use the new TDF jitsi goodness this week at:
> 
>   http://jitsi.documentfoundation.org/esc
> 
>   ATB,
> 
>   Michael.
> 
> * Pending Action Items:
> + ask RH internally wrt. 32bit Developer Toolset bits (Stephan)
> + get download numbers for 32bit Linux (Christian)
> + default bitergia filter for master + libreoffice-* (Christian)
> 
> * Release Engineering update (Christian) 
> + 6.0.6 status
> + 6.1.0 RC3 update
> + Remotes
> + Android viewer
> + Online
> 
> * Documentation (Olivier)
> 
> * UX Update (Heiko)
> + Bugzilla (topicUI) statistics
> 248(248) (topicUI) bugs open, 280(280) (needsUXEval) needs to
> be evaluated by the UXteam
> + Updates:
> BZ changes   1 week1 month3 months   12 months  
>  added  1(-4)  9(-7) 18(-6)  86(-6) 
>  commented 49(-11)   148(-12)   282(-29)   1687(-8) 
>removed  0(0)   1(0)   1(0)   10(0)  
>   resolved  8(6)  13(4)  24(5)  157(2)  
> + top 10 contributors:
>   Foote, V Stuart made 60 changes in 1 month, and 284 changes
> in 1 year
>   Tietze, Heiko made 57 changes in 1 month, and 667 changes
> in 1 year
>   Buovjaga made 27 changes in 1 month, and 198 changes in 1
> year
>   Kaganski, Mike made 21 changes in 1 month, and 65 changes
> in 1 year
>   Xisco Faulí made 21 changes in 1 month, and 312 changes in
> 1 year
>   Timur made 13 changes in 1 month, and 47 changes in 1 year
>   Nabet, Julien made 12 changes in 1 month, and 23 changes in
> 1 year
>   Harald Koester made 9 changes in 1 month, and 14 changes in
> 1 year
>   peter josvai made 9 changes in 1 month, and 10 changes in 1
> year
>   Faure, Jean-Baptiste made 7 changes in 1 month, and 43
> changes in 1 year
> * Fuzz / Crash Testing (Caolan)
> + 3(-14) import failures, 8(-106) export failures
> + coverity
> + ?? 0 (+0, -17)
> + forcepoint round #8
> + ??
> + oss-fuzz 10 (-3), 0 major, 10 minor
> + ??
>   
> * Crash Reporting (Xisco)
> + http://crashreport.libreoffice.org/stats/version/5.4.7.2
>  + 535 (last 7 days) (+1)
> + http://crashreport.libreoffice.org/stats/version/6.0.4.2
>  + 851 (last 7 days) (-116)
> + http://crashreport.libreoffice.org/stats/version/6.0.5.2
>  + 1360 (last 7 days) (+68)
> 
> * GSoC schedule (Heiko)
>+ Coding: May 14 - August 6
>+ Evaluation 2: July 9 – 13
>+ Students Submit Code and Final Evaluations: August 6 - 14
>+ Mentors Submit Final Evaluations: August 14 - 21
>+ Results Announced: August 22
>+ https://wiki.documentfoundation.org/Development/GSoC/2018
> 
> * Hackfests & Events
>+ Akademy in Vienna Aug 11-17th
>   + Thorsten?
>+ FrOScon in Bonn: Aug 25
>   + Bubli, Thorsten, perhaps Cloph.
>+ Conference – September
>+ potentially one in Bern / Switzerland - October 19th.
>+ working on a Munich event October 26-28th (Thorsten)
>   + an Open Gov’t meeting from the City of Munich
>   + good to have a hack-fest back-to-back there.
>   + moving slowly here …
> 
> * mentoring/easyhack update
>   committer...   1 week  1 month 3 months  12
> months
>   open  108(10) 149(-8)  150(-
> 9)   160(-9)  
>reviews 1653(283)   5765(138)   10585(1016)   2412
> 6(1087)
> merged  428(180)   1320(34) 3787(181)1424
> 1(243) 
>  abandoned   10(1)   52(-2)  261(-
> 5)   970(-11) 
>own
> commits  368(164)   (82) 3605(108)15304(355) 
> review commits   64(-21)310(-
> 10) 941(2)   3652(61)  
> contributor...   1 week1 month3 months 12
> months
>   open 18(1)  76(8)   77(7) 81(8)
>
>reviews 81(35)303(-4)3695(-477)   28183(-
> 383)
> merged 19(-37)   173(-
> 5) 381(2)   1722(2)   
>  abandoned  3(-1) 33(-5)  88(-6)   343(-
> 2)  
>own commits 22(-38)   167(-10)405(-
> 2)  1424(18)  
> review
> commits  0(0)   0(0)0(0) 

[Libreoffice-commits] core.git: sc/CppunitTest_sc_datapilotfieldobj.mk

2018-08-01 Thread Libreoffice Gerrit user
 sc/CppunitTest_sc_datapilotfieldobj.mk |   41 -
 1 file changed, 6 insertions(+), 35 deletions(-)

New commits:
commit 0a4f577669d4f7faf7287d3eb947832502a31726
Author: Jens Carl 
AuthorDate: Wed Aug 1 05:30:57 2018 +
Commit: Jens Carl 
CommitDate: Wed Aug 1 17:59:27 2018 +0200

Remove obsolete (cargo-cult copied) dependencies

Change-Id: I9edc18f94a33587bbb0a3bd11b4df66b7844a028
Reviewed-on: https://gerrit.libreoffice.org/58379
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sc/CppunitTest_sc_datapilotfieldobj.mk 
b/sc/CppunitTest_sc_datapilotfieldobj.mk
index 5a7c2a474eed..da8781adde35 100644
--- a/sc/CppunitTest_sc_datapilotfieldobj.mk
+++ b/sc/CppunitTest_sc_datapilotfieldobj.mk
@@ -14,48 +14,19 @@ $(eval $(call 
gb_CppunitTest_CppunitTest,sc_datapilotfieldobj))
 $(eval $(call gb_CppunitTest_use_external,sc_datapilotfieldobj,boost_headers))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sc_datapilotfieldobj, \
-sc/qa/extras/scdatapilotfieldobj \
+   sc/qa/extras/scdatapilotfieldobj \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,sc_datapilotfieldobj, \
-basegfx \
-comphelper \
-cppu \
-cppuhelper \
-drawinglayer \
-editeng \
-for \
-forui \
-i18nlangtag \
-msfilter \
-oox \
-sal \
-salhelper \
-sax \
-sb \
-sc \
-sfx \
-sot \
-subsequenttest \
-svl \
-svt \
-svx \
-svxcore \
+   cppu \
+   sal \
+   subsequenttest \
test \
-tk \
-tl \
-ucbhelper \
unotest \
-utl \
-vbahelper \
-vcl \
-xo \
 ))
 
 $(eval $(call gb_CppunitTest_set_include,sc_datapilotfieldobj,\
--I$(SRCDIR)/sc/source/ui/inc \
--I$(SRCDIR)/sc/inc \
-$$(INCLUDE) \
+   $$(INCLUDE) \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,sc_datapilotfieldobj))
@@ -64,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,sc_datapilotfieldobj))
 $(eval $(call gb_CppunitTest_use_vcl,sc_datapilotfieldobj))
 
 $(eval $(call gb_CppunitTest_use_components,sc_datapilotfieldobj,\
-$(sc_unoapi_common_components) \
+   $(sc_unoapi_common_components) \
 ))
 
 $(eval $(call gb_CppunitTest_use_configuration,sc_datapilotfieldobj))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 chart2/source/view/main/VLegend.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 88af6826a78dcacee4270dc65108a4123b46fb12
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 11:16:53 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 17:46:03 2018 +0200

forcepoint#60 FPE

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

diff --git a/chart2/source/view/main/VLegend.cxx 
b/chart2/source/view/main/VLegend.cxx
index 17889044e591..34511f3885e7 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -243,6 +243,8 @@ void lcl_collectRowHeighs( std::vector< sal_Int32 >& 
rRowHeights, const sal_Int3
 sal_Int32 lcl_getTextLineHeight( const std::vector< sal_Int32 >& aRowHeights, 
const sal_Int32 nNumberOfRows, double fViewFontSize )
 {
 const sal_Int32 nFontHeight = static_cast< sal_Int32 >( fViewFontSize );
+if (!nFontHeight)
+return 0;
 sal_Int32 nTextLineHeight = nFontHeight;
 for (sal_Int32 nRow = 0; nRow < nNumberOfRows; ++nRow)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sal/osl/unx/file.cxx |   74 ++-
 sal/osl/w32/file.cxx |   65 ++--
 2 files changed, 12 insertions(+), 127 deletions(-)

New commits:
commit aeeb6d5206e813b037a3957aa8fb94c490d2729d
Author: Stephan Bergmann 
AuthorDate: Wed Jan 3 18:03:31 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Aug 1 17:24:25 2018 +0200

Replace rtl_cache_alloc/free with rtl_allocate/freeMemory

...as with the combination of old ce906b8096081dee15dc8cc96e570d5b0b587955
"skip tricky allocators on G_SLICE=always-malloc" and recent
bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 "Disable custom allocator", 
rtl_cache
unconditionally just uses malloc/free now (see also
db354dfad541fe2edd64a618a2d7cc83a6be2b9e "the custom SAL allocator is no 
longer
used" and df6ba650469a6f2fda06ef1c2e107ccdd3570505 "Remove 'officially dead 
now'
rtl_cache slab allocator mechanism").  So simplify the code.

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

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 94aa6e42fc8a..ae221a8834a6 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -142,26 +142,6 @@ struct FileHandle_Impl
 
 oslFileError syncFile();
 
-/** Buffer cache / allocator.
- */
-class Allocator
-{
-rtl_cache_type*  m_cache;
-size_t   m_bufsiz;
-
-public:
-Allocator(const Allocator&) = delete;
-Allocator& operator=(const Allocator&) = delete;
-static Allocator& get();
-
-void allocate(sal_uInt8 **ppBuffer, size_t *pnSize);
-void deallocate(sal_uInt8 *pBuffer);
-
-protected:
-Allocator();
-~Allocator();
-};
-
 class Guard
 {
 pthread_mutex_t *m_mutex;
@@ -172,47 +152,6 @@ struct FileHandle_Impl
 };
 };
 
-FileHandle_Impl::Allocator& FileHandle_Impl::Allocator::get()
-{
-static Allocator g_aBufferAllocator;
-return g_aBufferAllocator;
-}
-
-FileHandle_Impl::Allocator::Allocator()
-: m_cache(nullptr),
-  m_bufsiz(0)
-{
-size_t const pagesize = FileHandle_Impl::getpagesize();
-if (pagesize != size_t(-1))
-{
-m_cache  = rtl_cache_create(
-"osl_file_buffer_cache", pagesize, 0, nullptr, nullptr, nullptr, 
nullptr, nullptr, 0);
-
-if (m_cache)
-m_bufsiz = pagesize;
-}
-}
-
-FileHandle_Impl::Allocator::~Allocator()
-{
-rtl_cache_destroy(m_cache);
-m_cache = nullptr;
-}
-
-void FileHandle_Impl::Allocator::allocate(sal_uInt8 **ppBuffer, size_t *pnSize)
-{
-assert(ppBuffer);
-assert(pnSize);
-*ppBuffer = static_cast< sal_uInt8* >(rtl_cache_alloc(m_cache));
-*pnSize = m_bufsiz;
-}
-
-void FileHandle_Impl::Allocator::deallocate(sal_uInt8 * pBuffer)
-{
-if (pBuffer)
-rtl_cache_free(m_cache, pBuffer);
-}
-
 FileHandle_Impl::Guard::Guard(pthread_mutex_t * pMutex)
 : m_mutex(pMutex)
 {
@@ -243,9 +182,14 @@ FileHandle_Impl::FileHandle_Impl(int fd, enum Kind kind, 
char const * path)
 rtl_string_newFromStr(&m_strFilePath, path);
 if (m_kind == KIND_FD)
 {
-Allocator::get().allocate (&m_buffer, &m_bufsiz);
-if (m_buffer)
-memset(m_buffer, 0, m_bufsiz);
+size_t const pagesize = getpagesize();
+if (pagesize != size_t(-1))
+{
+m_bufsiz = pagesize;
+m_buffer = static_cast(rtl_allocateMemory(m_bufsiz));
+if (m_buffer)
+memset(m_buffer, 0, m_bufsiz);
+}
 }
 }
 
@@ -253,7 +197,7 @@ FileHandle_Impl::~FileHandle_Impl()
 {
 if (m_kind == KIND_FD)
 {
-Allocator::get().deallocate(m_buffer);
+rtl_freeMemory(m_buffer);
 m_buffer = nullptr;
 }
 
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index a63b58a1bdca..35373bb56cc2 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -116,27 +116,6 @@ struct FileHandle_Impl
 
 oslFileError syncFile();
 
-/** Buffer cache / allocator.
- */
-class Allocator
-{
-rtl_cache_type * m_cache;
-SIZE_T   m_bufsiz;
-
-Allocator(Allocator const &) = delete;
-Allocator & operator= (Allocator const &) = delete;
-
-public:
-static Allocator & get();
-
-void allocate(sal_uInt8 ** ppBuffer, SIZE_T * pnSize);
-void deallocate(sal_uInt8 * pBuffer);
-
-protected:
-Allocator();
-~Allocator();
-};
-
 /** Guard.
  */
 class Guard
@@ -149,44 +128,6 @@ struct FileHandle_Impl
 };
 };
 
-FileHandle_Impl::Allocator& FileHandle_Impl::Allocator::get()
-{
-static Allocator g_aBufferAllocator;
-return g_aBufferAllocator;
-}
-
-FileHandle_Impl::Allocator::Allocator()
-: m_cache  (nullptr),
-  m_bufsiz (0)
-{
-SIZE_T const pagesize

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

2018-08-01 Thread Libreoffice Gerrit user
 filter/source/xsltfilter/OleHandler.cxx |   60 
 1 file changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 0c00f6490951ee73748fae74998edf0a7ef589fa
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 11:37:51 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 17:10:55 2018 +0200

fix up non standard indent and stray ;

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

diff --git a/filter/source/xsltfilter/OleHandler.cxx 
b/filter/source/xsltfilter/OleHandler.cxx
index 3ad12a9dfa1a..29d6962bef03 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -60,16 +60,16 @@ namespace XSLT
 void OleHandler::ensureCreateRootStorage()
 {
 if (m_storage == nullptr || m_rootStream == nullptr)
-{
-m_rootStream = createTempFile();
-Sequence args(1);
-args[0] <<= m_rootStream->getInputStream();
-
-Reference cont(
- 
Reference(m_xContext->getServiceManager(), 
UNO_QUERY_THROW)
- 
->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), 
UNO_QUERY);
-m_storage = cont;
-}
+{
+m_rootStream = createTempFile();
+Sequence args(1);
+args[0] <<= m_rootStream->getInputStream();
+
+Reference cont(
+ 
Reference(m_xContext->getServiceManager(), 
UNO_QUERY_THROW)
+ 
->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), 
UNO_QUERY);
+m_storage = cont;
+}
 }
 
 void OleHandler::initRootStorageFromBase64(const OString& content)
@@ -98,15 +98,15 @@ namespace XSLT
 OleHandler::encodeSubStorage(const OUString& streamName)
 {
 if (!m_storage || !m_storage->hasByName(streamName))
-{
-return "Not Found:";// + streamName;
-}
-;
+{
+return "Not Found:";// + streamName;
+}
+
 Reference subStream(m_storage->getByName(streamName), 
UNO_QUERY);
 if (!subStream.is())
-{
-return "Not Found:";// + streamName;
-}
+{
+return "Not Found:";// + streamName;
+}
 //The first four byte are the length of the uncompressed data
 Sequence aLength(4);
 Reference xSeek(subStream, UNO_QUERY);
@@ -114,9 +114,9 @@ namespace XSLT
 //Get the uncompressed length
 int readbytes = subStream->readBytes(aLength, 4);
 if (4 != readbytes)
-{
-return "Can not read the length.";
-}
+{
+return "Can not read the length.";
+}
 sal_Int32 const oleLength = (static_cast(aLength[0]) <<  0U)
   | (static_cast(aLength[1]) <<  8U)
   | (static_cast(aLength[2]) << 16U)
@@ -129,9 +129,9 @@ namespace XSLT
 //Read all bytes. The compressed length should less then the 
uncompressed length
 readbytes = subStream->readBytes(content, oleLength);
 if (oleLength < readbytes)
-{
-return "oleLength";// +oleLength + readBytes;
-}
+{
+return "oleLength";// +oleLength + readBytes;
+}
 
 // Decompress the bytes
 std::unique_ptr< ::ZipUtils::Inflater> decompresser(new 
::ZipUtils::Inflater(false));
@@ -150,14 +150,14 @@ namespace XSLT
 OleHandler::insertByName(const OUString& streamName, const OString& 
content)
 {
 if ( streamName == "oledata.mso" )
-{
-initRootStorageFromBase64(content);
-}
+{
+initRootStorageFromBase64(content);
+}
 else
-{
-ensureCreateRootStorage();
-insertSubStorage(streamName, content);
-}
+{
+ensureCreateRootStorage();
+insertSubStorage(streamName, content);
+}
 }
 
 const OString
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sc/source/filter/xml/XMLTableShapeImportHelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bd145a8a6d284d6fbc67929a2783b297f3b8fe6f
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 11:48:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 17:10:02 2018 +0200

forcepoint#64 null deref

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

diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx 
b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 75410c627865..a81396b1cf8b 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -201,7 +201,7 @@ void XMLTableShapeImportHelper::finishShape(
 // the group
 Point aStartPoint( rShape->getPosition().X,rShape->getPosition().Y 
);
 uno::Reference< drawing::XShape > xChild( rShapes, uno::UNO_QUERY 
);
-if (SvxShape* pGroupShapeImp = SvxShape::getImplementation( 
lcl_getTopLevelParent( xChild ) ))
+if (SvxShape* pGroupShapeImp = xChild.is() ? 
SvxShape::getImplementation(lcl_getTopLevelParent(xChild)) : nullptr)
 {
 if (SdrObject *pSdrObj = pGroupShapeImp->GetSdrObject())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 include/vcl/filter/pdfdocument.hxx |4 
 vcl/source/filter/ipdf/pdfdocument.cxx |   20 
 2 files changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 20e8d12c309d33a4c2937fa5ae041ac05a167de1
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 12:04:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 17:10:27 2018 +0200

forcepoint#65 pdf page visiting revisits itself

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

diff --git a/include/vcl/filter/pdfdocument.hxx 
b/include/vcl/filter/pdfdocument.hxx
index 60acfe68c984..b19bfca6b408 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -63,6 +63,7 @@ class VCL_DLLPUBLIC PDFObjectElement : public PDFElement
 PDFDocument& m_rDoc;
 double m_fObjectValue;
 double m_fGenerationValue;
+bool m_bVisiting;
 std::map m_aDictionary;
 /// If set, the object contains this number element (outside any 
dictionary/array).
 PDFNumberElement* m_pNumberElement;
@@ -122,6 +123,9 @@ public:
 SvMemoryStream* GetStreamBuffer() const;
 void SetStreamBuffer(std::unique_ptr& pStreamBuffer);
 PDFDocument& GetDocument();
+
+/// Visits the page tree recursively, looking for page objects.
+void visitPages(std::vector& rRet);
 };
 
 /// Array object: a list.
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx 
b/vcl/source/filter/ipdf/pdfdocument.cxx
index 28c49e53101d..7d4efc9e0eb0 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -1815,15 +1815,17 @@ size_t PDFDocument::GetObjectOffset(size_t nIndex) const
 const std::vector>& PDFDocument::GetElements() { 
return m_aElements; }
 
 /// Visits the page tree recursively, looking for page objects.
-static void visitPages(PDFObjectElement* pPages, 
std::vector& rRet)
+void PDFObjectElement::visitPages(std::vector& rRet)
 {
-auto pKids = dynamic_cast(pPages->Lookup("Kids"));
+auto pKids = dynamic_cast(Lookup("Kids"));
 if (!pKids)
 {
 SAL_WARN("vcl.filter", "visitPages: pages has no kids");
 return;
 }
 
+m_bVisiting = true;
+
 for (const auto& pKid : pKids->GetElements())
 {
 auto pReference = dynamic_cast(pKid);
@@ -1834,14 +1836,23 @@ static void visitPages(PDFObjectElement* pPages, 
std::vector&
 if (!pKidObject)
 continue;
 
+// detect if visiting reenters itself
+if (pKidObject->m_bVisiting)
+{
+SAL_WARN("vcl.filter", "visitPages: loop in hierarchy");
+continue;
+}
+
 auto pName = dynamic_cast(pKidObject->Lookup("Type"));
 if (pName && pName->GetValue() == "Pages")
 // Pages inside pages: recurse.
-visitPages(pKidObject, rRet);
+pKidObject->visitPages(rRet);
 else
 // Found an actual page.
 rRet.push_back(pKidObject);
 }
+
+m_bVisiting = false;
 }
 
 std::vector PDFDocument::GetPages()
@@ -1886,7 +1897,7 @@ std::vector PDFDocument::GetPages()
 return aRet;
 }
 
-visitPages(pPages, aRet);
+pPages->visitPages(aRet);
 
 return aRet;
 }
@@ -2122,6 +2133,7 @@ PDFObjectElement::PDFObjectElement(PDFDocument& rDoc, 
double fObjectValue, doubl
 : m_rDoc(rDoc)
 , m_fObjectValue(fObjectValue)
 , m_fGenerationValue(fGenerationValue)
+, m_bVisiting(false)
 , m_pNumberElement(nullptr)
 , m_nDictionaryOffset(0)
 , m_nDictionaryLength(0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 filter/source/xsltfilter/OleHandler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1c21662de87e03ae9430ce8a5be283aef70ef846
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 11:36:01 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 17:09:44 2018 +0200

forcepoint#63 null deref

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

diff --git a/filter/source/xsltfilter/OleHandler.cxx 
b/filter/source/xsltfilter/OleHandler.cxx
index 63728d54d5f3..3ad12a9dfa1a 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -97,7 +97,7 @@ namespace XSLT
 OString
 OleHandler::encodeSubStorage(const OUString& streamName)
 {
-if (!m_storage->hasByName(streamName))
+if (!m_storage || !m_storage->hasByName(streamName))
 {
 return "Not Found:";// + streamName;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sal/rtl/alloc_cache.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 90950c63fa24f98fa18306610e18f2080b8f0029
Author: Stephan Bergmann 
AuthorDate: Wed Aug 1 12:36:30 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Aug 1 16:37:35 2018 +0200

Dead assignment

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

diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index b4d7a0060d39..d1eaf44cd142 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -68,7 +68,7 @@ rtl_cache_type * rtl_cache_activate(
 }
 assert(RTL_MEMORY_ISP2(objalign));
 
-cache->m_type_size  = objsize = RTL_MEMORY_P2ROUNDUP(objsize, objalign);
+cache->m_type_size = RTL_MEMORY_P2ROUNDUP(objsize, objalign);
 
 cache->m_constructor = constructor;
 cache->m_destructor  = destructor;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 805609a5a3845fdd67d375be850484340593e567
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 11:31:21 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:39:52 2018 +0200

forcepoint#62 null deref

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

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 9e35322c5fa7..0bee265b0187 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5023,7 +5023,7 @@ void DomainMapper_Impl::PopFieldContext()
 else
 {
 FormControlHelper::Pointer_t 
pFormControlHelper(pContext->getFormControlHelper());
-if (pFormControlHelper.get() != nullptr && 
pFormControlHelper->hasFFDataHandler() )
+if (pFormControlHelper.get() != nullptr && 
pFormControlHelper->hasFFDataHandler() && xCrsr.is())
 {
 uno::Reference< text::XFormField > xFormField( 
pContext->GetFormField() );
 xToInsert.set(xFormField, uno::UNO_QUERY);
@@ -5039,7 +5039,7 @@ void DomainMapper_Impl::PopFieldContext()
 pFormControlHelper->insertControl(xTxtRange);
 }
 }
-else if(!pContext->GetHyperlinkURL().isEmpty())
+else if (!pContext->GetHyperlinkURL().isEmpty() && 
xCrsr.is())
 {
 xCrsr->gotoEnd( true );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 oox/source/export/chartexport.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 61ebd4fac9da6a56ae89beeb850a719820a87920
Author: Mike Kaganski 
AuthorDate: Wed Aug 1 12:20:28 2018 +0200
Commit: Mike Kaganski 
CommitDate: Wed Aug 1 15:04:57 2018 +0200

Use temporaries for dummy arguments

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

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 2a2223c813ca..142f8528c2f4 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -105,6 +105,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace css;
 using namespace css::uno;
@@ -2336,9 +2337,8 @@ void ChartExport::exportTextProps(const 
Reference& xPropSet, bool
 pFS->startElement(FSNS(XML_a, XML_p), FSEND);
 pFS->startElement(FSNS(XML_a, XML_pPr), FSEND);
 
-bool bOverrideCharHeight = false;
-sal_Int32 nCharHeight;
-WriteRunProperties(xPropSet, false, XML_defRPr, true, bOverrideCharHeight, 
nCharHeight);
+WriteRunProperties(xPropSet, false, XML_defRPr, true, 
o3tl::temporary(false),
+   o3tl::temporary(sal_Int32()));
 
 pFS->endElement(FSNS(XML_a, XML_pPr));
 pFS->endElement(FSNS(XML_a, XML_p));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sw/source/core/text/pormulti.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 518210ad681bc0721c57c56e625abcb6429dd693
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 11:25:22 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:03:57 2018 +0200

forcepoint#61 null deref

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

diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 13b7207b71d9..78423e440a6f 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -2094,11 +2094,13 @@ bool SwTextFormatter::BuildMultiPortion( 
SwTextFormatInfo &rInf,
 
 BuildPortions( aTmp );
 
-if ( rMulti.OnRight() )
+const SwLinePortion *pRightPortion = rMulti.OnRight() ?
+ 
rMulti.GetRoot().GetNext()->GetPortion() : nullptr;
+if (pRightPortion)
 {
 // The ruby text on the right is vertical.
 // The width and the height are swapped.
-SwTwips nHeight = 
rMulti.GetRoot().GetNext()->GetPortion()->Height();
+SwTwips nHeight = pRightPortion->Height();
 // Keep room for the ruby text.
 rMulti.GetRoot().FindLastPortion()->AddPrtWidth( nHeight );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sc/source/core/data/column3.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f40ec956b65ba25eacb75f201ea039639a5d1297
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 08:55:23 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:04:25 2018 +0200

forcepoint#55 invalid iterator increment

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

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b8b5acd28a3c..9a1a5622a608 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3081,6 +3081,8 @@ public:
 if (xCurGrp)
 {
 // Move to the cell after the last cell of the current 
group.
+if (xCurGrp->mnLength > std::distance(it, itEnd))
+throw css::lang::IllegalArgumentException();
 std::advance(it, xCurGrp->mnLength);
 nRow += xCurGrp->mnLength;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 oox/source/drawingml/chart/chartconverter.cxx |   38 ++
 1 file changed, 16 insertions(+), 22 deletions(-)

New commits:
commit ec98a8c4ced6d94159a84e4db6fec7bd97a171f3
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 10:42:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:03:30 2018 +0200

forcepoint#59 the "matrix" is always one row in height

so it can be a vector instead, and by using vector::at() instead of
matrix::at() vector bounds checking is performed, unlike matrix::at()
which does no checking

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

diff --git a/oox/source/drawingml/chart/chartconverter.cxx 
b/oox/source/drawingml/chart/chartconverter.cxx
index 4992758396ac..f86ea8adb760 100644
--- a/oox/source/drawingml/chart/chartconverter.cxx
+++ b/oox/source/drawingml/chart/chartconverter.cxx
@@ -44,7 +44,6 @@ using ::oox::core::XmlFilterBase;
 
 static const sal_Unicode API_TOKEN_ARRAY_OPEN  = '{';
 static const sal_Unicode API_TOKEN_ARRAY_CLOSE = '}';
-static const sal_Unicode API_TOKEN_ARRAY_ROWSEP= '|';
 static const sal_Unicode API_TOKEN_ARRAY_COLSEP= ';';
 
 // Code similar to oox/source/xls/formulabase.cxx
@@ -57,28 +56,23 @@ static OUString lclGenerateApiString( const OUString& 
rString )
 return "\"" + aRetString + "\"";
 }
 
-static OUString lclGenerateApiArray( const Matrix< Any >& rMatrix )
+static OUString lclGenerateApiArray(const std::vector& rRow)
 {
-OSL_ENSURE( !rMatrix.empty(), "ChartConverter::lclGenerateApiArray - 
missing matrix values" );
+OSL_ENSURE( !rRow.empty(), "ChartConverter::lclGenerateApiArray - missing 
matrix values" );
 OUStringBuffer aBuffer;
 aBuffer.append( API_TOKEN_ARRAY_OPEN );
-for( size_t nRow = 0, nHeight = rMatrix.height(); nRow < nHeight; ++nRow )
+for (auto aBeg = rRow.begin(), aIt = aBeg, aEnd = rRow.end(); aIt != aEnd; 
++aIt)
 {
-if( nRow > 0 )
-aBuffer.append( API_TOKEN_ARRAY_ROWSEP );
-for( Matrix< Any >::const_iterator aBeg = rMatrix.row_begin( nRow ), 
aIt = aBeg, aEnd = rMatrix.row_end( nRow ); aIt != aEnd; ++aIt )
-{
-double fValue = 0.0;
-OUString aString;
-if( aIt != aBeg )
-aBuffer.append( API_TOKEN_ARRAY_COLSEP );
-if( *aIt >>= fValue )
-aBuffer.append( fValue );
-else if( *aIt >>= aString )
-aBuffer.append( lclGenerateApiString( aString ) );
-else
-aBuffer.append( "\"\"" );
-}
+double fValue = 0.0;
+OUString aString;
+if( aIt != aBeg )
+aBuffer.append( API_TOKEN_ARRAY_COLSEP );
+if( *aIt >>= fValue )
+aBuffer.append( fValue );
+else if( *aIt >>= aString )
+aBuffer.append( lclGenerateApiString( aString ) );
+else
+aBuffer.append( "\"\"" );
 }
 aBuffer.append( API_TOKEN_ARRAY_CLOSE );
 return aBuffer.makeStringAndClear();
@@ -133,11 +127,11 @@ Reference< XDataSequence > 
ChartConverter::createDataSequence(
 if( !rDataSeq.maData.empty() )
 {
 // create a single-row array from constant source data
-Matrix< Any > aMatrix( rDataSeq.mnPointCount, 1 );
+std::vector aRow(rDataSeq.mnPointCount);
 for (auto const& elem : rDataSeq.maData)
-*aMatrix.at(elem.first, 0) = elem.second;
+aRow.at(elem.first) = elem.second;
 
-aRangeRep = lclGenerateApiArray( aMatrix );
+aRangeRep = lclGenerateApiArray(aRow);
 }
 
 if( !aRangeRep.isEmpty() ) try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 xmlsecurity/source/helper/xmlsignaturehelper.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9d9148ae8b78d4c6fbee397889897127ecf317b3
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 09:30:10 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:02:15 2018 +0200

forcepoint#57 sanity check stream signature size

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

diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx 
b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 1118bff743c7..d21a8a101862 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -381,6 +381,11 @@ bool 
XMLSignatureHelper::ReadAndVerifySignatureStorage(const uno::ReferencegetPropertyValue("Size") >>= nSize;
+if (nSize < 0 || nSize > SAL_MAX_INT32)
+{
+SAL_WARN("xmlsecurity.helper", "bogus signature size: " << 
nSize);
+continue;
+}
 uno::Sequence aData;
 xInputStream->readBytes(aData, nSize);
 mpXSecController->setSignatureBytes(aData);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 xmlsecurity/source/helper/xmlsignaturehelper.cxx |   29 +++
 1 file changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 090616c5fb01a649076e535ad8ef43bd027f4fa2
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 09:18:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:01:53 2018 +0200

flatten conditionals

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

diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx 
b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 43efcb618b1c..1118bff743c7 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -370,21 +370,20 @@ bool 
XMLSignatureHelper::ReadAndVerifySignatureStorage(const uno::ReferenceopenStreamElement(it->Second, 
nOpenMode), uno::UNO_QUERY);
-uno::Reference 
xPropertySet(xInputStream, uno::UNO_QUERY);
-if (xPropertySet.is())
-{
-sal_Int64 nSize = 0;
-xPropertySet->getPropertyValue("Size") >>= nSize;
-uno::Sequence aData;
-xInputStream->readBytes(aData, nSize);
-mpXSecController->setSignatureBytes(aData);
-}
-}
+if (!bCache)
+continue;
+// Store the contents of the stream as is, in case we need to 
write it back later.
+xInputStream.clear();
+xInputStream.set(xStorage->openStreamElement(it->Second, 
nOpenMode), uno::UNO_QUERY);
+uno::Reference xPropertySet(xInputStream, 
uno::UNO_QUERY);
+if (!xPropertySet.is())
+continue;
+
+sal_Int64 nSize = 0;
+xPropertySet->getPropertyValue("Size") >>= nSize;
+uno::Sequence aData;
+xInputStream->readBytes(aData, nSize);
+mpXSecController->setSignatureBytes(aData);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 44236073b2d20dfaa003b1bbb1f49162f38e5b23
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 09:04:58 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 15:01:23 2018 +0200

forcepoint#56 null deref

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

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c6a68079c4ab..9e35322c5fa7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3083,15 +3083,17 @@ void DomainMapper_Impl::PushFieldContext()
 TagLogger::getInstance().element("pushFieldContext");
 #endif
 
-uno::Reference< text::XTextAppend >  xTextAppend;
+uno::Reference xCrsr;
 if (!m_aTextAppendStack.empty())
-xTextAppend = m_aTextAppendStack.top().xTextAppend;
-uno::Reference< text::XTextRange > xStart;
-if (xTextAppend.is())
 {
-uno::Reference< text::XTextCursor > xCrsr = 
xTextAppend->createTextCursorByRange( xTextAppend->getEnd() );
-xStart = xCrsr->getStart();
+uno::Reference xTextAppend = 
m_aTextAppendStack.top().xTextAppend;
+if (xTextAppend.is())
+xCrsr = 
xTextAppend->createTextCursorByRange(xTextAppend->getEnd());
 }
+
+uno::Reference< text::XTextRange > xStart;
+if (xCrsr.is())
+xStart = xCrsr->getStart();
 m_aFieldStack.push( new FieldContext( xStart ) );
 }
 /*-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Segmentation fault when compiling

2018-08-01 Thread julien2412
Hi,

On which env and version are you?

2 things:
1) bt
you can try to retrieve a backtrace by using "ulimit -c unlimited" and
relaunch "make"
or 
type "make CppunitTest_toolkit CPPUNITTRACE="gdb --args"
then in gdb, just type "run" then "bt" to retrieve bt.

If 1) gives nothing->
2) build tools (at least on Linux since I don't know for the rest)
Perhaps some build tools have upgraded on your machine (eg gcc) and some
cache is wrong
So I'll try this:
"ccache -C" (to clean ccache)
make clean (to remove any built part)
./g pull -r ./autogen.sh && make

Hope it helps a bit

Julien



--
Sent from: 
http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 59187f1b539a36ae78bc07aaeebe71cd830317be
Author: Olivier Hallot 
AuthorDate: Wed Aug 1 07:06:48 2018 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Aug 1 13:52:28 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - tdf#115254 Some branch bookmarks are'nt working 15

module sw a- to b-

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

diff --git a/helpcontent2 b/helpcontent2
index a20196a08afd..814d9dc38a99 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a20196a08afd082a74e89e217cc5ca18a8dbe0be
+Subproject commit 814d9dc38a99f64b05d32e402295a3db8f91eb6b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 source/text/shared/00/0215.xhp   |3 ++-
 source/text/shared/01/01010304.xhp   |1 +
 source/text/shared/optionen/serverauthentication.xhp |3 ++-
 source/text/swriter/01/01160300.xhp  |5 +++--
 source/text/swriter/01/0212.xhp  |1 +
 source/text/swriter/01/04120219.xhp  |8 +---
 source/text/swriter/01/04120300.xhp  |1 +
 source/text/swriter/01/mm_cusgrelin.xhp  |3 ++-
 source/text/swriter/01/mm_matfie.xhp |3 ++-
 9 files changed, 19 insertions(+), 9 deletions(-)

New commits:
commit 814d9dc38a99f64b05d32e402295a3db8f91eb6b
Author: Olivier Hallot 
AuthorDate: Wed Aug 1 07:06:48 2018 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 1 13:52:28 2018 +0200

tdf#115254 Some branch bookmarks are'nt working 15

module sw a- to b-

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

diff --git a/source/text/shared/00/0215.xhp 
b/source/text/shared/00/0215.xhp
index 9e67875f2..38446781c 100644
--- a/source/text/shared/00/0215.xhp
+++ b/source/text/shared/00/0215.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -30,6 +30,7 @@
 
 
 
+
 
 ASCII 
Filter Options
 You can 
specify which options, such as basic font, language, character set, or break, 
are imported or exported with a text document. The dialog appears when you load 
an ASCII file with the filter "Text Encoded" or when you save the document the 
first time, or when you "save as" with another name.
diff --git a/source/text/shared/01/01010304.xhp 
b/source/text/shared/01/01010304.xhp
index 19fb66d71..620ffcdd5 100644
--- a/source/text/shared/01/01010304.xhp
+++ b/source/text/shared/01/01010304.xhp
@@ -30,6 +30,7 @@
 
 
 
+
 Business
   Contains contact information for business cards that use a layout from 
a 'Business Card, Work' category. Business card layouts are selected on the 
Business Cards tab.
 
diff --git a/source/text/shared/optionen/serverauthentication.xhp 
b/source/text/shared/optionen/serverauthentication.xhp
index 8170defca..0f061730c 100644
--- a/source/text/shared/optionen/serverauthentication.xhp
+++ b/source/text/shared/optionen/serverauthentication.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -27,6 +27,7 @@
 
 
 
+
 
 Server 
Authentication
 On the 
%PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Writer - Mail Merge 
E-mail tab page, click the Server Authentication button to 
specify the server security settings.
diff --git a/source/text/swriter/01/01160300.xhp 
b/source/text/swriter/01/01160300.xhp
index 789315e21..f307f707c 100644
--- a/source/text/swriter/01/01160300.xhp
+++ b/source/text/swriter/01/01160300.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -31,10 +31,11 @@
 
 
 
+
 
 Create 
AutoAbstract
 
-Copies the 
headings and a number of subsequent paragraphs in the active document to a new 
AutoAbstract text document. An AutoAbstract is useful for obtaining an overview 
of long documents. You can specify the number of outline levels as well 
as the number of paragraphs displayed therein. All levels and paragraphs under 
the respective settings are hidden. 
+Copies the 
headings and a number of subsequent paragraphs in the active document to a new 
AutoAbstract text document. An AutoAbstract is useful for obtaining an overview 
of long documents. You can specify the number of outline levels as well 
as the number of paragraphs displayed therein. All levels and paragraphs under 
the respective settings are hidden.
 
 
   
diff --git a/source/text/swriter/01/0212.xhp 
b/source/text/swriter/01/0212.xhp
index 33f53058a..67cb79b91 100644
--- a/source/text/swriter/01/0212.xhp
+++ b/source/text/swriter/01/0212.xhp
@@ -28,6 +28,7 @@
 
 
 
+
 
 
 AutoText
diff --git a/source/text/swriter/01/04120219.xhp 
b/source/text/swriter/01/04120219.xhp
index 0a05a8d40..00bd71569 100644
--- a/source/text/swriter/01/04120219.xhp
+++ b/source/text/swriter/01/04120219.xhp
@@ -30,9 +30,11 @@
 
 
 
-  
-  
-  Assign 
Styles
+
+
+
+  
+  Assign 
Styles
   Creates index entries from specific paragraph 
styles.
   
   
diff --git a/source/text/swriter/01/04120300.xhp 
b/source/text/swriter/01/04120300.xhp
index 41a8c60e3..42f627f5b 100644
--- a/source/text/swriter/01/04120300.xhp
+++ b/source/text/swriter/01/04120300.xhp
@@ -29,6 +29,7 @@
 
 
 
+
 
 Insert Bibliography Entry
 Inserts a 
bibliography reference.
di

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

2018-08-01 Thread Libreoffice Gerrit user
 sc/qa/extras/macros-test.cxx   |1 +
 sc/qa/unit/helper/qahelper.cxx |1 +
 sc/source/core/data/attarray.cxx   |1 +
 sc/source/core/data/attrib.cxx |1 +
 sc/source/core/data/bcaslot.cxx|1 +
 sc/source/core/data/column4.cxx|1 +
 sc/source/core/data/conditio.cxx   |1 +
 sc/source/core/data/documen2.cxx   |1 +
 sc/source/core/data/documen4.cxx   |1 +
 sc/source/core/data/documen7.cxx   |1 +
 sc/source/core/data/documen8.cxx   |1 +
 sc/source/core/data/document.cxx   |1 +
 sc/source/core/data/document10.cxx |1 +
 sc/source/core/data/dpresfilter.cxx|1 +
 sc/source/core/data/dpsave.cxx |1 +
 sc/source/core/data/dptabres.cxx   |1 +
 sc/source/core/data/dptabsrc.cxx   |1 +
 sc/source/core/data/formulacell.cxx|1 +
 sc/source/core/data/global2.cxx|1 +
 sc/source/core/data/postit.cxx |1 +
 sc/source/core/data/segmenttree.cxx|1 +
 sc/source/core/data/table3.cxx |1 +
 sc/source/core/data/table6.cxx |1 +
 sc/source/core/opencl/formulagroupcl.cxx   |1 +
 sc/source/core/opencl/opbase.cxx   |1 +
 sc/source/core/tool/addincfg.cxx   |2 ++
 sc/source/core/tool/addincol.cxx   |1 +
 sc/source/core/tool/address.cxx|1 +
 sc/source/core/tool/calcconfig.cxx |1 +
 sc/source/core/tool/compiler.cxx   |1 +
 sc/source/core/tool/dbdata.cxx |1 +
 sc/source/core/tool/formulagroup.cxx   |1 +
 sc/source/core/tool/formulaopt.cxx |1 +
 sc/source/core/tool/formularesult.cxx  |2 ++
 sc/source/core/tool/grouparealistener.cxx  |2 ++
 sc/source/core/tool/interpr1.cxx   |1 +
 sc/source/core/tool/interpr8.cxx   |1 +
 sc/source/core/tool/lookupcache.cxx|2 ++
 sc/source/core/tool/parclass.cxx   |1 +
 sc/source/core/tool/rangelst.cxx   |1 +
 sc/source/core/tool/scmatrix.cxx   |1 +
 sc/source/core/tool/token.cxx  |1 +
 sc/source/filter/excel/excform.cxx |1 +
 sc/source/filter/excel/excrecds.cxx|1 +
 sc/source/filter/excel/impop.cxx   |1 +
 sc/source/filter/excel/tokstack.cxx|1 +
 sc/source/filter/excel/xecontent.cxx   |1 +
 sc/source/filter/excel/xeformula.cxx   |1 +
 sc/source/filter/excel/xelink.cxx  |1 +
 sc/source/filter/excel/xeroot.cxx  |1 +
 sc/source/filter/excel/xichart.cxx |1 +
 sc/source/filter/excel/xicontent.cxx   |1 +
 sc/source/filter/excel/xiescher.cxx|1 +
 sc/source/filter/excel/xihelper.cxx|1 +
 sc/source/filter/excel/xilink.cxx  |1 +
 sc/source/filter/excel/xipivot.cxx |1 +
 sc/source/filter/excel/xistream.cxx|1 +
 sc/source/filter/excel/xistring.cxx|1 +
 sc/source/filter/excel/xistyle.cxx |1 +
 sc/source/filter/excel/xlpivot.cxx |1 +
 sc/source/filter/excel/xlroot.cxx  |1 +
 sc/source/filter/excel/xlstyle.cxx |1 +
 sc/source/filter/excel/xltoolbar.cxx   |1 +
 sc/source/filter/excel/xltools.cxx |1 +
 sc/source/filter/ftools/fapihelper.cxx |1 +
 sc/source/filter/lotus/lotattr.cxx |1 +
 sc/source/filter/lotus/lotform.cxx |1 +
 sc/source/filter/lotus/lotimpop.cxx|1 +
 sc/source/filter/lotus/lotread.cxx |2 ++
 sc/source/filter/lotus/tool.cxx|1 +
 sc/source/filter/oox/condformatbuffer.cxx  |1 +
 sc/source/filter/oox/excelfilter.cxx   |1 +
 sc/source/filter/oox/externallinkbuffer.cxx|1 +
 sc/source/filter/oox/extlstcontext.cxx |1 +
 sc/source/filter/oox/formulabuffer.cxx |1 +
 sc/source/filter/oox/formulaparser.cxx |1 +
 sc/source/filter/oox/pivotcachebuffer.cxx

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

2018-08-01 Thread Libreoffice Gerrit user
 writerfilter/source/rtftok/rtfsdrimport.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ccc0986d9a1c4a90114a38c30fe778ee42c8a8b5
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 10:19:52 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 13:38:42 2018 +0200

forcepoint#58 null deref

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

diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx 
b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 1d3b9527311e..ae8a6333d720 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -1119,6 +1119,8 @@ void RTFSdrImport::append(const OUString& aKey, const 
OUString& aValue)
 
 void RTFSdrImport::appendGroupProperty(const OUString& aKey, const OUString& 
aValue)
 {
+if (m_aParents.empty())
+return;
 uno::Reference xShape(m_aParents.top(), uno::UNO_QUERY);
 if (xShape.is())
 applyProperty(xShape, aKey, aValue);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 sw/source/uibase/dochdl/swdtflvr.cxx |   31 ---
 1 file changed, 28 insertions(+), 3 deletions(-)

New commits:
commit 80d3d1044a1ad921bff990e2c4bb4dbf7c0a35c6
Author: László Németh 
AuthorDate: Mon Jul 30 21:22:23 2018 +0200
Commit: László Németh 
CommitDate: Wed Aug 1 13:36:10 2018 +0200

tdf#37223 insert OLE tables in text tables as native text tables

to solve the long-standing problem of Calc/Writer integration,
ie. now Calc table data are inserted cell by cell in Writer
text tables instead of putting an unwanted second table over
the original, as an OLE object.

First insert the OLE table as a nested native table using paste
special as RTF, and cut and paste that to get a native table
insertion, removing also the temporary nested table.

This fix has got correct undo, but unfortunately, also a small
flash during insertion by the temporary nested table. I've
tried to fix that by LockView and LockModify, but it seems,
they don't help.

Note: the planned solution mentioned in the original OOo issue
(reported in 2004) suggested to use a hidden temporary
document, but that has got poblems with clipboard usage.

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

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index d69c680a0424..a9a5fa476219 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1154,9 +1154,11 @@ bool SwTransferable::Paste(SwWrtShell& rSh, 
TransferableDataHelper& rData, RndSt
 &nActionFlags );
 }
 
+bool bInsertOleTable = ( EXCHG_OUT_ACTION_INSERT_OLE == nAction && ( 
rData.HasFormat( SotClipboardFormatId::SYLK ) ||
+  rData.HasFormat( SotClipboardFormatId::SYLK_BIGCAPS ) ) );
+
 // content of 1-cell tables is inserted as simple text
-if( EXCHG_OUT_ACTION_INSERT_OLE == nAction && ( rData.HasFormat( 
SotClipboardFormatId::SYLK ) ||
-  rData.HasFormat( SotClipboardFormatId::SYLK_BIGCAPS ) ) )
+if (bInsertOleTable)
 {
 OUString aExpand;
 if( rData.GetString( SotClipboardFormatId::STRING, aExpand ))
@@ -1172,8 +1174,11 @@ bool SwTransferable::Paste(SwWrtShell& rSh, 
TransferableDataHelper& rData, RndSt
 }
 }
 
+bool bInsertOleTableInTable = (bInsertOleTable && !bSingleCellTable &&
+(rSh.GetDoc()->IsIdxInTable(rSh.GetCursor()->GetNode()) != 
nullptr));
+
 // special case for tables from draw application or 1-cell tables
-if( EXCHG_OUT_ACTION_INSERT_DRAWOBJ == nAction || bSingleCellTable )
+if( EXCHG_OUT_ACTION_INSERT_DRAWOBJ == nAction || bSingleCellTable || 
bInsertOleTableInTable )
 {
 if( rData.HasFormat( SotClipboardFormatId::RTF ) )
 {
@@ -1187,6 +1192,26 @@ bool SwTransferable::Paste(SwWrtShell& rSh, 
TransferableDataHelper& rData, RndSt
 }
 }
 
+// tdf#37223 insert OLE table in text tables as a native text table
+// (first as an RTF nested table, and cut and paste that to get a
+// native table insertion, removing also the temporary nested table)
+// TODO set a working view lock to avoid of showing the temporary nested 
table for a moment
+if (bInsertOleTableInTable && EXCHG_OUT_ACTION_INSERT_STRING == nAction)
+{
+bool bPasted = SwTransferable::PasteData( rData, rSh, nAction, 
nActionFlags, nFormat,
+nDestination, false, false, nullptr, 
0, false, nAnchorType );
+if (bPasted && rSh.DoesUndo())
+{
+SfxDispatcher* pDispatch = 
rSh.GetView().GetViewFrame()->GetDispatcher();
+pDispatch->Execute(FN_PREV_TABLE, SfxCallMode::SYNCHRON);
+pDispatch->Execute(FN_TABLE_SELECT_ALL, SfxCallMode::SYNCHRON);
+pDispatch->Execute(SID_COPY, SfxCallMode::SYNCHRON);
+pDispatch->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
+pDispatch->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
+}
+return bPasted;
+}
+
 return EXCHG_INOUT_ACTION_NONE != nAction &&
 SwTransferable::PasteData( rData, rSh, nAction, nActionFlags, 
nFormat,
 nDestination, false, false, nullptr, 
0, false, nAnchorType );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Is there a way to know if a dispatch command opens a dialog?

2018-08-01 Thread Saurav Chirania
There are dispatch commands (like .uno:FontDialog) which open a dialog when
executed. There are other dispatch commands (like .uno:GoDown) which don't
open a dialog when executed. Do we have a function using which I can know
whether or not a command opens a dialog? If not, will it be possible to
implement such a function? Which parts of the code should I look into for
implementing such a function?

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


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

2018-08-01 Thread Libreoffice Gerrit user
 sfx2/source/doc/objserv.cxx |   39 +--
 1 file changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 5ffc6da9b8270114cc6e1100f79425e70c5a5789
Author: Miklos Vajna 
AuthorDate: Mon Jul 30 20:29:08 2018 +0200
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 13:09:32 2018 +0200

tdf#118593 sfx2: no need to call into xmlsecurity without signature streams

In the ODF and OOXML cases the ZIP storage already tells us if there are
signatures on this file so we can avoid the whole libxmlsec init, which
can be slow.

The bugreport talks about a smartcard setup, I also heard that the gpg
code in xmlsecurity isn't cheap to init, either.

(cherry picked from commit 7ac4e48687d7679927f5659e941024445946ffa7)

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

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0be2858aad5b..fc486fad4cb7 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1286,6 +1286,38 @@ SignatureState 
SfxObjectShell::ImplCheckSignaturesInformation( const uno::Sequen
 return nResult;
 }
 
+/// Does this ZIP storage have a signature stream?
+static bool HasSignatureStream(const uno::Reference& xStorage)
+{
+uno::Reference xNameAccess(xStorage, 
uno::UNO_QUERY);
+if (!xNameAccess.is())
+return false;
+
+if (xNameAccess->hasByName("META-INF"))
+{
+// ODF case.
+try
+{
+uno::Reference xMetaInf
+= xStorage->openStorageElement("META-INF", 
embed::ElementModes::READ);
+uno::Reference xMetaInfNames(xMetaInf, 
uno::UNO_QUERY);
+if (xMetaInfNames.is())
+{
+return xMetaInfNames->hasByName("documentsignatures.xml")
+   || xMetaInfNames->hasByName("macrosignatures.xml")
+   || xMetaInfNames->hasByName("packagesignatures.xml");
+}
+}
+catch (const css::io::IOException& rException)
+{
+SAL_WARN("sfx.doc", "HasSignatureStream: failed to open META-INF: 
" << rException.Message);
+}
+}
+
+// OOXML case.
+return xNameAccess->hasByName("_xmlsignatures");
+}
+
 uno::Sequence< security::DocumentSignatureInformation > 
SfxObjectShell::ImplAnalyzeSignature( bool bScriptingContent, const 
uno::Reference< security::XDocumentDigitalSignatures >& xSigner )
 {
 uno::Sequence< security::DocumentSignatureInformation > aResult;
@@ -1320,8 +1352,11 @@ uno::Sequence< security::DocumentSignatureInformation > 
SfxObjectShell::ImplAnal
 if (GetMedium()->GetStorage().is())
 {
 // Something ZIP-based.
-aResult = xLocSigner->verifyDocumentContentSignatures( 
GetMedium()->GetZipStorageToSign_Impl(),
-
uno::Reference< io::XInputStream >() );
+// Only call into xmlsecurity if we see a signature stream,
+// as libxmlsec init is expensive.
+if 
(HasSignatureStream(GetMedium()->GetZipStorageToSign_Impl()))
+aResult = xLocSigner->verifyDocumentContentSignatures( 
GetMedium()->GetZipStorageToSign_Impl(),
+
uno::Reference< io::XInputStream >() );
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 wizards/source/access2base/Database.xba |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 64b18c37c55dcac472e0344f7ac61a12d81e51c5
Author: Jean-Pierre Ledure 
AuthorDate: Wed Aug 1 12:55:20 2018 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Wed Aug 1 12:55:20 2018 +0200

Access2Base - Firebird 3.0 field equivalences

Review in LoadMetadata the field types array for Firebird

diff --git a/wizards/source/access2base/Database.xba 
b/wizards/source/access2base/Database.xba
index 2a61d7e3c73a..cf8617e0b285 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -1294,9 +1294,9 @@ Const cstSQLITE = "SQLite"
_RDBMS = DBMS_HSQLDB2
_ColumnTypesAlias = Array(0, -5, -3, -7, 2004, 
16, 1, 2005, 91, 3, 0, 8, 8, 4, -3, 12, 2, 0, 0, 8, 0, 5, 0, 0, 92, 93, -6, -3, 
12)
_BinaryStream = True
-   Case .URL = cstFirebird
+   Case .URL = cstFirebird '  Only embedded 
3.0
_RDBMS = DBMS_FIREBIRD
-   _ColumnTypesAlias = Array(0, -5, 2004, 16, 
2004, 16, 1, 12, 91, 8, 0, 8, 6, 4, 2004, 12, 8, 0, 0, 8, 0, 5, 0, 0, 92, 93, 
4, 2004, 12)
+   _ColumnTypesAlias = Array(0, -5, -2, 16, 2004, 
16, 1, 2005, 91, 3, 0, 8, 6, 4, -4, 2005, 2, 0, 0, 8, 0, 5, 0, 0, 92, 93, 4, 
2004, 12)
_BinaryStream = True
Case Len(sProduct) > Len(cstMSAccess2007) And 
Left(sProduct, Len(cstMSAccess2007)) = cstMSAccess2007
_RDBMS = DBMS_MSACCESS2007
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 vcl/source/control/fixed.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 396d77ac0d7e7fa8ca6d9f3fc3846b835905427a
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 10:10:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 12:46:18 2018 +0200

Resolves: rhbz#1610692 rectangles ctor takes topleft, bottomright points

so pass arguments in the topleft, bottomright order to avoid eventual...

Gtk-CRITICAL **: 09:43:33.896: gtk_widget_queue_draw_area: assertion 
'height >= 0' failed

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

diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 74fb8c407250..b22a779ce0a9 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -532,11 +532,11 @@ void FixedLine::ImplDraw(vcl::RenderContext& 
rRenderContext)
 rRenderContext.DrawText(aTextPt, aText, 0, aText.getLength());
 rRenderContext.Pop();
 if (aOutSize.Height() - aStartPt.Y() > FIXEDLINE_TEXT_BORDER)
-aDecoView.DrawSeparator(Point(aStartPt.X(), aOutSize.Height() - 1),
-Point(aStartPt.X(), aStartPt.Y() + 
FIXEDLINE_TEXT_BORDER));
+aDecoView.DrawSeparator(Point(aStartPt.X(), aStartPt.Y() + 
FIXEDLINE_TEXT_BORDER),
+Point(aStartPt.X(), aOutSize.Height() - 
1));
 if (aStartPt.Y() - nWidth - FIXEDLINE_TEXT_BORDER > 0)
-aDecoView.DrawSeparator(Point(aStartPt.X(), aStartPt.Y() - nWidth 
- FIXEDLINE_TEXT_BORDER),
-Point(aStartPt.X(), 0));
+aDecoView.DrawSeparator(Point(aStartPt.X(), 0),
+Point(aStartPt.X(), aStartPt.Y() - nWidth 
- FIXEDLINE_TEXT_BORDER));
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Segmentation fault when compiling

2018-08-01 Thread Alex Kempshall
I'm getting a segmentation fault when compiling. I've tried my usual 
techniques to overcome the problem such as - waiting till the next day 
and/or complete refresh. All to no avail.


I've been compiling for several years without major incident. Last 
compiled successfully on July 6th 2018.


Have I missed something  that I should have done recently to cater for 
some change. I'm not aware of other people encountering this problem. 
Should I raise it as a bug?


Alex


[build DEP] LNK:Library/libavmedialo.so
[build LNK] Library/libavmedialo.so
[build DEP] LNK:Library/libdbplo.so
[build LNK] Library/libdbplo.so
/bin/sh: line 1:  1727 Segmentation fault  ( 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs 
MALLOC_CHECK_=2 MALLOC_PERTURB_=153 
$W/LinkTarget/Executable/cppunittester 
$W/LinkTarget/CppunitTest/libtest_vcl_lifecycle.so --headless 
"-env:BRAND_BASE_DIR=file://$S/instdir" 
"-env:BRAND_SHARE_SUBDIR=share" 
"-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" 
"-env:UserInstallation=file://$W/CppunitTest/vcl_lifecycle.test.user" 
"-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry 
xcsxcu:file://$W/unittest/registry" 
"-env:UNO_TYPES=file://$I/program/types.rdb 
file://$I/program/types/offapi.rdb" 
"-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb 
file://$W/ComponentTarget/configmgr/source/configmgr.component 
file://$W/ComponentTarget/i18npool/util/i18npool.component 
file://$W/ComponentTarget/ucb/source/core/ucb1.component 
file://$W/ComponentTarget/ucb/source/ucp/file/ucpfile1.component 
file://$W/ComponentTarget/framework/u/bin/sh: line 1:  1713 
Segmentation fault  ( 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs 
MALLOC_CHECK_=2 MALLOC_PERTURB_=153 
$W/LinkTarget/Executable/cppunittester 
$W/LinkTarget/CppunitTest/libtest_toolkit.so --headless 
"-env:BRAND_BASE_DIR=file://$S/instdir" 
"-env:BRAND_SHARE_SUBDIR=share" 
"-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" 
"-env:UserInstallation=file://$W/CppunitTest/toolkit.test.user" 
"-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry 
xcsxcu:file://$W/unittest/registry" 
"-env:UNO_TYPES=file://$I/program/types/offapi.rdb 
file://$I/program/types.rdb" 
"-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb 
file://$W/ComponentTarget/comphelper/util/comphelp.component 
file://$W/ComponentTarget/configmgr/source/configmgr.component 
file://$W/ComponentTarget/framework/util/fwk.component 
file://$W/ComponentTarget/i18npool/util/i18npool.component 
file://$W/ComponentTarget/sfx2/util/sfx.component 
file://$W/ComponentTarget/toolkit/util/tk.component 
file://$W/ComponentTarget/ucb/source/core/ucb1.component 
file://$W/ComponentTarget/ucb/source/ucp/file/ucpfile1.component" 
-env:URE_INTERNAL_LIB_DIR=file://$I/program 
-env:LO_LIB_DIR=file://$I/program 
-env:LO_JAVA_DIR=file://$I/program/classes --protector 
$W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector 
--protector $W/LinkTarget/Library/unobootstrapprotector.so 
unobootstrapprotector --protector 
$W/LinkTarget/Library/libvclbootstrapprotector.so 
vclbootstrapprotector 
"-env:CPPUNITTESTTARGET=$W/CppunitTest/toolkit.test" ) > 
$W/CppunitTest/toolkit.test.log 2>&1
til/fwk.component file://$W/ComponentTarget/sfx2/util/sfx.component" 
-env:URE_INTERNAL_LIB_DIR=file://$I/program 
-env:LO_LIB_DIR=file://$I/program 
-env:LO_JAVA_DIR=file://$I/program/classes --protector 
$W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector 
--protector $W/LinkTarget/Library/unobootstrapprotector.so 
unobootstrapprotector --protector 
$W/LinkTarget/Library/libvclbootstrapprotector.so 
vclbootstrapprotector 
"-env:CPPUNITTESTTARGET=$W/CppunitTest/vcl_lifecycle.test" ) > 
$W/CppunitTest/vcl_lifecycle.test.log 2>&1
warn:vcl.opengl:1713:1713:vcl/opengl/x11/X11DeviceInfo.cxx:356: 
unknown vendor => blocked

Window position and size in pixel:
X: 100
Y: 100
Width: 640
Height: 480
Window position:
X: 2646 1/100mm
Y: 2646 1/100mm
Window size:
Width: 16933 1/100mm
Height: 12700 1/100mm
Window size:
Width: 1693 1/10mm
Height: 1270 1/10mm
Window size:
Width: 640 pixel
Height: 480 pixel
Window size:
Width: 332 appfont
Height: 295 appfont
Window size:
Width: 332 sysfont
Height: 295 sysfont
Window size:
Width: 169 mm
Height: 127 mm
Window size:
Width: 17 cm
Height: 13 cm
Window size:
Width: 6667 1/1000inch
Height: 5000 1/1000inch
Window size:
Width: 667 1/100inch
Height: 500 1/100inch
Window size:
Width: 67 1/10inch
Height: 50 1/10inch
Window size:
Width: 7 inch
Height: 5 inch
Window size:
Width: 480 point
Height: 360 point
Window size:
Width: 9600 twip
Height: 7200 twip
Window size:
Width: 640 pixel
Height: 480 pixel
(anonymous namespace)::ToolkitTest::testXUnitConversion finished in: 728ms
OK (1)
warn:fwk.desktop:1713:1713:framework/source/services/desktop.cxx:1069: 
Desktop disposed before terminating it


No core file identified in

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

2018-08-01 Thread Libreoffice Gerrit user
 oox/source/crypto/CryptTools.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 79180421cb1b8f5b94ca442d0cee57773466ceea
Author: Caolán McNamara 
AuthorDate: Wed Aug 1 08:39:03 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 1 12:31:36 2018 +0200

forcepoint#54 null deref

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

diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index c507923f7bc9..99fb01fe88d2 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -288,6 +288,8 @@ sal_uInt32 Decrypt::update(std::vector& output, 
std::vectormContext)
+return 0;
 (void)PK11_CipherOp(mpImpl->mContext, output.data(), &outputLength, 
actualInputLength, input.data(), actualInputLength);
 #endif // USE_TLS_NSS
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 source/text/shared/01/01010201.xhp  |1 +
 source/text/shared/01/05020400.xhp  |1 +
 source/text/swriter/01/0212.xhp |9 +
 source/text/swriter/01/0217.xhp |3 ++-
 source/text/swriter/01/04060100.xhp |3 ++-
 source/text/swriter/01/04070100.xhp |8 +---
 source/text/swriter/01/04070200.xhp |4 +++-
 source/text/swriter/01/04070300.xhp |3 ++-
 source/text/swriter/01/04090003.xhp |1 +
 source/text/swriter/01/04120229.xhp |7 ---
 source/text/swriter/01/04120250.xhp |3 ++-
 source/text/swriter/01/04180400.xhp |3 ++-
 source/text/swriter/01/05030400.xhp |3 ++-
 source/text/swriter/01/05040500.xhp |7 ---
 source/text/swriter/01/05120100.xhp |3 ++-
 source/text/swriter/01/05130100.xhp |7 ---
 source/text/swriter/01/06080200.xhp |3 ++-
 source/text/swriter/01/0609.xhp |1 +
 source/text/swriter/01/mm_copyto.xhp|3 ++-
 source/text/swriter/01/mm_cusaddlis.xhp |3 ++-
 source/text/swriter/01/mm_newaddlis.xhp |3 ++-
 21 files changed, 51 insertions(+), 28 deletions(-)

New commits:
commit a20196a08afd082a74e89e217cc5ca18a8dbe0be
Author: Olivier Hallot 
AuthorDate: Tue Jul 31 21:47:01 2018 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 1 11:40:55 2018 +0200

tdf#115254 Some branch bookmarks are'nt working 14

module sw, c- to e-

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

diff --git a/source/text/shared/01/01010201.xhp 
b/source/text/shared/01/01010201.xhp
index 816e42dbb..157f69db6 100644
--- a/source/text/shared/01/01010201.xhp
+++ b/source/text/shared/01/01010201.xhp
@@ -29,6 +29,7 @@
 
 
 
+
 
 Labels
   Specify the label text 
and choose the paper size for the label.
diff --git a/source/text/shared/01/05020400.xhp 
b/source/text/shared/01/05020400.xhp
index 9ee21b03b..990ecd64f 100644
--- a/source/text/shared/01/05020400.xhp
+++ b/source/text/shared/01/05020400.xhp
@@ -34,6 +34,7 @@
 text;hyperlinks
 links; character formats
 
+
 
 
 Hyperlink
diff --git a/source/text/swriter/01/0212.xhp 
b/source/text/swriter/01/0212.xhp
index 13e66c5cc..33f53058a 100644
--- a/source/text/swriter/01/0212.xhp
+++ b/source/text/swriter/01/0212.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
+
 
 
 AutoText
@@ -44,7 +44,7 @@
 
 Display 
remainder of name as a suggestion while typing
 Displays a suggestion for completing a 
word as a Help Tip after you type the first three letters of a word that 
matches an AutoText entry. To accept the suggestion, press Enter. If more than 
one AutoText entry matches the letters that you type, press Ctrl+Tab to advance 
through the entries. For example, to insert dummy text, type "Dum", and 
then press Enter.
-To display the 
list in reverse order, press Command 
+To display the 
list in reverse order, press Command
 
Ctrl+Shift+Tab.
 
 Name
@@ -91,6 +91,7 @@
 
 Categories
 Adds, renames, or deletes AutoText 
categories.
+
 
 Edit 
Categories
 Adds, renames, or 
deletes AutoText categories.
diff --git a/source/text/swriter/01/0217.xhp 
b/source/text/swriter/01/0217.xhp
index 78f37fbcb..0766b1c63 100644
--- a/source/text/swriter/01/0217.xhp
+++ b/source/text/swriter/01/0217.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -31,6 +31,7 @@
 
 
 
+
 
 Edit 
Sections
 Changes the properties of 
sections defined in your document. To insert a section, select text or 
click in your document, and then choose Insert - Section.
diff --git a/source/text/swriter/01/04060100.xhp 
b/source/text/swriter/01/04060100.xhp
index 57fff9357..c50d1921e 100644
--- a/source/text/swriter/01/04060100.xhp
+++ b/source/text/swriter/01/04060100.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -37,6 +37,7 @@
 
   
 
+
 
 Numbering by chapter
 When you add 
chapter numbers to caption labels, the caption numbering is reset when a 
chapter heading is encountered. For example, if the last figure in chapter 1 is 
"Figure 1.12", the first figure in the next chapter would be "Figure 
2.1".
diff --git a/source/text/swriter/01/04070100.xhp 
b/source/text/swriter/01/04070100.xhp
index e4b23eb10..01bb278f8 100644
--- a/source/text/swriter/01/04070100.xhp
+++ b/source/text/swriter/01/04070100.xhp
@@ -30,10 +30,12 @@
 
 
 
-  
-  
+
+
   
-  Envelope
+  
+  
+  Envelope
   Enter the delivery and return addresses for the envelope. 
You can also insert address fields from a database, for example from the 
Addresses database.
   
   
diff --git a/source/text/swriter/01/04070200.xhp 
b/source/text/swriter/01/0407

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit d4c4a07de9c5bdbeaa43bc82f9b78f397d5249fc
Author: Olivier Hallot 
AuthorDate: Tue Jul 31 21:47:01 2018 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Aug 1 11:40:55 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - tdf#115254 Some branch bookmarks are'nt working 14

module sw, c- to e-

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

diff --git a/helpcontent2 b/helpcontent2
index 6eec4dae4a5e..a20196a08afd 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6eec4dae4a5e3a7edc426e01a86b755123e03f4c
+Subproject commit a20196a08afd082a74e89e217cc5ca18a8dbe0be
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 0820ece7c6b20610b81772388b94b445c562002c
Author: Olivier Hallot 
AuthorDate: Tue Jul 31 19:56:46 2018 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Aug 1 11:40:34 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - tdf#115254 Some branch bookmarks are'nt working 13

Module sw, f- h-

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

diff --git a/helpcontent2 b/helpcontent2
index b26200c8b2bd..6eec4dae4a5e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b26200c8b2bdc3d9f6d35f8e6f5564e411c0f7cf
+Subproject commit 6eec4dae4a5e3a7edc426e01a86b755123e03f4c
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-01 Thread Libreoffice Gerrit user
 source/text/shared/01/01010203.xhp   |1 +
 source/text/swriter/01/04090001.xhp  |3 ++-
 source/text/swriter/01/04090002.xhp  |9 +
 source/text/swriter/01/04090003.xhp  |7 ---
 source/text/swriter/01/04090004.xhp  |1 +
 source/text/swriter/01/04090005.xhp  |9 +
 source/text/swriter/01/04090300.xhp  |1 +
 source/text/swriter/01/05040600.xhp  |1 +
 source/text/swriter/01/05040700.xhp  |1 +
 source/text/swriter/01/05060100.xhp  |1 +
 source/text/swriter/01/05060800.xhp  |7 ---
 source/text/swriter/01/05060900.xhp  |1 +
 source/text/swriter/01/05090100.xhp  |3 ++-
 source/text/swriter/01/06080100.xhp  |3 ++-
 source/text/swriter/01/mm_finent.xhp |3 ++-
 15 files changed, 33 insertions(+), 18 deletions(-)

New commits:
commit 6eec4dae4a5e3a7edc426e01a86b755123e03f4c
Author: Olivier Hallot 
AuthorDate: Tue Jul 31 19:56:46 2018 -0300
Commit: Olivier Hallot 
CommitDate: Wed Aug 1 11:40:34 2018 +0200

tdf#115254 Some branch bookmarks are'nt working 13

Module sw, f- h-

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

diff --git a/source/text/shared/01/01010203.xhp 
b/source/text/shared/01/01010203.xhp
index 2524685be..bb68150f2 100644
--- a/source/text/shared/01/01010203.xhp
+++ b/source/text/shared/01/01010203.xhp
@@ -52,6 +52,7 @@
 
 Synchronize contents
   Allows you to edit a 
single label or business card and updates the contents of the remaining labels 
or business cards on the page when you click the Synchronize 
Labels button.
+
 
 Synchronize Labels
   The 
Synchronize labels button only appears in your document if you 
have selected the Synchronize contents on the Options 
tab when you created the labels or business cards.
diff --git a/source/text/swriter/01/04090001.xhp 
b/source/text/swriter/01/04090001.xhp
index efc53dff5..837a3852a 100644
--- a/source/text/swriter/01/04090001.xhp
+++ b/source/text/swriter/01/04090001.xhp
@@ -29,6 +29,7 @@
 
 
 
+
 
 
 Document
@@ -141,7 +142,7 @@
 
 Selecton "Document" and "DocInformation" tab page 
this is called "Select", on the other tab pages 
"Selection"
 Lists the available fields for 
the field type selected in the Type list. To insert a field, click 
the field, and then click Insert.
-To quickly insert a 
field from the list, hold down Command 
+To quickly insert a 
field from the list, hold down Command
 Ctrl and 
double-click the field.
 
 
diff --git a/source/text/swriter/01/04090002.xhp 
b/source/text/swriter/01/04090002.xhp
index a122d9709..614b5ce8e 100644
--- a/source/text/swriter/01/04090002.xhp
+++ b/source/text/swriter/01/04090002.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
+
 
 
 Cross-references
@@ -30,6 +30,7 @@
 
 
 
+
 
 Cross-references
 This is where you insert the references or 
referenced fields into the current document. References are referenced fields 
within the same document or within sub-documents of a master document.
@@ -120,7 +121,7 @@
 
 Selectionon "Document" and "DocInformation" tab page this is 
called "Select", on the other tab pages "Selection"
 Lists the available fields for the field type selected in the 
Type list. To insert a field, click the field, select a format in 
the "Insert reference to" list, and then click 
Insert.
-To quickly insert a 
field from the list, hold down Command 
+To quickly insert a 
field from the list, hold down Command
 Ctrl and 
double-click the field.
 
 In the 
Insert reference to list, click the format that you want to 
use.
diff --git a/source/text/swriter/01/04090003.xhp 
b/source/text/swriter/01/04090003.xhp
index 6a7939ccc..0becbbd97 100644
--- a/source/text/swriter/01/04090003.xhp
+++ b/source/text/swriter/01/04090003.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
+
 
 
 Functions
@@ -32,6 +32,7 @@
 
 
 Sets additional function parameters for fields. The type of 
parameter depends on the field type that you select.
+
 
 Depending on the field type that you select, you can assign conditions 
to certain functions. For example, you can define a field that executes a macro 
when you click the field in the document, or a condition that, when met, hides 
a field. You can also define placeholder fields that insert graphics, tables, 
frames and other objects into your document when needed.
 
diff --git a/source/text/swriter/01/04090004.xhp 
b/source/text/swriter/01/04090004.xhp
index ace39eadb..0008aea50 100644
--- a/source/text/swriter/01/04090004.xhp
+++ b/source/text/swriter/01/04090004.xhp
@@ -28,6 +28,7 @@
 
 
 
+
 
 DocInformation
 DocInformation fields contain information about the properties of a 
document, such as the date a document was created. To view the properties of a 
document, choose File - Properties.
diff --git a/source/text/swriter/01/04090005.xhp 
b/source/text/swriter/01/04090005.xhp
index 89c3cf009..6c8f3867d 100644
--- a/source/text/swrit

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

2018-08-01 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |   12 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx  |   52 -
 3 files changed, 45 insertions(+), 19 deletions(-)

New commits:
commit 07266e2314fd19dcbf777dadd52d7b826b23c207
Author: Justin Luth 
AuthorDate: Tue Jul 24 14:49:00 2018 +0300
Commit: László Németh 
CommitDate: Wed Aug 1 11:33:02 2018 +0200

tdf#118521 writerfilter: ContextMargin grouped with Top/Bottom

fixes tdf#104348, but tagging with the bug# of the initial fixes.

Internally, EditEng holds Top/Bottom/Context settings in one
object, so if only one piece is set, the cloned object
starts with docDefaults, so the un-initialized parts also need to
be specified with the values they inherit from their style.

So this patch makes two corrections. The first is grouping
ContextMargin with top/bottom. The second correction
is to check the entire style-chain instead of only
the direct style for the inherited property.

Change-Id: Ie1d4c9538aefece4ff8b7287242c7f4d33319b3b
Reviewed-on: https://gerrit.libreoffice.org/57914
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx 
b/sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx
new file mode 100644
index ..ef3d06533bb7
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index bb5d91500cb3..121c2d798ecb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -524,6 +524,18 @@ DECLARE_OOXMLEXPORT_TEST(testMarginsFromStyle, 
"margins_from_style.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(600), 
getProperty(getParagraph(3), "ParaBottomMargin"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf104348_contextMargin, 
"tdf104348_contextMargin.docx")
+{
+// tdf#104348 shows that ContextMargin belongs with Top/Bottom handling
+
+uno::Reference 
xMyStyle(getStyles("ParagraphStyles")->getByName("MyStyle"), uno::UNO_QUERY);
+// from paragraph style - this is what direct formatting should equal
+sal_Int32 nMargin = getProperty(xMyStyle, "ParaBottomMargin");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nMargin);
+// from direct formatting
+CPPUNIT_ASSERT_EQUAL(nMargin, getProperty(getParagraph(2), 
"ParaBottomMargin"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf118521_marginsLR, "tdf118521_marginsLR.docx")
 {
 // tdf#118521 paragraphs with direct formatting of only some of left, 
right, or first margins have
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3a71b395acb7..c6a68079c4ab 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1472,46 +1472,60 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
 
 // tdf#118521 set paragraph top or bottom margin based on the 
paragraph style
 // if we already set the other margin with direct formatting
-if (pStyleSheetProperties && pParaContext && 
m_xPreviousParagraph.is() &&
-pParaContext->isSet(PROP_PARA_TOP_MARGIN) != 
pParaContext->isSet(PROP_PARA_BOTTOM_MARGIN))
+if ( pParaContext && m_xPreviousParagraph.is() )
 {
-boost::optional oProperty;
-if (pParaContext->isSet(PROP_PARA_TOP_MARGIN))
+const bool bTopSet = 
pParaContext->isSet(PROP_PARA_TOP_MARGIN);
+const bool bBottomSet = 
pParaContext->isSet(PROP_PARA_BOTTOM_MARGIN);
+const bool bContextSet = 
pParaContext->isSet(PROP_PARA_CONTEXT_MARGIN);
+if ( !(bTopSet == bBottomSet && bBottomSet == bContextSet) 
)
 {
-if ( (oProperty = 
pStyleSheetProperties->getProperty(PROP_PARA_BOTTOM_MARGIN)) )
-
m_xPreviousParagraph->setPropertyValue("ParaBottomMargin", oProperty->second);
-}
-else
-{
-if ( (oProperty = 
pStyleSheetProperties->getProperty(PROP_PARA_TOP_MARGIN)) )
-
m_xPreviousParagraph->setPropertyValue("ParaTopMargin", oProperty->second);
+if ( !bTopSet )
+{
+uno::Any aMargin = 
GetPropertyFromStyleSheet(PROP_PARA_TOP_MARGIN);
+if ( aMargin != uno::Any() )
+
m_xPreviousParagraph->setPropertyValue("ParaTopMargin", aMargin);
+}
+   

Re: LibreOffice ESC call, Wed - 18:00 central European (local) time

2018-08-01 Thread Stephan Bergmann

On 31/07/18 13:08, Michael Meeks wrote:

I won't be around for the next couple of weeks - so, someone
to build the next set of bug stats and of course to run the meeting
much appreciated.

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

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

Lets use the new TDF jitsi goodness this week at:

http://jitsi.documentfoundation.org/esc


We're on the Thu not Wed timeslot this week, so meeting should be at 
Thu, Aug 2, 16:00 CEST.

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


[Libreoffice-commits] core.git: dbaccess/source desktop/source drawinglayer/source editeng/source embeddedobj/source embedserv/source emfio/source extensions/source

2018-08-01 Thread Libreoffice Gerrit user
 dbaccess/source/core/api/CacheSet.cxx   |1 +
 dbaccess/source/core/api/FilteredContainer.cxx  |1 +
 dbaccess/source/core/api/KeySet.cxx |1 +
 dbaccess/source/core/api/RowSet.cxx |1 +
 dbaccess/source/core/api/RowSetBase.cxx |1 +
 dbaccess/source/core/api/RowSetCache.cxx|1 +
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx  |1 +
 dbaccess/source/core/api/TableDeco.cxx  |1 +
 dbaccess/source/core/api/resultset.cxx  |1 +
 dbaccess/source/core/api/tablecontainer.cxx |1 +
 dbaccess/source/core/dataaccess/databasecontext.cxx |1 +
 dbaccess/source/core/dataaccess/databasedocument.cxx|1 +
 dbaccess/source/core/dataaccess/datasource.cxx  |1 +
 dbaccess/source/core/misc/apitools.cxx  |1 +
 dbaccess/source/core/recovery/dbdocrecovery.cxx |1 +
 dbaccess/source/core/recovery/settingsimport.cxx|1 +
 dbaccess/source/core/recovery/subcomponentrecovery.cxx  |1 +
 dbaccess/source/filter/hsqldb/alterparser.cxx   |1 +
 dbaccess/source/filter/hsqldb/createparser.cxx  |1 +
 dbaccess/source/filter/hsqldb/fbalterparser.cxx |1 +
 dbaccess/source/filter/hsqldb/hsqlimport.cxx|1 +
 dbaccess/source/filter/hsqldb/parseschema.cxx   |1 +
 dbaccess/source/filter/xml/xmlDataSourceSetting.cxx |1 +
 dbaccess/source/filter/xml/xmlExport.cxx|1 +
 dbaccess/source/filter/xml/xmlfilter.cxx|1 +
 dbaccess/source/ui/app/AppControllerDnD.cxx |1 +
 dbaccess/source/ui/browser/brwctrlr.cxx |1 +
 dbaccess/source/ui/browser/exsrcbrw.cxx |1 +
 dbaccess/source/ui/browser/genericcontroller.cxx|1 +
 dbaccess/source/ui/browser/sbagrid.cxx  |1 +
 dbaccess/source/ui/browser/unodatbr.cxx |1 +
 dbaccess/source/ui/dlg/DbAdminImpl.cxx  |1 +
 dbaccess/source/ui/dlg/dsselect.cxx |1 +
 dbaccess/source/ui/dlg/generalpage.cxx  |1 +
 dbaccess/source/ui/misc/DExport.cxx |1 +
 dbaccess/source/ui/misc/RowSetDrop.cxx  |1 +
 dbaccess/source/ui/misc/TableCopyHelper.cxx |1 +
 dbaccess/source/ui/misc/TokenWriter.cxx |1 +
 dbaccess/source/ui/misc/UITools.cxx |1 +
 dbaccess/source/ui/misc/WCopyTable.cxx  |1 +
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx|1 +
 dbaccess/source/ui/uno/copytablewizard.cxx  |1 +
 desktop/source/app/cmdlineargs.cxx  |1 +
 desktop/source/app/opencl.cxx   |1 +
 desktop/source/app/updater.cxx  |1 +
 desktop/source/deployment/dp_log.cxx|1 +
 desktop/source/deployment/dp_persmap.cxx|1 +
 desktop/source/deployment/gui/dp_gui_dialog2.cxx|1 +
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx  |1 +
 desktop/source/deployment/misc/dp_update.cxx|1 +
 desktop/source/deployment/registry/dp_registry.cxx  |1 +
 desktop/source/migration/services/basicmigration.cxx|1 +
 desktop/source/migration/services/wordbookmigration.cxx |1 +
 desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx  |1 +
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx|1 +
 desktop/source/splash/unxsplash.cxx |1 +
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx   |1 +
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |1 +
 drawinglayer/source/processor2d/vclprocessor2d.cxx  |1 +
 drawinglayer/source/texture/texture3d.cxx   |2 +-
 drawinglayer/source/tools/emfpbrush.cxx |1 +
 drawinglayer/source/tools/emfpcustomlinecap.cxx |1 +
 drawinglayer/source/tools/emfpfont.cxx  |1 +
 drawinglayer/source/tools/emfphelperdata.cxx|1 +
 drawinglayer/source/tools/emfpimage.cxx |1 +
 drawinglayer/source/tools/emfppath.cxx  |1 +
 drawinglayer/source/tools/emfppen.cxx   |1 +
 drawinglayer/source/tools/emfpregion.cxx|1 +
 drawinglayer/source/tools/emfpstringformat.cxx  |1 +
 drawinglayer/source/tools/wmfemfhelper.cxx  |1 +
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |1 +
 editeng/source/accessibilit

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

2018-08-01 Thread Libreoffice Gerrit user
 external/pdfium/0001-Add-FPDFText_GetTextRenderMode-API.patch.1 |  118 
++
 external/pdfium/0002-svx-more-accurate-PDF-text-importing.patch.2   |6 
 external/pdfium/0004-svx-support-PDF-text-color.patch.2 |   51 

 external/pdfium/0009-svx-support-color-text-for-imported-PDFs.patch.2   |  100 

 external/pdfium/0010-svx-support-importing-forms-from-PDFs.patch.2  |   10 
 external/pdfium/0012-svx-import-processed-PDF-text.patch.2  |   16 
-
 external/pdfium/0014-svx-update-PDFium-patch-and-code.patch.2   |   24 
--
 external/pdfium/0015-svx-set-the-font-name-of-imported-PDF-text.patch.2 |6 
 external/pdfium/UnpackedTarball_pdfium.mk   |3 
 svx/source/svdraw/svdpdf.cxx|   29 
++
 10 files changed, 167 insertions(+), 196 deletions(-)

New commits:
commit d8b7ac327cfe39f46aaa871cfa7a8fdc8b2b6b54
Author: Miklos Vajna 
AuthorDate: Wed Aug 1 08:34:42 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 1 09:34:02 2018 +0200

pdfium: replace FPDFTextObj_GetColor() patch with backport

Upstream already got FPDFPageObj_GetFillColor() and
FPDFPageObj_GetStrokeColor(), so what was necessary is just a
FPDFText_GetTextRenderMode() to find out which one to use.

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

diff --git a/external/pdfium/0001-Add-FPDFText_GetTextRenderMode-API.patch.1 
b/external/pdfium/0001-Add-FPDFText_GetTextRenderMode-API.patch.1
new file mode 100644
index ..47874119baeb
--- /dev/null
+++ b/external/pdfium/0001-Add-FPDFText_GetTextRenderMode-API.patch.1
@@ -0,0 +1,118 @@
+From 1448cc11b9be67d2d1fcd3f2f833cc6f79ad8d42 Mon Sep 17 00:00:00 2001
+Date: Tue, 3 Jul 2018 13:52:33 +
+Subject: [PATCH] Add FPDFText_GetTextRenderMode() API
+
+This allows deciding if FPDFPageObj_GetFillColor() or
+FPDFPageObj_GetStrokeColor() should be used to get the effective color
+of a text object.
+
+Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae
+Reviewed-on: https://pdfium-review.googlesource.com/36750
+Reviewed-by: dsinclair 
+Commit-Queue: dsinclair 
+---
+ fpdfsdk/fpdf_edit_embeddertest.cpp | 17 
+ fpdfsdk/fpdf_edittext.cpp  | 37 +
+ fpdfsdk/fpdf_view_c_api_test.c |  1 +
+ public/fpdf_edit.h | 17 
+ testing/resources/text_render_mode.pdf | 75 ++
+ 5 files changed, 147 insertions(+)
+ create mode 100644 testing/resources/text_render_mode.pdf
+
+diff --git a/fpdfsdk/fpdf_edittext.cpp b/fpdfsdk/fpdf_edittext.cpp
+index 3115e2a16..c552d615e 100644
+--- a/fpdfsdk/fpdf_edittext.cpp
 b/fpdfsdk/fpdf_edittext.cpp
+@@ -14,6 +14,7 @@
+ #include "core/fpdfapi/font/cpdf_type1font.h"
+ #include "core/fpdfapi/page/cpdf_docpagedata.h"
+ #include "core/fpdfapi/page/cpdf_textobject.h"
++#include "core/fpdfapi/page/cpdf_textstate.h"
+ #include "core/fpdfapi/parser/cpdf_array.h"
+ #include "core/fpdfapi/parser/cpdf_dictionary.h"
+ #include "core/fpdfapi/parser/cpdf_document.h"
+@@ -27,6 +28,31 @@
+ #include "fpdfsdk/cpdfsdk_helpers.h"
+ #include "public/fpdf_edit.h"
+ 
++// These checks are here because core/ and public/ cannot depend on each 
other.
++static_assert(static_cast(TextRenderingMode::MODE_FILL) ==
++  FPDF_TEXTRENDERMODE_FILL,
++  "TextRenderingMode::MODE_FILL value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_STROKE) ==
++  FPDF_TEXTRENDERMODE_STROKE,
++  "TextRenderingMode::MODE_STROKE value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_FILL_STROKE) ==
++  FPDF_TEXTRENDERMODE_FILL_STROKE,
++  "TextRenderingMode::MODE_FILL_STROKE value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_INVISIBLE) ==
++  FPDF_TEXTRENDERMODE_INVISIBLE,
++  "TextRenderingMode::MODE_INVISIBLE value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_FILL_CLIP) ==
++  FPDF_TEXTRENDERMODE_FILL_CLIP,
++  "TextRenderingMode::MODE_FILL_CLIP value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_STROKE_CLIP) ==
++  FPDF_TEXTRENDERMODE_STROKE_CLIP,
++  "TextRenderingMode::MODE_STROKE_CLIP value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_FILL_STROKE_CLIP) ==
++  FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP,
++  "TextRenderingMode::MODE_FILL_STROKE_CLIP value mismatch");
++static_assert(static_cast(TextRenderingMode::MODE_CLIP) ==
++  FPDF_TEXTRENDERMODE_CLIP,
++  "TextRenderingMode::MODE_CLIP value mismatch");
+ namespace {
+ 
+ CPDF_Dictionary* LoadFontDesc(CPDF_Document* pDoc,
+@@ -545,3 +571,14 @@ FPDFPageObj_