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

2018-07-20 Thread Libreoffice Gerrit user
 sfx2/source/appl/sfxhelp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 387f4b1e63fabb486d404ec7a47604aec1c9a75c
Author: Muhammet Kara 
AuthorDate: Sat Jul 21 07:18:18 2018 +0300
Commit: Julien Nabet 
CommitDate: Sat Jul 21 08:13:17 2018 +0200

Remove useless self-assignment of sHelpPath

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

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index cb7e3f0696e9..e7e5cbea4194 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -251,7 +251,7 @@ static OUString  HelpLocaleString()
 return aLocaleStr;
 }
 
-sHelpPath = sHelpPath = getHelpRootURL() + "/" + 
utl::ConfigManager::getProductVersion() + "/" + aEnglish;
+sHelpPath = getHelpRootURL() + "/" + 
utl::ConfigManager::getProductVersion() + "/" + aEnglish;
 if (impl_checkHelpLocalePath(sHelpPath))
 {
 return aEnglish;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sfx2/source/doc/objxtor.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 715fcaff01ed048c52c69264a7a0fb773dd57b32
Author: Markus Mohrhard 
AuthorDate: Sat Jul 21 01:57:27 2018 +0200
Commit: Markus Mohrhard 
CommitDate: Sat Jul 21 02:59:18 2018 +0200

fix shutdown crash when SfxApplication has already been destroyed

See e.g. 
http://crashreport.libreoffice.org/stats/crash_details/dc1ae6ff-923e-44f6-99a9-84893039efd7

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

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 82e376f9f0ac..f5fab3249fc0 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -312,13 +312,13 @@ SfxObjectShell::~SfxObjectShell()
 DELETEZ( pImpl->pReloadTimer );
 
 SfxApplication *pSfxApp = SfxGetpApp();
-if ( USHRT_MAX != pImpl->nVisualDocumentNumber )
+if ( USHRT_MAX != pImpl->nVisualDocumentNumber && pSfxApp )
 pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber);
 
 // Destroy Basic-Manager
 pImpl->aBasicManager.reset( nullptr );
 
-if ( pSfxApp->GetDdeService() )
+if ( pSfxApp && pSfxApp->GetDdeService() )
 pSfxApp->RemoveDdeTopic( this );
 
 pImpl->pBaseModel.set( nullptr );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 accessibility/source/extended/textwindowaccessibility.cxx |  105 --
 1 file changed, 105 deletions(-)

New commits:
commit bab37647c4366c4f422d577a65cb8d91cb49ded2
Author: Muhammet Kara 
AuthorDate: Fri Jul 20 20:55:20 2018 +0300
Commit: Muhammet Kara 
CommitDate: Fri Jul 20 23:00:58 2018 +0200

Remove dead code from textwindowaccessibility.cxx

Seems like commented out during some refactoring/rewrite in 2013
with commit efb23f29983f8, and then forgotten

Change-Id: I59148b7fd9ee8a68bfdb0609dc3a13634b29db5f
Reviewed-on: https://gerrit.libreoffice.org/57785
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index 69f5ab489b0d..ed673c473c66 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1577,18 +1577,6 @@ IMPL_LINK(Document, WindowEventHandler, 
::VclWindowEvent&, rEvent, void)
 FOCUSED));
 }
 }
-/*
-::rtl::Reference< Paragraph > xParagraph(
-getParagraph(m_aFocused));
-if (xParagraph.is())
-xParagraph->notifyEvent(
-css::accessibility::AccessibleEventId::
-STATE_CHANGED,
-css::uno::Any(),
-css::uno::Any(
-css::accessibility::AccessibleStateType::
-FOCUSED));
-*/
 break;
 }
 case VclEventId::WindowLoseFocus:
@@ -1612,22 +1600,6 @@ IMPL_LINK(Document, WindowEventHandler, 
::VclWindowEvent&, rEvent, void)
 FOCUSED),
 css::uno::Any());
 }
-
-/*
-if (m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
-{
-::rtl::Reference< Paragraph > xParagraph(
-getParagraph(m_aFocused));
-if (xParagraph.is())
-xParagraph->notifyEvent(
-css::accessibility::AccessibleEventId::
-STATE_CHANGED,
-css::uno::Any(
-css::accessibility::AccessibleStateType::
-FOCUSED),
-css::uno::Any());
-}
-*/
 break;
 }
 default: break;
@@ -2261,83 +2233,6 @@ void Document::handleSelectionChangeNotification()
 break;
 }
 
-/*
-// Update both old and new selection.  (Regardless of how the two 
selections
-// look like, there will always be two ranges to the left and right of the
-// overlap---the overlap and/or the range to the right of it possibly being
-// empty.  Only for these two ranges notifications have to be sent.)
-
-TextPaM aOldTextStart( static_cast< sal_uLong >( m_nSelectionFirstPara ), 
static_cast< sal_uInt16 >( m_nSelectionFirstPos ) );
-TextPaM aOldTextEnd( static_cast< sal_uLong >( m_nSelectionLastPara ), 
static_cast< sal_uInt16 >( m_nSelectionLastPos ) );
-TextPaM aNewTextStart( static_cast< sal_uLong >( nNewFirstPara ), 
static_cast< sal_uInt16 >( nNewFirstPos ) );
-TextPaM aNewTextEnd( static_cast< sal_uLong >( nNewLastPara ), 
static_cast< sal_uInt16 >( nNewLastPos ) );
-
-// justify selections
-justifySelection( aOldTextStart, aOldTextEnd );
-justifySelection( aNewTextStart, aNewTextEnd );
-
-sal_Int32 nFirst1;
-sal_Int32 nLast1;
-sal_Int32 nFirst2;
-sal_Int32 nLast2;
-
-if ( m_nSelectionFirstPara == -1 )
-{
-// old selection not initialized yet => notify events only for new 
selection (if not empty)
-nFirst1 = aNewTextStart.GetPara();
-nLast1 = aNewTextEnd.GetPara() + ( aNewTextStart != aNewTextEnd ? 1 : 
0 );
-nFirst2 = 0;
-nLast2 = 0;
-}
-else if ( aOldTextStart == aOldTextEnd && aNewTextStart == aNewTextEnd )
-{
-// old and new selection empty => no events
-nFirst1 = 0;
-nLast1 = 0;
-nFirst2 = 0;
-nLast2 = 0;
-}
-else if ( aOldTextStart != aOldTextEnd && aNewTextStart == aNewTextEnd )
-{
-// old selection not empty + new selection empty => notify events only 
for old selection
-nFirst1 = aOldTextStart.GetPara();
-nLast1 = aOldTextEnd.GetPara() + 1;
-nFirst2 = 0;
-nLast2 = 0;
-}
-else if ( aOldTextStart == aOldTextEnd && aNewTextStart != aNewTextEnd )
-{
-// old selection empty + new selection not empty => notify events only 
for new selection
-nFirst1 = aNewTextStart.GetPara();
-nLast1 = aNewTextEnd.GetPara() + 1;
-nFirst2 = 0;
-nLast2 = 0;
-}
-else
-{
-// ol

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

2018-07-20 Thread Libreoffice Gerrit user
 oox/source/drawingml/chart/titleconverter.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 0fc41c53dfbd21e526fb0ad68a6651693c4a2ecd
Author: Bartosz Kosiorek 
AuthorDate: Fri Jul 20 20:59:01 2018 +0200
Commit: Markus Mohrhard 
CommitDate: Fri Jul 20 22:54:34 2018 +0200

tdf#118150 Fix displaying of chart where Legend is set manually

By default Legend's position is automatic and it is located
at the right side of the chart.
Unfortunately even if layout with manualLayout is set:
http://www.datypic.com/sc/ooxml/e-draw-chart_manualLayout-1.html
the empty space for the automatic legend on the right side of the chart,
was left.
This is issue with opening of the OOXML charts by LibreOffice,
as MS Word is opening the same document properly.

This patch fixes issue with wrong chart displaying, when manual position
of the legend is set.

Change-Id: Id5363d48b049c469b6761b43cecfbb56514bf7d8
Reviewed-on: https://gerrit.libreoffice.org/57762
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 
Reviewed-by: Markus Mohrhard 

diff --git a/oox/source/drawingml/chart/titleconverter.cxx 
b/oox/source/drawingml/chart/titleconverter.cxx
index 690858e290de..daa1f2d8cb57 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -213,14 +213,13 @@ void LegendConverter::convertFromModel( const Reference< 
XDiagram >& rxDiagram )
 case XML_r:
 eLegendPos = cssc2::LegendPosition_LINE_END;
 eLegendExpand = cssc::ChartLegendExpansion_HIGH;
-break;
+break;
 case XML_tr:// top-right not supported
 eLegendPos = LegendPosition_CUSTOM;
 eRelPos.Primary = 1;
 eRelPos.Secondary =0;
 eRelPos.Anchor = Alignment_TOP_RIGHT;
 bTopRight=true;
-
 break;
 case XML_t:
 eLegendPos = cssc2::LegendPosition_PAGE_START;
@@ -236,9 +235,12 @@ void LegendConverter::convertFromModel( const Reference< 
XDiagram >& rxDiagram )
 if( mrModel.mxLayout.get() )
 {
 LayoutConverter aLayoutConv( *this, *mrModel.mxLayout );
-// manual size needs ChartLegendExpansion_CUSTOM
+// manual size needs ChartLegendExpansion_CUSTOM and 
LegendPosition_CUSTOM (tdf#118150)
 if( aLayoutConv.convertFromModel( aPropSet ) )
+{
+eLegendPos = cssc2::LegendPosition_CUSTOM;
 eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
+}
 bManualLayout = !aLayoutConv.getAutoLayout();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sc/inc/columniterator.hxx  |1 +
 sc/source/core/data/columniterator.cxx |   10 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 9ae56cdf78af1ff1b5c5178168b4aaa9a37c3e04
Author: Michael Meeks 
AuthorDate: Thu Jul 12 19:06:03 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Fri Jul 20 22:46:00 2018 +0200

tdf#118620 - avoid out of bounds iterator for end of sheet pivots.

Change-Id: I2ddcf56dc94175718739611f0791558fda87b1ba
Reviewed-on: https://gerrit.libreoffice.org/57358
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Reviewed-by: Michael Meeks 
(cherry picked from commit d3387b38fe0eea3fb7ac630c026f02986e8dafc4)
Reviewed-on: https://gerrit.libreoffice.org/57385
Reviewed-by: Eike Rathke 
(cherry picked from commit 4a8ecfd9fdb6d8460bc7eee8773580d4ae550b18)
Reviewed-on: https://gerrit.libreoffice.org/57744
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/sc/inc/columniterator.hxx b/sc/inc/columniterator.hxx
index c6a87b4e6b39..799d437b33e0 100644
--- a/sc/inc/columniterator.hxx
+++ b/sc/inc/columniterator.hxx
@@ -60,6 +60,7 @@ class ColumnIterator
 {
 CellStoreType::const_position_type maPos;
 CellStoreType::const_position_type maPosEnd;
+bool mbComplete;
 
 public:
 ColumnIterator( const CellStoreType& rCells, SCROW nRow1, SCROW nRow2 );
diff --git a/sc/source/core/data/columniterator.cxx 
b/sc/source/core/data/columniterator.cxx
index f7367193d9cb..ad96639ca9d4 100644
--- a/sc/source/core/data/columniterator.cxx
+++ b/sc/source/core/data/columniterator.cxx
@@ -172,7 +172,8 @@ namespace sc {
 
 ColumnIterator::ColumnIterator( const CellStoreType& rCells, SCROW nRow1, 
SCROW nRow2 ) :
 maPos(rCells.position(nRow1)),
-maPosEnd(rCells.position(maPos.first, nRow2+1))
+maPosEnd(rCells.position(maPos.first, nRow2)),
+mbComplete(false)
 {
 }
 
@@ -180,7 +181,10 @@ ColumnIterator::~ColumnIterator() {}
 
 void ColumnIterator::next()
 {
-maPos = CellStoreType::next_position(maPos);
+if ( maPos == maPosEnd)
+mbComplete = true;
+else
+maPos = CellStoreType::next_position(maPos);
 }
 
 SCROW ColumnIterator::getRow() const
@@ -190,7 +194,7 @@ SCROW ColumnIterator::getRow() const
 
 bool ColumnIterator::hasCell() const
 {
-return maPos != maPosEnd;
+return !mbComplete;
 }
 
 mdds::mtv::element_t ColumnIterator::getType() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sc/Library_sc.mk|1 
 sc/source/filter/xml/xmlmappingi.cxx|   33 +
 sc/source/filter/xml/xmlmappingi.hxx|4 
 sc/source/filter/xml/xmltransformationi.cxx |  510 
 sc/source/filter/xml/xmltransformationi.hxx |  140 +++
 5 files changed, 686 insertions(+), 2 deletions(-)

New commits:
commit 842af5109646f0b2555c4cb48d79bb999ee6efff
Author: Vikas Mahato 
AuthorDate: Tue Jul 10 18:18:59 2018 +0530
Commit: Markus Mohrhard 
CommitDate: Fri Jul 20 22:45:23 2018 +0200

Import ODF with data transformations

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

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 5425d681caab..dc2a2149f0a1 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -346,6 +346,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/filter/xml/xmlstyli \
 sc/source/filter/xml/xmlsubti \
 sc/source/filter/xml/xmltabi \
+sc/source/filter/xml/xmltransformationi \
 sc/source/filter/xml/xmlwrap \
 sc/source/filter/chart/chart_imp \
 sc/source/filter/importfilterdata \
diff --git a/sc/source/filter/xml/xmlmappingi.cxx 
b/sc/source/filter/xml/xmlmappingi.cxx
index 907f4ea472e6..8f8babad1e26 100644
--- a/sc/source/filter/xml/xmlmappingi.cxx
+++ b/sc/source/filter/xml/xmlmappingi.cxx
@@ -8,6 +8,7 @@
  */
 
 #include "xmlmappingi.hxx"
+#include "xmltransformationi.hxx"
 
 #include 
 #include 
@@ -51,6 +52,11 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
ScXMLMappingsContext::c
 pContext = new ScXMLMappingContext( GetScImport(), pAttribList );
 }
 break;
+case XML_ELEMENT( CALC_EXT, XML_DATA_TRANSFORMATIONS):
+{
+ pContext = new ScXMLTransformationsContext( GetScImport() );
+}
+break;
 }
 
 if( !pContext )
@@ -110,13 +116,36 @@ ScXMLMappingContext::ScXMLMappingContext( ScXMLImport& 
rImport,
 aSource.setID(aID);
 aSource.setDBData(aDBName);
 rDataMapper.insertDataSource(aSource);
-auto& rDataSources = rDataMapper.getDataSources();
-rDataSources[0].refresh(pDoc, true);
 }
 }
 
 ScXMLMappingContext::~ScXMLMappingContext()
 {
+ScDocument* pDoc = GetScImport().GetDocument();
+auto& rDataMapper = pDoc->GetExternalDataMapper();
+auto& rDataSources = rDataMapper.getDataSources();
+if(!rDataSources.empty())
+rDataSources[0].refresh(pDoc, true);
 }
 
+uno::Reference
+SAL_CALL ScXMLMappingContext::createFastChildContext(
+sal_Int32 nElement, const 
uno::Reference& /*xAttrList*/)
+{
+SvXMLImportContext *pContext = nullptr;
+
+switch( nElement )
+{
+case XML_ELEMENT( CALC_EXT, XML_DATA_TRANSFORMATIONS):
+{
+ pContext = new ScXMLTransformationsContext( GetScImport() );
+}
+break;
+}
+
+if( !pContext )
+pContext = new SvXMLImportContext( GetImport() );
+
+return pContext;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlmappingi.hxx 
b/sc/source/filter/xml/xmlmappingi.hxx
index 41129c8a1c0d..4080f7dfe230 100644
--- a/sc/source/filter/xml/xmlmappingi.hxx
+++ b/sc/source/filter/xml/xmlmappingi.hxx
@@ -38,6 +38,10 @@ public:
 const 
rtl::Reference& rAttrList );
 
 virtual ~ScXMLMappingContext() override;
+
+virtual css::uno::Reference SAL_CALL 
createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference& 
xAttrList) override;
 };
 
 
diff --git a/sc/source/filter/xml/xmltransformationi.cxx 
b/sc/source/filter/xml/xmltransformationi.cxx
new file mode 100644
index ..287485f69e91
--- /dev/null
+++ b/sc/source/filter/xml/xmltransformationi.cxx
@@ -0,0 +1,510 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "xmltransformationi.hxx"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+using namespace com::sun::star;
+using namespace xmloff::token;
+
+ScXMLTransformationsContext::ScXMLTransformationsContext(ScXMLImport& rImport)
+: ScXMLImportContext(rImport)
+{
+}
+
+ScXMLTransformationsContext::~ScXMLTransformationsContext() {}
+
+uno::Reference
+SAL_CALL ScXMLTransformationsContext::createFastChildContext(
+sal_Int32 nElement, const 
uno::Reference& xAttrList)
+{
+SvXMLImportContext* pContext = nullptr;
+sax_fastparser::FastAttributeList* pAttribList
+= 
sax_fastparser::FastAttributeList::castToFastAttributeList(xAt

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

2018-07-20 Thread Libreoffice Gerrit user
 basctl/source/basicide/bastypes.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 64ee6a4d5f2e937e549568d83abead7259f690ac
Author: Muhammet Kara 
AuthorDate: Fri Jul 20 21:16:56 2018 +0300
Commit: Muhammet Kara 
CommitDate: Fri Jul 20 22:44:32 2018 +0200

Remove commented-out code from bastypes.cxx

Was last touched in 2012 by a mass find&replace
in commit d3e08f257437f

Change-Id: Id62c0ce4680afa1febca01d54734f11dd026a58f
Reviewed-on: https://gerrit.libreoffice.org/57786
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 87d0b85123d1..47fee717fa00 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -775,7 +775,6 @@ bool QueryPassword( const Reference< 
script::XLibraryContainer >& xLibContainer,
 if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( 
rLibName ) && !xPasswd->isLibraryPasswordVerified( rLibName ) )
 {
 rPassword = aDlg.GetPassword();
-//OUString aOUPassword( rPassword );
 bOK = xPasswd->verifyLibraryPassword( rLibName, rPassword 
);
 
 if ( !bOK )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 include/svx/svdobj.hxx   |8 +-
 include/svx/svdocapt.hxx |   19 +-
 sc/source/filter/xcl97/xcl97rec.cxx  |   33 ++-
 svx/source/svdraw/svdobj.cxx |   29 ++
 svx/source/svdraw/svdocapt.cxx   |8 ++
 svx/source/svdraw/svdpage.cxx|   14 ++---
 svx/source/unodraw/unoshape.cxx  |   86 +--
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |2 
 8 files changed, 130 insertions(+), 69 deletions(-)

New commits:
commit cbc992e7370ab006ea7c0f8520896845f79f7749
Author: Armin Le Grand 
AuthorDate: Thu Jul 19 19:26:14 2018 +0200
Commit: Armin Le Grand 
CommitDate: Fri Jul 20 20:29:11 2018 +0200

tdf#118662 Cleanup old hack with cloned SdrCaptionObj

XclObjComment formally cloned the SdrCaptionObj for a single
reason - to suppress functionality of the UNO API implementation
in SvxShape::GetBitmap - non-inserted SdrObjects did not create
Graphic return values.

Changed this to use an exclusive flag at SdrCaptionObj, only
accessible for XclObjComment. Due to bad/undefined behaviour
of SdrObjects that are not iinserted anywhere (see old comment
in XclObjComment) there is no way to return to cloning the
SdrObjects just to have them without being added to a SdrPage.

Also improved the time eater UNO API implementation SvxShape::GetBitmap
to use more modern stuff to create the Graphics needed. All the
time constructing a full E3DView and setting SdrObjects selected
and getting the selection as graphic is way too expensive. That
way save may even get somewhat faster.

Last was to cleanup the bInserted flag in SdrObject. It is no
longer needed, being inserted now depends on being a member
of an SdrObjList (Group or Page) - sounds normal anyways and
is a synergy effect of already done AW080 cleanups.

Checked now on linux. Problem is UnitTest 'testN777345' which
checks file "n777345.docx".

First point is that this only happens
  #if !defined(MACOSX)
  #if !defined(_WIN32)
so it's clear why I detected no problem on Windows.

Second point is that this test takes a checksum of a Graphic
that is created using getReplacementGraphic() this value *will*
change - of course - every time creation of that graphic is
even *slightly* modified, so from my POV this UnitTest is
defined to fill quite often. It may even create different
results on different systems (!). Adaption of the test value
 will be needed quite often and makes this test questionable.

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

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index a7a80105122b..52183e78ecc1 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -790,11 +790,14 @@ public:
 // is invalid, if this is a group object
 bool IsClosedObj() const { return bClosedObj;}
 
+// tdf#118662 reorganize inserted state, no local bool needed anymore,
+// it depends on being a member of a SdrObjList
+void InsertedStateChange();
+bool IsInserted() const { return nullptr != 
getParentSdrObjListFromSdrObject(); }
+
 bool IsEdgeObj() const { return bIsEdge;}
 bool Is3DObj() const { return bIs3DObj;}
 bool IsUnoObj() const { return bIsUnoObj;}
-void SetInserted(bool bIns);
-bool IsInserted() const { return bInserted;}
 void SetMoveProtect(bool bProt);
 bool IsMoveProtect() const { return bMovProt;}
 void SetResizeProtect(bool bProt);
@@ -1004,7 +1007,6 @@ private:
 // Position in the navigation order. SAL_MAX_UINT32 when not used.
 sal_uInt32mnNavigationPosition;
 SdrLayerIDmnLayerID;
-bool  bInserted : 1;  // only if set to true, 
there are RepaintBroadcast & SetModify
 bool  bNoPrint : 1;   // if true, the object 
is not printed.
 bool  mbVisible : 1;  // if false, the object 
is not visible on screen (but maybe on printer, depending on bNoprint
 bool  bMarkProt : 1;  // marking forbidden, 
persistent
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index b75d4867b8e1..124e83c206b2 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -46,15 +46,23 @@ private:
 friend class sdr::properties::CaptionProperties;
 friend classSdrTextObj; // for ImpRecalcTail() during 
AutoGrow
 
+// tdf#118662 exclusive friend function and setter for SuppressGetBitmap
+friend void setSuppressGetBitmapFromXclObjComment(SdrCaptionObj* 
pSdrCaptionObj, bool bValue);
+void setSuppressGetBitmap(bool bNew)
+{
+mbSuppressGetBitmap = bNew;
+}
+
 

[Libreoffice-commits] core.git: editeng/source forms/source sc/source sfx2/source vcl/unx vcl/win

2018-07-20 Thread Libreoffice Gerrit user
 editeng/source/misc/splwrap.cxx   |2 +-
 forms/source/component/Edit.cxx   |2 +-
 sc/source/ui/docshell/docsh8.cxx  |2 +-
 sc/source/ui/view/output2.cxx |2 +-
 sfx2/source/doc/sfxmodelfactory.cxx   |2 +-
 vcl/unx/generic/printer/ppdparser.cxx |2 +-
 vcl/win/gdi/salvd.cxx |2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 133da6ed83b278b9e6059c5c1a3d49f9f402792e
Author: Andrea Gelmini 
AuthorDate: Fri Jul 20 10:16:14 2018 +0200
Commit: Jens Carl 
CommitDate: Fri Jul 20 18:55:16 2018 +0200

Fix typos

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

diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index d31752d15cc7..6e2175a8f269 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -57,7 +57,7 @@ void SvxPrepareAutoCorrect( OUString &rOldText, const 
OUString &rNewText )
 // the strings before passing them on to the autocorrect function in
 // order that the autocorrect function will hopefully
 // works properly with normal words and abbreviations (with trailing '.')
-// independ of if they are at the end of the sentence or not.
+// independent of if they are at the end of the sentence or not.
 //
 // rOldText: text to be replaced
 // rNewText: replacement text
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index 064bfe7205a0..0627d60059e2 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -517,7 +517,7 @@ void OEditModel::write(const 
Reference& _rxOutStream)
 m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, 
makeAny(nOldTextLen));
 // and reset the text
 // First we set it to an empty string : Without this the second 
setPropertyValue would not do anything as it thinks
-// we aren't changing the prop (it didn't notify the - implicite - 
change of the text prop while setting the max text len)
+// we aren't changing the prop (it didn't notify the - implicit - 
change of the text prop while setting the max text len)
 // This seems to be a bug with in toolkit's EditControl-implementation.
 m_xAggregateSet->setPropertyValue(PROPERTY_TEXT, makeAny(OUString()));
 m_xAggregateSet->setPropertyValue(PROPERTY_TEXT, aCurrentText);
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index aae269593844..5729b12f92cc 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -1002,7 +1002,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& 
rFullFileName, rtl_TextEncoding
 // SQL error 22001: String length exceeds field width (after 
encoding).
 bool bEncErr = (nError == 22018);
 bool bIsOctetTextEncoding = rtl_isOctetTextEncoding( eCharSet);
-OSL_ENSURE( !bEncErr || bIsOctetTextEncoding, 
"ScDocShell::DBaseExport: encoding error and not an octect textencoding");
+OSL_ENSURE( !bEncErr || bIsOctetTextEncoding, 
"ScDocShell::DBaseExport: encoding error and not an octet textencoding");
 SCCOL nDocCol = nFirstCol;
 const sal_Int32* pColTypes = aColTypes.getConstArray();
 const sal_Int32* pColLengths = aColLengths.getConstArray();
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 5177e128ded2..58992589d93e 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -4728,7 +4728,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
 double nAbsCos = fabs( nCos );
 double nAbsSin = fabs( nSin );
 
-// adjust witdh of papersize for height of text
+// adjust width of papersize for height of text
 int nSteps = 5;
 while (nSteps > 0)
 {
diff --git a/sfx2/source/doc/sfxmodelfactory.cxx 
b/sfx2/source/doc/sfxmodelfactory.cxx
index 564a5dc3e0c3..1cd797b8f6b8 100644
--- a/sfx2/source/doc/sfxmodelfactory.cxx
+++ b/sfx2/source/doc/sfxmodelfactory.cxx
@@ -153,7 +153,7 @@ namespace sfx2
 
 Reference< XInterface > xInstance( (*m_pComponentFactoryFunc)( 
m_xServiceFactory, nCreationFlags ) );
 
-// to mimic the bahaviour of the default factory's 
createInstanceWithArguments, we initialize
+// to mimic the behaviour of the default factory's 
createInstanceWithArguments, we initialize
 // the object with the given arguments, stripped by the three special 
ones
 Sequence< Any > aStrippedArguments( _rArguments.getLength() );
 Any* pStrippedArgs = aStrippedArguments.getArray();
diff --git a/vcl/unx/generic/printer/ppdparser.cxx

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

2018-07-20 Thread Libreoffice Gerrit user
 vcl/source/gdi/pdfwriter_impl.cxx |   21 +
 1 file changed, 21 insertions(+)

New commits:
commit 4a627a5724c9a9a4e469921d032376703260fbff
Author: Caolán McNamara 
AuthorDate: Fri Jul 20 14:49:17 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 20 17:16:11 2018 +0200

implement pdf export of underline for outlined font

just the simplest case of a straight solid line which is outlined,
i.e. border in font color and filled with white

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

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index f623344d06e0..3071fb1371f4 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7408,6 +7408,27 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& 
aLine, long nWidth, Fon
 if ( !nLineHeight )
 return;
 
+// outline attribute ?
+if (m_aCurrentPDFState.m_aFont.IsOutline() && eTextLine == 
LINESTYLE_SINGLE)
+{
+appendStrokingColor(aColor, aLine); // stroke with text color
+aLine.append( " " );
+Color aNonStrokeColor(COL_WHITE);   // fill with white
+appendNonStrokingColor(aNonStrokeColor, aLine);
+aLine.append( "\n" );
+aLine.append( "0.25 w \n" ); // same line thickness as in drawLayout
+
+// draw rectangle instead
+aLine.append( "0 " );
+m_aPages.back().appendMappedLength( static_cast(-nLinePos * 
1.5), aLine );
+aLine.append( " " );
+m_aPages.back().appendMappedLength( static_cast(nWidth), 
aLine, false );
+aLine.append( ' ' );
+m_aPages.back().appendMappedLength( 
static_cast(nLineHeight), aLine );
+aLine.append( " re h B\n" );
+return;
+}
+
 m_aPages.back().appendMappedLength( static_cast(nLineHeight), 
aLine );
 aLine.append( " w " );
 appendStrokingColor( aColor, aLine );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 solenv/gbuild/UIConfig.mk|   23 
 solenv/sanitizers/ui/cui.suppr   |  111 +++
 solenv/sanitizers/ui/dbaccess.suppr  |   31 ++
 solenv/sanitizers/ui/desktop.suppr   |1 
 solenv/sanitizers/ui/filter.suppr|   23 
 solenv/sanitizers/ui/modules/BasicIDE.suppr  |4 
 solenv/sanitizers/ui/modules/dbreport.suppr  |2 
 solenv/sanitizers/ui/modules/sabpilot.suppr  |   29 ++
 solenv/sanitizers/ui/modules/sbibliography.suppr |   31 ++
 solenv/sanitizers/ui/modules/scalc.suppr |   61 
 solenv/sanitizers/ui/modules/schart.suppr|   16 +++
 solenv/sanitizers/ui/modules/sdraw.suppr |6 +
 solenv/sanitizers/ui/modules/simpress.suppr  |8 +
 solenv/sanitizers/ui/modules/smath.suppr |   24 
 solenv/sanitizers/ui/modules/spropctrlr.suppr|3 
 solenv/sanitizers/ui/modules/swriter.suppr   |   91 ++
 solenv/sanitizers/ui/sfx.suppr   |8 +
 solenv/sanitizers/ui/svt.suppr   |   21 
 solenv/sanitizers/ui/svx.suppr   |   51 ++
 solenv/sanitizers/ui/uui.suppr   |9 +
 solenv/sanitizers/ui/vcl.suppr   |3 
 solenv/sanitizers/ui/writerperfect.suppr |2 
 22 files changed, 535 insertions(+), 23 deletions(-)

New commits:
commit 3c51047edc9209ca97e9d6611deb4258d5be71d2
Author: Samuel Thibault 
AuthorDate: Wed Jun 13 12:50:44 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Jul 20 16:46:18 2018 +0200

gla11y: Enable warnings for all orphan labels

This completes enabling all gla11y warnings

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

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 3098b56cea0f..08922c5c955a 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -149,29 +149,6 @@ gb_UIConfig_gla11y_PARAMETERS += --widgets-button 
+vcllo-SmallButton,cuilo-RubyR
 # All new warnings should be fatal except a few kinds which could be only 
doubtful
 gb_UIConfig_gla11y_PARAMETERS += --fatal-all --not-fatal-type 
duplicate-mnemonic --not-fatal-type labelled-by-and-mnemonic --not-fatal-type 
orphan-label
 
-# Disable all warnings types by default for now, to enable warnings types 
progressively
-gb_UIConfig_gla11y_PARAMETERS += --disable-all
-
-# For now, ignore orphan labels without an unlabelled widget
-gb_UIConfig_gla11y_PARAMETERS += --disable-orphan-labels
-# but do not ignore orphan labels with an unlabelled widget
-gb_UIConfig_gla11y_PARAMETERS += --enable-type orphan-label
-
-# The following are to be uncommented progressively
-
-# These are definite errors
-gb_UIConfig_gla11y_PARAMETERS += --enable-type undeclared-target
-gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-label-for
-gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-labelled-by
-gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-id
-
-# These are often buttons with only an image
-gb_UIConfig_gla11y_PARAMETERS += --enable-type button-no-label
-# These are often doubtful
-gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-mnemonic 
--enable-type labelled-by-and-mnemonic
-
-gb_UIConfig_gla11y_PARAMETERS += --enable-type no-labelled-by
-
 define gb_UIConfig_a11yerrors__command
 $(call gb_Output_announce,$(2),$(true),UIA,1)
 $(call gb_UIConfig__gla11y_command)
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 0780cd7415f3..b503cb85b775 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -26,10 +26,27 @@ cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='m'] 
orphan-label
 cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='t'] orphan-label
 
cui/uiconfig/ui/applylocalizedpage.ui://svtlo-SvSimpleTableContainer[@id='list:border']
 no-labelled-by
 
cui/uiconfig/ui/applylocalizedpage.ui://svxcorelo-SvxCheckListBox[@id='checklist:border']
 no-labelled-by
+cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='singlestartex'] 
orphan-label
+cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='singleendex'] 
orphan-label
+cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='doublestartex'] 
orphan-label
+cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='doubleendex'] 
orphan-label
 cui/uiconfig/ui/assigncomponentdialog.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/assigncomponentdialog.ui://GtkEntry[@id='methodEntry'] 
no-labelled-by
 cui/uiconfig/ui/autocorrectdialog.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/autocorrectdialog.ui://svxcorelo-SvxLanguageBox[@id='lang'] 
no-labelled-by
+cui/uiconfig/ui/backgroundpage.ui://GtkLabel[@id='fileft'] orphan-label
+cui/uiconfig/ui/backgroundpage.ui://GtkLabel[@id='unlinkedft'] orphan-label
+cu

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

2018-07-20 Thread Libreoffice Gerrit user
 sw/CppunitTest_sw_uiwriter.mk   |1 
 sw/qa/extras/uiwriter/data2/tdf101534.fodt  |   28 +++
 sw/qa/extras/uiwriter/uiwriter2.cxx |   60 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |4 -
 4 files changed, 92 insertions(+), 1 deletion(-)

New commits:
commit b6cae942898a1ef1bf3a0bea0f05f881462f1b89
Author: Miklos Vajna 
AuthorDate: Thu Jul 19 15:32:59 2018 +0200
Commit: Aron Budea 
CommitDate: Fri Jul 20 16:10:23 2018 +0200

tdf#101534 sw: fix lost indent attributes when copying into numbered 
paragraph

Commit aa91dc0ccbe53ffcec9dbfec2265de057775d4e3 (CWS-TOOLING: integrate
CWS sw32numbf01, 2009-09-08) replaced the SwDoc::ReplaceNumRule() call
with SwDoc::SetNumRule(), as the later handles list ids. This required a
decision if resetting of the indent attributes is needed or not, but it
did not document why resetting was chosen.

On the other hand, the current bugdoc shows why resetting is a bad idea:
this way if you paste into a numbered paragraph which has a non-zero
paragraph indent inherited from the numbering + zero indent as direct
formatting, then this later is lost during paste.

Conflicts:
sw/qa/extras/uiwriter/uiwriter2.cxx

(cherry picked from commit 340eaa6aa15c18cc2696a4a304350810cb36565c)

Change-Id: Ie5dcf6ed86c240fd61c4d5bfed886910aea3648f
Reviewed-on: https://gerrit.libreoffice.org/57770
Reviewed-by: Mike Kaganski 
Tested-by: Miklos Vajna 
(cherry picked from commit 499c31d83f3ad6356678ae9103e7e0748ff45ad7)
Reviewed-on: https://gerrit.libreoffice.org/5
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk
index e048fae7e2c9..4b60c7ead4b8 100644
--- a/sw/CppunitTest_sw_uiwriter.mk
+++ b/sw/CppunitTest_sw_uiwriter.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,sw_uiwriter))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_uiwriter, \
 sw/qa/extras/uiwriter/uiwriter \
+sw/qa/extras/uiwriter/uiwriter2 \
 ))
 
 # note: this links msword only for the reason to have a order dependency,
diff --git a/sw/qa/extras/uiwriter/data2/tdf101534.fodt 
b/sw/qa/extras/uiwriter/data2/tdf101534.fodt
new file mode 100644
index ..e1db2f08ee08
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf101534.fodt
@@ -0,0 +1,28 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+  
+
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  Lorem ipsum dolor sit amet.
+  
+
+  Quo dolor dolore ea, vis te dicunt 
evertitur. Quo idque nostrud referrentur at, saperet volumus sententiae ut 
pro.
+
+  
+
+  
+
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
new file mode 100644
index ..e6b061f0e071
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code F

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

2018-07-20 Thread Libreoffice Gerrit user
 vcl/qa/cppunit/FontFeatureTest.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit fadd8727cd050c00af4f0986626b99a9e84f1ddd
Author: Noel Grandin 
AuthorDate: Fri Jul 20 14:12:29 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 15:56:29 2018 +0200

undef more vcl_font_feature test on windows

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

diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx 
b/vcl/qa/cppunit/FontFeatureTest.cxx
index 1c50bf30071f..2e9507a3426c 100644
--- a/vcl/qa/cppunit/FontFeatureTest.cxx
+++ b/vcl/qa/cppunit/FontFeatureTest.cxx
@@ -70,9 +70,10 @@ void FontFeatureTest::testGetFontFeatures()
 }
 }
 
+#if !defined(_WIN32)
+// periodically fails on windows tinderbox like tb77 with a value of 27
 CPPUNIT_ASSERT_EQUAL(size_t(20), rDefaultFontFeatures.size());
 
-#if !defined(_WIN32)
 OUString aExpectedFeaturesString = "aalt c2sc case dlig frac hlig liga 
lnum "
"onum pnum salt sinf smcp ss01 ss02 
ss03 "
"sups tnum zero cpsp ";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 canvas/Library_vclcanvas.mk|5 -
 canvas/source/vcl/spritehelper.cxx |6 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 76b43425d764fbc9bf4dac52054b1d94344f26b0
Author: Miklos Vajna 
AuthorDate: Fri Jul 20 14:09:36 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 15:46:48 2018 +0200

tdf#118107 canvas opengl: avoid assertion failure with negative widths

In case an Impress shape has a "Fade in and Swivel" animation attached,
canvas calls OutputDevice::DrawBitmapEx() with a negative width. This
results in a call to OutputDevice::DrawDeviceAlphaBitmap(), which
asserts that the height/width is not negative.

Fix the problem by transforming the bitmap before calling
OutputDevice::DrawBitmapEx() in the GL case, similarly to how "complex"
transformations are handled already.

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

diff --git a/canvas/Library_vclcanvas.mk b/canvas/Library_vclcanvas.mk
index 805cefc43c77..6ff19eba6130 100644
--- a/canvas/Library_vclcanvas.mk
+++ b/canvas/Library_vclcanvas.mk
@@ -21,7 +21,10 @@ $(eval $(call gb_Library_Library,vclcanvas))
 
 $(eval $(call 
gb_Library_set_componentfile,vclcanvas,canvas/source/vcl/vclcanvas))
 
-$(eval $(call gb_Library_use_external,vclcanvas,boost_headers))
+$(eval $(call gb_Library_use_externals,vclcanvas,\
+   boost_headers \
+   epoxy \
+))
 
 $(eval $(call gb_Library_use_sdk_api,vclcanvas))
 
diff --git a/canvas/source/vcl/spritehelper.cxx 
b/canvas/source/vcl/spritehelper.cxx
index 0dc26bf448cc..d8a45d422653 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -183,8 +184,11 @@ namespace vclcanvas
 
 if( !bIdentityTransform )
 {
+// Avoid the trick with the negative width in the OpenGL case,
+// OutputDevice::DrawDeviceAlphaBitmap() doesn't like it.
 if( !::basegfx::fTools::equalZero( aTransform.get(0,1) ) ||
-!::basegfx::fTools::equalZero( aTransform.get(1,0) ) )
+!::basegfx::fTools::equalZero( aTransform.get(1,0) ) ||
+OpenGLHelper::isVCLOpenGLEnabled())
 {
 // "complex" transformation, employ affine
 // transformator
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx   |6 
 writerfilter/source/dmapper/PropertyMap.cxx  |   15 ++-
 writerfilter/source/dmapper/PropertyMap.hxx  |8 ++---
 writerfilter/source/dmapper/StyleSheetTable.cxx  |4 ++
 5 files changed, 23 insertions(+), 10 deletions(-)

New commits:
commit 7f697ec27b1175ed94228155935d9ccd3cd5606c
Author: Justin Luth 
AuthorDate: Thu Jul 12 23:24:25 2018 +0300
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 15:25:13 2018 +0200

tdf#103961 writerfilter: parentless styles need pPrDefault(s)

It is possible for paragraph styles to be based on -none-.
In those cases, the DocDefaults must be applied.

Change-Id: I5b3458384c6473f3aaf64e5f274372d291ff824d
Reviewed-on: https://gerrit.libreoffice.org/57371
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx 
b/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx
index 091718984540..d86b0b4f1a77 100644
Binary files a/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx and 
b/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 852e63114769..d45284d67a4e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -727,6 +727,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117504_numberingIndent, 
"tdf117504_numberingInde
 {
 OUString sName = getProperty(getParagraph(1), 
"NumberingStyleName");
 CPPUNIT_ASSERT_MESSAGE("Paragraph has numbering style", !sName.isEmpty());
+
+uno::Reference xPropertySet(
+getStyles("ParagraphStyles")->getByName("Revision"), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(353), getProperty(xPropertySet, 
"ParaBottomMargin"));
+xPropertySet.set(getStyles("ParagraphStyles")->getByName("Body Note"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xPropertySet, 
"ParaBottomMargin"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark.docx")
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index a24ae3d41270..46b846289219 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -317,20 +317,23 @@ void PropertyMap::dumpXml() const
 }
 #endif
 
-void PropertyMap::InsertProps( const PropertyMapPtr& rMap )
+void PropertyMap::InsertProps( const PropertyMapPtr& rMap, const bool 
bOverwrite )
 {
 if ( rMap )
 {
 for ( const auto& rPropPair : rMap->m_vMap )
-m_vMap[rPropPair.first] = rPropPair.second;
+{
+if ( bOverwrite || !m_vMap.count(rPropPair.first) )
+m_vMap[rPropPair.first] = rPropPair.second;
+}
 
-insertTableProperties( rMap.get() );
+insertTableProperties( rMap.get(), bOverwrite );
 
 Invalidate();
 }
 }
 
-void PropertyMap::insertTableProperties( const PropertyMap* )
+void PropertyMap::insertTableProperties( const PropertyMap*, const bool )
 {
 #ifdef DEBUG_WRITERFILTER
 TagLogger::getInstance().element( "PropertyMap.insertTableProperties" );
@@ -1825,7 +1828,7 @@ void TablePropertyMap::setValue( TablePropertyMapTarget 
eWhich, sal_Int32 nSet )
 OSL_FAIL( "invalid TablePropertyMapTarget" );
 }
 
-void TablePropertyMap::insertTableProperties( const PropertyMap* pMap )
+void TablePropertyMap::insertTableProperties( const PropertyMap* pMap, const 
bool bOverwrite )
 {
 #ifdef DEBUG_WRITERFILTER
 TagLogger::getInstance().startElement( 
"TablePropertyMap.insertTableProperties" );
@@ -1838,7 +1841,7 @@ void TablePropertyMap::insertTableProperties( const 
PropertyMap* pMap )
 for ( sal_Int32 eTarget = TablePropertyMapTarget_START;
 eTarget < TablePropertyMapTarget_MAX; ++eTarget )
 {
-if ( pSource->m_aValidValues[eTarget].bValid )
+if ( pSource->m_aValidValues[eTarget].bValid && (bOverwrite || 
!m_aValidValues[eTarget].bValid) )
 {
 m_aValidValues[eTarget].bValid = true;
 m_aValidValues[eTarget].nValue = 
pSource->m_aValidValues[eTarget].nValue;
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx 
b/writerfilter/source/dmapper/PropertyMap.hxx
index c20951c624c9..91e182d3997f 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -141,8 +141,8 @@ public:
 // Remove a named property from *this, does nothing if the property id has 
not been set
 void Erase( PropertyIds eId);
 
-// Imports properties from pMap, overwriting those with the same 
PropertyIds as the current map
-void InsertProps( const tools::SvRef< 

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

2018-07-20 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |   13 +++
 sw/source/filter/html/htmltab.cxx  |   36 +++--
 2 files changed, 29 insertions(+), 20 deletions(-)

New commits:
commit a98d071d32ad15f928e262cdb721fd64032d46a2
Author: Noel Grandin 
AuthorDate: Thu Jul 19 13:08:41 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 15:24:27 2018 +0200

loplugin:useuniqueptr in HTMLTable

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index 88bbec4a9d59..4d5b7fc0733a 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -92,7 +92,18 @@ public:
 if (fn == SRCDIR "/comphelper/source/property/MasterPropertySet.cxx"
 || fn == SRCDIR 
"/comphelper/source/property/MasterPropertySetInfo.cxx")
 return;
-
+// SwTableLine::m_aBoxes
+if (fn == SRCDIR "/sw/source/core/table/swtable.cxx")
+return;
+// SwHTMLParser::m_pFormImpl
+if (fn == SRCDIR "/sw/source/filter/html/htmlform.cxx")
+return;
+// SwHTMLParser::m_pPendStack, pNext
+if (fn == SRCDIR "/sw/source/filter/html/htmltab.cxx")
+return;
+// SaveLine::pBox, pNext
+if (fn == SRCDIR "/sw/source/core/undo/untbl.cxx")
+return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 9f4816e5d1ff..910a98b524cd 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -376,8 +376,8 @@ class HTMLTable
 OUString m_aClass;
 OUString m_aDir;
 
-SdrObjects *m_pResizeDrawObjects;// SDR objects
-std::vector *m_pDrawObjectPrcWidths;   // column of draw 
object and its rel. width
+std::unique_ptr m_pResizeDrawObjects;// SDR objects
+std::unique_ptr> m_pDrawObjectPrcWidths;   // 
column of draw object and its rel. width
 
 HTMLTableRows m_aRows; ///< table rows
 HTMLTableColumns m_aColumns;   ///< table columns
@@ -440,7 +440,7 @@ private:
 SwHTMLParser *m_pParser;  // the current parser
 std::unique_ptr m_xParentContents;
 
-HTMLTableContext *m_pContext;// the context of the table
+std::unique_ptr m_pContext;// the context of the 
table
 
 std::shared_ptr m_xLayoutInfo;
 
@@ -597,11 +597,11 @@ public:
 
 bool HasToFly() const { return m_bHasToFly; }
 
-void SetTable( const SwStartNode *pStNd, HTMLTableContext *pCntxt,
+void SetTable( const SwStartNode *pStNd, std::unique_ptr 
pCntxt,
sal_uInt16 nLeft, sal_uInt16 nRight,
const SwTable *pSwTab=nullptr, bool bFrcFrame=false );
 
-HTMLTableContext *GetContext() const { return m_pContext; }
+HTMLTableContext *GetContext() const { return m_pContext.get(); }
 
 const std::shared_ptr& CreateLayoutInfo();
 
@@ -905,9 +905,6 @@ inline SwFrameFormat *HTMLTableColumn::GetFrameFormat( bool 
bBorderLine,
 
 void HTMLTable::InitCtor(const HTMLTableOptions& rOptions)
 {
-m_pResizeDrawObjects = nullptr;
-m_pDrawObjectPrcWidths = nullptr;
-
 m_nRows = 0;
 m_nCurrentRow = 0; m_nCurrentColumn = 0;
 
@@ -1059,10 +1056,10 @@ HTMLTable::~HTMLTable()
 {
 m_pParser->DeregisterHTMLTable(this);
 
-delete m_pResizeDrawObjects;
-delete m_pDrawObjectPrcWidths;
+m_pResizeDrawObjects.reset();
+m_pDrawObjectPrcWidths.reset();
 
-delete m_pContext;
+m_pContext.reset();
 
 // pLayoutInfo has either already been deleted or is now owned by SwTable
 }
@@ -2435,13 +2432,13 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 
nAbsAvail,
 
 }
 
-void HTMLTable::SetTable( const SwStartNode *pStNd, HTMLTableContext *pCntxt,
+void HTMLTable::SetTable( const SwStartNode *pStNd, 
std::unique_ptr pCntxt,
   sal_uInt16 nLeft, sal_uInt16 nRight,
   const SwTable *pSwTab, bool bFrcFrame )
 {
 m_pPrevStartNode = pStNd;
 m_pSwTable = pSwTab;
-m_pContext = pCntxt;
+m_pContext = std::move(pCntxt);
 
 m_nLeftMargin = nLeft;
 m_nRightMargin = nRight;
@@ -2452,11 +2449,11 @@ void HTMLTable::SetTable( const SwStartNode *pStNd, 
HTMLTableContext *pCntxt,
 void HTMLTable::RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPrcWidth )
 {
 if( !m_pResizeDrawObjects )
-m_pResizeDrawObjects = new SdrObjects;
+m_pResizeDrawObjects.reset(new SdrObjects);
 m_pResizeDrawObjects->push_back( pObj );
 
 if( !m_pDrawObjectPrcWidths )
-m_pDrawObjectPrcWidths = new std::vector;
+m_pDrawObjectPrcWidths.reset(new std::vector);
 m_pDrawObjectPrcWidths->push_back( m_nCurrentRow );
 m_pDrawObjectPrcWidths->push_b

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

2018-07-20 Thread Libreoffice Gerrit user
 sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc |binary
 sw/source/filter/ww8/ww8par6.cxx  |6 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e97a2073b5c8a209f224c70b04e9a1cddab30add
Author: Caolán McNamara 
AuthorDate: Fri Jul 20 12:28:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 20 15:05:15 2018 +0200

forcepoint#51 anchor location deleted before graphic anchor processed

try deferring to after anchor stack is cleared

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

diff --git a/sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc 
b/sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc
new file mode 100644
index ..91ee6b58f210
Binary files /dev/null and 
b/sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index fbc3ecf271bb..7abf127ec0fd 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2526,6 +2526,7 @@ void SwWW8ImplReader::StopApo()
 Color aBg(0xFE, 0xFF, 0xFF, 0xFF);  //Transparent by default
 
 SwTextNode* pNd = aPref.GetNode().GetTextNode();
+SwTextNode* pJoinNext = nullptr;
 if (pNd && m_xSFlyPara->pFlyFormat)
 {
 /*
@@ -2555,13 +2556,16 @@ void SwWW8ImplReader::StopApo()
 }
 
 //Get rid of extra empty paragraph
-pNd->JoinNext();
+pJoinNext = pNd;
 }
 
 if (m_xSFlyPara->pFlyFormat)
 m_xSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, 
RES_BACKGROUND));
 
 DeleteAnchorStack();
+if (pJoinNext)
+pJoinNext->JoinNext();
+
 m_xAnchorStck = std::move(m_xSFlyPara->xOldAnchorStck);
 
 // When inserting a graphic into the fly frame using the auto
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: comphelper/qa comphelper/source compilerplugins/clang include/comphelper

2018-07-20 Thread Libreoffice Gerrit user
 comphelper/qa/container/comphelper_ifcontainer.cxx|2 
 comphelper/source/container/interfacecontainer2.cxx   |4 -
 comphelper/source/eventattachermgr/eventattachermgr.cxx   |4 -
 comphelper/source/misc/backupfilehelper.cxx   |4 -
 comphelper/source/misc/hash.cxx   |2 
 comphelper/source/misc/profilezone.cxx|4 -
 comphelper/source/officeinstdir/officeinstallationdirectories.hxx |4 -
 comphelper/source/property/propertycontainerhelper.cxx|2 
 comphelper/source/xml/ofopxmlhelper.cxx   |   26 

 compilerplugins/clang/unusedfields.cxx|   32 
++
 compilerplugins/clang/unusedfields.py |   31 
+
 include/comphelper/ChainablePropertySet.hxx   |2 
 include/comphelper/MasterPropertySet.hxx  |2 
 include/comphelper/PropertyInfoHash.hxx   |   10 +--
 include/comphelper/asyncnotification.hxx  |2 
 include/comphelper/componentmodule.hxx|8 +-
 include/comphelper/enumhelper.hxx |2 
 include/comphelper/flagguard.hxx  |2 
 include/comphelper/interaction.hxx|2 
 include/comphelper/interfacecontainer2.hxx|6 -
 include/comphelper/profilezone.hxx|2 
 include/comphelper/propmultiplex.hxx  |2 
 include/comphelper/seqstream.hxx  |4 -
 include/comphelper/stl_types.hxx  |4 -
 include/comphelper/string.hxx |2 
 include/comphelper/threadpool.hxx |2 
 include/comphelper/unique_disposing_ptr.hxx   |2 
 27 files changed, 116 insertions(+), 53 deletions(-)

New commits:
commit 12dce07aec980562fa449fa1884e0e8379d680fb
Author: Noel Grandin 
AuthorDate: Thu Jul 19 16:28:37 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 14:12:57 2018 +0200

loplugin:unusedfields - look for fields that can be const, in comphelper

idea from tml.

Extend the unusedfields plugin to find fields that are only assigned in
the constructor.

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

diff --git a/comphelper/qa/container/comphelper_ifcontainer.cxx 
b/comphelper/qa/container/comphelper_ifcontainer.cxx
index cf38b4e45bfe..26a2bd9992d8 100644
--- a/comphelper/qa/container/comphelper_ifcontainer.cxx
+++ b/comphelper/qa/container/comphelper_ifcontainer.cxx
@@ -42,7 +42,7 @@ struct ContainerStats {
 
 class ContainerListener : public cppu::WeakImplHelper< XEventListener >
 {
-ContainerStats *m_pStats;
+ContainerStats * const m_pStats;
 public:
 explicit ContainerListener(ContainerStats *pStats)
 : m_pStats(pStats) { m_pStats->m_nAlive++; }
diff --git a/comphelper/source/container/interfacecontainer2.cxx 
b/comphelper/source/container/interfacecontainer2.cxx
index c22d1641eef0..aac2e6213098 100644
--- a/comphelper/source/container/interfacecontainer2.cxx
+++ b/comphelper/source/container/interfacecontainer2.cxx
@@ -39,13 +39,13 @@ namespace comphelper
 {
 
 OInterfaceIteratorHelper2::OInterfaceIteratorHelper2( 
OInterfaceContainerHelper2 & rCont_ )
-: rCont( rCont_ )
+: rCont( rCont_ ),
+  bIsList( rCont_.bIsList )
 {
 MutexGuard aGuard( rCont.rMutex );
 if( rCont.bInUse )
 // worst case, two iterators at the same time
 rCont.copyAndResetInUse();
-bIsList = rCont_.bIsList;
 aData = rCont_.aData;
 if( bIsList )
 {
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx 
b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 4e5cdb0e0e53..e613a92258ac 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -134,8 +134,8 @@ private:
 class AttacherAllListener_Impl : public WeakImplHelper< XAllListener >
 {
 rtl::Reference mxManager;
-OUStringaScriptType;
-OUStringaScriptCode;
+OUString const   aScriptType;
+OUString const   aScriptCode;
 
 /// @throws CannotConvertException
 void convertToEventReturn( Any & rRet, const Type & rRetType );
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index fc19da6d2570..8bb0804739d5 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/mi

[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit fd0348d42568d5f32fb03e1e13055db5938d5f35
Author: Olivier Hallot 
AuthorDate: Wed Jul 18 17:32:15 2018 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Jul 20 13:22:51 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - tdf#115254 Some branch bookmarks are not working 6

writerperfect and uui modules

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

diff --git a/helpcontent2 b/helpcontent2
index 9cd1d2832cad..faeb714c09f7 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9cd1d2832cad78410c85b9fb7b6ccba9473f3106
+Subproject commit faeb714c09f7420d6ed0c55097de2467e211a13d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 source/text/shared/01/01020103.xhp|1 +
 source/text/shared/01/password_dlg.xhp|2 ++
 source/text/shared/01/password_main.xhp   |1 +
 source/text/shared/01/ref_epub_export.xhp |1 +
 source/text/shared/01/securitywarning.xhp |1 +
 5 files changed, 6 insertions(+)

New commits:
commit faeb714c09f7420d6ed0c55097de2467e211a13d
Author: Olivier Hallot 
AuthorDate: Wed Jul 18 17:32:15 2018 -0300
Commit: Olivier Hallot 
CommitDate: Fri Jul 20 13:22:51 2018 +0200

tdf#115254 Some branch bookmarks are not working 6

writerperfect and uui modules

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

diff --git a/source/text/shared/01/01020103.xhp 
b/source/text/shared/01/01020103.xhp
index 55ad698b0..9f8a611a5 100644
--- a/source/text/shared/01/01020103.xhp
+++ b/source/text/shared/01/01020103.xhp
@@ -35,6 +35,7 @@
 
 
 
+
 Filter 
list
   Select the import filter 
for the file that you want to open.
   If 
$[officename] does not recognize the file type of the document that your want 
to open, try any of the following:
diff --git a/source/text/shared/01/password_dlg.xhp 
b/source/text/shared/01/password_dlg.xhp
index 20fad3081..5e04cf60a 100644
--- a/source/text/shared/01/password_dlg.xhp
+++ b/source/text/shared/01/password_dlg.xhp
@@ -29,6 +29,8 @@
  
  
  
+ 
+ 
  
  Password
  Assigns a 
password to prevent users from making unauthorized changes.
diff --git a/source/text/shared/01/password_main.xhp 
b/source/text/shared/01/password_main.xhp
index 901ae4097..17c9b26f2 100644
--- a/source/text/shared/01/password_main.xhp
+++ b/source/text/shared/01/password_main.xhp
@@ -28,6 +28,7 @@


   
+  
  
  Set Master Password
  Assign a master password to protect the access 
to a saved password.
diff --git a/source/text/shared/01/ref_epub_export.xhp 
b/source/text/shared/01/ref_epub_export.xhp
index a4013ad4e..689800465 100644
--- a/source/text/shared/01/ref_epub_export.xhp
+++ b/source/text/shared/01/ref_epub_export.xhp
@@ -35,6 +35,7 @@
 
 
 
+
 
 Export as 
EPUB
 Export the 
current file to EPUB.
diff --git a/source/text/shared/01/securitywarning.xhp 
b/source/text/shared/01/securitywarning.xhp
index 7f0cdc5b8..5ce927cd3 100644
--- a/source/text/shared/01/securitywarning.xhp
+++ b/source/text/shared/01/securitywarning.xhp
@@ -36,6 +36,7 @@
 macros;security warning dialog
 
 
+
 
 Security Warning
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 984bab6c6f48bd3dfa8deaa6e7f1a1fb73f9af34
Author: Olivier Hallot 
AuthorDate: Wed Jul 18 17:07:17 2018 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Jul 20 13:22:04 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - tdf#115254 Some branch bookmarks are not working 5

vcl and xmlsecurity dialogs

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

diff --git a/helpcontent2 b/helpcontent2
index bfe354c9d429..9cd1d2832cad 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bfe354c9d4291ddebf32d0cddfca24ddfd3aa950
+Subproject commit 9cd1d2832cad78410c85b9fb7b6ccba9473f3106
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 source/text/shared/01/0113.xhp|1 +
 source/text/shared/01/digitalsignatures.xhp   |1 +
 source/text/shared/01/selectcertificate.xhp   |7 ---
 source/text/shared/optionen/macrosecurity_sl.xhp  |7 ---
 source/text/shared/optionen/macrosecurity_ts.xhp  |1 +
 source/text/shared/optionen/viewcertificate_c.xhp |3 ++-
 source/text/shared/optionen/viewcertificate_d.xhp |3 ++-
 source/text/shared/optionen/viewcertificate_g.xhp |3 ++-
 8 files changed, 17 insertions(+), 9 deletions(-)

New commits:
commit 9cd1d2832cad78410c85b9fb7b6ccba9473f3106
Author: Olivier Hallot 
AuthorDate: Wed Jul 18 17:07:17 2018 -0300
Commit: Olivier Hallot 
CommitDate: Fri Jul 20 13:22:04 2018 +0200

tdf#115254 Some branch bookmarks are not working 5

vcl and xmlsecurity dialogs

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

diff --git a/source/text/shared/01/0113.xhp 
b/source/text/shared/01/0113.xhp
index b68cac64d..5bd600438 100644
--- a/source/text/shared/01/0113.xhp
+++ b/source/text/shared/01/0113.xhp
@@ -45,6 +45,7 @@
 spoolfiles with Xprinter
 
 
+
 
 Print
 Prints the current document, 
selection, or the pages that you specify. You can also set the print options 
for the current document.
diff --git a/source/text/shared/01/digitalsignatures.xhp 
b/source/text/shared/01/digitalsignatures.xhp
index de1538ca1..d5996d75b 100644
--- a/source/text/shared/01/digitalsignatures.xhp
+++ b/source/text/shared/01/digitalsignatures.xhp
@@ -27,6 +27,7 @@
   


+   
   
   
 
diff --git a/source/text/shared/01/selectcertificate.xhp 
b/source/text/shared/01/selectcertificate.xhp
index b2a855e64..1694fa81d 100644
--- a/source/text/shared/01/selectcertificate.xhp
+++ b/source/text/shared/01/selectcertificate.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
+
 
 
 Select Certificate
@@ -27,6 +27,7 @@
 
 
 
+
 
 Select 
Certificate
 Select the certificate that you want to digitally sign the current 
document with.
diff --git a/source/text/shared/optionen/macrosecurity_sl.xhp 
b/source/text/shared/optionen/macrosecurity_sl.xhp
index c27d40b83..8d99df5a0 100644
--- a/source/text/shared/optionen/macrosecurity_sl.xhp
+++ b/source/text/shared/optionen/macrosecurity_sl.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
+
 
 
 Security Level
@@ -31,6 +31,7 @@
 macros;security levels
 levels;macro security
 
+
 
 Security Level
 
diff --git a/source/text/shared/optionen/macrosecurity_ts.xhp 
b/source/text/shared/optionen/macrosecurity_ts.xhp
index eec19e01d..ed7a5c854 100644
--- a/source/text/shared/optionen/macrosecurity_ts.xhp
+++ b/source/text/shared/optionen/macrosecurity_ts.xhp
@@ -32,6 +32,7 @@
 Trusted Sources
 
 
+
 Specifies the 
macro security 
settings for trusted certificates and trusted file locations.
 Trusted certificates
 Lists the trusted certificates.
diff --git a/source/text/shared/optionen/viewcertificate_c.xhp 
b/source/text/shared/optionen/viewcertificate_c.xhp
index 43be7bad3..77c28fb22 100644
--- a/source/text/shared/optionen/viewcertificate_c.xhp
+++ b/source/text/shared/optionen/viewcertificate_c.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 @@
 
 
 
+
 
 
 
diff --git a/source/text/shared/optionen/viewcertificate_d.xhp 
b/source/text/shared/optionen/viewcertificate_d.xhp
index deb8fd7bd..b94f1fef6 100644
--- a/source/text/shared/optionen/viewcertificate_d.xhp
+++ b/source/text/shared/optionen/viewcertificate_d.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 @@
 
 
 
+
 
 
 Details
diff --git a/source/text/shared/optionen/viewcertificate_g.xhp 
b/source/text/shared/optionen/viewcertificate_g.xhp
index 465285255..d12e018d2 100644
--- a/source/text/shared/optionen/viewcertificate_g.xhp
+++ b/source/text/shared/optionen/viewcertificate_g.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 @@
 
 
 
+
 General
 
 The General page of the View Certificate dialog 
displays basic information about the certificate.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/source/filter/html/svxcss1.cxx |   35 +++
 sw/source/filter/html/svxcss1.hxx |5 +++--
 2 files changed, 14 insertions(+), 26 deletions(-)

New commits:
commit f3c4af6383340886b94bdbc429b95916c104e09e
Author: Noel Grandin 
AuthorDate: Thu Jul 19 13:19:23 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 13:16:17 2018 +0200

loplugin:useuniqueptr in SvxCSS1PropertyInfo

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

diff --git a/sw/source/filter/html/svxcss1.cxx 
b/sw/source/filter/html/svxcss1.cxx
index c7b832b540e1..aa6298da1a55 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -362,9 +362,6 @@ constexpr sal_uInt16 
SvxCSS1PropertyInfo::UNSET_BORDER_DISTANCE;
 
 SvxCSS1PropertyInfo::SvxCSS1PropertyInfo()
 {
-for(SvxCSS1BorderInfo* & rp : m_aBorderInfos)
-rp = nullptr;
-
 Clear();
 }
 
@@ -400,24 +397,19 @@ SvxCSS1PropertyInfo::SvxCSS1PropertyInfo( const 
SvxCSS1PropertyInfo& rProp ) :
 m_ePageBreakBefore( rProp.m_ePageBreakBefore ),
 m_ePageBreakAfter( rProp.m_ePageBreakAfter )
 {
-for( size_t i=0; iSetBorderLine( SvxBoxItemLine::RIGHT, aBoxItem );
 
-for( size_t i=0; i
 
+#include 
+#include 
 #include 
 #include 
-#include 
 
 class SfxItemPool;
 class SvxBoxItem;
@@ -96,7 +97,7 @@ namespace editeng { class SvxBorderLine; }
 struct SvxCSS1BorderInfo;
 class SvxCSS1PropertyInfo
 {
-SvxCSS1BorderInfo *m_aBorderInfos[4];
+std::array,4> m_aBorderInfos;
 
 void DestroyBorderInfos();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8544730f60b18ec25ed5ff2a939ffb8f1c425c03
Author: Abhyudaya Sharma 
AuthorDate: Wed Jul 4 13:34:36 2018 +0530
Commit: Heiko Tietze 
CommitDate: Fri Jul 20 13:08:37 2018 +0200

tdf#118402 Add ellipsis to New -> Templates

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

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 10065e2e6114..5575bbd3d350 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -267,7 +267,7 @@
   .uno:NewDoc
 
 
-  Templates
+  Templates...
 
 
   _self
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf104797.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|   19 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |4 +++-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 ++
 4 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit 04b53321ca56844521787563914fad21513fd58d
Author: László Németh 
AuthorDate: Thu Jul 19 12:08:31 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 12:58:51 2018 +0200

tdf#104797 DOCX change tracking: handle moveFrom and moveTo

data as deletion and insertion instead of importing them
as normal (unmodified) texts (messing up document content
and losing change tracking information).

Change-Id: I9c0a7da83f3e8235d65d47afdb99ffe188f52704
Reviewed-on: https://gerrit.libreoffice.org/57723
Reviewed-by: László Németh 
Tested-by: László Németh 
Reviewed-on: https://gerrit.libreoffice.org/57729
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf104797.docx 
b/sw/qa/extras/ooxmlexport/data/tdf104797.docx
new file mode 100644
index ..6e52190ce671
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf104797.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index f27c88facc67..af4fa6661907 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -401,6 +401,25 @@ DECLARE_OOXMLEXPORT_TEST(testOpenDocumentAsReadOnly, 
"open-as-read-only.docx")
 CPPUNIT_ASSERT(pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf104797, "tdf104797.docx")
+{
+// check moveFrom and moveTo
+CPPUNIT_ASSERT_EQUAL( OUString( "Will this sentence be duplicated?" ), 
getParagraph( 1 )->getString());
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 1 
)->getString());
+CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 2), "RedlineType"));
+
CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(1),
 2), "RedlineType"));
+CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(1), 2), 
"IsStart"));
+CPPUNIT_ASSERT_EQUAL( OUString( "This is a filler sentence. Will this 
sentence be duplicated ADDED STUFF?" ),
+getParagraph( 2 )->getString());
+CPPUNIT_ASSERT_EQUAL( OUString( "This is a filler sentence." ), getRun( 
getParagraph( 2 ), 1 )->getString());
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 2 
)->getString());
+CPPUNIT_ASSERT_EQUAL( OUString( " Will this sentence be duplicated ADDED 
STUFF?" ), getRun( getParagraph( 2 ), 3 )->getString());
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 4 
)->getString());
+CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 5), "RedlineType"));
+
CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(2),
 5), "RedlineType"));
+CPPUNIT_ASSERT_EQUAL(false,getProperty(getRun(getParagraph(2), 5), 
"IsStart"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index cbcce6bda2ef..9eab98638e99 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3833,13 +3833,15 @@ void DomainMapper::HandleRedline( Sprm& rSprm )
 case XML_mod:
 case XML_ins:
 case XML_del:
+case XML_moveTo:
+case XML_moveFrom:
 case XML_ParagraphFormat:
 case XML_tableRowInsert:
 case XML_tableRowDelete:
 case XML_tableCellInsert:
 case XML_tableCellDelete:
 break;
-default: OSL_FAIL( "redline token other than mod, ins, del or table 
row" ); break;
+default: OSL_FAIL( "redline token other than mod, ins, del, moveTo, 
moveFrom or table row" ); break;
 }
 m_pImpl->EndParaMarkerChange( );
 m_pImpl->SetCurrentRedlineIsRead();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8a9c038d8c2f..321866daf85a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1860,9 +1860,11 @@ void 
DomainMapper_Impl::CreateRedline(uno::Reference const& xR
 case XML_mod:
 sType = getPropertyName( PROP_FORMAT );
 break;
+case XML_moveTo:
 case XML_ins:
 sType = getPropertyName( PROP_INSERT );
 break;
+case XML_moveFrom:
 case XML_del:
 sType = getPropertyName( PROP_DELETE );
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.or

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

2018-07-20 Thread Libreoffice Gerrit user
 sw/CppunitTest_sw_uiwriter.mk   |1 
 sw/qa/extras/uiwriter/data2/tdf101534.fodt  |   28 +++
 sw/qa/extras/uiwriter/uiwriter2.cxx |   60 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |4 -
 4 files changed, 92 insertions(+), 1 deletion(-)

New commits:
commit 499c31d83f3ad6356678ae9103e7e0748ff45ad7
Author: Miklos Vajna 
AuthorDate: Thu Jul 19 15:32:59 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 12:58:03 2018 +0200

tdf#101534 sw: fix lost indent attributes when copying into numbered 
paragraph

Commit aa91dc0ccbe53ffcec9dbfec2265de057775d4e3 (CWS-TOOLING: integrate
CWS sw32numbf01, 2009-09-08) replaced the SwDoc::ReplaceNumRule() call
with SwDoc::SetNumRule(), as the later handles list ids. This required a
decision if resetting of the indent attributes is needed or not, but it
did not document why resetting was chosen.

On the other hand, the current bugdoc shows why resetting is a bad idea:
this way if you paste into a numbered paragraph which has a non-zero
paragraph indent inherited from the numbering + zero indent as direct
formatting, then this later is lost during paste.

Conflicts:
sw/qa/extras/uiwriter/uiwriter2.cxx

(cherry picked from commit 340eaa6aa15c18cc2696a4a304350810cb36565c)

Change-Id: Ie5dcf6ed86c240fd61c4d5bfed886910aea3648f
Reviewed-on: https://gerrit.libreoffice.org/57770
Reviewed-by: Mike Kaganski 
Tested-by: Miklos Vajna 

diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk
index e048fae7e2c9..4b60c7ead4b8 100644
--- a/sw/CppunitTest_sw_uiwriter.mk
+++ b/sw/CppunitTest_sw_uiwriter.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,sw_uiwriter))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_uiwriter, \
 sw/qa/extras/uiwriter/uiwriter \
+sw/qa/extras/uiwriter/uiwriter2 \
 ))
 
 # note: this links msword only for the reason to have a order dependency,
diff --git a/sw/qa/extras/uiwriter/data2/tdf101534.fodt 
b/sw/qa/extras/uiwriter/data2/tdf101534.fodt
new file mode 100644
index ..e1db2f08ee08
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf101534.fodt
@@ -0,0 +1,28 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+  
+
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  Lorem ipsum dolor sit amet.
+  
+
+  Quo dolor dolore ea, vis te dicunt 
evertitur. Quo idque nostrud referrentur at, saperet volumus sententiae ut 
pro.
+
+  
+
+  
+
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
new file mode 100644
index ..e6b061f0e071
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/

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

2018-07-20 Thread Libreoffice Gerrit user
 lotuswordpro/source/filter/lwplayout.cxx |2 +-
 lotuswordpro/source/filter/lwppagelayout.cxx |4 ++--
 vcl/unx/generic/print/genprnpsp.cxx  |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f61cff7f039153c1296ea823316fbebee6c895a8
Author: Andrea Gelmini 
AuthorDate: Fri Jul 20 10:23:48 2018 +0200
Commit: Julien Nabet 
CommitDate: Fri Jul 20 12:35:10 2018 +0200

Fix typos

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

diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index 4423178aeeeb..487058cbb08b 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -1377,7 +1377,7 @@ rtl::Reference 
LwpMiddleLayout::GetWaterMarkLayout()
 }
 
 /**
-* @descr:   Create and reture xfbgimage object for watermark
+* @descr:   Create and return xfbgimage object for watermark
 *
 */
 std::unique_ptr LwpMiddleLayout::GetXFBGImage()
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx 
b/lotuswordpro/source/filter/lwppagelayout.cxx
index 5a00d5368778..b3d58c692542 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -578,7 +578,7 @@ double LwpPageLayout::GetMarginWidth()
   =LAST_LAYOUTPAGENO, return the last page number 
that current page layout covers
else, return the specified page number that 
current page layout covers
  * @param:
- * @return:  if reture value >=0, success to find the page number, or fail.
+ * @return:  if return value >=0, success to find the page number, or fail.
 */
 sal_Int32 LwpPageLayout::GetPageNumber(sal_uInt16 nLayoutNumber)
 {
@@ -609,7 +609,7 @@ sal_Int32 LwpPageLayout::GetPageNumber(sal_uInt16 
nLayoutNumber)
 nPageNumber = nNumber;
 if(pPageHint->GetNext().IsNull())
 {
-//if is last page number of entire document, reture 
directly
+//if is last page number of entire document, return 
directly
 return nPageNumber + pDoc->GetNumberOfPagesBefore();
 }
 }
diff --git a/vcl/unx/generic/print/genprnpsp.cxx 
b/vcl/unx/generic/print/genprnpsp.cxx
index d30a518457b5..58c70696fab1 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -569,8 +569,8 @@ bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* 
pJobSetup )
 return true;
 }
 
-// This function merges the independ driver data
-// and sets the new independ data in pJobSetup
+// This function merges the independent driver data
+// and sets the new independent data in pJobSetup
 // Only the data must be changed, where the bit
 // in nGetDataFlags is set
 bool PspSalInfoPrinter::SetData(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 basegfx/source/polygon/b2dtrapezoid.cxx|2 +-
 include/svx/svdedtv.hxx|2 +-
 reportdesign/source/core/api/ReportEngineJFree.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 75ecad2b30c8d56355f0aaaf1ec093ed16cc
Author: Andrea Gelmini 
AuthorDate: Fri Jul 20 10:35:51 2018 +0200
Commit: Julien Nabet 
CommitDate: Fri Jul 20 12:34:10 2018 +0200

Fix typos

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

diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx 
b/basegfx/source/polygon/b2dtrapezoid.cxx
index 0916099a8c4c..9a8bcf48aee2 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -961,7 +961,7 @@ namespace basegfx
 {
 if(fTools::lessOrEqual(fLineWidth, 0.0))
 {
-// no line witdh
+// no line width
 return;
 }
 
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 51dbb4872e51..a44e4935021f 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -240,7 +240,7 @@ public:
 bool IsDistortAllowed(bool bNoContortion=false) const;
 
 // Unite several objects to a polygon:
-// - rectangles/circles/text... are implicite converted.
+// - rectangles/circles/text... are implicitly converted.
 // - polygones are closed automatically
 // - attributes and layer are taken from the first object marked
 //   (thus from lowest Z-order).
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx 
b/reportdesign/source/core/api/ReportEngineJFree.cxx
index b58be52e5fa4..8b5f67f2968c 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -266,7 +266,7 @@ uno::Reference< frame::XModel > SAL_CALL 
OReportEngineJFree::createDocumentAlive
 uno::Reference< frame::XModel > OReportEngineJFree::createDocumentAlive( const 
uno::Reference< frame::XFrame >& _frame,bool _bHidden )
 {
 uno::Reference< frame::XModel > xModel;
-OUString sOutputName = getNewOutputName(); // starts implicite the report 
generator
+OUString sOutputName = getNewOutputName(); // starts implicitly the report 
generator
 if ( !sOutputName.isEmpty() )
 {
 ::osl::MutexGuard aGuard(m_aMutex);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 editeng/source/items/frmitems.cxx |8 +-
 sw/qa/extras/ooxmlexport/data/tdf112118.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|   72 ++
 sw/qa/extras/ww8export/data/tdf112118.doc |binary
 sw/qa/extras/ww8export/ww8export2.cxx |   68 
 sw/source/core/tox/ToxTabStopTokenHandler.cxx |4 -
 sw/source/filter/ww8/docxattributeoutput.cxx  |4 -
 sw/source/filter/ww8/ww8atr.cxx   |4 -
 sw/source/filter/ww8/ww8par6.cxx  |2 
 9 files changed, 108 insertions(+), 54 deletions(-)

New commits:
commit 784d8fceceb5378cfb7661c2f4294a0a22f0397c
Author: Mike Kaganski 
AuthorDate: Sat Mar 17 23:49:37 2018 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jul 20 12:15:18 2018 +0200

tdf#112118: use correct border when calculating margin

This is a longstanding (at least since 2000: already present in commit
7b0b5cdf) error where left border linespace was used when calculating
right margin. It was copypasted from ww8 import to ooxml code verbatim.
The problem only manifests itself when left and right border spacings
are not the same; and since we had other errors in the borders import,
that additional problem simply wasn't apparent.

Also use scaled border width in border distance/margin calculations.

Unit tests updated.

Change-Id: I70961e1bde29471def69e1ef944ba2779cffe307
Reviewed-on: https://gerrit.libreoffice.org/51474
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/57705
Tested-by: Mike Kaganski 
Reviewed-by: Jan Holesovsky 

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index ec08134ef2eb..3e311a3c8975 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -2679,10 +2679,10 @@ void BorderDistancesToWord(const SvxBoxItem& rBox, 
const WordPageMargins& rMargi
 const SvxBorderLine* pLnR = rBox.GetLine(SvxBoxItemLine::RIGHT);
 
 // We need to take border widths into account
-const long nWidthT = pLnT ? pLnT->GetWidth() : 0;
-const long nWidthL = pLnL ? pLnL->GetWidth() : 0;
-const long nWidthB = pLnB ? pLnB->GetWidth() : 0;
-const long nWidthR = pLnR ? pLnR->GetWidth() : 0;
+const long nWidthT = pLnT ? pLnT->GetScaledWidth() : 0;
+const long nWidthL = pLnL ? pLnL->GetScaledWidth() : 0;
+const long nWidthB = pLnB ? pLnB->GetScaledWidth() : 0;
+const long nWidthR = pLnR ? pLnR->GetScaledWidth() : 0;
 
 // Resulting distances from text to borders
 const sal_Int32 nT2BT = pLnT ? nT : 0;
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112118.docx 
b/sw/qa/extras/ooxmlexport/data/tdf112118.docx
index dc3e14ae82c7..3ddb06839492 100644
Binary files a/sw/qa/extras/ooxmlexport/data/tdf112118.docx and 
b/sw/qa/extras/ooxmlexport/data/tdf112118.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index fae9b0cbeff2..a00d8f4f546d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -256,33 +256,63 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
 {
+// The resulting left margin width (2081) differs from its DOC counterpart 
from ww8export2.cxx,
+// because DOCX import does two conversions between mm/100 and twips on 
the route, loosing one
+// twip on the road and arriving with a value that is 2 mm/100 less. I 
don't see an obvious way
+// to avoid that.
+struct {
+const char* styleName;
+struct {
+const char* sideName;
+sal_Int32 nMargin;
+sal_Int32 nBorderDistance;
+sal_Int32 nBorderWidth;
+} sideParams[4];
+} styleParams[] = {  // Margin (MS-style), border 
distance, border width
+{
+"Standard",
+{
+{ "Top", 496, 847, 159 },//  851 twip, 24 pt (from text), 
4.5 pt
+{ "Left", 2081, 706, 212 },  // 1701 twip, 20 pt (from text), 
6.0 pt
+{ "Bottom", 1401, 564, 35 }, // 1134 twip, 16 pt (from text), 
1.0 pt
+{ "Right", 3471, 423, 106 }  // 2268 twip, 12 pt (from text), 
3.0 pt
+}
+},
+{
+"Converted1",
+{
+{ "Top", 847, 496, 159 },//  851 twip, 24 pt (from edge), 
4.5 pt
+{ "Left", 706, 2081, 212 },  // 1701 twip, 20 pt (from edge), 
6.0 pt
+{ "Bottom", 564, 1401, 35 }, // 1134 twip, 16 pt (from edge), 
1.0 pt
+{ "Right", 423, 3471, 106 }  // 2268 twip, 12 pt (from edge), 
3.0 pt
+}
+}
+};
 auto xStyles = getStyles("PageStyles");
-auto testProc = [&](const OUString& sStyleName, sal_Int32 nMargin, 
sal_Int32 nBorderDi

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

2018-07-20 Thread Libreoffice Gerrit user
 sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt |binary
 sw/qa/extras/uiwriter/uiwriter.cxx   |   26 +++
 sw/source/core/tox/ToxTabStopTokenHandler.cxx|5 ++
 3 files changed, 31 insertions(+)

New commits:
commit aca48fbf7b7c33ebabf6f1e479959838693e2508
Author: Mike Kaganski 
AuthorDate: Fri Mar 16 11:22:41 2018 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jul 20 12:14:42 2018 +0200

tdf#116403: consider borders when updating right-aligned tab in index

Change-Id: I415d8fcfdd75e6d608ec2e3ba228146cf8139278
Reviewed-on: https://gerrit.libreoffice.org/51388
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 1f3630e2fb35389835cb326a46bd539660942632)
Reviewed-on: https://gerrit.libreoffice.org/57625
Tested-by: Mike Kaganski 
Reviewed-by: Jan Holesovsky 

diff --git a/sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt 
b/sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt
new file mode 100644
index ..c0fb91ad7eb3
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index a103ab5f52a8..4ea7de52b6a7 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -305,6 +305,7 @@ public:
 void testTdf108048();
 void testTdf115132();
 void testXDrawPagesSupplier();
+void testTdf116403();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -489,6 +490,7 @@ public:
 CPPUNIT_TEST(testTdf108048);
 CPPUNIT_TEST(testTdf115132);
 CPPUNIT_TEST(testXDrawPagesSupplier);
+CPPUNIT_TEST(testTdf116403);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -5940,6 +5942,30 @@ void SwUiWriterTest::testXDrawPagesSupplier()
 xDrawPage.get(), xDrawPageFromXDrawPages.get());
 }
 
+void SwUiWriterTest::testTdf116403()
+{
+createDoc("tdf116403-considerborders.odt");
+// Check that before ToX update, the tab stop position is the old one
+uno::Reference xParagraph = getParagraph(2, "1\t1");
+auto aTabs = getProperty>(xParagraph, 
"ParaTabStops");
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aTabs.getLength());
+CPPUNIT_ASSERT_EQUAL(static_cast(17000), aTabs[0].Position);
+
+SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+const SwTOXBase* pTOX = pWrtShell->GetTOX(0);
+CPPUNIT_ASSERT(pTOX);
+pWrtShell->UpdateTableOf(*pTOX);
+
+xParagraph = getParagraph(2, "1\t1");
+aTabs = getProperty>(xParagraph, 
"ParaTabStops");
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aTabs.getLength());
+// This was still 17000, refreshing ToX didn't take borders spacings and 
widths into account
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Page borders must be considered for 
right-aligned tabstop",
+static_cast(17000 - 2 * 500 - 2 * 1), aTabs[0].Position);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/tox/ToxTabStopTokenHandler.cxx 
b/sw/source/core/tox/ToxTabStopTokenHandler.cxx
index 6de76cb4f2c7..3fd3abb8abb1 100644
--- a/sw/source/core/tox/ToxTabStopTokenHandler.cxx
+++ b/sw/source/core/tox/ToxTabStopTokenHandler.cxx
@@ -93,6 +93,11 @@ 
DefaultToxTabStopTokenHandler::CalculatePageMarginFromPageDescription(const SwTe
 const SwFrameFormat& rPgDscFormat = pPageDesc->GetMaster();
 long result = rPgDscFormat.GetFrameSize().GetWidth() - 
rPgDscFormat.GetLRSpace().GetLeft()
 - rPgDscFormat.GetLRSpace().GetRight();
+// Also consider borders
+const SvxBoxItem& rBox = rPgDscFormat.GetBox();
+for (SvxBoxItemLine eLine : { SvxBoxItemLine::LEFT, SvxBoxItemLine::RIGHT 
})
+if (const editeng::SvxBorderLine* pBorder = rBox.GetLine(eLine))
+result -= pBorder->GetWidth() + rBox.GetDistance(eLine);
 return result;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - editeng/source include/editeng sw/qa sw/source writerfilter/source

2018-07-20 Thread Libreoffice Gerrit user
 editeng/source/items/frmitems.cxx|  125 +
 include/editeng/boxitem.hxx  |   30 ++
 sw/qa/extras/ooxmlexport/data/tdf112118.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx   |2 
 sw/qa/extras/ww8export/data/tdf112118.doc|binary
 sw/qa/extras/ww8export/ww8export2.cxx|   31 ++
 sw/source/filter/ww8/docxattributeoutput.cxx |  131 +++
 sw/source/filter/ww8/docxattributeoutput.hxx |   21 
 sw/source/filter/ww8/wrtw8sty.cxx|4 
 sw/source/filter/ww8/ww8atr.cxx  |   40 +---
 sw/source/filter/ww8/ww8attributeoutput.hxx  |6 +
 sw/source/filter/ww8/ww8par6.cxx |   81 
 writerfilter/source/dmapper/PropertyMap.cxx  |   34 +--
 13 files changed, 272 insertions(+), 233 deletions(-)

New commits:
commit ed6bcf7185cd2a650f304a065aa60114ac2d3fb7
Author: Mike Kaganski 
AuthorDate: Thu Mar 15 20:48:53 2018 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jul 20 12:13:51 2018 +0200

tdf#112118: DOC: properly import/export border distance

DOCX part was done in fb959e581c900b392efd0bb329b7cf30c8ed56a5.

This commit fixes DOC part. Line width wasn't taken into account on
import; and export was done only with "from text" distance, which
gave poor interoperability with Word, where the borders were close
to page edge.

The common code is moved to editeng/source/items/frmitems.cxx and
include/editeng/boxitem.hxx.

Change-Id: I3d1d1312cb9dc9a9e00d9847ec11234cd787df60
Reviewed-on: https://gerrit.libreoffice.org/51366
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/57704
Tested-by: Mike Kaganski 
Reviewed-by: Jan Holesovsky 

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index bb61ccaccc86..ec08134ef2eb 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -2610,6 +2610,131 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 return true;
 }
 
+
+namespace editeng
+{
+
+void BorderDistanceFromWord(bool bFromEdge, sal_Int32& nMargin, sal_Int32& 
nBorderDistance,
+sal_Int32 nBorderWidth)
+{
+// See 
https://wiki.openoffice.org/wiki/Writer/MSInteroperability/PageBorder
+
+sal_Int32 nNewMargin = nMargin;
+sal_Int32 nNewBorderDistance = nBorderDistance;
+
+if (bFromEdge)
+{
+nNewMargin = nBorderDistance;
+nNewBorderDistance = nMargin - nBorderDistance - nBorderWidth;
+}
+else
+{
+nNewMargin -= nBorderDistance + nBorderWidth;
+}
+
+// Ensure correct distance from page edge to text in cases not supported 
by us:
+// when border is outside entire page area (!bFromEdge && BorderDistance > 
Margin),
+// and when border is inside page body area (bFromEdge && BorderDistance > 
Margin)
+if (nNewMargin < 0)
+{
+nNewMargin = 0;
+nNewBorderDistance = std::max(nMargin - nBorderWidth, 0);
+}
+else if (nNewBorderDistance < 0)
+{
+nNewMargin = std::max(nMargin - nBorderWidth, 0);
+nNewBorderDistance = 0;
+}
+
+nMargin = nNewMargin;
+nBorderDistance = nNewBorderDistance;
+}
+
+// Heuristics to decide if we need to use "from edge" offset of borders
+//
+// There are two cases when we can safely use "from text" or "from edge" 
offset without distorting
+// border position (modulo rounding errors):
+// 1. When distance of all borders from text is no greater than 31 pt, we use 
"from text"
+// 2. Otherwise, if distance of all borders from edge is no greater than 31 
pt, we use "from edge"
+// In all other cases, the position of borders would be distirted on export, 
because Word doesn't
+// support the offset of >31 pts 
(https://msdn.microsoft.com/en-us/library/ff533820), and we need
+// to decide which type of offset would provide less wrong result (i.e., the 
result would look
+// closer to original). Here, we just check sum of distances from text to 
borders, and if it is
+// less than sum of distances from borders to edges. The alternative would be 
to compare total areas
+// between text-and-borders and between borders-and-edges (taking into account 
different lengths of
+// borders, and visual impact of that).
+void BorderDistancesToWord(const SvxBoxItem& rBox, const WordPageMargins& 
rMargins,
+WordBorderDistances& rDistances)
+{
+// Use signed sal_Int32 that can hold sal_uInt16, to prevent overflow at 
substraction below
+const sal_Int32 nT = rBox.GetDistance(SvxBoxItemLine::TOP);
+const sal_Int32 nL = rBox.GetDistance(SvxBoxItemLine::LEFT);
+const sal_Int32 nB = rBox.GetDistance(SvxBoxItemLine::BOTTOM);
+const sal_Int32 nR = rBox.GetDistance(SvxBoxItemLine::RIGHT);
+
+// Only take into account existing borders
+const SvxBorderLine* pLnT = rBox.GetLine(SvxBoxItemLine::TOP);
+

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

2018-07-20 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf112118.docx   |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |   32 
 sw/source/filter/ww8/docxattributeoutput.cxx   |  165 +
 sw/source/filter/ww8/docxattributeoutput.hxx   |   18 +-
 writerfilter/source/dmapper/DomainMapper.cxx   |1 
 writerfilter/source/dmapper/PageBordersHandler.cxx |   16 +-
 writerfilter/source/dmapper/PageBordersHandler.hxx |8 -
 writerfilter/source/dmapper/PropertyMap.cxx|   73 +
 writerfilter/source/dmapper/PropertyMap.hxx|   23 ++
 9 files changed, 226 insertions(+), 110 deletions(-)

New commits:
commit 0f3ba021f7a9072306beec3d279179f4bae35afc
Author: Mike Kaganski 
AuthorDate: Wed Mar 14 10:18:15 2018 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jul 20 12:13:14 2018 +0200

tdf#112118: DOCX: properly import/export border distance

https://wiki.openoffice.org/wiki/Writer/MSInteroperability/PageBorder
discusses implementation differences between ODF model and MS formats
wrt dealing with page margins and distances to borders.

This patch corrects import from DOCX, so that the border distance and
width doesn't add to the margin size imported from file anymore. It
takes care to preserve size from page edge to text (the most important
size that affects document layout). When borders go outside of range
valid for ODF, the margin is set to keep text area intact, and the
border is placed as close to intended position as possible.

Export code now also properly handles border width. Also, an improved
heuristic implemented to better export cases unsupported by Word, so
that the result would look closer to ODF original. We still write
correct sizes to OOXML, so that when reopened by LO, the borders will
be in correct places; but as Word cannot handle sizes more than 31 pt,
it will show borders shifted.

This prevents from adding border widths and distances to page margins
at each opening of DOCX, saving back the changed value, increasing
the margins each time.

This also backports commit 6d20aeeda8a346ac10782d44214a89878fd00c40

Change-Id: Ia978ab119dd661949d6c321aea91397f28d205b0
Reviewed-on: https://gerrit.libreoffice.org/51267
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/57703
Tested-by: Mike Kaganski 
Reviewed-by: Jan Holesovsky 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf112118.docx 
b/sw/qa/extras/ooxmlexport/data/tdf112118.docx
new file mode 100644
index ..87081d8c6dd9
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf112118.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index ace8af95abc8..406bafb58c57 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -253,6 +254,37 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("D1"), xCell->getString());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf112118, "tdf112118.docx")
+{
+auto xStyles = getStyles("PageStyles");
+auto testProc = [&](const OUString& sStyleName, sal_Int32 nMargin, 
sal_Int32 nBorderDistance,
+sal_Int16 nBorderWidth)
+{
+typedef std::initializer_list StringList;
+uno::Reference 
xStyle(xStyles->getByName(sStyleName), uno::UNO_QUERY_THROW);
+for (const auto& side : StringList{ "Top", "Left", "Bottom", "Right" })
+{
+table::BorderLine aBorder = getProperty(xStyle, 
side + "Border");
+CPPUNIT_ASSERT_EQUAL(sal_Int16(nBorderWidth), 
aBorder.OuterLineWidth);
+CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aBorder.InnerLineWidth);
+CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aBorder.LineDistance);
+
+sal_Int32 nMarginActual = getProperty(xStyle, side + 
"Margin");
+CPPUNIT_ASSERT_EQUAL(nMargin, nMarginActual);
+
+sal_Int32 nBorderDistanceActual = getProperty(xStyle, 
side + "BorderDistance");
+CPPUNIT_ASSERT_EQUAL(nBorderDistance, nBorderDistanceActual);
+}
+};
+
+// For both styles used in document, the total distance from page edge to 
text must be 2.54 cm.
+// The first style uses "from edge" border distance; the second uses "from 
text" border distance
+// Border distances in both cases are 24 pt = 847 mm100; line widths are 6 
pt = 212 mm100.
+// 1482 + 847 + 212 = 2541
+testProc("Standard", 847, 1482, 212);
+testProc("Converted1", 1482, 847, 212);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b569bc25b5c3..e3419a539a5e 100644

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - chart2/inc chart2/qa chart2/source offapi/com offapi/UnoApi_offapi.mk oox/inc oox/source sd/qa

2018-07-20 Thread Libreoffice Gerrit user
 chart2/inc/unonames.hxx  |1 
 chart2/qa/extras/chart2export.cxx|  159 +++
 chart2/qa/extras/chart2import.cxx|  153 ++
 chart2/qa/extras/data/pptx/tdf115107-2.pptx  |binary
 chart2/qa/extras/data/pptx/tdf115107.pptx|binary
 chart2/source/chartcore.component|1 
 chart2/source/model/main/DataPointProperties.cxx |   10 
 chart2/source/model/main/DataPointProperties.hxx |3 
 chart2/source/model/main/FormattedString.cxx |   40 ++
 chart2/source/model/main/FormattedString.hxx |   16 +
 chart2/source/view/charttypes/VSeriesPlotter.cxx |  126 +++-
 chart2/source/view/inc/AbstractShapeFactory.hxx  |7 
 chart2/source/view/inc/OpenglShapeFactory.hxx|7 
 chart2/source/view/inc/ShapeFactory.hxx  |7 
 chart2/source/view/inc/VSeriesPlotter.hxx|2 
 chart2/source/view/main/OpenglShapeFactory.cxx   |   12 
 chart2/source/view/main/ShapeFactory.cxx |   94 ++
 offapi/UnoApi_offapi.mk  |3 
 offapi/com/sun/star/chart2/DataPointCustomLabelField.idl |   26 +
 offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl |   33 ++
 offapi/com/sun/star/chart2/DataPointProperties.idl   |8 
 offapi/com/sun/star/chart2/XDataPointCustomLabelField.idl|   43 ++
 oox/inc/drawingml/textfield.hxx  |2 
 oox/source/drawingml/chart/seriesconverter.cxx   |   78 +
 oox/source/export/chartexport.cxx|  107 +++
 oox/source/token/properties.txt  |1 
 sd/qa/unit/import-tests.cxx  |4 
 27 files changed, 919 insertions(+), 24 deletions(-)

New commits:
commit 4807f573336dddfecd9b44b515aefa39ab26aa23
Author: Szymon Kłos 
AuthorDate: Mon Feb 12 20:39:14 2018 +0100
Commit: Jan Holesovsky 
CommitDate: Fri Jul 20 12:10:40 2018 +0200

tdf#114821 import/export/place complex data labels in charts

Change-Id: Ia44abcebb4febcabb1704aef85e396730ac2cd6f
Reviewed-on: https://gerrit.libreoffice.org/57530
Tested-by: Szymon Kłos 
Reviewed-by: Jan Holesovsky 

diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
index 867a155e14aa..44c3bf67d3cb 100644
--- a/chart2/inc/unonames.hxx
+++ b/chart2/inc/unonames.hxx
@@ -29,6 +29,7 @@
 #define CHART_UNONAME_LABEL_BORDER_DASH "LabelBorderDash"
 #define CHART_UNONAME_LABEL_BORDER_DASHNAME "LabelBorderDashName"
 #define CHART_UNONAME_LABEL_BORDER_TRANS"LabelBorderTransparency"
+#define CHART_UNONAME_CUSTOM_LABEL_FIELDS   "CustomLabelFields"
 
 #endif
 
diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
old mode 100644
new mode 100755
index 9b9e75c868c2..f7427b76e9b1
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -13,6 +13,8 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -103,6 +105,8 @@ public:
 void testAxisCrossBetweenXSLX();
 void testNumberFormatExportPPTX();
 void testTdf116163();
+void testCustomDataLabel();
+void testCustomDataLabelMultipleSeries();
 
 CPPUNIT_TEST_SUITE(Chart2ExportTest);
 CPPUNIT_TEST(testErrorBarXLSX);
@@ -170,6 +174,8 @@ public:
 CPPUNIT_TEST(testAxisCrossBetweenXSLX);
 CPPUNIT_TEST(testNumberFormatExportPPTX);
 CPPUNIT_TEST(testTdf116163);
+CPPUNIT_TEST(testCustomDataLabel);
+CPPUNIT_TEST(testCustomDataLabelMultipleSeries);
 CPPUNIT_TEST_SUITE_END();
 
 protected:
@@ -1584,6 +1590,159 @@ void Chart2ExportTest::testTdf116163()
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot", "-540");
 }
 
+void Chart2ExportTest::testCustomDataLabel()
+{
+load("/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
+xmlDocPtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 
2007 XML");
+CPPUNIT_ASSERT(pXmlDoc);
+
+Reference xChartDoc(getChartDocFromDrawImpress(0, 
0), uno::UNO_QUERY);
+CPPUNIT_ASSERT(xChartDoc.is());
+
+uno::Reference 
xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
+CPPUNIT_ASSERT(xDataSeries.is());
+float nFontSize;
+sal_Int64 nFontColor;
+sal_Int32 nCharUnderline;
+uno::Reference xPropertySet;
+uno::Sequence> aFields;
+
+// 1
+xPropertySet.set(xDataSeries->getDataPointByIndex(0), 
uno::UNO_QUERY_THROW);
+xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+CPPUNIT_ASSERT_EQUAL(static_cast(2), aFields.getLength());
+
+
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
 aFields[0]->getFieldType());
+CPPUNIT_ASSERT_EQUAL(OUString("90.0 

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

2018-07-20 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit a32d9ec1fa48296ffba713bc4593cad45a1c83ad
Author: Caolán McNamara 
AuthorDate: Thu Jul 19 12:20:47 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jul 20 11:54:11 2018 +0200

tdf#118304 reselect current glyph on changing font

preview glyph will rerender the glyph if its there, or the glyph description
changes to "missing glyph" if its not there anymore. Don't auto select
first entry of the subset when font changes, leave it as unselected and
let the glyph determine what's ends up there

Change-Id: I33d7dd3a071100175ac9bc7c7e9d44684a1aff28
Reviewed-on: https://gerrit.libreoffice.org/57724
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit e8bf2cb72dbe55f4e9ac7ace48e644a934cfc503)
Reviewed-on: https://gerrit.libreoffice.org/57764
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index d65ec3fe1926..7837e6fa6f5d 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -471,6 +471,8 @@ void SvxCharacterMap::init()
 else if (m_xFontLB->get_count() )
 m_xFontLB->set_active(0);
 FontSelectHdl(*m_xFontLB);
+if (m_xSubsetLB->get_count())
+m_xSubsetLB->set_active(0);
 
 m_xFontLB->connect_changed(LINK( this, SvxCharacterMap, FontSelectHdl));
 m_xSubsetLB->connect_changed(LINK( this, SvxCharacterMap, 
SubsetSelectHdl));
@@ -603,6 +605,8 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont )
 m_xFontLB->set_active_text(aTmp.GetFamilyName());
 aFont = aTmp;
 FontSelectHdl(*m_xFontLB);
+if (m_xSubsetLB->get_count())
+m_xSubsetLB->set_active(0);
 }
 
 void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& rListBox)
@@ -680,14 +684,10 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 pSubsetMap = new SubsetMap( xFontCharMap );
 
 // update subset listbox for new font's unicode subsets
-bool bFirst = true;
 for (auto const& subset : pSubsetMap->GetSubsetMap())
 {
 
m_xSubsetLB->append(OUString::number(reinterpret_cast(&subset)), 
subset.GetName());
 // NOTE: subset must live at least as long as the selected font
-if (bFirst)
-m_xSubsetLB->set_active(0);
-bFirst = false;
 }
 
 if (m_xSubsetLB->get_count() <= 1)
@@ -696,6 +696,9 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 
 m_xSubsetText->set_sensitive(bNeedSubset);
 m_xSubsetLB->set_sensitive(bNeedSubset);
+
+// tdf#118304 reselect current glyph to see if its still there in new font
+selectCharByCode(Radix::hexadecimal);
 }
 
 void SvxCharacterMap::toggleSearchView(bool state)
@@ -999,14 +1002,11 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, 
SvxShowCharSet*, void)
 m_xSubsetLB->set_active(-1);
 }
 
-if(m_xShowSet->HasFocus() || m_xHexCodeText->has_focus() || 
m_xDecimalCodeText->has_focus() )
-{
-m_aShowChar.SetText( aText );
-m_aShowChar.SetFont( aFont );
-m_aShowChar.Invalidate();
+m_aShowChar.SetText( aText );
+m_aShowChar.SetFont( aFont );
+m_aShowChar.Invalidate();
 
-setFavButtonState(aText, aFont.GetFamilyName());
-}
+setFavButtonState(aText, aFont.GetFamilyName());
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, SvxShowCharSet*, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |   17 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx  |   59 +++--
 3 files changed, 57 insertions(+), 19 deletions(-)

New commits:
commit eab67995d7056682c250efa3c903b1fffd812700
Author: Justin Luth 
AuthorDate: Thu Jul 19 19:20:26 2018 +0300
Commit: László Németh 
CommitDate: Fri Jul 20 10:44:15 2018 +0200

tdf#118521 DOCX import: style sets unset left/right/hanging margin

followup to commit 480ac84f2f5049fb4337b36f12fd6796e005761b which
nicely paved the way by doing this for top/bottom.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx 
b/sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx
new file mode 100644
index ..66170ede470c
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index bc9e3f7f3328..3246fe5eec4d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -464,6 +464,23 @@ DECLARE_OOXMLEXPORT_TEST(testMarginsFromStyle, 
"margins_from_style.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(600), 
getProperty(getParagraph(3), "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
+// lost the other unset margins coming from paragraph style, getting a bad 
margin from the default style instead
+
+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, "ParaLeftMargin");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nMargin);
+// from direct formatting
+CPPUNIT_ASSERT_EQUAL(nMargin, getProperty(getParagraph(1), 
"ParaLeftMargin"));
+
+nMargin = getProperty(xMyStyle, "ParaRightMargin");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1900), nMargin);
+CPPUNIT_ASSERT_EQUAL(nMargin, getProperty(getParagraph(2), 
"ParaRightMargin"));
+}
+
 DECLARE_OOXMLIMPORT_TEST(testTdf104797, "tdf104797.docx")
 {
 // check moveFrom and moveTo
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a1fde6baae1b..2939902f03ca 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1122,16 +1122,16 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
 TagLogger::getInstance().attribute("isTextAppend", 
sal_uInt32(xTextAppend.is()));
 #endif
 
+const StyleSheetEntryPtr pEntry = 
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( 
GetCurrentParaStyleName() );
+OSL_ENSURE( pEntry.get(), "no style sheet found" );
+const StyleSheetPropertyMap* pStyleSheetProperties = dynamic_cast(pEntry ? pEntry->pProperties.get() : nullptr);
 //apply numbering to paragraph if it was set at the style, but only if the 
paragraph itself
 //does not specify the numbering
-if( pParaContext && !pParaContext->isSet(PROP_NUMBERING_RULES) )
+if ( pStyleSheetProperties && pParaContext && 
!pParaContext->isSet(PROP_NUMBERING_RULES) )
 {
-const StyleSheetEntryPtr pEntry = 
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( 
GetCurrentParaStyleName() );
-OSL_ENSURE( pEntry.get(), "no style sheet found" );
-const StyleSheetPropertyMap* pStyleSheetProperties = 
dynamic_cast(pEntry ? pEntry->pProperties.get() : 
nullptr);
 
 sal_Int32 nListId = pEntry ? lcl_getListId(pEntry, 
GetStyleSheetTable()) : -1;
-if( pStyleSheetProperties && nListId >= 0 )
+if ( nListId >= 0 )
 {
 pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny( 
ListDef::GetStyleName( nListId ) ), false);
 
@@ -1169,7 +1169,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
 }
 }
 
-if( pStyleSheetProperties && pStyleSheetProperties->GetListLevel() >= 
0 )
+if ( pStyleSheetProperties->GetListLevel() >= 0 )
 pParaContext->Insert( PROP_NUMBERING_LEVEL, 
uno::makeAny(pStyleSheetProperties->GetListLevel()), false);
 }
 
@@ -1418,28 +1418,49 @@ 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 format

[Libreoffice-commits] core.git: configure.ac

2018-07-20 Thread Libreoffice Gerrit user
 configure.ac |   33 ++---
 1 file changed, 6 insertions(+), 27 deletions(-)

New commits:
commit 9b8c8c70fa8116f606ce0ebacdaad04ed9402c9f
Author: Aron Budea 
AuthorDate: Tue Jul 17 11:30:22 2018 +0200
Commit: Mike Kaganski 
CommitDate: Fri Jul 20 10:40:20 2018 +0200

Don't search for old (<= 2.0) .NET SDK anymore

Try to find >= 4.6 .NET SDK first.

+allow .NET SDK 4.7.2.

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

diff --git a/configure.ac b/configure.ac
index 7308d31faebd..d418e54d0d2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5180,7 +5180,7 @@ find_al()
 done
 
 # We need this additional check to detect 4.6.1 or above.
-for ver in 4.7.1 4.7 4.6.2 4.6.1; do
+for ver in 4.7.2 4.7.1 4.7 4.6.2 4.6.1; do
 reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft 
SDKs/NETFXSDK/$ver/WinSDK-NetFx40Tools/InstallationFolder"
 if test -n "$regvalue" -a \( -f "$regvalue/al.exe" -o -f 
"$regvalue/bin/al.exe" \); then
 altest=$regvalue
@@ -5195,26 +5195,11 @@ find_al()
 done
 }
 
-find_dotnetsdk()
-{
-# Return value: $frametest (that's a silly name...)
-
-unset frametest
-
-for ver in 1.1 2.0; do
-reg_get_value_32 
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/sdkInstallRootv$ver
-if test -n "$regvalue"; then
-frametest=$regvalue
-return
-fi
-done
-}
-
 find_dotnetsdk46()
 {
 unset frametest
 
-for ver in 4.7.1 4.7 4.6.2 4.6.1 4.6; do
+for ver in 4.7.2 4.7.1 4.7 4.6.2 4.6.1 4.6; do
 reg_get_value_64 
"HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/Microsoft 
SDKs/NETFXSDK/$ver/KitsInstallationFolder"
 if test -n "$regvalue"; then
 frametest=$regvalue
@@ -5591,23 +5576,17 @@ if test "$build_os" = "cygwin"; then
 
 dnl Check mscoree.lib / .NET Framework dir
 AC_MSG_CHECKING(.NET Framework)
-find_dotnetsdk
-if test -f "$frametest/lib/mscoree.lib"; then
+find_dotnetsdk46
+PathFormat "$frametest"
+frametest="$formatted_path"
+if test -f "$frametest/Lib/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
 DOTNET_FRAMEWORK_HOME="$frametest"
 else
 find_winsdk
 if test -f "$winsdktest/lib/mscoree.lib" -o -f 
"$winsdktest/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
 DOTNET_FRAMEWORK_HOME="$winsdktest"
-else
-find_dotnetsdk46
-PathFormat "$frametest"
-frametest="$formatted_path"
-if test -f "$frametest/Lib/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
- DOTNET_FRAMEWORK_HOME="$frametest"
-fi
 fi
 fi
-
 if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib" -a ! -f 
"$DOTNET_FRAMEWORK_HOME/lib/$winsdklibsubdir/um/$WINDOWS_SDK_ARCH/mscoree.lib" 
-a ! -f "$DOTNET_FRAMEWORK_HOME/Lib/um/$WINDOWS_SDK_ARCH/mscoree.lib"; then
 AC_MSG_ERROR([mscoree.lib not found])
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/CppunitTest_sw_uiwriter.mk   |1 
 sw/qa/extras/uiwriter/data2/tdf101534.fodt  |   28 +++
 sw/qa/extras/uiwriter/uiwriter2.cxx |   60 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |4 -
 4 files changed, 92 insertions(+), 1 deletion(-)

New commits:
commit 507e891c4ee889a6218fbf56ea535d0a8f3901ce
Author: Miklos Vajna 
AuthorDate: Thu Jul 19 15:32:59 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 10:34:52 2018 +0200

tdf#101534 sw: fix lost indent attributes when copying into numbered 
paragraph

Commit aa91dc0ccbe53ffcec9dbfec2265de057775d4e3 (CWS-TOOLING: integrate
CWS sw32numbf01, 2009-09-08) replaced the SwDoc::ReplaceNumRule() call
with SwDoc::SetNumRule(), as the later handles list ids. This required a
decision if resetting of the indent attributes is needed or not, but it
did not document why resetting was chosen.

On the other hand, the current bugdoc shows why resetting is a bad idea:
this way if you paste into a numbered paragraph which has a non-zero
paragraph indent inherited from the numbering + zero indent as direct
formatting, then this later is lost during paste.

(cherry picked from commit 340eaa6aa15c18cc2696a4a304350810cb36565c)

Change-Id: Ie5dcf6ed86c240fd61c4d5bfed886910aea3648f
Reviewed-on: https://gerrit.libreoffice.org/57766
Reviewed-by: Mike Kaganski 
Tested-by: Miklos Vajna 

diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk
index 15d1b4b6cc25..8961655452c8 100644
--- a/sw/CppunitTest_sw_uiwriter.mk
+++ b/sw/CppunitTest_sw_uiwriter.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,sw_uiwriter))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_uiwriter, \
 sw/qa/extras/uiwriter/uiwriter \
+sw/qa/extras/uiwriter/uiwriter2 \
 ))
 
 # note: this links msword only for the reason to have a order dependency,
diff --git a/sw/qa/extras/uiwriter/data2/tdf101534.fodt 
b/sw/qa/extras/uiwriter/data2/tdf101534.fodt
new file mode 100644
index ..e1db2f08ee08
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf101534.fodt
@@ -0,0 +1,28 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+  
+
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  Lorem ipsum dolor sit amet.
+  
+
+  Quo dolor dolore ea, vis te dicunt 
evertitur. Quo idque nostrud referrentur at, saperet volumus sententiae ut 
pro.
+
+  
+
+  
+
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
new file mode 100644
index ..239700294b71
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+namespace
+{

[Libreoffice-commits] online.git: tools/Tool.cpp

2018-07-20 Thread Libreoffice Gerrit user
 tools/Tool.cpp |2 --
 1 file changed, 2 deletions(-)

New commits:
commit ec008efd73d017267e2948f33b038f8f106ec0f1
Author: Miklos Vajna 
AuthorDate: Fri Jul 20 10:23:48 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 10:23:48 2018 +0200

tools: remove unused Poco::Util::Option include / using decl

diff --git a/tools/Tool.cpp b/tools/Tool.cpp
index ba89e4463..a36ead2e2 100644
--- a/tools/Tool.cpp
+++ b/tools/Tool.cpp
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -67,7 +66,6 @@ using Poco::Runnable;
 using Poco::Thread;
 using Poco::URI;
 using Poco::Util::Application;
-using Poco::Util::Option;
 using Poco::Util::OptionSet;
 
 /// Thread class which performs the conversion.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 writerfilter/source/rtftok/rtfreferenceproperties.cxx  |2 +-
 writerfilter/source/rtftok/rtfreferenceproperties.hxx  |2 +-
 writerfilter/source/rtftok/rtfreferencetable.hxx   |2 +-
 writerfilter/source/rtftok/rtfsprm.cxx |2 +-
 writerfilter/source/rtftok/rtfvalue.cxx|6 +++---
 writerfilter/source/rtftok/rtfvalue.hxx|6 +++---
 xmlsecurity/inc/documentsignaturemanager.hxx   |4 ++--
 xmlsecurity/source/helper/documentsignaturemanager.cxx |4 ++--
 8 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit b6e3cad985252d8ce30ca9aa4c7553646c7ad1a5
Author: Miklos Vajna 
AuthorDate: Fri Jul 20 09:06:10 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 20 10:00:34 2018 +0200

writerfilter, xmlsecurity: various small cleanups

That call in the RTFSprms copy ctor to the parent non-copy ctor was a
bit odd.

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

diff --git a/writerfilter/source/rtftok/rtfreferenceproperties.cxx 
b/writerfilter/source/rtftok/rtfreferenceproperties.cxx
index fed8d2263990..dcb16e4fa53a 100644
--- a/writerfilter/source/rtftok/rtfreferenceproperties.cxx
+++ b/writerfilter/source/rtftok/rtfreferenceproperties.cxx
@@ -29,7 +29,7 @@ RTFReferenceProperties::~RTFReferenceProperties() = default;
 void RTFReferenceProperties::resolve(Properties& rHandler)
 {
 for (auto& rAttribute : m_aAttributes)
-rHandler.attribute(rAttribute.first, *rAttribute.second.get());
+rHandler.attribute(rAttribute.first, *rAttribute.second);
 for (auto& rSprm : m_aSprms)
 {
 RTFSprm aSprm(rSprm.first, rSprm.second);
diff --git a/writerfilter/source/rtftok/rtfreferenceproperties.hxx 
b/writerfilter/source/rtftok/rtfreferenceproperties.hxx
index b4cc0a26c02d..1c57aeaf80a9 100644
--- a/writerfilter/source/rtftok/rtfreferenceproperties.hxx
+++ b/writerfilter/source/rtftok/rtfreferenceproperties.hxx
@@ -22,7 +22,7 @@ class RTFReferenceProperties : public 
writerfilter::Reference
 public:
 RTFReferenceProperties(const RTFSprms& rAttributes, const RTFSprms& 
rSprms);
 explicit RTFReferenceProperties(const RTFSprms& rAttributes);
-virtual ~RTFReferenceProperties() override;
+~RTFReferenceProperties() override;
 void resolve(Properties& rHandler) override;
 RTFSprms& getAttributes() { return m_aAttributes; }
 RTFSprms& getSprms() { return m_aSprms; }
diff --git a/writerfilter/source/rtftok/rtfreferencetable.hxx 
b/writerfilter/source/rtftok/rtfreferencetable.hxx
index 58e57e3ea99d..8c9595493373 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.hxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.hxx
@@ -24,7 +24,7 @@ public:
 using Entries_t = std::map::Pointer_t>;
 using Entry_t = std::pair::Pointer_t>;
 explicit RTFReferenceTable(Entries_t aEntries);
-virtual ~RTFReferenceTable() override;
+~RTFReferenceTable() override;
 void resolve(Table& rHandler) override;
 
 private:
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx 
b/writerfilter/source/rtftok/rtfsprm.cxx
index 94acac0d1f25..45c6e351ed5f 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -373,7 +373,7 @@ RTFSprms::RTFSprms()
 RTFSprms::~RTFSprms() = default;
 
 RTFSprms::RTFSprms(const RTFSprms& rSprms)
-: SvRefBase()
+: SvRefBase(rSprms)
 {
 *this = rSprms;
 }
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx 
b/writerfilter/source/rtftok/rtfvalue.cxx
index f637cc2712a5..8685c9d238a3 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -17,7 +17,7 @@ namespace writerfilter
 {
 namespace rtftok
 {
-RTFValue::RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms 
rSprms,
+RTFValue::RTFValue(int nValue, OUString sValue, const RTFSprms& rAttributes, 
const RTFSprms& rSprms,
uno::Reference xShape, 
uno::Reference xStream,
uno::Reference xObject, bool 
bForceString,
const RTFShape& aShape, const RTFPicture& rPicture)
@@ -61,7 +61,7 @@ RTFValue::RTFValue(OUString sValue, bool bForce)
 {
 }
 
-RTFValue::RTFValue(RTFSprms rAttributes)
+RTFValue::RTFValue(const RTFSprms& rAttributes)
 : m_pAttributes(new RTFSprms(rAttributes))
 , m_pSprms(new RTFSprms())
 , m_pShape(new RTFShape())
@@ -69,7 +69,7 @@ RTFValue::RTFValue(RTFSprms rAttributes)
 {
 }
 
-RTFValue::RTFValue(RTFSprms rAttributes, RTFSprms rSprms)
+RTFValue::RTFValue(const RTFSprms& rAttributes, const RTFSprms& rSprms)
 : m_pAttributes(new RTFSprms(rAttributes))
 , m_pSprms(new RTFSprms(rSprms))
 , m_pShape(new RTFShape())
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx 
b/writerfilter/source/rtftok/rtfvalue.hxx
index a775c795a716..4913162aea81 100644
--- a/writerfi

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

2018-07-20 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unostyle.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a1dafed34690e76b0d6c1b45ce1a5f3d26f63344
Author: Andrea Gelmini 
AuthorDate: Thu Jul 19 18:15:40 2018 +0200
Commit: Julien Nabet 
CommitDate: Fri Jul 20 09:22:52 2018 +0200

Fix typo

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

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 1f341cad9b35..769de1c04af6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -5364,7 +5364,7 @@ css::uno::Sequence SAL_CALL 
SwXTextCellStyle::getProp
 pStates[i] = aAny1 == aAny2 ? 
beans::PropertyState_DEFAULT_VALUE : beans::PropertyState_DIRECT_VALUE;
 break;
 default:
-// falltrough to DIRECT_VALUE, to export properties for 
which getPropertyStates is not implemented
+// fallthrough to DIRECT_VALUE, to export properties for 
which getPropertyStates is not implemented
 pStates[i] = beans::PropertyState_DIRECT_VALUE;
 SAL_WARN("sw.uno", "SwXTextCellStyle getPropertyStates 
unknown nWID");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/source/filter/html/svxcss1.cxx |   12 ++--
 sw/source/filter/html/svxcss1.hxx |4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit bb718c9e00bb4e3c1ab9dded4434ea58fdac00c6
Author: Noel Grandin 
AuthorDate: Thu Jul 19 13:22:03 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 09:00:21 2018 +0200

loplugin:useuniqueptr in SvxCSS1Parser

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

diff --git a/sw/source/filter/html/svxcss1.cxx 
b/sw/source/filter/html/svxcss1.cxx
index a46aba97c2cc..c7b832b540e1 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -769,14 +769,14 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const 
OUString& rBaseURL,
 if( pWhichIds && nWhichIds )
 BuildWhichTable( aWhichMap, pWhichIds, nWhichIds );
 
-pSheetItemSet = new SfxItemSet( rPool, &aWhichMap[0] );
-pSheetPropInfo = new SvxCSS1PropertyInfo;
+pSheetItemSet.reset( new SfxItemSet( rPool, &aWhichMap[0] ) );
+pSheetPropInfo.reset( new SvxCSS1PropertyInfo );
 }
 
 SvxCSS1Parser::~SvxCSS1Parser()
 {
-delete pSheetItemSet;
-delete pSheetPropInfo;
+pSheetItemSet.reset();
+pSheetPropInfo.reset();
 }
 
 void SvxCSS1Parser::InsertId( const OUString& rId,
@@ -841,8 +841,8 @@ SvxCSS1MapEntry* SvxCSS1Parser::GetTag( const OUString& 
rTag )
 
 bool SvxCSS1Parser::ParseStyleSheet( const OUString& rIn )
 {
-pItemSet = pSheetItemSet;
-pPropInfo = pSheetPropInfo;
+pItemSet = pSheetItemSet.get();
+pPropInfo = pSheetPropInfo.get();
 
 bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
 
diff --git a/sw/source/filter/html/svxcss1.hxx 
b/sw/source/filter/html/svxcss1.hxx
index 516887c54521..c5b6b68af433 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -192,10 +192,10 @@ class SvxCSS1Parser : public CSS1Parser
 
 OUString sBaseURL;
 
-SfxItemSet *pSheetItemSet;  // item set of Style-Sheet
+std::unique_ptr pSheetItemSet;  // item set of Style-Sheet
 SfxItemSet *pItemSet;   // current item set
 
-SvxCSS1PropertyInfo *pSheetPropInfo;
+std::unique_ptr pSheetPropInfo;
 SvxCSS1PropertyInfo *pPropInfo;
 
 sal_uInt16 nMinFixLineSpace;// minimum spacing for fixed line spacing
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sw/source/filter/html/swhtml.cxx |   10 +-
 sw/source/filter/html/swhtml.hxx |6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit af3a976ab355b8e67f91a6223427bf967fdaefff
Author: Noel Grandin 
AuthorDate: Thu Jul 19 13:33:27 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 09:00:36 2018 +0200

loplugin:useuniqueptr in SwHTMLParser

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

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index e6368cf07c40..f8543d6f601c 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -354,7 +354,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, 
SvStream& rIn,
 m_bOldIsHTMLMode = 
m_xDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE);
 m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, 
true);
 
-m_pCSS1Parser = new SwCSS1Parser( m_xDoc.get(), m_aFontHeights, 
m_sBaseURL, IsNewDoc() );
+m_pCSS1Parser.reset( new SwCSS1Parser( m_xDoc.get(), m_aFontHeights, 
m_sBaseURL, IsNewDoc() ) );
 m_pCSS1Parser->SetIgnoreFontFamily( rHtmlOptions.IsIgnoreFontFamily() );
 
 if( bReadUTF8 )
@@ -473,13 +473,13 @@ SwHTMLParser::~SwHTMLParser()
 m_aSetAttrTab.clear();
 }
 
-delete m_pCSS1Parser;
-delete m_pNumRuleInfo;
+m_pCSS1Parser.reset();
+m_pNumRuleInfo.reset();
 DeleteFormImpl();
 DeleteFootEndNoteImpl();
 
 OSL_ENSURE(!m_xTable.get(), "It exists still a open table");
-delete m_pImageMaps;
+m_pImageMaps.reset();
 
 OSL_ENSURE( !m_pPendStack,
 "SwHTMLParser::~SwHTMLParser: Here should not be Pending-Stack 
anymore" );
@@ -2033,7 +2033,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
 if( ParseMapOptions( m_pImageMap) )
 {
 if (!m_pImageMaps)
-m_pImageMaps = new ImageMaps;
+m_pImageMaps.reset( new ImageMaps );
 m_pImageMaps->push_back(std::unique_ptr(m_pImageMap));
 }
 else
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index e6d927c96768..c8d5d32c3ccc 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -370,8 +370,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 
 std::unique_ptr m_pAppletImpl; // current applet
 
-SwCSS1Parser*m_pCSS1Parser;   // Style-Sheet-Parser
-SwHTMLNumRuleInfo *m_pNumRuleInfo;
+std::unique_ptr m_pCSS1Parser;   // Style-Sheet-Parser
+std::unique_ptr m_pNumRuleInfo;
 SwPendingStack  *m_pPendStack;
 
 rtl::Reference m_xDoc;
@@ -385,7 +385,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 SdrObject   *m_pMarquee;// current marquee
 std::unique_ptr m_xField; // current field
 ImageMap*m_pImageMap;   // current image map
-ImageMaps   *m_pImageMaps;  ///< all Image-Maps that have been read
+std::unique_ptr m_pImageMaps;  ///< all Image-Maps that have 
been read
 std::unique_ptr m_pFootEndNoteImpl;
 
 Sizem_aHTMLPageSize;  // page size of HTML template
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 sc/source/ui/inc/tpusrlst.hxx|2 +-
 sc/source/ui/optdlg/tpusrlst.cxx |9 -
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit a0f0863dc7d251f6112d59c34e8851ee41ba47d8
Author: Noel Grandin 
AuthorDate: Thu Jul 19 12:07:32 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 08:59:26 2018 +0200

loplugin:useuniqueptr in ScTpUserLists

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

diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 6e84d2e442f8..bd1c690b1019 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -71,7 +71,7 @@ private:
 const OUString  aStrCopyErr;
 
 const sal_uInt16nWhichUserLists;
-ScUserList* pUserLists;
+std::unique_ptr pUserLists;
 
 ScDocument* pDoc;
 ScViewData* pViewData;
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 5f7734c483f6..6b13e971cc1b 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -53,7 +53,6 @@ ScTpUserLists::ScTpUserLists( vcl::Window*   
pParent,
 aStrCopyFrom( ScResId( STR_COPYFROM ) ),
 aStrCopyErr ( ScResId( STR_COPYERR ) ),
 nWhichUserLists ( GetWhich( SID_SCUSERLISTS ) ),
-pUserLists  ( nullptr ),
 pDoc( nullptr ),
 pViewData   ( nullptr ),
 bModifyMode ( false ),
@@ -86,7 +85,7 @@ ScTpUserLists::~ScTpUserLists()
 
 void ScTpUserLists::dispose()
 {
-delete pUserLists;
+pUserLists.reset();
 mpFtLists.clear();
 mpLbLists.clear();
 mpFtEntries.clear();
@@ -165,7 +164,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
 if ( pCoreList )
 {
 if ( !pUserLists )
-pUserLists = new ScUserList( *pCoreList );
+pUserLists.reset( new ScUserList( *pCoreList ) );
 else
 *pUserLists = *pCoreList;
 
@@ -176,7 +175,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
 }
 }
 else if ( !pUserLists )
-pUserLists = new ScUserList;
+pUserLists.reset( new ScUserList );
 
 mpEdCopyFrom->SetText( aStrSelectedArea );
 
@@ -336,7 +335,7 @@ void ScTpUserLists::AddNewList( const OUString& rEntriesStr 
)
 OUString theEntriesStr( rEntriesStr );
 
 if ( !pUserLists )
-pUserLists = new ScUserList;
+pUserLists.reset( new ScUserList );
 
 MakeListStr( theEntriesStr );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |4 
 sc/source/filter/excel/xeescher.cxx|4 ++--
 sc/source/filter/inc/xcl97rec.hxx  |4 ++--
 sc/source/filter/xcl97/xcl97rec.cxx|   14 ++
 sc/source/ui/inc/tpview.hxx|2 +-
 sc/source/ui/optdlg/tpview.cxx |   11 +--
 6 files changed, 20 insertions(+), 19 deletions(-)

New commits:
commit 82a2a8f29e0f4bade59d26a7733f797188f1d57c
Author: Noel Grandin 
AuthorDate: Thu Jul 19 12:11:06 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 20 09:00:02 2018 +0200

loplugin:useuniqueptr in XclObj

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index 3f563699e1f6..88bbec4a9d59 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -88,6 +88,10 @@ public:
 // SwHTMLParser::m_pPendStack
 if (fn == SRCDIR "/sw/source/filter/html/htmlcss1.cxx")
 return;
+// Visual Studio 2017 has trouble with these
+if (fn == SRCDIR "/comphelper/source/property/MasterPropertySet.cxx"
+|| fn == SRCDIR 
"/comphelper/source/property/MasterPropertySetInfo.cxx")
+return;
 
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
diff --git a/sc/source/filter/excel/xeescher.cxx 
b/sc/source/filter/excel/xeescher.cxx
index 855f28cd0433..b3e97ea16422 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -743,7 +743,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( 
XclExpObjectManager& rRoot, Reference<
 /*  Be sure to construct the MSODRAWING record containing the
 ClientTextbox atom after the base OBJ's MSODRAWING record data is
 completed. */
-pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
+pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
 mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox );  // TXO record
 mrEscherEx.UpdateDffFragmentEnd();
 
@@ -756,7 +756,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( 
XclExpObjectManager& rRoot, Reference<
 nXclFont = GetFontBuffer().Insert( aFontData, 
EXC_COLOR_CTRLTEXT );
 }
 
-pTxo = new XclTxo( aString, nXclFont );
+pTxo.reset( new XclTxo( aString, nXclFont ) );
 pTxo->SetHorAlign( (mnObjType == EXC_OBJTYPE_BUTTON) ? 
EXC_OBJ_HOR_CENTER : EXC_OBJ_HOR_LEFT );
 pTxo->SetVerAlign( EXC_OBJ_VER_CENTER );
 }
diff --git a/sc/source/filter/inc/xcl97rec.hxx 
b/sc/source/filter/inc/xcl97rec.hxx
index a8491bc44791..f97c9b72bf9d 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -87,8 +87,8 @@ class XclObj : public XclExpRecord
 protected:
 XclEscherEx&mrEscherEx;
 XclExpMsoDrawing*   pMsodrawing;
-XclExpMsoDrawing*   pClientTextbox;
-XclTxo* pTxo;
+std::unique_ptr pClientTextbox;
+std::unique_ptr pTxo;
 sal_uInt16  mnObjType;
 sal_uInt16  nObjId;
 sal_uInt16  nGrbit;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx 
b/sc/source/filter/xcl97/xcl97rec.cxx
index b8a9919ca5dd..2e3041662f1a 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -338,8 +338,6 @@ void XclExpObjList::ResetCounters()
 XclObj::XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool 
bOwnEscher ) :
 XclExpRecord( EXC_ID_OBJ, 26 ),
 mrEscherEx( rObjMgr.GetEscherEx() ),
-pClientTextbox( nullptr ),
-pTxo( nullptr ),
 mnObjType( nObjType ),
 nObjId(0),
 nGrbit( 0x6011 ),   // AutoLine, AutoFill, Printable, Locked
@@ -358,8 +356,8 @@ XclObj::~XclObj()
 {
 if ( !bFirstOnSheet )
 delete pMsodrawing;
-delete pClientTextbox;
-delete pTxo;
+pClientTextbox.reset();
+pTxo.reset();
 }
 
 void XclObj::ImplWriteAnchor( const SdrObject* pSdrObj, const 
tools::Rectangle* pChildAnchor )
@@ -410,10 +408,10 @@ void XclObj::SetText( const XclExpRoot& rRoot, const 
SdrTextObj& rObj )
 if ( !pClientTextbox )
 {
 mrEscherEx.UpdateDffFragmentEnd();
-pClientTextbox = new XclExpMsoDrawing( mrEscherEx );
+pClientTextbox.reset( new XclExpMsoDrawing( mrEscherEx ) );
 mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox );// TXO record
 mrEscherEx.UpdateDffFragmentEnd();
-pTxo = new XclTxo( rRoot, rObj );
+pTxo.reset( new XclTxo( rRoot, rObj ) );
 }
 }
 
@@ -514,7 +512,7 @@ XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, 
const tools::Rectang
 {
 ProcessEscherObj( rObjMgr.GetRoot(), rRect, pCaption, bVisible);
 // TXO
-pTxo = new XclTxo( rObjMgr.GetRoot(), rEditObj, pCaption );
+pTxo .reset(new