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

2018-11-07 Thread Libreoffice Gerrit user
 sw/uiconfig/sglobal/popupmenu/table.xml  |   17 +
 sw/uiconfig/sweb/popupmenu/table.xml |   17 +
 sw/uiconfig/swform/popupmenu/table.xml   |   17 +
 sw/uiconfig/swreport/popupmenu/table.xml |   17 +
 sw/uiconfig/swriter/popupmenu/table.xml  |   17 +
 sw/uiconfig/swxform/popupmenu/table.xml  |   17 +
 6 files changed, 30 insertions(+), 72 deletions(-)

New commits:
commit 6d1976af5572e5797266579a13adf98b4db1eaf9
Author: Maxim Monastirsky 
AuthorDate: Wed Nov 7 17:03:08 2018 +0200
Commit: Maxim Monastirsky 
CommitDate: Thu Nov 8 08:56:36 2018 +0100

sw: Remove the comment sub menu from table.xml

A follow-up to 6acde4a63176e99c287c8d8ab9498c003e138025
("Context Menu: Remove Comment section in sw modules").
I doubt we want the table context menu to be so
different from the regular text context menu. And the
reason of the whole change is apparently a comment by
Mike Kaganski in https://gerrit.libreoffice.org/62242/,
which applies here too.

Change-Id: I2849e7c6b835a4d0d464a9a199b054dfb2b57606
Reviewed-on: https://gerrit.libreoffice.org/63050
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sw/uiconfig/sglobal/popupmenu/table.xml 
b/sw/uiconfig/sglobal/popupmenu/table.xml
index 03021c965c6d..310b3f3794c2 100644
--- a/sw/uiconfig/sglobal/popupmenu/table.xml
+++ b/sw/uiconfig/sglobal/popupmenu/table.xml
@@ -118,18 +118,11 @@
   
 
   
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
+  
+  
+  
+  
+  
   
   
   
diff --git a/sw/uiconfig/sweb/popupmenu/table.xml 
b/sw/uiconfig/sweb/popupmenu/table.xml
index 03021c965c6d..310b3f3794c2 100644
--- a/sw/uiconfig/sweb/popupmenu/table.xml
+++ b/sw/uiconfig/sweb/popupmenu/table.xml
@@ -118,18 +118,11 @@
   
 
   
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
+  
+  
+  
+  
+  
   
   
   
diff --git a/sw/uiconfig/swform/popupmenu/table.xml 
b/sw/uiconfig/swform/popupmenu/table.xml
index b76ca48f8974..1ad93f9651ef 100644
--- a/sw/uiconfig/swform/popupmenu/table.xml
+++ b/sw/uiconfig/swform/popupmenu/table.xml
@@ -70,18 +70,11 @@
   
   
   
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
+  
+  
+  
+  
+  
   
   
   
diff --git a/sw/uiconfig/swreport/popupmenu/table.xml 
b/sw/uiconfig/swreport/popupmenu/table.xml
index b76ca48f8974..1ad93f9651ef 100644
--- a/sw/uiconfig/swreport/popupmenu/table.xml
+++ b/sw/uiconfig/swreport/popupmenu/table.xml
@@ -70,18 +70,11 @@
   
   
   
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
+  
+  
+  
+  
+  
   
   
   
diff --git a/sw/uiconfig/swriter/popupmenu/table.xml 
b/sw/uiconfig/swriter/popupmenu/table.xml
index 03021c965c6d..310b3f3794c2 100644
--- a/sw/uiconfig/swriter/popupmenu/table.xml
+++ b/sw/uiconfig/swriter/popupmenu/table.xml
@@ -118,18 +118,11 @@
   
 
   
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
+  
+  
+  
+  
+  
   
   
   
diff --git a/sw/uiconfig/swxform/popupmenu/table.xml 
b/sw/uiconfig/swxform/popupmenu/table.xml
index 03021c965c6d..310b3f3794c2 100644
--- a/sw/uiconfig/swxform/popupmenu/table.xml
+++ b/sw/uiconfig/swxform/popupmenu/table.xml
@@ -118,18 +118,11 @@
   
 
   
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
+  
+  
+  
+  
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 sd/uiconfig/sdraw/popupmenu/tabletext.xml|3 ---
 sd/uiconfig/simpress/popupmenu/tabletext.xml |3 ---
 2 files changed, 6 deletions(-)

New commits:
commit 38754e65d58656ca2a87dfb57f401dd3464251ef
Author: Maxim Monastirsky 
AuthorDate: Thu Nov 8 02:03:19 2018 +0200
Commit: Maxim Monastirsky 
CommitDate: Thu Nov 8 08:55:02 2018 +0100

These commands do not work in sd

Change-Id: Ic4893d310e0503d5d0d4cd185976b149c9f079b1
Reviewed-on: https://gerrit.libreoffice.org/63053
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sd/uiconfig/sdraw/popupmenu/tabletext.xml 
b/sd/uiconfig/sdraw/popupmenu/tabletext.xml
index ed1625065383..7ecc89a5952d 100644
--- a/sd/uiconfig/sdraw/popupmenu/tabletext.xml
+++ b/sd/uiconfig/sdraw/popupmenu/tabletext.xml
@@ -52,9 +52,6 @@
   
   
   
-  
-  
-  
   
   
   
diff --git a/sd/uiconfig/simpress/popupmenu/tabletext.xml 
b/sd/uiconfig/simpress/popupmenu/tabletext.xml
index ed1625065383..7ecc89a5952d 100644
--- a/sd/uiconfig/simpress/popupmenu/tabletext.xml
+++ b/sd/uiconfig/simpress/popupmenu/tabletext.xml
@@ -52,9 +52,6 @@
   
   
   
-  
-  
-  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - chart2/source compilerplugins/clang connectivity/source dbaccess/source editeng/inc include/oox include/sfx2 include/svx include/vcl oox/inc oox/source sc/i

2018-11-07 Thread Libreoffice Gerrit user
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx   |   26 
 compilerplugins/clang/constantparam.bitmask.results |   14 
 compilerplugins/clang/constantparam.booleans.results|  466 
-
 compilerplugins/clang/constantparam.constructors.results|   96 +
 compilerplugins/clang/constantparam.numbers.results |  484 
+-
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |   70 -
 compilerplugins/clang/unusedfields.readonly.results |   28 
 compilerplugins/clang/unusedfields.untouched.results|   48 
 compilerplugins/clang/unusedfields.writeonly.results|   42 
 compilerplugins/clang/unusedmethods.results |  134 +-
 compilerplugins/clang/unusedmethods.unused-returns.results  |   36 
 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx |3 
 connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx |2 
 dbaccess/source/ui/dlg/dbadmin.cxx  |8 
 dbaccess/source/ui/inc/dbadmin.hxx  |1 
 editeng/inc/editdoc.hxx |2 
 include/oox/core/filterbase.hxx |4 
 include/oox/drawingml/shape.hxx |8 
 include/sfx2/tabdlg.hxx |3 
 include/svx/dialcontrol.hxx |1 
 include/vcl/outdev.hxx  |1 
 include/vcl/window.hxx  |2 
 oox/inc/drawingml/diagram/diagram.hxx   |6 
 oox/source/core/filterbase.cxx  |5 
 oox/source/drawingml/diagram/diagram.cxx|   51 -
 oox/source/drawingml/shape.cxx  |8 
 sc/inc/compiler.hxx |2 
 sc/source/core/tool/compiler.cxx|   10 
 sc/source/core/tool/rangenam.cxx|2 
 sfx2/source/dialog/tabdlg.cxx   |5 
 svx/source/dialog/dialcontrol.cxx   |1 
 sw/source/core/txtnode/fntcache.cxx |2 
 sw/source/ui/dialog/wordcountdialog.cxx |1 
 sw/source/ui/index/swuiidxmrk.cxx   |1 
 sw/source/uibase/dbui/mailmergehelper.cxx   |2 
 sw/source/uibase/inc/mailmergehelper.hxx|1 
 sw/source/uibase/inc/swuiidxmrk.hxx |1 
 sw/source/uibase/inc/wordcountdialog.hxx|1 
 vcl/source/gdi/pdfbuildin_fonts.hxx |1 
 vcl/source/outdev/text.cxx  |3 
 vcl/source/window/stacking.cxx  |4 
 writerfilter/source/rtftok/rtfdispatchvalue.cxx |1 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx  |1 
 writerfilter/source/rtftok/rtfdocumentimpl.hxx  |1 
 44 files changed, 758 insertions(+), 831 deletions(-)

New commits:
commit 1cfa1d9e1041b0e82d9be90847c428adfd01476e
Author: Noel Grandin 
AuthorDate: Wed Nov 7 16:48:42 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 8 07:38:35 2018 +0100

loplugin:unusedfields

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

diff --git 
a/compilerplugins/clang/unusedfields.only-used-in-constructor.results 
b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
index 4c0d68ae1977..56f1939b7a5d 100644
--- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results
+++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
@@ -9,9 +9,9 @@ avmedia/source/vlc/wrapper/Types.hxx:44
 avmedia/source/vlc/wrapper/Types.hxx:45
 libvlc_event_t::(anonymous union)::(anonymous) dummy2 const char *
 avmedia/source/vlc/wrapper/Types.hxx:46
-libvlc_event_t::(anonymous) padding struct (anonymous struct at 
/media/noel/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:43:7)
+libvlc_event_t::(anonymous) padding struct (anonymous struct at 
/media/noel/disk2/libo5/avmedia/source/vlc/wrapper/Types.hxx:43:7)
 avmedia/source/vlc/wrapper/Types.hxx:47
-libvlc_event_t u union (anonymous union at 
/media/noel/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:41:5)
+libvlc_event_t u union (anonymous union at 
/media/noel/disk2/libo5/avmedia/source/vlc/wrapper/Types.hxx:41:5)
 avmedia/source/vlc/wrapper/Types.hx

[Libreoffice-commits] core.git: tools/source unoidl/source unotools/source vcl/source writerfilter/source xmloff/source

2018-11-07 Thread Libreoffice Gerrit user
 tools/source/stream/stream.cxx|7 -
 unoidl/source/unoidl-write.cxx|6 -
 unotools/source/config/bootstrap.cxx  |7 -
 vcl/source/control/imp_listbox.cxx|   13 +--
 vcl/source/control/scrbar.cxx |7 -
 vcl/source/fontsubset/sft.cxx |5 -
 vcl/source/gdi/regionband.cxx |7 -
 vcl/source/gdi/virdev.cxx |7 -
 vcl/source/outdev/bitmap.cxx  |   10 --
 vcl/source/outdev/clipping.cxx|5 -
 vcl/source/outdev/curvedshapes.cxx|   28 +-
 vcl/source/outdev/line.cxx|   14 ---
 vcl/source/outdev/mask.cxx|5 -
 vcl/source/outdev/nativecontrols.cxx  |   20 +---
 vcl/source/outdev/outdev.cxx  |   94 ++
 vcl/source/outdev/rect.cxx|   21 +---
 vcl/source/outdev/text.cxx|   14 ---
 vcl/source/window/dialog.cxx  |9 --
 vcl/source/window/splitwin.cxx|   13 +--
 vcl/source/window/status.cxx  |   13 +--
 vcl/source/window/window.cxx  |7 -
 vcl/source/window/winproc.cxx |7 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   13 +--
 writerfilter/source/dmapper/StyleSheetTable.cxx   |7 -
 writerfilter/source/dmapper/TableManager.cxx  |7 -
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx   |   13 +--
 writerfilter/source/rtftok/rtfsdrimport.cxx   |7 -
 xmloff/source/core/xmlimp.cxx |   17 +--
 xmloff/source/draw/animationexport.cxx|9 --
 xmloff/source/draw/ximpshap.cxx   |   17 +--
 xmloff/source/text/XMLIndexMarkExport.cxx |   14 ---
 xmloff/source/text/XMLTextFrameContext.cxx|7 -
 32 files changed, 141 insertions(+), 289 deletions(-)

New commits:
commit 7f48fa8152bd3320af7276d811b752c5a762dcce
Author: Noel Grandin 
AuthorDate: Thu Nov 1 13:14:09 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 8 07:37:40 2018 +0100

loplugin:collapseif in tools..xmloff

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

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index a0160348dff7..8fe25c28d055 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1674,11 +1674,8 @@ void SvMemoryStream::SetBuffer( void* pNewBuf, 
std::size_t nCount,
 {
 SetBufferSize( 0 ); // Init buffering in the base class
 Seek( 0 );
-if( bOwnsData )
-{
-if( pNewBuf != pBuf )
-FreeMemory();
-}
+if( bOwnsData && pNewBuf != pBuf )
+FreeMemory();
 
 pBuf= static_cast(pNewBuf);
 nPos= 0;
diff --git a/unoidl/source/unoidl-write.cxx b/unoidl/source/unoidl-write.cxx
index 827e9ad0a4db..1626dbe19ea5 100644
--- a/unoidl/source/unoidl-write.cxx
+++ b/unoidl/source/unoidl-write.cxx
@@ -731,10 +731,8 @@ sal_uInt64 writeMap(
 bool dfltCtor = ent2->getConstructors().size() == 1
 && ent2->getConstructors()[0].defaultConstructor;
 bool ann = !ent2->getAnnotations().empty();
-if (!dfltCtor) {
-if (!ann)
-ann = hasNotEmptyAnnotations(ent2->getConstructors());
-}
+if (!dfltCtor && !ann)
+ann = hasNotEmptyAnnotations(ent2->getConstructors());
 i.second.dataOffset = getOffset(file);
 writeKind(file, ent2.get(), ann, dfltCtor);
 writeIdxName(file, ent2->getBase());
diff --git a/unotools/source/config/bootstrap.cxx 
b/unotools/source/config/bootstrap.cxx
index a084375aedda..69f530ae240c 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -298,11 +298,8 @@ static PathStatus checkStatusAndNormalizeURL(OUString & 
_sURL)
 
 eStatus = implCheckStatusOfURL(_sURL,aDirItem);
 
-if (eStatus == Bootstrap::PATH_EXISTS)
-{
-if (!implNormalizeURL(_sURL,aDirItem))
-OSL_FAIL("Unexpected failure getting actual URL for existing 
object");
-}
+if (eStatus == Bootstrap::PATH_EXISTS && 
!implNormalizeURL(_sURL,aDirItem))
+OSL_FAIL("Unexpected failure getting actual URL for existing 
object");
 }
 return eStatus;
 }
diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index bd6c0b04214c..e7f770d5ff1f 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -1493,16 +1493,13 @@ bool ImplListBoxWindow::ProcessKeyInput( const 
KeyEvent& rKEvt )
 {
  

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

2018-11-07 Thread Libreoffice Gerrit user
 svx/source/toolbars/fontworkbar.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f10b7e820844d94b4dbec3dcaf24392275940914
Author: Michael Meeks 
AuthorDate: Fri Nov 2 19:14:05 2018 +
Commit: Markus Mohrhard 
CommitDate: Thu Nov 8 07:11:20 2018 +0100

tdf#119648 - even if we fail to import a fontwork, we shouldn't crash.

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

diff --git a/svx/source/toolbars/fontworkbar.cxx 
b/svx/source/toolbars/fontworkbar.cxx
index 90b05316fdc0..290c1f746fe4 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -340,7 +340,10 @@ static void GetGeometryForCustomShape( 
SdrCustomShapeGeometryItem& rGeometryItem
 
 if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, 
i, &aFormModel ) )
 {
-const SdrObject* pSourceObj = aFormModel.GetPage( 0 
)->GetObj( 0 );
+const SdrObject* pSourceObj = nullptr;
+if (aFormModel.GetPageCount() > 0)
+pSourceObj = aFormModel.GetPage( 0 )->GetObj( 0 );
+SAL_WARN_IF(!pSourceObj, "svx.form", "No content in 
gallery custom shape '" << rCustomShape << "'" );
 if( pSourceObj )
 {
 PropertyValue aPropVal_;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 xmloff/source/draw/sdxmlexp.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d467214ac24e22818ff933d76148f3f0987c65ca
Author: Julien Nabet 
AuthorDate: Tue Nov 6 21:57:59 2018 +0100
Commit: Julien Nabet 
CommitDate: Thu Nov 8 07:10:28 2018 +0100

Fix some layout values

Cases indicated here correspond to portrait layout
so use else cases from sd/source/core/sdpage.cxx:3013 switch:

case 24/AUTOLAYOUT_HANDOUT3
nColCnt = 2; nRowCnt = 3;

case 26/AUTOLAYOUT_HANDOUT6
nColCnt = 2; nRowCnt = 3; break;

and so avoid some negative values for param given to
setHeight in xmloff/source/draw/sdxmlexp.cxx during sd tests

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

diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 3f09010adfd0..86ecf33a43f7 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -992,9 +992,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
 {
 case 22 : nColCnt = 1; nRowCnt = 1; break;
 case 23 : nColCnt = 1; nRowCnt = 2; break;
-case 24 : nColCnt = 1; nRowCnt = 3; break;
+case 24 : nColCnt = 2; nRowCnt = 3; break;
 case 25 : nColCnt = 2; nRowCnt = 2; break;
-case 26 : nColCnt = 3; nRowCnt = 2; break;
+case 26 : nColCnt = 2; nRowCnt = 3; break;
 case 31 : nColCnt = 3; nRowCnt = 3; break;
 default:  nColCnt = 0; nRowCnt = 0; break;  // 
FIXME - What is correct values?
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 vcl/source/gdi/svmconverter.cxx |   24 +---
 1 file changed, 21 insertions(+), 3 deletions(-)

New commits:
commit 6aa6cb6347575828a9d6955b98f459c7446eca05
Author: Julien Nabet 
AuthorDate: Tue Nov 6 21:55:13 2018 +0100
Commit: Julien Nabet 
CommitDate: Thu Nov 8 07:09:38 2018 +0100

svmconverter value < 0 seem wrong for width and height (vcl/gdi)

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

diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index b00fdfdce81b..1a689ce1dfcd 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -243,6 +243,13 @@ namespace
 
 #define LF_FACESIZE 32
 
+void static lcl_error( SvStream& rIStm, const SvStreamEndian& nOldFormat, 
const sal_uLong& nPos)
+{
+rIStm.SetError(SVSTREAM_FILEFORMAT_ERROR);
+rIStm.SetEndian(nOldFormat);
+rIStm.Seek(nPos);
+return;
+}
 void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
 {
 const sal_uLong nPos = rIStm.Tell();
@@ -261,8 +268,20 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 rIStm.ReadInt16( nVersion );  // Version
 sal_Int32 nTmp32(0);
 rIStm.ReadInt32( nTmp32 );
+if (nTmp32 < 0)
+{
+SAL_WARN("vcl.gdi", "svm: value for width should be positive");
+lcl_error(rIStm, nOldFormat, nPos);
+return;
+}
 aPrefSz.setWidth( nTmp32 );   // PrefSize.Width()
 rIStm.ReadInt32( nTmp32 );
+if (nTmp32 < 0)
+{
+SAL_WARN("vcl.gdi", "svm: value for height should be positive");
+lcl_error(rIStm, nOldFormat, nPos);
+return;
+}
 aPrefSz.setHeight( nTmp32 );  // PrefSize.Height()
 
 // check header-magic and version
@@ -270,9 +289,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
 || ( nVersion != 200 ) )
 {
-rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
-rIStm.SetEndian( nOldFormat );
-rIStm.Seek( nPos );
+SAL_WARN("vcl.gdi", "svm: wrong check for header-magic and version");
+lcl_error(rIStm, nOldFormat, nPos);
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/liborcus

2018-11-07 Thread Libreoffice Gerrit user
 external/liborcus/0001-Prevent-unsigned-integer-underflow.patch |   27 
++
 external/liborcus/UnpackedTarball_liborcus.mk   |1 
 2 files changed, 28 insertions(+)

New commits:
commit 0512ed1e8c9490f0f9b0d7ab515dc292800cac55
Author: Kohei Yoshida 
AuthorDate: Wed Nov 7 21:44:01 2018 -0500
Commit: Markus Mohrhard 
CommitDate: Thu Nov 8 07:08:35 2018 +0100

Prevent crash on assert error coming from orcus::css_parser::parse().

It was caused by an unsigned integer underflow i.e. 0 - 1 on size_t.

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

diff --git a/external/liborcus/0001-Prevent-unsigned-integer-underflow.patch 
b/external/liborcus/0001-Prevent-unsigned-integer-underflow.patch
new file mode 100644
index ..3353857a2d10
--- /dev/null
+++ b/external/liborcus/0001-Prevent-unsigned-integer-underflow.patch
@@ -0,0 +1,27 @@
+From 1967be013804f4f578b53659d7ef459b4c35de9f Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida 
+Date: Wed, 7 Nov 2018 21:08:40 -0500
+Subject: [PATCH] Prevent unsigned integer underflow.
+
+(cherry picked from commit 40bbce85048b77c545103af124f3d9831dd4a458)
+---
+ src/parser/parser_base.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/parser/parser_base.cpp b/src/parser/parser_base.cpp
+index 586d495f..9d426efb 100644
+--- a/src/parser/parser_base.cpp
 b/src/parser/parser_base.cpp
+@@ -120,7 +120,8 @@ double parser_base::parse_double()
+ 
+ size_t parser_base::remaining_size() const
+ {
+-return std::distance(mp_char, mp_end) - 1;
++size_t n = std::distance(mp_char, mp_end);
++return n ? (n - 1) : 0;
+ }
+ 
+ std::ptrdiff_t parser_base::offset() const
+-- 
+2.17.1
+
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 7669390cc661..94ef29f80462 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
external/liborcus/version.patch.0 \
+   external/liborcus/0001-Prevent-unsigned-integer-underflow.patch \
 ))
 
 ifeq ($(OS),WNT)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Crash test update

2018-11-07 Thread Kohei Yoshida
> On November 7, 2018 at 5:17 PM Kohei Yoshida  wrote:

> Yup, I can reproduce it now.  It shouldn't trigger that assertion even if the 
> content it's parsing is clearly not CSS.  I'll look into this.

Hopefully this will fix the crash: https://gerrit.libreoffice.org/#/c/63057/

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


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

2018-11-07 Thread Libreoffice Gerrit user
 wsd/ClientSession.cpp |5 +
 1 file changed, 5 insertions(+)

New commits:
commit a0f83bd9b915ef3ea6dbdb9ed5ef39ead548276e
Author: Michael Meeks 
AuthorDate: Thu Nov 8 02:35:44 2018 +
Commit: Michael Meeks 
CommitDate: Thu Nov 8 02:36:08 2018 +

Convert-to - cleanup after ourselves.

Change-Id: I85de9721ac1b33d053b59fc36fc7c307206a0888

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 762b5a907..9101c7237 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -854,6 +854,11 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 
 // Now terminate.
 docBroker->stop("Finished saveas handler.");
+
+// Remove file and directory
+Poco::Path path = docBroker->getDocKey();
+Poco::File(path).remove();
+Poco::File(path.makeParent()).remove();
 }
 
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 wsd/LOOLWSD.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9f31063bd619345c7e33f16a2c282bdcae365de1
Author: Michael Meeks 
AuthorDate: Thu Nov 8 02:10:03 2018 +
Commit: Michael Meeks 
CommitDate: Thu Nov 8 02:12:02 2018 +

Don't sniff the inside of SSL sockets for SSL headers.

We might find a websocket we don't like.

Change-Id: Id13628252e01501d6cc209f4d572d8da16a7a658

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 15a9c9c0a..438004b7f 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2008,7 +2008,7 @@ private:
 std::shared_ptr socket = _socket.lock();
 
 #ifndef MOBILEAPP
-if (socket->sniffSSL())
+if (!LOOLWSD::isSSLEnabled() && socket->sniffSSL())
 {
 LOG_ERR("Looks like SSL/TLS traffic on plain http port");
 std::ostringstream oss;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 vcl/inc/svdata.hxx|1 +
 vcl/source/app/svapp.cxx  |2 +-
 vcl/source/app/svmain.cxx |3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 4201779de7441c03fbf0fea665d17ed2328970cc
Author: Markus Mohrhard 
AuthorDate: Wed Nov 7 20:59:22 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Thu Nov 8 02:53:17 2018 +0100

Revert "Use the backend SalInstance method IsMainThread for 
Application::IsMainThread"

vcl/inc/unx/gtk/gtkinst.hxx's IsMainThread returns always false.

This breaks in iahndl.cxx on Linux.

This reverts commit bc089afb13029bae65b993992b3815430657ac24.

Change-Id: I8fbd945e3704214d242f6f9e65760d44b0cc7d40
Reviewed-on: https://gerrit.libreoffice.org/63044
Reviewed-by: Michael Meeks 
Tested-by: Jenkins

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 62f07929e031..b36ecf7e6a41 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -363,6 +363,7 @@ struct ImplSVData
 std::unique_ptr mpDockingManager;
 std::unique_ptr mpBlendFrameCache;
 
+oslThreadIdentifier mnMainThreadId = 0;
 rtl::Reference< vcl::DisplayConnectionDispatch > mxDisplayConnection;
 
 css::uno::Reference< css::lang::XComponent > mxAccessBridge;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0d9a2770aeb8..3221804607e3 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -520,7 +520,7 @@ comphelper::SolarMutex& Application::GetSolarMutex()
 
 bool Application::IsMainThread()
 {
-return ImplGetSVData()->mpDefInst->IsMainThread();
+return ImplGetSVData()->mnMainThreadId == 
osl::Thread::getCurrentIdentifier();
 }
 
 sal_uInt32 Application::ReleaseSolarMutex()
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 86db558da3e9..673e800e4ac4 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -302,6 +302,9 @@ bool InitVCL()
 
 ImplSVData* pSVData = ImplGetSVData();
 
+// remember Main-Thread-Id
+pSVData->mnMainThreadId = ::osl::Thread::getCurrentIdentifier();
+
 // Initialize Sal
 pSVData->mpDefInst = CreateSalInstance();
 if ( !pSVData->mpDefInst )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: common/Unit.hpp kit/Kit.cpp loolwsd.xml.in test/Makefile.am test/UnitConvert.cpp test/UnitFuzz.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2018-11-07 Thread Libreoffice Gerrit user
 common/Unit.hpp|3 -
 kit/Kit.cpp|7 --
 loolwsd.xml.in |1 
 test/Makefile.am   |4 +
 test/UnitConvert.cpp   |  123 +
 test/UnitFuzz.cpp  |3 -
 wsd/DocumentBroker.cpp |   24 +++--
 wsd/DocumentBroker.hpp |3 -
 wsd/LOOLWSD.cpp|7 +-
 9 files changed, 158 insertions(+), 17 deletions(-)

New commits:
commit fa74404019044f240686226f1c6dfefb27356c98
Author: Michael Meeks 
AuthorDate: Wed Nov 7 23:00:32 2018 +
Commit: Michael Meeks 
CommitDate: Thu Nov 8 01:27:40 2018 +

Add a time limit for badly behaved / huge document load / conversions.

Also improve debug printing of load times in dumpstate.

Change-Id: Ib3fd70dffb57588cd90bd928c4be9890cee8bc65

diff --git a/common/Unit.hpp b/common/Unit.hpp
index 5844cc3bd..4d018b80b 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -275,8 +275,7 @@ public:
 virtual void postFork() {}
 
 /// Kit got a message
-virtual bool filterKitMessage(const std::shared_ptr& /* ws 
*/,
-  std::string& /* message */)
+virtual bool filterKitMessage(WebSocketHandler *, std::string &/* message 
*/ )
 {
 return false;
 }
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 8eda6ce10..2c21155d7 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -2109,12 +2109,8 @@ protected:
 {
 std::string message(data.data(), data.size());
 
-#if 0 // FIXME might be needed for unit tests #ifndef KIT_IN_PROCESS
-if (UnitKit::get().filterKitMessage(ws, message))
-{
+if (UnitKit::get().filterKitMessage(this, message))
 return;
-}
-#endif
 
 std::vector tokens = LOOLProtocol::tokenize(message);
 Log::StreamLogger logger = Log::debug();
@@ -2295,6 +2291,7 @@ void lokit_main(
 jailPath = Path::forDirectory(childRoot + "/" + jailId);
 LOG_INF("Jail path: " << jailPath.toString());
 File(jailPath).createDirectories();
+chmod(jailPath.toString().c_str(), S_IXUSR | S_IWUSR | S_IRUSR);
 
 if (bRunInsideJail)
 {
diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 29ab2ef8f..54cda7e63 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -26,6 +26,7 @@
 8000
 0
 0
+   100
 
 
 
diff --git a/test/Makefile.am b/test/Makefile.am
index 9b7d8def3..62b859bcc 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -13,6 +13,7 @@ AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 
-DTDOC=\"$(top_srcdir)/test/data\" \
-I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd 
-I${top_srcdir}/kit
 
 noinst_LTLIBRARIES = \
+   unit-convert.la \
unit-timeout.la unit-prefork.la \
unit-storage.la unit-client.la \
unit-admin.la unit-tilecache.la \
@@ -87,6 +88,7 @@ unit_admin_la_SOURCES = UnitAdmin.cpp
 unit_admin_la_LIBADD = $(CPPUNIT_LIBS)
 unit_client_la_SOURCES = UnitClient.cpp ${test_all_source}
 unit_client_la_LIBADD = $(CPPUNIT_LIBS)
+unit_convert_la_SOURCES = UnitConvert.cpp
 unit_timeout_la_SOURCES = UnitTimeout.cpp
 unit_prefork_la_SOURCES = UnitPrefork.cpp
 unit_storage_la_SOURCES = UnitStorage.cpp
@@ -117,7 +119,7 @@ check-local:
./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, 
UnitHTTPServerResponse&) ,
-TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la \
+TESTS = unit-convert.la unit-prefork.la unit-tilecache.la unit-timeout.la \
 unit-oauth.la unit-wopi.la unit-wopi-saveas.la \
 unit-wopi-ownertermination.la unit-wopi-versionrestore.la \
 unit-wopi-documentconflict.la
diff --git a/test/UnitConvert.cpp b/test/UnitConvert.cpp
new file mode 100644
index 0..2b30b00a8
--- /dev/null
+++ b/test/UnitConvert.cpp
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+// Inside the WSD process
+class UnitConvert : public UnitWSD
+{
+bool _workerStarted;
+std::thread _worker;
+
+public:
+UnitConvert() :
+_workerStarted(false)
+{
+setHasKitHooks();
+setTimeout(3600 * 1000); /* one hour */
+}
+~UnitConvert()
+{
+LOG_INF("Joining test worker thread\n");
+_worker.join();
+}
+
+void configure(Poco::Util::LayeredConfiguration& config) override
+{
+UnitWSD::conf

[Libreoffice-commits] core.git: icon-themes/colibre icon-themes/colibre_svg officecfg/registry

2018-11-07 Thread Libreoffice Gerrit user
 icon-themes/colibre/cmd/sc_deleteallbreaks.png   |binary
 icon-themes/colibre/cmd/sc_hidenote.png  |binary
 icon-themes/colibre/cmd/sc_insertcolumnbreak.png |binary
 icon-themes/colibre/cmd/sc_shownote.png  |binary
 icon-themes/colibre/links.txt|   26 
++
 icon-themes/colibre_svg/cmd/sc_deleteallbreaks.svg   |   20 
+++
 icon-themes/colibre_svg/cmd/sc_hidenote.svg  |   17 
++
 icon-themes/colibre_svg/cmd/sc_insertcolumnbreak.svg |   22 

 icon-themes/colibre_svg/cmd/sc_shownote.svg  |   15 
+
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu|   12 

 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |3 +
 11 files changed, 115 insertions(+)

New commits:
commit 397dd8a5f7694540f31f32759c2c915d63506ccd
Author: andreas kainz 
AuthorDate: Tue Nov 6 14:12:47 2018 +0100
Commit: andreas_kainz 
CommitDate: Thu Nov 8 00:37:39 2018 +0100

Colibre icons: add context menu icons for calc

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

diff --git a/icon-themes/colibre/cmd/sc_deleteallbreaks.png 
b/icon-themes/colibre/cmd/sc_deleteallbreaks.png
new file mode 100644
index ..5001453885c3
Binary files /dev/null and b/icon-themes/colibre/cmd/sc_deleteallbreaks.png 
differ
diff --git a/icon-themes/colibre/cmd/sc_hidenote.png 
b/icon-themes/colibre/cmd/sc_hidenote.png
new file mode 100644
index ..00939c487e0e
Binary files /dev/null and b/icon-themes/colibre/cmd/sc_hidenote.png differ
diff --git a/icon-themes/colibre/cmd/sc_insertcolumnbreak.png 
b/icon-themes/colibre/cmd/sc_insertcolumnbreak.png
new file mode 100644
index ..537bf5ba3fa6
Binary files /dev/null and b/icon-themes/colibre/cmd/sc_insertcolumnbreak.png 
differ
diff --git a/icon-themes/colibre/cmd/sc_shownote.png 
b/icon-themes/colibre/cmd/sc_shownote.png
new file mode 100644
index ..65d0863b1728
Binary files /dev/null and b/icon-themes/colibre/cmd/sc_shownote.png differ
diff --git a/icon-themes/colibre/links.txt b/icon-themes/colibre/links.txt
index 6adf549b5d24..1adb56eef9ed 100644
--- a/icon-themes/colibre/links.txt
+++ b/icon-themes/colibre/links.txt
@@ -351,6 +351,7 @@ cmd/sc_dbreportdelete.png cmd/sc_delete.png
 cmd/sc_dbquerydelete.png cmd/sc_delete.png
 cmd/sc_dbformdelete.png cmd/sc_delete.png
 cmd/sc_dbclearquery.png cmd/sc_delete.png
+cmd/sc_deletecell.png cmd/sc_delete.png
 
 # Folder
 cmd/lc_dbtableopen.png cmd/lc_open.png
@@ -829,6 +830,11 @@ cmd/sc_fliphorizontal.png cmd/sc_mirror.png
 cmd/lc_flipvertical.png cmd/lc_mirrorvert.png
 cmd/sc_flipvertical.png cmd/sc_mirrorvert.png
 cmd/sc_mirrorhorz.png cmd/sc_mirror.png
+cmd/sc_flipmenu.png cmd/sc_mirror.png
+cmd/lc_objectmirrorhorizontal.png cmd/lc_mirror.png
+cmd/sc_objectmirrorhorizontal.png cmd/sc_mirror.png
+cmd/lc_objectmirrorvertical.png cmd/lc_mirrorvert.png
+cmd/sc_objectmirrorvertical.png cmd/sc_mirrorvert.png
 
 # Connector
 cmd/lc_connectortoolbox.png cmd/lc_connector.png
@@ -1752,3 +1758,23 @@ cmd/sc_namegroup.png cmd/sc_renameobject.png
 
 cmd/lc_margins.png cmd/lc_pagemargin.png
 cmd/lc_exportasgraphic.png cmd/lc_insertgraphic.png
+
+# calc toolbar draw
+# ===
+cmd/sc_assignmacro.png cmd/sc_starshapes.vertical-scroll.png
+cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png
+cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png
+cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png
+
+cmd/lc_assignmacro.png cmd/lc_starshapes.vertical-scroll.png
+cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png
+cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png
+cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png
+
+cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png
+
+# calc menubar icons
+# ===
+cmd/sc_chartmenu.png cmd/sc_drawchart.png
+cmd/sc_objectmenu.png cmd/sc_insertframe.png
+
diff --git a/icon-themes/colibre_svg/cmd/sc_deleteallbreaks.svg 
b/icon-themes/colibre_svg/cmd/sc_deleteallbreaks.svg
new file mode 100644
index ..f69477ed575a
--- /dev/null
+++ b/icon-themes/colibre_svg/cmd/sc_deleteallbreaks.svg
@@ -0,0 +1,20 @@
+
+http://www.w3.org/2000/svg"; 
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; 
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"; viewBox="0 0 16 
16" version="1.1">
+ 
+  
+   
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage"/>
+   
+  
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+
diff --git a/icon-themes/colibre_svg/cmd/sc_hidenote.svg 
b/icon-themes/colibre_svg/cmd/sc_hidenote.svg
new file mode 100644
index ..91c738fd1753
--- /de

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

2018-11-07 Thread Libreoffice Gerrit user
 sc/source/filter/oox/stylesbuffer.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit d278f59c6112d39ae0f0cf23ec04697d87bbf870
Author: Markus Mohrhard 
AuthorDate: Tue Nov 6 22:35:41 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Wed Nov 7 23:30:09 2018 +0100

tdf#120168, adapt horizontal alignment based on text rotation

See §18.8.1 of Part1 of the XLSX spec.

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

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index ec1dce320cec..e8701b7aa2ec 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1115,10 +1115,22 @@ Alignment::Alignment( const WorkbookHelper& rHelper ) :
 
 void Alignment::importAlignment( const AttributeList& rAttribs )
 {
-maModel.mnHorAlign = rAttribs.getToken( XML_horizontal, XML_general );
 maModel.mnVerAlign = rAttribs.getToken( XML_vertical, XML_bottom );
 maModel.mnTextDir  = rAttribs.getInteger( XML_readingOrder, 
OOX_XF_TEXTDIR_CONTEXT );
 maModel.mnRotation = rAttribs.getInteger( XML_textRotation, 
OOX_XF_ROTATION_NONE );
+sal_Int32 nDefaultHorAlign = XML_general;
+if (maModel.mnRotation != OOX_XF_ROTATION_NONE)
+{
+if (maModel.mnRotation < 90 || maModel.mnRotation == 180)
+{
+nDefaultHorAlign = XML_left;
+}
+else
+{
+nDefaultHorAlign = XML_right;
+}
+}
+maModel.mnHorAlign = rAttribs.getToken( XML_horizontal, 
nDefaultHorAlign );
 maModel.mnIndent   = rAttribs.getInteger( XML_indent, 
OOX_XF_INDENT_NONE );
 maModel.mbWrapText = rAttribs.getBool( XML_wrapText, false );
 maModel.mbShrink   = rAttribs.getBool( XML_shrinkToFit, false );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 drawinglayer/source/tools/emfphelperdata.cxx |   74 +--
 1 file changed, 58 insertions(+), 16 deletions(-)

New commits:
commit 8d4da5429548ba6ef4d3ee4dd6062c25a77ba78b
Author: Bartosz Kosiorek 
AuthorDate: Sun Nov 4 02:39:09 2018 +0100
Commit: Bartosz Kosiorek 
CommitDate: Wed Nov 7 23:27:00 2018 +0100

tdf#55058 tdf#106084 EMF+ Add support for Underline and Strikeout

Add support of Underline and Strikeout for DrawString and
DrawDriverString EMF+ records

Change-Id: I24c47e0d7524dabc13edd04c6b68aec69fa35e7b
Reviewed-on: https://gerrit.libreoffice.org/62827
Tested-by: Jenkins
Reviewed-by: Patrick Jaap 
Reviewed-by: Bartosz Kosiorek 

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx 
b/drawinglayer/source/tools/emfphelperdata.cxx
index c9002681e6f5..dd95f2fb6027 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1321,10 +1322,6 @@ namespace emfplushelper
 
mrPropertyHolders.Current().setFont(vcl::Font(font->family, Size(font->emSize, 
font->emSize)));
 // done reading
 
-// transform to TextSimplePortionPrimitive2D
-// TODO add more decorations: underline, 
strikeout, etc
-//  and create a 
TextDecoratedPortionPrimitive2D
-
 const OUString emptyString;
 drawinglayer::attribute::FontAttribute 
fontAttribute(
 font->family,  
// font family
@@ -1377,8 +1374,10 @@ namespace emfplushelper
 if (color.GetTransparency() < 255)
 {
 std::vector emptyVector;
-
drawinglayer::primitive2d::Primitive2DReference aPrimitiveText(
-new 
drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+drawinglayer::primitive2d::BasePrimitive2D* 
pBaseText = nullptr;
+if (font->Underline() || font->Strikeout())
+{
+pBaseText = new 
drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
 transformMatrix,
 text,
 0, // text always 
starts at 0
@@ -1386,8 +1385,28 @@ namespace emfplushelper
 emptyVector,   // EMF-PLUS has 
no DX-array
 fontAttribute,
 locale,
-color.getBColor()));
-
+color.getBColor(),
+COL_TRANSPARENT,
+color.getBColor(),
+color.getBColor(),
+
drawinglayer::primitive2d::TEXT_LINE_NONE,
+font->Underline() ? 
drawinglayer::primitive2d::TEXT_LINE_SINGLE : 
drawinglayer::primitive2d::TEXT_LINE_NONE,
+false,
+font->Strikeout() ? 
drawinglayer::primitive2d::TEXT_STRIKEOUT_SINGLE : 
drawinglayer::primitive2d::TEXT_STRIKEOUT_NONE);
+}
+else
+{
+pBaseText = new 
drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+transformMatrix,
+text,
+0, // text always 
starts at 0
+stringLength,
+emptyVector,   // EMF-PLUS has 
no DX-array
+fontAttribute,
+locale,
+color.getBColor());
+}
+
drawinglayer::primitive2d::Primitive2DReference aPrimitiveText(pBaseText);
 if (color.GetTransparency() != 0)
 {
 aPrimitiveText = new 
drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
@@ -1766,8 +1785,8 @@ namespace emfplushelper
   

Re: Crash test update

2018-11-07 Thread Kohei Yoshida
> On November 7, 2018 at 5:04 AM Caolán McNamara  wrote:
> 
> 
> On Tue, 2018-11-06 at 17:25 -0500, Kohei Yoshida wrote:
> > On Mon, 2018-11-05 at 13:10 +, Caolán McNamara wrote:
> > > On Mon, 2018-11-05 at 07:45 -0500, Kohei Yoshida wrote:
> > > > Thanks.  I assume the other document ends with a similar error?
> > > 
> > > yeah, https://bz.apache.org/ooo/attachment.cgi?id=59846 IIRC its
> > > the
> > > same string
> > 
> > So both the document 
> > 
> > https://bz.apache.org/ooo/attachment.cgi?id=43970
> > 
> > and the one from above open fine for me, using the latest master
> > branch build.  They both open in Calc, as they should.
> 
> I can reproduce it, with a dbgutil build, if the file is given a .xls
> suffix, e.g. demo.xls with just
> 
> ./instdir/program/soffice.bin --headless --convert-to pdf ./demo.xls

Yup, I can reproduce it now.  It shouldn't trigger that assertion even if the 
content it's parsing is clearly not CSS.  I'll look into this.

> it has indeed been detected as a "calc_HTML_WebQuery"

Yeah that's another issue... The file detection should not be detecting that 
file as an HTML file.

Kohei

--
Kohei Yoshida, LibreOffice Calc volunteer hacker
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-11-07 Thread Libreoffice Gerrit user
 wsd/DocumentBroker.cpp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 802cb3bd24605fc479f2bbd9967a40ee51e6f757
Author: Tor Lillqvist 
AuthorDate: Thu Nov 8 00:11:21 2018 +0200
Commit: Michael Meeks 
CommitDate: Wed Nov 7 23:16:49 2018 +0100

Move initailisation of 'now' variable back after the poll where it should be

Was moved before the poll in my
75438baa70a0d15b18c5ca829b3e3b1307a27c08.

Change-Id: I0ec99c0c1433d2e5d631720f003905cbd18206aa
Reviewed-on: https://gerrit.libreoffice.org/63052
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index dcef3df3e..7b56fc651 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -256,10 +256,10 @@ void DocumentBroker::pollThread()
 // Main polling loop goodness.
 while (!_stop && _poll->continuePolling() && !TerminationFlag)
 {
-const auto now = std::chrono::steady_clock::now();
-
 _poll->poll(SocketPoll::DefaultPollTimeoutMs);
 
+const auto now = std::chrono::steady_clock::now();
+
 #ifndef MOBILEAPP
 if (std::chrono::duration_cast
 (now - lastBWUpdateTime).count() >= 5 * 1000)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/qa include/vcl sw/qa uitest/manual_tests vcl/inc vcl/source vcl/unx

2018-11-07 Thread Libreoffice Gerrit user
 cui/qa/uitest/dialogs/pastedlg.py   |5 -
 include/vcl/builder.hxx |2 
 include/vcl/lstbox.hxx  |4 -
 include/vcl/treelistbox.hxx |2 
 include/vcl/treelistentry.hxx   |7 +-
 sw/qa/uitest/table/tdf116737.py |5 -
 uitest/manual_tests/calc.py |2 
 vcl/inc/listbox.hxx |6 -
 vcl/source/app/salvtables.cxx   |  123 +---
 vcl/source/control/imp_listbox.cxx  |   15 
 vcl/source/control/listbox.cxx  |5 -
 vcl/source/outdev/font.cxx  |6 +
 vcl/source/treelist/treelistbox.cxx |9 +-
 vcl/source/treelist/uiobject.cxx|3 
 vcl/source/window/builder.cxx   |   52 +--
 vcl/unx/gtk3/gtk3gtkinst.cxx|   16 +++-
 16 files changed, 160 insertions(+), 102 deletions(-)

New commits:
commit 2e4d92dd0662956da4570ac53d50ad7bffe70873
Author: Caolán McNamara 
AuthorDate: Wed Nov 7 13:06:47 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 7 22:01:53 2018 +0100

coverity#1441099 Unchecked return value

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

diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 09e7bdcd2987..ffc6d9c2d147 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1118,6 +1118,8 @@ bool OutputDevice::ImplNewFont() const
   (maFont.GetRelief() != FontRelief::NONE);
 
 
+bool bRet = true;
+
 // #95414# fix for OLE objects which use scale factors very creatively
 if( mbMap && !aSize.Width() )
 {
@@ -1131,13 +1133,13 @@ bool OutputDevice::ImplNewFont() const
 const_cast(maFont).SetFontSize( Size( nNewWidth, 
aSize.Height() ) );
 mbMap = false;
 mbNewFont = true;
-ImplNewFont();  // recurse once using stretched width
+bRet = ImplNewFont();  // recurse once using stretched width
 mbMap = true;
 const_cast(maFont).SetFontSize( aOrigSize );
 }
 }
 
-return true;
+return bRet;
 }
 
 void OutputDevice::SetFontOrientation( LogicalFontInstance* const 
pFontInstance ) const
commit a977098f59a4c931c6f8a1d423720e682f5ed047
Author: Caolán McNamara 
AuthorDate: Mon Nov 5 15:08:47 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 7 22:01:20 2018 +0100

map GtkTreeView to SvTreeViewBox now it is in vcl

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

diff --git a/cui/qa/uitest/dialogs/pastedlg.py 
b/cui/qa/uitest/dialogs/pastedlg.py
index 4c17adac33d3..ccd33e02d11e 100644
--- a/cui/qa/uitest/dialogs/pastedlg.py
+++ b/cui/qa/uitest/dialogs/pastedlg.py
@@ -29,10 +29,11 @@ class Test(UITestCase):
 self.ui_test.execute_dialog_through_command(".uno:PasteSpecial")
 pasteSpecial = self.xUITest.getTopFocusWindow()
 formats = pasteSpecial.getChild("list")
-entryCount = int(get_state_as_dict(formats)["EntryCount"])
+entryCount = int(get_state_as_dict(formats)["Children"])
 items = []
 for index in range(entryCount):
-formats.executeAction("SELECT", mkPropertyValues({"POS": 
str(index)}))
+entry = formats.getChild(str(index))
+entry.executeAction("SELECT", tuple())
 items.append(get_state_as_dict(formats)["SelectEntryText"])
 
 # Make sure there is no RTF vs Richtext duplication.
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 534789b12cb2..203b44e96871 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -43,6 +43,7 @@ class PopupMenu;
 class SalInstanceBuilder;
 class ScreenshotTest;
 class ScrollBar;
+class SvTreeListBox;
 class Slider;
 class DateField;
 class TimeField;
@@ -220,6 +221,7 @@ private:
 const ListStore* get_model_by_name(const OString& sID) const;
 void mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt16 
nActiveId);
 void mungeModel(ComboBox &rTarget, const ListStore &rStore, sal_uInt16 
nActiveId);
+void mungeModel(SvTreeListBox &rTarget, const ListStore &rStore, 
sal_uInt16 nActiveId);
 
 typedef stringmap TextBuffer;
 const TextBuffer* get_buffer_by_name(const OString& sID) const;
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 8ee51a2681fb..332233158b98 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -69,12 +69,10 @@ class ImplListBoxFloatingWindow;
 class ImplBtn;
 class ImplWin;
 class ImplListBoxWindow;
-class SalInstanceEntryTreeView;
 
 class VCL_DLLPUBLIC ListBox : public Control
 {
 private:
-friend SalInstanceEntryTreeView;
 VclPtrmpImplLB;
 VclP

[Libreoffice-commits] online.git: 2 commits - loleaflet/README loolwsd.spec.in Makefile.am wsd/reference.md wsd/reference.txt

2018-11-07 Thread Libreoffice Gerrit user
 Makefile.am   |2 
 loleaflet/README  |8 +-
 loolwsd.spec.in   |2 
 wsd/reference.md  |  163 +
 wsd/reference.txt |  192 --
 5 files changed, 169 insertions(+), 198 deletions(-)

New commits:
commit 2bf384cac0a320df247a9d15979761dae30a710f
Author: Andras Timar 
AuthorDate: Wed Nov 7 21:25:25 2018 +0100
Commit: Andras Timar 
CommitDate: Wed Nov 7 21:25:25 2018 +0100

Convert wsd/reference.txt to Markdown format

Change-Id: I393a74337293e376b6458a9cc05ba1d8b748e0d3

diff --git a/Makefile.am b/Makefile.am
index 50b9bf0ab..6e537309e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,7 +31,7 @@ man_MANS = man/loolwsd.1 \
 dist_doc_DATA = wsd/README \
 wsd/README.vars \
 wsd/protocol.txt \
-wsd/reference.txt
+wsd/reference.md
 
 loolwsddatadir = @LOOLWSD_DATADIR@
 
diff --git a/loleaflet/README b/loleaflet/README
index afc29f8c2..3b9f53d21 100644
--- a/loleaflet/README
+++ b/loleaflet/README
@@ -129,10 +129,10 @@ src/control/Toolbar.js . Any new test file needs also to 
be added in spec/leafle
 API & events
 
 
-##
-# See /loleaflet/reference.html for a better formated documentation. #
-# See /wsd/reference.txt for the HTTP API documentation. #
-##
+###
+# See /loleaflet/reference.html for a better formatted documentation. #
+# See /wsd/reference.md for the HTTP API documentation.   #
+###
 
 Search:
 - API:
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index b1d2df5fb..929bff10b 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -105,7 +105,7 @@ echo "accountrequired pam_unix.so" >>  
%{buildroot}/etc/pam.d/loolwsd
 /usr/share/doc/loolwsd/README
 /usr/share/doc/loolwsd/README.vars
 /usr/share/doc/loolwsd/protocol.txt
-/usr/share/doc/loolwsd/reference.txt
+/usr/share/doc/loolwsd/reference.md
 /usr/share/man/man1/loolwsd.1
 /usr/share/man/man1/loolforkit.1
 /usr/share/man/man1/loolconvert.1
commit a9cf1ab45fbed65c66eb3159ca976fc877f1f63e
Author: Andras Timar 
AuthorDate: Wed Nov 7 21:21:59 2018 +0100
Commit: Andras Timar 
CommitDate: Wed Nov 7 21:22:33 2018 +0100

Convert wsd/reference.txt to Markdown format

Change-Id: I93b36c7136a9ea77ecf381fb1c57913c283821b6

diff --git a/wsd/reference.md b/wsd/reference.md
new file mode 100644
index 0..194c8571b
--- /dev/null
+++ b/wsd/reference.md
@@ -0,0 +1,163 @@
+
+LibreOffice Online API
+==
+
+Document conversion
+---
+
+ **API:** HTTP POST to `/lool/convert-to/`
+  * the format is e.g. "png", "pdf" or "txt"
+  * the file itself in the payload
+### Example:
+
+curl -F "data=@test.txt" https://localhost:9980/lool/convert-to/docx > 
out.docx
+
+  * or in HTML:
+```html
+https://localhost:9980/lool/convert-to/docx"; 
enctype="multipart/form-data" method="post">
+File: 
+
+
+```
+
+Alternatively you can omit the ``, and instead provide it as another 
parameter
+### Example:
+
+curl -F "data=@test.odt" -F "format=pdf" 
https://localhost:9980/lool/convert-to > out.pdf
+
+* or in HTML:
+```html
+https://localhost:9980/lool/convert-to"; 
enctype="multipart/form-data" method="post">
+File: 
+Format: 
+
+
+```
+
+WOPI Extensions
+===
+
+LibreOffice Online uses a WOPI-like protocol to interact with hosts who want 
to integrate LibreOffice Online in them.
+
+Refer to [WOPI docs](https://wopi.readthedocs.io/en/latest/) for further 
details on the protocol's inspiration.
+
+CheckFileInfo response properties
+-
+
+### BaseFileName
+A string containing the basename of the file, omitting its path.
+
+### DisablePrint
+Disables print functionality in libreoffice online backend. Ift rue, 
HidePrintOption is assumed to be true
+
+### OwnerID
+A programmatic string identifier for the owner of the file.
+
+### PostMessageOrigin
+A string for the domain the host page sends/receives PostMessages from, we 
only listen to messages from this domain.
+
+### Size
+Size of the file in bytes (64bit)
+
+### UserCanWrite
+A boolean flag, indicating whether the user has permission to edit and/or 
over-write the file. If not set PutFile will fail.
+
+### UserCanNotWriteRelative
+A boolean flag indiciating that the user cannot Save-As on this server, so 
PutFileRelative will fail.
+
+### UserId
+A programmatic string identifier of the user.
+
+### UserFriendlyName
+A string representing the name of the user for display in the UI.
+
+
+CheckFileInfo extended response properties
+--
+
+### HidePrintOption
+If set to true, hides th

Minutes from the UX/design meeting 2018-Nov-07

2018-11-07 Thread Heiko Tietze
Present: Duna, Heiko

Welcome to the new volunteer, Duna!


Tickets 

 * Content panels "Slide" and "Layout" at Properties deck not available when 
editing a slide
   + https://bugs.documentfoundation.org/show_bug.cgi?id=105722
   => postponed

 * Select object also outside of page canvas
   + https://bugs.documentfoundation.org/show_bug.cgi?id=120721
   + clear WF as there is no use case (Heiko)
 + changed my mind (see last comment)
   + OTOH patch wouldn't introduce any regressions
   => postponed 

 * Control for setting UI font size
   + https://bugs.documentfoundation.org/show_bug.cgi?id=67372
   + Available options WFM, a constant size independently from 
 the font metrics can be achieved per fontwork (Heiko)
   + idea is to change the UI font (lens feature like) but WF is accepted by OP
   => WFM

 * Sentence and toggle cases are not on the list of style's font effects in 
Writer
   + https://bugs.documentfoundation.org/show_bug.cgi?id=99550
   + renaming of "Effects" -> "Case convert", "Capitals" -> "UPPER CASE", and
 "Lower Case" -> "lower case" makes sense but "Title" and "Small Capitals"
 have no pendant; the character formatting overrides convert cases so it
 better has a different wording => WF
   + agree with Maxim on WFM (Cor)
   => WF

 * keyboard shortcut to apply default formatting including removing applied 
character styles
   + https://bugs.documentfoundation.org/show_bug.cgi?id=89089
   + what's needed here?
   + terminology missing
   => postponed

 * Reduce heading levels
   + https://bugs.documentfoundation.org/show_bug.cgi?id=100101
   + applies to "Automatic" filter
   + or WF?
   + arbitrary decision, vote for 5 (Timur)
   + show more when 4 are used maybe (Cor)
   => WF





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


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

2018-11-07 Thread Libreoffice Gerrit user
 sw/qa/uitest/writer_tests/data/tableToText.odt |binary
 sw/qa/uitest/writer_tests5/tableToText.py  |   89 +
 2 files changed, 89 insertions(+)

New commits:
commit 128bec2c4bf57c2d82ce61319cbd1778bcabfeb1
Author: Zdeněk Crhonek 
AuthorDate: Wed Nov 7 17:10:09 2018 +0100
Commit: Zdenek Crhonek 
CommitDate: Wed Nov 7 19:42:51 2018 +0100

uitest Table to text dialog

Change-Id: Ica1c9f18d9486ff25662f9e9c0fc96e8fda706b1
Reviewed-on: https://gerrit.libreoffice.org/63033
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sw/qa/uitest/writer_tests/data/tableToText.odt 
b/sw/qa/uitest/writer_tests/data/tableToText.odt
new file mode 100644
index ..5f8f9b01df87
Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tableToText.odt 
differ
diff --git a/sw/qa/uitest/writer_tests5/tableToText.py 
b/sw/qa/uitest/writer_tests5/tableToText.py
new file mode 100644
index ..ff4a23c1175a
--- /dev/null
+++ b/sw/qa/uitest/writer_tests5/tableToText.py
@@ -0,0 +1,89 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+return 
pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Writer Table to text
+
+class tableToText(UITestCase):
+def test_table_to_text(self):
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tableToText.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+#dialog Table to text - Tabs; verify
+self.ui_test.execute_dialog_through_command(".uno:ConvertTableToText")
+xDialog = self.xUITest.getTopFocusWindow()
+tabs = xDialog.getChild("tabs")
+tabs.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+#verify
+self.assertEqual(document.Text.String[0:3], "a\ta")
+self.assertEqual(document.TextTables.getCount(), 0)
+#undo
+self.xUITest.executeCommand(".uno:Undo")
+self.assertEqual(document.TextTables.getCount(), 1)
+
+#dialog Table to text - Paragraph; verify
+self.ui_test.execute_dialog_through_command(".uno:ConvertTableToText")
+xDialog = self.xUITest.getTopFocusWindow()
+paragraph = xDialog.getChild("paragraph")
+paragraph.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+#verify
+self.assertEqual(document.Text.String[0:4], "a\na\n")
+self.assertEqual(document.TextTables.getCount(), 0)
+#undo
+self.xUITest.executeCommand(".uno:Undo")
+self.assertEqual(document.TextTables.getCount(), 1)
+
+#dialog Table to text - Semicolons; verify
+self.ui_test.execute_dialog_through_command(".uno:ConvertTableToText")
+xDialog = self.xUITest.getTopFocusWindow()
+semicolons = xDialog.getChild("semicolons")
+semicolons.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+#verify
+self.assertEqual(document.Text.String[0:6], "a;a\n;\n")
+self.assertEqual(document.TextTables.getCount(), 0)
+#undo
+self.xUITest.executeCommand(".uno:Undo")
+self.assertEqual(document.TextTables.getCount(), 1)
+
+#dialog Table to text - other; verify
+self.ui_test.execute_dialog_through_command(".uno:ConvertTableToText")
+xDialog = self.xUITest.getTopFocusWindow()
+other = xDialog.getChild("other")
+other.executeAction("CLICK", tuple())
+othered = xDialog.getChild("othered")
+othered.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+othered.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+othered.executeAction("TYPE", mkPropertyValues({"TEXT":":"}))
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+#verify
+self.assertEqual(document.Text.String[0:6], "a:a\n:\n")
+self.assertEqual(document.TextTables.getCount(), 0)
+#undo
+sel

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

2018-11-07 Thread Libreoffice Gerrit user
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   61 +---
 sd/qa/unit/data/pptx/table-list.pptx|binary
 sd/qa/unit/import-tests-smartart.cxx|   34 +++
 3 files changed, 87 insertions(+), 8 deletions(-)

New commits:
commit 924f01fdef73af88284e6629c6d3604f33d27f24
Author: Miklos Vajna 
AuthorDate: Wed Nov 7 17:35:50 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 19:36:12 2018 +0100

oox smartart, table list: fix too large width of children

It's possible all children request 100% of space, need to scale down in
that case. This means that children other than the first one is now
readable in the layout result.

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

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 2ef5ffef2151..763eca855d91 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -36,6 +36,27 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::oox::core;
 
+namespace
+{
+/// Looks up the value of the rInternalName -> nProperty key in rProperties.
+oox::OptValue findProperty(const oox::drawingml::LayoutPropertyMap& 
rProperties,
+  const OUString& rInternalName, sal_Int32 
nProperty)
+{
+oox::OptValue oRet;
+
+auto it = rProperties.find(rInternalName);
+if (it != rProperties.end())
+{
+const oox::drawingml::LayoutProperty& rProperty = it->second;
+auto itProperty = rProperty.find(nProperty);
+if (itProperty != rProperty.end())
+oRet = itProperty->second;
+}
+
+return oRet;
+}
+}
+
 namespace oox { namespace drawingml {
 
 IteratorAttr::IteratorAttr( )
@@ -436,24 +457,48 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
 rProperty[XML_w] = rShape->getSize().Width * 
rConstraint.mfFactor;
 }
 
+// See if children requested more than 100% space in total: scale
+// down in that case.
+sal_Int32 nTotalWidth = 0;
+bool bSpaceFromConstraints = false;
 for (auto & aCurrShape : rShape->getChildren())
 {
-// Extract properties relevant for this shape from constraints.
-oox::OptValue oWidth;
-auto it = aProperties.find(aCurrShape->getInternalName());
-if (it != aProperties.end())
+oox::OptValue oWidth
+= findProperty(aProperties, aCurrShape->getInternalName(), 
XML_w);
+
+awt::Size aSize = aChildSize;
+if (oWidth.has())
 {
-LayoutProperty& rProperty = it->second;
-auto itProperty = rProperty.find(XML_w);
-if (itProperty != rProperty.end())
-oWidth = itProperty->second;
+aSize.Width = oWidth.get();
+bSpaceFromConstraints = true;
 }
+if (nDir == XML_fromL || nDir == XML_fromR)
+nTotalWidth += aSize.Width;
+}
+
+double fWidthScale = 1.0;
+if (nTotalWidth > rShape->getSize().Width && nTotalWidth)
+{
+fWidthScale = rShape->getSize().Width;
+fWidthScale /= nTotalWidth;
+}
+
+// Don't add automatic space if we take space from constraints.
+if (bSpaceFromConstraints)
+fSpace = 0;
+
+for (auto& aCurrShape : rShape->getChildren())
+{
+// Extract properties relevant for this shape from constraints.
+oox::OptValue oWidth
+= findProperty(aProperties, aCurrShape->getInternalName(), 
XML_w);
 
 aCurrShape->setPosition(aCurrPos);
 
 awt::Size aSize = aChildSize;
 if (oWidth.has())
 aSize.Width = oWidth.get();
+aSize.Width *= fWidthScale;
 aCurrShape->setSize(aSize);
 
 aCurrShape->setChildSize(aChildSize);
diff --git a/sd/qa/unit/data/pptx/table-list.pptx 
b/sd/qa/unit/data/pptx/table-list.pptx
new file mode 100644
index ..bc5fe7418e02
Binary files /dev/null and b/sd/qa/unit/data/pptx/table-list.pptx differ
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index 223b105181d5..3e3c6c3691b2 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -42,6 +42,7 @@ public:
 void testBaseRtoL();
 void testVertialBoxList();
 void testVertialBracketList();
+void testTableList();
 
  

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

2018-11-07 Thread Libreoffice Gerrit user
 sw/qa/uitest/writer_tests5/titlePage.py |   37 
 1 file changed, 37 insertions(+)

New commits:
commit faabaf7fe2b49085e40c7986e1b4b50973b23ab0
Author: Zdeněk Crhonek 
AuthorDate: Wed Nov 7 17:12:25 2018 +0100
Commit: Zdenek Crhonek 
CommitDate: Wed Nov 7 19:01:50 2018 +0100

uitest Title page dialog

Change-Id: I83015ea075c986ce5186f7a773df7b54ceb21636
Reviewed-on: https://gerrit.libreoffice.org/63034
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sw/qa/uitest/writer_tests5/titlePage.py 
b/sw/qa/uitest/writer_tests5/titlePage.py
new file mode 100644
index ..4df2cb1f3a14
--- /dev/null
+++ b/sw/qa/uitest/writer_tests5/titlePage.py
@@ -0,0 +1,37 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+#uitest sw / Title Page dialog
+
+class titlePage(UITestCase):
+def test_title_page(self):
+writer_doc = self.ui_test.create_doc_in_start_center("writer")
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+#dialog Title Page
+self.ui_test.execute_dialog_through_command(".uno:TitlePageDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+#print(xDialog.getChildren())
+
+#select new Pages; nr of pages =2 (click UP), save; verify pageCount = 
3
+newPages = xDialog.getChild("RB_INSERT_NEW_PAGES")
+newPages.executeAction("CLICK", tuple())
+xpageCount = xDialog.getChild("NF_PAGE_COUNT")
+xpageCount.executeAction("UP", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+self.assertEqual(document.CurrentController.PageCount, 3)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - net/Socket.cpp net/Socket.hpp wsd/LOOLWSD.cpp

2018-11-07 Thread Libreoffice Gerrit user
 net/Socket.cpp  |   12 
 net/Socket.hpp  |7 +--
 wsd/LOOLWSD.cpp |   14 ++
 3 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit d00aa78c9b7841e8ce68b92c04916be41ac6aadc
Author: Michael Meeks 
AuthorDate: Wed Nov 7 17:36:45 2018 +
Commit: Michael Meeks 
CommitDate: Wed Nov 7 17:37:25 2018 +

Don't name parameter after a local method.

Change-Id: I06929d23009b851cf3fb20da5bfe66d9795dcdd9

diff --git a/net/Socket.hpp b/net/Socket.hpp
index db4f58760..531f5358a 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -126,9 +126,9 @@ public:
 /// Create socket of the given type.
 static int createSocket(Type type);
 
-void setClientAddress(const std::string& clientAddress)
+void setClientAddress(const std::string& address)
 {
-_clientAddress = clientAddress;
+_clientAddress = address;
 }
 
 const std::string& clientAddress() const
commit 738abc1de7e5905d3b323f1ddb3938754024c844
Author: Michael Meeks 
AuthorDate: Wed Nov 7 17:35:46 2018 +
Commit: Michael Meeks 
CommitDate: Wed Nov 7 17:36:18 2018 +

Respond to SSL/TLS over http - when we don't expect it.

Change-Id: I48c7607cd4e1416fb4ac28c552c2cd96b51d60a6

diff --git a/net/Socket.cpp b/net/Socket.cpp
index 208efc3c9..44f5d18a4 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -607,6 +607,18 @@ namespace HttpHelper
 }
 }
 
+bool StreamSocket::sniffSSL() const
+{
+// Only sniffing the first bytes of a sockte.
+if (_bytesSent > 0 || _bytesRecvd != _inBuffer.size() || _bytesRecvd < 6)
+return false;
+
+// 0x  16 03 01 02 00 01 00 01
+return (_inBuffer[0] == 0x16 && // HANDSHAKE
+_inBuffer[1] == 0x03 && // SSL 3.0 / TLS 1.x
+_inBuffer[5] == 0x01);  // Handshake: CLIENT_HELLO
+}
+
 #endif // !MOBILEAPP
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/net/Socket.hpp b/net/Socket.hpp
index e62b01039..db4f58760 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -1073,6 +1073,9 @@ public:
 while (!_outBuffer.empty());
 }
 
+/// Does it look like we have some TLS / SSL where we don't expect it ?
+bool sniffSSL() const;
+
 protected:
 /// Override to handle reading of socket data differently.
 virtual int readData(char* buf, int len)
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 2c31e88c6..85040f13e 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2005,6 +2005,20 @@ private:
 std::shared_ptr socket = _socket.lock();
 
 #ifndef MOBILEAPP
+if (socket->sniffSSL())
+{
+LOG_ERR("Looks like SSL/TLS traffic on plain http port");
+std::ostringstream oss;
+oss << "HTTP/1.1 400\r\n"
+<< "Date: " << 
Poco::DateTimeFormatter::format(Poco::Timestamp(), 
Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
+<< "User-Agent: " << WOPI_AGENT_STRING << "\r\n"
+<< "Content-Length: 0\r\n"
+<< "\r\n";
+socket->send(oss.str());
+socket->shutdown();
+return;
+}
+
 Poco::MemoryInputStream message(&socket->getInBuffer()[0],
 socket->getInBuffer().size());;
 Poco::Net::HTTPRequest request;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 cppu/source/uno/data.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5f91153233b7f88470e2ccdc496c236b170b24f4
Author: Caolán McNamara 
AuthorDate: Wed Nov 7 13:05:41 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 7 18:18:51 2018 +0100

coverity#1441100 silence Out-of-bounds access

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

diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index 6c93fced581d..dcd2b19ec62e 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -54,6 +54,7 @@ void * binuno_queryInterface( void * pUnoI, 
typelib_TypeDescriptionReference * p
 typelib_TypeDescription* pQITD = nullptr;
 typelib_typedescriptionreference_getDescription(&pQITD,
 
pTXInterfaceDescr->ppAllMembers[0]);
+// coverity[callee_ptr_arith] - not a bug
 TYPELIB_DANGER_RELEASE(&pTXInterfaceDescr->aBase);
 return pQITD;
 }();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 embeddedobj/source/msole/olecomponent.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit fe83001574b4c8dbab166d8abb8014f78424278a
Author: Miklos Vajna 
AuthorDate: Wed Nov 7 12:24:47 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 17:32:33 2018 +0100

embeddedobj win32: avoid owning a lock while calling out to event listeners

The deadlock happens from time to time, when converting documents
containing OLE objects via remote UNO (from Java) -- after the
conversion, when closing the document.

The relevant stacktraces are:

>Debug.ListCallStack /ShowLineOffset /AllThreads
Callstack for Thread 8 (Thread Id: 32912 (0x8090)):
...
 6  sal3.dll!osl_acquireMutex(_oslMutexImpl * Mutex) Line 75
 7  [Inline Frame] emboleobj.dll!osl::Mutex::acquire() Line 56
 8  [Inline Frame] 
emboleobj.dll!osl::Guard::{ctor}(osl::Mutex &) Line 129
 9  emboleobj.dll!OleComponent::OnClose_Impl() Line 1399
 10 emboleobj.dll!OleWrapperAdviseSink::OnClose() Line 119

Callstack for Thread 11 (Thread Id: 21088 (0x5260)):
...
 11 ole32.dll!7fffc5e44e83()
 12 [Inline Frame] emboleobj.dll!OleComponent::CloseObject() Line 1012
 13 emboleobj.dll!OleComponent::Dispose() Line 484
 14 emboleobj.dll!OleComponent::close(unsigned char bDeliverOwnership) 
Line 1463
 15 emboleobj.dll!OleEmbeddedObject::GetRidOfComponent() Line 239
 16 emboleobj.dll!OleEmbeddedObject::Dispose() Line 275
 17 emboleobj.dll!OleEmbeddedObject::close(unsigned char 
bDeliverOwnership) Line 497
...
 26 swlo.dll!SwXTextDocument::close(unsigned char bDeliverOwnership) 
Line 617

OleComponent::OnClose_Impl() taking a lock is fine, but
OleComponent::close() takes a lock and then later it still calls out
(via OleComponent::CloseObject()), which is a no-go.

Fix the problem by making sure that callers of Dispose() own no lock at
the time of the function call, and taking the lock in Dispose() only
after the CloseObject() call (which invokes event listeners).

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

diff --git a/embeddedobj/source/msole/olecomponent.cxx 
b/embeddedobj/source/msole/olecomponent.cxx
index f9440f651bb2..a8fad97a35a7 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -454,8 +454,9 @@ OleComponent::~OleComponent()
 
 if ( m_pOleWrapClientSite || m_pImplAdviseSink || m_pInterfaceContainer || 
m_bOleInitialized )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+::osl::ClearableMutexGuard aGuard( m_aMutex );
 m_refCount++;
+aGuard.clear();
 try {
 Dispose();
 } catch( const uno::Exception& ) {}
@@ -472,12 +473,15 @@ OleComponent::~OleComponent()
 
 void OleComponent::Dispose()
 {
-// the mutex must be locked before this method is called
 if ( m_bDisposed )
 return;
 
+// Call CloseObject() without m_aMutex locked, since it will call
+// IOleObject::Close(), which can call event listeners, which can run on a
+// different thread.
 CloseObject();
 
+osl::MutexGuard aGuard(m_aMutex);
 if ( m_pOleWrapClientSite )
 {
 m_pOleWrapClientSite->disconnectOleComponent();
@@ -1408,7 +1412,7 @@ void OleComponent::OnClose_Impl()
 
 void SAL_CALL OleComponent::close( sal_Bool bDeliverOwnership )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+::osl::ClearableMutexGuard aGuard( m_aMutex );
 if ( m_bDisposed )
 throw lang::DisposedException(); // TODO
 
@@ -1453,6 +1457,7 @@ void SAL_CALL OleComponent::close( sal_Bool 
bDeliverOwnership )
 }
 }
 }
+aGuard.clear();
 
 Dispose();
 }
___
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' - 3 commits - sc/source svx/source

2018-11-07 Thread Libreoffice Gerrit user
 sc/source/ui/view/gridwin.cxx |7 +--
 sc/source/ui/view/tabview.cxx |4 ++--
 svx/source/svdraw/svdpdf.hxx  |   17 -
 3 files changed, 15 insertions(+), 13 deletions(-)

New commits:
commit be67fab68eb974e78686f8f9a2583af27d1119d4
Author: Marco Cecchetti 
AuthorDate: Sat Oct 27 17:25:06 2018 +
Commit: Jan Holesovsky 
CommitDate: Wed Nov 7 16:31:59 2018 +0100

lok: sc: make hi-dpi/zoom compatible with retrieving cell cursor

A bit different approach than trying to handle different zoom levels
at the samet time: instead, always handle the spreadsheet at 100%, but
use cairo to scale to the actual zoom level.

Change-Id: I318aec8fa4baaab2ee1f271223b2e10e26d41fcf


(cherry picked from commit 201045f9c47d219a2aa3a6571a48a92e6ac6569e)

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 400b2ee959a7..5bce39050830 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5631,7 +5631,7 @@ OString ScGridWindow::getCellCursor( int nOutputWidth, 
int nOutputHeight,
 return getCellCursor(zoomX, zoomY);
 }
 
-OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& 
rZoomY) const
+OString ScGridWindow::getCellCursor(const Fraction& /*rZoomX*/, const 
Fraction& /*rZoomY*/) const
 {
 // GridWindow stores a shown cell cursor in mpOOCursors, hence
 // we can use that to determine whether we would want to be showing
@@ -5647,7 +5647,10 @@ OString ScGridWindow::getCellCursor(const Fraction& 
rZoomX, const Fraction& rZoo
 Fraction defaultZoomX = pViewData->GetZoomX();
 Fraction defaultZoomY = pViewData->GetZoomY();
 
-pViewData->SetZoom(rZoomX, rZoomY, true);
+// hardcode to what we mean as 100% (256px tiles meaning 3840 twips)
+Fraction aFracX(long(256 * TWIPS_PER_PIXEL), 3840);
+Fraction aFracY(long(256 * TWIPS_PER_PIXEL), 3840);
+pViewData->SetZoom(aFracX, aFracY, true);
 
 Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, true );
 long nSizeXPix;
commit 681f771daf74e3a788cd1be0f85636a57000c46c
Author: Marco Cecchetti 
AuthorDate: Sat Oct 27 17:15:35 2018 +
Commit: Jan Holesovsky 
CommitDate: Wed Nov 7 16:31:49 2018 +0100

lok: calc: fix needed when position caching is disabled

In case it would be needed to disable position caching we can't
retrieve the nTotalPixels value from the LOKHeight/WidthHelper.

The new code works in both cases.

Change-Id: I65562dd4458eee40c5db958067fc91af6b3eb79e


(cherry picked from commit 2cadae31dc3b041650d89c94225923ba3839e8c1)

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 7c730e7d0a29..520dafa3cd18 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2589,7 +2589,7 @@ OUString ScTabView::getRowColumnHeaders(const 
tools::Rectangle& rRectangle)
 
 aBuffer.append("\"rows\": [\n");
 
-long nTotalPixels = aViewData.GetLOKHeightHelper().getPosition(nStartRow);
+long nTotalPixels = nStartHeightPx;
 SAL_INFO("sc.lok.header", "Row Header: [create string data for rows]: 
start row: "
 << nStartRow << " start height: " << nTotalPixels);
 
@@ -2728,7 +2728,7 @@ OUString ScTabView::getRowColumnHeaders(const 
tools::Rectangle& rRectangle)
 
 aBuffer.append("\"columns\": [\n");
 
-nTotalPixels = aViewData.GetLOKWidthHelper().getPosition(nStartCol);
+nTotalPixels = nStartWidthPx;
 SAL_INFO("sc.lok.header", "Col Header: [create string data for cols]: 
start col: "
 << nStartRow << " start width: " << nTotalPixels);
 
commit f5ae3fc056408a55365b04d45f98de64b667ab3c
Author: Marco Cecchetti 
AuthorDate: Sat Oct 27 16:53:10 2018 +
Commit: Jan Holesovsky 
CommitDate: Wed Nov 7 16:31:38 2018 +0100

fix compiler error: shadows a member of 'this'

Fix an annoying bug reported by compiler (warnings as errors enabled)
Moreover there are some minor change in formatting reported by
clang-format commit-hook

Change-Id: I148b0bc3384e9fab070bba4df5b15cbb44ece930


(cherry picked from commit e30214acc7f9d527876354200c8b9b792a323ecf)

diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx
index a4a59a8bff82..6b4b0d63a816 100644
--- a/svx/source/svdraw/svdpdf.hxx
+++ b/svx/source/svdraw/svdpdf.hxx
@@ -41,7 +41,7 @@ class SdrPage;
 class SdrObject;
 class SvdProgressInfo;
 typedef struct fpdf_document_t__* FPDF_DOCUMENT;
-typedef struct fpdf_pageobject_t__* FPDF_PAGEOBJECT;  // (text, path, etc.)
+typedef struct fpdf_pageobject_t__* FPDF_PAGEOBJECT; // (text, path, etc.)
 typedef struct fpdf_textpage_t__* FPDF_TEXTPAGE;
 
 // Helper Class to import PDF
@@ -60,13 +60,13 @@ class ImpSdrPdfImport final
 {
 }
 
-Matrix(double a, double b, double c, double d, double e, double f)
-: ma(a)
-, mb(b)
-, mc(c)
-, md(d

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

2018-11-07 Thread Libreoffice Gerrit user
 loleaflet/src/layer/AnnotationManager.js |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 5ba1dec1f82fcb66e3b154fa0a507497a52a6714
Author: Michael Meeks 
AuthorDate: Wed Nov 7 14:14:46 2018 +
Commit: Michael Meeks 
CommitDate: Wed Nov 7 14:17:35 2018 +

Avoid synchronous re-layout of comments / red-lines on each modification.

Change-Id: I698c6d47a58cfab2096900e01d19c8f4d4693fc4

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index 56579ccd2..6927eb32e 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -328,7 +328,7 @@ L.AnnotationManager = L.Class.extend({
}
},
 
-   layout: function (zoom) {
+   doLayout: function (zoom) {
var docRight = 
this._map.project(this._map.options.docBounds.getNorthEast());
var topRight = docRight.add(L.point(this.options.marginX, 
this.options.marginY));
var latlng, layoutBounds, point, idx;
@@ -414,6 +414,19 @@ L.AnnotationManager = L.Class.extend({
}
},
 
+   layout: function (zoom) {
+   if (zoom)
+   this.doLayout(zoom);
+   else if (!this._layoutTimer) {
+   var me = this;
+   me._layoutTimer = setTimeout(function() {
+   delete me._layoutTimer;
+   me.doLayout(zoom);
+   }, 250 /* ms */);
+   } // else - avoid excessive re-layout
+
+   },
+
add: function (comment) {
var annotation = 
L.annotation(this._map._docLayer._twipsToLatLng(comment.anchorPos.getTopRight()),
 comment,
comment.id === 'new' ? {noMenu: true} : 
{}).addTo(this._map);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src

2018-11-07 Thread Libreoffice Gerrit user
 loleaflet/src/layer/AnnotationManager.js |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit c48054f18a1c34d5460a2b9ec74fe57c122ef0a6
Author: Michael Meeks 
AuthorDate: Wed Nov 7 14:14:46 2018 +
Commit: Michael Meeks 
CommitDate: Wed Nov 7 14:16:07 2018 +

Avoid synchronous re-layout of comments / red-lines on each modification.

Change-Id: I698c6d47a58cfab2096900e01d19c8f4d4693fc4

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index 5636456ba..d5007b14a 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -330,7 +330,7 @@ L.AnnotationManager = L.Class.extend({
}
},
 
-   layout: function (zoom) {
+   doLayout: function (zoom) {
var docRight = 
this._map.project(this._map.options.docBounds.getNorthEast());
var topRight = docRight.add(L.point(this.options.marginX, 
this.options.marginY));
var latlng, layoutBounds, point, idx;
@@ -416,6 +416,19 @@ L.AnnotationManager = L.Class.extend({
}
},
 
+   layout: function (zoom) {
+   if (zoom)
+   this.doLayout(zoom);
+   else if (!this._layoutTimer) {
+   var me = this;
+   me._layoutTimer = setTimeout(function() {
+   delete me._layoutTimer;
+   me.doLayout(zoom);
+   }, 250 /* ms */);
+   } // else - avoid excessive re-layout
+
+   },
+
add: function (comment) {
var annotation = 
L.annotation(this._map._docLayer._twipsToLatLng(comment.anchorPos.getTopRight()),
 comment,
comment.id === 'new' ? {noMenu: true} : 
{}).addTo(this._map);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 include/sot/storage.hxx|2 +-
 include/tools/stream.hxx   |6 +++---
 sot/source/sdstor/storage.cxx  |   10 +++---
 tools/source/stream/stream.cxx |   16 ++--
 4 files changed, 21 insertions(+), 13 deletions(-)

New commits:
commit dbe94dd3b64e74f661ea7193d8e06ac91f1dd7b0
Author: Noel Grandin 
AuthorDate: Wed Nov 7 09:12:23 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 15:07:11 2018 +0100

tdf#120657 Pie chart saved as DOC doesn't preview in MSO

regression from

commit 9ec8bf8f22fe74884185492ef2576ce79b41e4f1
add SvStream::TellEnd

the problem is that in this stack trace

sot/source/sdstor/stgelem.hxx:130
sot/source/sdstor/stgdir.cxx:300
sot/source/sdstor/stg.cxx:245
sot/source/sdstor/storage.cxx:187
tools/source/stream/stream.cxx:1908
sw/source/filter/ww8/ww8scan.cxx:6267

The StgEntry returns a size of 0. If we do something else to the
SotStorageStream first, then it materialises a temporary stream, and
that stream returns a valid size.

Also implement suggestions from mike kaganski:

IMO, it would be more robust to implement this new function as virtual
(instead of the remainingSize()), and reimplement the latter as
non-virtual one using the new one and doing the necessary correction.

Change-Id: Id1462d918570a684ec67099c30181436a27d3c6a
Reviewed-on: https://gerrit.libreoffice.org/62984
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Noel Grandin 

diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index 6a7e25af9dfb..cb1c0baa3938 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -56,7 +56,7 @@ public:
 voidCopyTo( SotStorageStream * pDestStm );
 boolCommit();
 boolSetProperty( const OUString& rName, const 
css::uno::Any& rValue );
-virtual sal_uInt64 remainingSize() override;
+virtual sal_uInt64  TellEnd() override;
 };
 
 class  BaseStorage;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 4da1d2e0adb7..c627ed494998 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -272,9 +272,9 @@ public:
 sal_uInt64  Seek( sal_uInt64 nPos );
 sal_uInt64  SeekRel( sal_Int64 nPos );
 sal_uInt64  Tell() const { return m_nBufFilePos + m_nBufActualPos;  }
-sal_uInt64  TellEnd();
+virtual sal_uInt64 TellEnd();
 // length between current (Tell()) pos and end of stream
-virtual sal_uInt64 remainingSize();
+sal_uInt64  remainingSize();
 voidFlush();
 // next Tell() <= nSize
 boolSetStreamSize( sal_uInt64 nSize );
@@ -669,7 +669,7 @@ public:
 
 voidObjectOwnsMemory( bool bOwn ) { bOwnsData = bOwn; }
 voidSetResizeOffset( std::size_t nNewResize ) { nResize = 
nNewResize; }
-virtual sal_uInt64 remainingSize() override { FlushBuffer(true); return 
GetEndOfData() - Tell(); }
+virtual sal_uInt64 TellEnd() override { FlushBuffer(true); return 
nEndOfData; }
 };
 
 #endif
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index cff3520264ba..bc78bddbbe04 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -181,12 +181,16 @@ sal_uInt32 SotStorageStream::GetSize() const
 return nSize;
 }
 
-sal_uInt64 SotStorageStream::remainingSize()
+sal_uInt64 SotStorageStream::TellEnd()
 {
+// Need to flush the buffer so we materialise the stream and return the 
correct answer
+// otherwise we return a 0 value from StgEntry::GetSize
+FlushBuffer(true);
+
 if (pOwnStm)
-return pOwnStm->GetSize() - Tell();
+return pOwnStm->GetSize();
 
-return SvStream::remainingSize();
+return SvStream::TellEnd();
 }
 
 void SotStorageStream::CopyTo( SotStorageStream * pDestStm )
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 818726b2a619..a0160348dff7 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1425,12 +1425,21 @@ bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
 sal_uInt64 SvStream::remainingSize()
 {
 sal_uInt64 const nCurr = Tell();
-sal_uInt64 const nEnd = Seek(STREAM_SEEK_TO_END);
+sal_uInt64 const nEnd = TellEnd();
 sal_uInt64 nMaxAvailable = nEnd > nCurr ? (nEnd-nCurr) : 0;
 Seek(nCurr);
 return nMaxAvailable;
 }
 
+sal_uInt64 SvStream::TellEnd()
+{
+FlushBuffer(true);
+sal_uInt64 const nCurr = Tell();
+sal_uInt64 const nEnd = Seek(STREAM_SEEK_TO_END);
+Seek(nCurr);
+return nEnd;
+}
+
 void SvStream::Flush()
 {
 FlushBuffer(m_isConsistent);
@@ -1903,11 +1912,6 @@ void SvMemoryStream::SetSize(sal_uInt64 const nNewSize)
 ReAllocateMemory( nDiff );
 }
 
-sal_uInt64 SvStream::TellEnd()
-{
-return Tell() + remainingSize();
-}
-
 //Create a OString of 

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

2018-11-07 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf117137.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx   |   16 
 2 files changed, 16 insertions(+)

New commits:
commit edbb7a39c7a954f8c773e6bdf136e65b70299dd5
Author: Miklos Vajna 
AuthorDate: Wed Nov 7 10:39:47 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 14:55:44 2018 +0100

tdf#117137 sw: add testcase for this DOCX import bug

Fails with commit ac27f4e7abf5339f71d4f5f3fc09a13b25669fe4 (tdf#117137:
DOCX import: don't try to set grab-bag as UNO prop, 2018-04-21)
reverted.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf117137.docx 
b/sw/qa/extras/ooxmlexport/data/tdf117137.docx
new file mode 100644
index ..1c2cc92b20f6
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf117137.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 7c24fa3751fc..8a98742a0532 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -845,6 +845,22 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105444, "tdf105444.docx")
 assertXPath(pXmlComm, "/w:comments/w:comment/w:p", 1);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
+{
+// Paragraphs were not part of a numbering anymore after roundtrip.
+uno::Reference xPara1(getParagraph(1), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xPara1.is());
+CPPUNIT_ASSERT(xPara1->getPropertyValue("NumberingRules").hasValue());
+
+uno::Reference xPara2(getParagraph(2), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xPara2.is());
+CPPUNIT_ASSERT(xPara2->getPropertyValue("NumberingRules").hasValue());
+
+uno::Reference xPara3(getParagraph(3), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xPara3.is());
+CPPUNIT_ASSERT(xPara3->getPropertyValue("NumberingRules").hasValue());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 1df8aa9f3e4612270c8bf5d6b05f7cb2526f2170
Author: Noel Grandin 
AuthorDate: Wed Nov 7 10:57:49 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 14:52:27 2018 +0100

ifdef out more fontfeature test on windows

tb72 fails this regularly

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

diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx 
b/vcl/qa/cppunit/FontFeatureTest.cxx
index fca68240f0da..297ccc991121 100644
--- a/vcl/qa/cppunit/FontFeatureTest.cxx
+++ b/vcl/qa/cppunit/FontFeatureTest.cxx
@@ -84,10 +84,13 @@ void FontFeatureTest::testGetFontFeatures()
 
 // periodically fails on windows tinderbox like tb72 with a missing "ss02"
 CPPUNIT_ASSERT_EQUAL(aExpectedFeaturesString, aFeaturesString);
-#endif
 
 // Check C2SC feature
 {
+// periodically fails on the Windows tb72 tinderboxen with
+// equality assertion failed
+//- Expected: 1664250723
+//- Actual  : 1684826471
 vcl::font::Feature& rFeature = rDefaultFontFeatures[0];
 CPPUNIT_ASSERT_EQUAL(vcl::font::featureCode("c2sc"), 
rFeature.m_aID.m_aFeatureCode);
 
@@ -99,6 +102,7 @@ void FontFeatureTest::testGetFontFeatures()
 
 CPPUNIT_ASSERT_EQUAL(size_t(0), 
rFracFeatureDefinition.getEnumParameters().size());
 }
+#endif
 
 // Check FRAC feature
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 sw/source/core/txtnode/thints.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 2d5c38d41dc8a4d20b34307f23b67d957776019b
Author: Michael Weghorn 
AuthorDate: Wed Nov 7 12:13:40 2018 +0100
Commit: Michael Weghorn 
CommitDate: Wed Nov 7 14:24:47 2018 +0100

Drop unused variable

Change-Id: Ie35a1f526d449989cadbbda4bf87e4b96cbcb8ef
Reviewed-on: https://gerrit.libreoffice.org/63012
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index 40f4ab7ccc29..e467a79f7634 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -592,7 +592,6 @@ void SwpHints::BuildPortions( SwTextNode& rNode, 
SwTextAttr& rNewHint,
 const bool bNoLengthAttribute = nThisStart == nThisEnd;
 
 std::vector aInsDelHints;
-std::vector::iterator aIter;
 
 assert( RES_TXTATR_CHARFMT == rNewHint.Which() ||
 RES_TXTATR_AUTOFMT == rNewHint.Which() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2018-11-07 Thread Libreoffice Gerrit user
 kit/Kit.cpp |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit adbcc28273da6511050ca37c3d5ee4c93ac3ba7f
Author: Tor Lillqvist 
AuthorDate: Wed Nov 7 13:21:25 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Nov 7 14:19:02 2018 +0100

If we skipped all tiles, don't bother sending an empty tilecombine: message

It would just be ignored later anyway, and produce the warning "WRN
Dropping empty tilecombine response".

Change-Id: I6d92367262dc306369f2ca6c2e1964b5d151acc1
Reviewed-on: https://gerrit.libreoffice.org/63013
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index c78f73c3b..8eda6ce10 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1179,6 +1179,12 @@ public:
 renderArea.getWidth() << ", " << renderArea.getHeight() << ") 
" <<
 " took " << (elapsed/1000.) << " ms (including the 
paintTile).");
 
+if (tileIndex == 0)
+{
+LOG_DBG("All tiles skipped, not producing empty tilecombine: 
message");
+return;
+}
+
 const auto tileMsg = 
ADD_DEBUG_RENDERID(tileCombined.serialize("tilecombine:")) + "\n";
 LOG_TRC("Sending back painted tiles for " << tileMsg);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New Defects reported by Coverity Scan for LibreOffice

2018-11-07 Thread scan-admin
Hi,

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

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

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


** CID 1441102:  Incorrect expression  (COPY_PASTE_ERROR)
/filter/source/graphicfilter/ipict/ipict.cxx: 924 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle *, 
tools::Rectangle *, bool, bool)()



*** CID 1441102:  Incorrect expression  (COPY_PASTE_ERROR)
/filter/source/graphicfilter/ipict/ipict.cxx: 924 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle *, 
tools::Rectangle *, bool, bool)()
918 sal_uInt16  nByteCount, nCount, nD;
919 sal_uLong   nSrcBitsPos;
920 
921 if (nWidth > nRowBytes / 2)
922 return 0x;
923 
>>> CID 1441102:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "nRowBytes" in "nRowBytes < 8" looks like a copy-paste error.
924 if (nRowBytes < 8 || nPackType == 1)
925 {
926 if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt16) 
* nWidth))
927 return 0x;
928 }
929 else

** CID 1441101:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/comphelper/source/misc/profilezone.cxx: 44 in 
comphelper::ProfileRecording::addRecording(const char *, long long)()



*** CID 1441101:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/comphelper/source/misc/profilezone.cxx: 44 in 
comphelper::ProfileRecording::addRecording(const char *, long long)()
38 }
39 ProfileZone::g_bRecording = bStartRecording;
40 }
41 
42 long long addRecording(const char * aProfileId, long long aCreateTime)
43 {
>>> CID 1441101:  Incorrect expression  (ASSERT_SIDE_EFFECT)
>>> Argument "comphelper::ProfileZone::g_bRecording" of assert() has a side 
>>> effect because the variable is volatile.  The containing function might 
>>> work differently in a non-debug build.
44 assert( ProfileZone::g_bRecording );
45 
46 TimeValue systemTime;
47 osl_getSystemTime( &systemTime );
48 long long aTime = static_cast(systemTime.Seconds) * 
100 + systemTime.Nanosec/1000;
49 

** CID 1441100:  Memory - corruptions  (ARRAY_VS_SINGLETON)



*** CID 1441100:  Memory - corruptions  (ARRAY_VS_SINGLETON)
/cppu/source/uno/data.cxx: 57 in binuno_queryInterface::[lambda() (instance 
1)]::operator ()() const()
51 
TYPELIB_DANGER_GET(reinterpret_cast(&pTXInterfaceDescr),
52type_XInterface);
53 assert(pTXInterfaceDescr->ppAllMembers);
54 typelib_TypeDescription* pQITD = nullptr;
55 typelib_typedescriptionreference_getDescription(&pQITD,
56 
pTXInterfaceDescr->ppAllMembers[0]);
>>> CID 1441100:  Memory - corruptions  (ARRAY_VS_SINGLETON)
>>> Passing "&pTXInterfaceDescr->aBase" to function 
>>> "TYPELIB_DANGER_RELEASE" which uses it as an array. This might corrupt or 
>>> misinterpret adjacent memory locations.
57 TYPELIB_DANGER_RELEASE(&pTXInterfaceDescr->aBase);
58 return pQITD;
59 }();
60 
61 uno_Any aRet, aExc;
62 uno_Any * pExc = &aExc;

** CID 1441099:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 1134 in OutputDevice::ImplNewFont() const()



*** CID 1441099:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 1134 in OutputDevice::ImplNewFont() const()
1128 if( (nNewWidth != nOrigWidth) && (nNewWidth != 0) )
1129 {
1130 Size aOrigSize = maFont.GetFontSize();
1131 const_cast(maFont).SetFontSize( Size( 
nNewWidth, aSize.Height() ) );
1132 mbMap = false;
1133 mbNewFont = true;
>>> CID 1441099:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ImplNewFont" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
1134 ImplNewFont();  // recurse once using stretched width
1135 mbMap = true;
1136 const_cast(maFont).SetFontSize( aOrigSize );
1137 }
1138 }
1139 



To view the defects in Coverity S

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 3 commits - comphelper/source desktop/source include/comphelper include/LibreOfficeKit sc/source vcl/headless

2018-11-07 Thread Libreoffice Gerrit user
 comphelper/source/misc/lok.cxx|   13 +++
 desktop/source/lib/init.cxx   |   50 --
 include/LibreOfficeKit/LibreOfficeKit.h   |9 +
 include/LibreOfficeKit/LibreOfficeKit.hxx |   13 ++-
 include/comphelper/lok.hxx|4 ++
 sc/source/ui/unoobj/docuno.cxx|   10 +++---
 sc/source/ui/view/gridwin4.cxx|   32 +--
 vcl/headless/svpvd.cxx|   15 +++--
 8 files changed, 124 insertions(+), 22 deletions(-)

New commits:
commit e94ceb6eff0edd1699d21b8b860f6929236a90ef
Author: Jan Holesovsky 
AuthorDate: Fri Oct 26 15:21:06 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Wed Nov 7 12:53:17 2018 +0100

lokdialog: Implement hi-dpi support for the routed dialogs.

Change-Id: I770c605a049b7ac9c26c2773414eef8b6fc093a2

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5b5381c002fa..a8d5e87eed08 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -678,6 +678,11 @@ static void doc_paintWindow(LibreOfficeKitDocument* pThis, 
unsigned nLOKWindowId
 const int nX, const int nY,
 const int nWidth, const int nHeight);
 
+static void doc_paintWindowDPI(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, unsigned char* pBuffer,
+   const int nX, const int nY,
+   const int nWidth, const int nHeight,
+   const double fDPIScale);
+
 static void doc_postWindow(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nAction);
 
 static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart);
@@ -733,6 +738,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getPartHash = doc_getPartHash;
 
 m_pDocumentClass->paintWindow = doc_paintWindow;
+m_pDocumentClass->paintWindowDPI = doc_paintWindowDPI;
 m_pDocumentClass->postWindow = doc_postWindow;
 
 m_pDocumentClass->setViewLanguage = doc_setViewLanguage;
@@ -3566,11 +3572,20 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pTh
 return nullptr;
 }
 
-static void doc_paintWindow(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId,
+static void doc_paintWindow(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
 unsigned char* pBuffer,
 const int nX, const int nY,
 const int nWidth, const int nHeight)
 {
+doc_paintWindowDPI(pThis, nLOKWindowId, pBuffer, nX, nY, nWidth, nHeight, 
1.0);
+}
+
+static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId,
+   unsigned char* pBuffer,
+   const int nX, const int nY,
+   const int nWidth, const int nHeight,
+   const double fDPIScale)
+{
 SolarMutexGuard aGuard;
 if (gImpl)
 gImpl->maLastExceptionMsg.clear();
@@ -3582,6 +3597,11 @@ static void doc_paintWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWind
 return;
 }
 
+// Setup cairo to draw with the changed DPI scale (and return back to 1.0
+// when the painting finishes)
+comphelper::ScopeGuard dpiScaleGuard([]() { 
comphelper::LibreOfficeKit::setDPIScale(1.0); });
+comphelper::LibreOfficeKit::setDPIScale(fDPIScale);
+
 #if defined(IOS)
 
 CGContextRef cgc = CGBitmapContextCreate(pBuffer, nWidth, nHeight, 8, 
nWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | 
kCGImageByteOrder32Little);
@@ -3615,7 +3635,7 @@ static void doc_paintWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWind
 pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nWidth, nHeight), 
Fraction(1.0), Point(), pBuffer);
 
 MapMode aMapMode(pDevice->GetMapMode());
-aMapMode.SetOrigin(Point(-nX, -nY));
+aMapMode.SetOrigin(Point(-(nX / fDPIScale), -(nY / fDPIScale)));
 pDevice->SetMapMode(aMapMode);
 
 comphelper::LibreOfficeKit::setDialogPainting(true);
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 0799584d3097..f8021065af1e 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -309,6 +309,15 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::getPartInfo().
 char* (*getPartInfo) (LibreOfficeKitDocument* pThis, int nPart);
 
+/// Paints window with given id to the buffer with the give DPI scale
+/// (every pixel is dpiscale-times larger).
+/// @see lok::Document::paintWindow().
+void (*paintWindowDPI) (LibreOfficeKitDocument* pThis, unsigned nWindowId,
+unsigned char* pBuffer,
+const int x, const int y,
+const int width, const int h

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

2018-11-07 Thread Libreoffice Gerrit user
 sfx2/qa/cppunit/test_misc.cxx |   19 +++
 1 file changed, 3 insertions(+), 16 deletions(-)

New commits:
commit caec23449a21c0eacbb593330a5b22f8c60d58e8
Author: Miklos Vajna 
AuthorDate: Tue Nov 6 21:46:03 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 13:13:32 2018 +0100

CppunitTest_sfx2_misc: use CPPUNIT_TEST_FIXTURE()

Allows not spelling out the test names 3 times.

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

diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index 2f419103cbd8..7022641db583 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -50,9 +50,6 @@ class MiscTest
 {
 public:
 virtual void setUp() override;
-void testODFCustomMetadata();
-void testNoThumbnail();
-void testHardLinks();
 
 virtual void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override
 {
@@ -64,14 +61,6 @@ public:
 xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("foo"), 
BAD_CAST("http://foo.net";));
 xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("baz"), 
BAD_CAST("http://baz.net";));
 }
-
-CPPUNIT_TEST_SUITE(MiscTest);
-CPPUNIT_TEST(testODFCustomMetadata);
-CPPUNIT_TEST(testNoThumbnail);
-CPPUNIT_TEST(testHardLinks);
-CPPUNIT_TEST_SUITE_END();
-
-private:
 };
 
 void MiscTest::setUp()
@@ -81,7 +70,7 @@ void MiscTest::setUp()
 SfxApplication::GetOrCreate();
 }
 
-void MiscTest::testODFCustomMetadata()
+CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata)
 {
 uno::Reference const xProps(
 ::com::sun::star::document::DocumentProperties::create(m_xContext));
@@ -110,7 +99,7 @@ void MiscTest::testODFCustomMetadata()
 aTempFile.EnableKillingFile();
 }
 
-void MiscTest::testNoThumbnail()
+CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail)
 {
 // Load a document.
 const OUString 
aURL(m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/hello.odt"));
@@ -160,7 +149,7 @@ void MiscTest::testNoThumbnail()
 xComponent->dispose();
 }
 
-void MiscTest::testHardLinks()
+CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
 {
 #ifndef _WIN32
 OUString aSourceDir = 
m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/");
@@ -201,8 +190,6 @@ void MiscTest::testHardLinks()
 #endif
 }
 
-CPPUNIT_TEST_SUITE_REGISTRATION(MiscTest);
-
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 include/unotest/bootstrapfixturebase.hxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 20f84aa139e122733f215fc539dcbcdcfce18c81
Author: Miklos Vajna 
AuthorDate: Tue Nov 6 21:45:36 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 13:13:15 2018 +0100

unotest: backport CPPUNIT_TEST_FIXTURE macro from cppunit.git

Added upstream as

.

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

diff --git a/include/unotest/bootstrapfixturebase.hxx 
b/include/unotest/bootstrapfixturebase.hxx
index 67be3b5f4ea7..0a967d34d736 100644
--- a/include/unotest/bootstrapfixturebase.hxx
+++ b/include/unotest/bootstrapfixturebase.hxx
@@ -22,6 +22,21 @@
 #include 
 #include 
 
+// For cppunit < 1.15.0.
+#ifndef CPPUNIT_TEST_FIXTURE
+#define CPPUNIT_TEST_FIXTURE(TestClass, TestName)  
\
+class TestName : public TestClass  
\
+{  
\
+public:
\
+void TestBody();   
\
+CPPUNIT_TEST_SUITE(TestName);  
\
+CPPUNIT_TEST(TestBody);
\
+CPPUNIT_TEST_SUITE_END();  
\
+}; 
\
+CPPUNIT_TEST_SUITE_REGISTRATION(TestName); 
\
+void TestName::TestBody()
+#endif
+
 namespace test {
 
 // Class to do lots of heavy-lifting UNO & environment
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 svx/source/table/tablelayouter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 577d4f115fd607d36ad574872f187b7c08223ace
Author: Caolán McNamara 
AuthorDate: Wed Nov 7 09:03:26 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 7 12:58:49 2018 +0100

ofz#11274 integer-overflow

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

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index 076a0f6ed40a..4012f2fa429a 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -825,7 +825,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& 
rArea, bool bFit )
 }
 }
 if( bChanges )
-nCurrentHeight += maRows[nRow].mnSize - nOldSize;
+nCurrentHeight = o3tl::saturating_add(nCurrentHeight, 
maRows[nRow].mnSize - nOldSize);
 }
 
 // now scale if wanted and needed
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sdext/source sfx2/source slideshow/source solenv/bin soltools/cpp sot/source starmath/source svl/source svtools/source svx/source

2018-11-07 Thread Libreoffice Gerrit user
 i18npool/source/nativenumber/nativenumbersupplier.cxx|   12 +--
 sdext/source/minimizer/optimizerdialog.cxx   |   21 ++---
 sfx2/source/appl/workwin.cxx |   17 +---
 sfx2/source/control/dispatch.cxx |7 -
 sfx2/source/doc/DocumentMetadataAccess.cxx   |5 -
 sfx2/source/view/lokcharthelper.cxx  |   23 ++---
 slideshow/source/engine/animationnodes/animationbasenode.cxx |6 -
 solenv/bin/concat-deps.c |   13 +--
 soltools/cpp/_cpp.c  |7 -
 sot/source/sdstor/stgdir.cxx |5 -
 sot/source/sdstor/storage.cxx|7 -
 starmath/source/view.cxx |4 -
 svl/source/fsstor/fsstorage.cxx  |   18 +---
 svtools/source/config/colorcfg.cxx   |7 -
 svtools/source/control/valueset.cxx  |   29 ++-
 svtools/source/dialogs/prnsetup.cxx  |7 -
 svtools/source/uno/addrtempuno.cxx   |5 -
 svx/source/form/fmshimp.cxx  |7 -
 svx/source/sidebar/line/LinePropertyPanelBase.cxx|   22 ++---
 svx/source/svdraw/svddrgmt.cxx   |   44 ---
 svx/source/svdraw/svdmodel.cxx   |7 -
 svx/source/svdraw/svdpoev.cxx|   23 ++---
 svx/source/svdraw/svdviter.cxx   |7 -
 svx/source/svdraw/svdxcgv.cxx|   14 +--
 svx/source/table/svdotable.cxx   |9 --
 svx/source/tbxctrls/extrusioncontrols.cxx|   15 +--
 26 files changed, 126 insertions(+), 215 deletions(-)

New commits:
commit 5404f75a2fa863b97bdf8432f647053f0bff726e
Author: Noel Grandin 
AuthorDate: Wed Nov 7 09:26:57 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 12:39:11 2018 +0100

loplugin:collapseif in sdext..svx

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

diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx 
b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index e3a023d792df..34dcae601029 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -216,13 +216,11 @@ static OUString AsciiToNative( const OUString& inStr, 
sal_Int32 nCount,
 if (count > 0 && 
number->multiplierExponent[number->exponentCount-1] == 1 &&
 newStr[count-1] == numberChar[0])
 count--;
-if (bNotZero && _count == count) {
-if (end != len) {
-newStr[count] = number->multiplierChar[0];
-if (useOffset)
-offset[count] = i - len;
-count++;
-}
+if (bNotZero && _count == count && end != len) {
+newStr[count] = number->multiplierChar[0];
+if (useOffset)
+offset[count] = i - len;
+count++;
 }
 }
 if (! bNotZero && ! (number->numberFlag & 
NUMBER_OMIT_ONLY_ZERO)) {
diff --git a/sdext/source/minimizer/optimizerdialog.cxx 
b/sdext/source/minimizer/optimizerdialog.cxx
index 9185f8e4f327..f7aa8cb9564e 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -173,22 +173,19 @@ void OptimizerDialog::UpdateConfiguration()
 }
 
 aAny = getControlProperty( "CheckBox3Pg3", "State" );
-if ( aAny >>= nInt16 )
+if ( (aAny >>= nInt16) && nInt16 )
 {
-if ( nInt16 )
+aAny = getControlProperty( "ListBox0Pg3", "SelectedItems" );
+if ( aAny >>= aSelectedItems )
 {
-aAny = getControlProperty( "ListBox0Pg3", "SelectedItems" );
-if ( aAny >>= aSelectedItems )
+if ( aSelectedItems.getLength() )
 {
-if ( aSelectedItems.getLength() )
+sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
+aAny = getControlProperty( "ListBox0Pg3", "StringItemList" );
+if ( aAny >>= aStringItemList )
 {
-sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
-aAny = getControlProperty( "ListBox0Pg3", "StringItemList" 
);
-if ( aAny >>= aStringItemList )
-{
-

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

2018-11-07 Thread Libreoffice Gerrit user
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 51fdcdb424933136b8408c8eacc330d2bec9fc1c
Author: Andras Timar 
AuthorDate: Wed Nov 7 12:39:47 2018 +0100
Commit: Andras Timar 
CommitDate: Wed Nov 7 12:39:47 2018 +0100

configure: undefined option is "" not "no"

Change-Id: I39cba79aa98b7e0d13a53b37cba0833c5a5267a8

diff --git a/configure.ac b/configure.ac
index b70958b71..39e4cf3b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,7 +434,7 @@ AM_CONDITIONAL([ENABLE_DEBUG], [test "$ENABLE_DEBUG" = 
"true"])
 
 mobile_app=
 AC_MSG_CHECKING([Is this a mobile app])
-if test "$enable_gtkapp" != "no" -o "$enable_iosapp" != "no"; then
+if test "$enable_gtkapp" = "yes" -o "$enable_iosapp" = "yes"; then
  AC_MSG_RESULT([Yes])
  mobile_app=true;
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/bin

2018-11-07 Thread Libreoffice Gerrit user
 solenv/bin/native-code.py |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 39efec060719bb2654ba20844ba02429371a4ffb
Author: Caolán McNamara 
AuthorDate: Wed Nov 7 11:24:03 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 7 11:24:03 2018 +

oss-fuzz build failure

Change-Id: I27e822ac2432eb2746ed9181cee158012e54252e

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index b7f397af4011..899baa5ff979 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -610,6 +610,7 @@ print ("""/*
 #include 
 #include 
 #include 
+#include 
 
 """)
 if not options.pure_c:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dev-tools.git: qa/createBlogReport.py

2018-11-07 Thread Libreoffice Gerrit user
 qa/createBlogReport.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 958b86687bdd0b69031809a5b53a5518e9ab16e3
Author: Xisco Fauli 
AuthorDate: Wed Nov 7 12:06:00 2018 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 7 12:06:00 2018 +0100

QA: Verified bugs -> Verified bug fixes

diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py
index 2e70bba..87abbf2 100755
--- a/qa/createBlogReport.py
+++ b/qa/createBlogReport.py
@@ -330,7 +330,7 @@ def createReport(statList):
 createSection(fp, statList['confirmed'], "Triaged Bugs", "triaged", 
"Triagers", "gold")
 createSection(fp, statList['fixed'], "Fixed Bugs", "fixed", "Fixers", 
"darksalmon")
 createList(fp, statList['criticalFixed'], "List of critical bugs fixed")
-createSection(fp, statList['verified'], "Verified Bugs", "verified", 
"Verifiers", "palegreen")
+createSection(fp, statList['verified'], "Verified bug fixes", "verified", 
"Verifiers", "palegreen")
 createSection(fp, statList['metabug'], "Categorized Bugs", "categorized 
with a metabug", "Categorizers", "lightpink")
 createSection(fp, statList['keywords']['bisected'], "Bisected Bugs", 
"bisected", "Bisecters", "orange")
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cppcanvas/source filter/source icon-themes/breeze icon-themes/colibre include/svx sw/source

2018-11-07 Thread Libreoffice Gerrit user
 cppcanvas/source/mtfrenderer/textlineshelper.hxx |2 +-
 filter/source/config/cache/filterfactory.cxx |2 +-
 icon-themes/breeze/links.txt |2 +-
 icon-themes/colibre/links.txt|2 +-
 include/svx/svdobj.hxx   |2 +-
 sw/source/core/docnode/ndsect.cxx|2 +-
 sw/source/core/text/frmcrsr.cxx  |2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 6751ed9e438f19e4062f1eea91e9dbab3040b6ad
Author: Andrea Gelmini 
AuthorDate: Tue Nov 6 11:32:48 2018 +0100
Commit: Julien Nabet 
CommitDate: Wed Nov 7 12:09:46 2018 +0100

Fix typos

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

diff --git a/cppcanvas/source/mtfrenderer/textlineshelper.hxx 
b/cppcanvas/source/mtfrenderer/textlineshelper.hxx
index fb06e345b64b..ca13d9482ad2 100644
--- a/cppcanvas/source/mtfrenderer/textlineshelper.hxx
+++ b/cppcanvas/source/mtfrenderer/textlineshelper.hxx
@@ -65,7 +65,7 @@ public:
 
 ::basegfx::B2DSize getOverallSize() const { return maOverallSize; }
 
-/** Init textlines with specified linewdith and TextLineInfo.
+/** Init textlines with specified linewidth and TextLineInfo.
  */
 void init(double nLineWidth, const tools::TextLineInfo& rLineInfo);
 
diff --git a/filter/source/config/cache/filterfactory.cxx 
b/filter/source/config/cache/filterfactory.cxx
index 50e8dc736440..573be9782275 100644
--- a/filter/source/config/cache/filterfactory.cxx
+++ b/filter/source/config/cache/filterfactory.cxx
@@ -387,7 +387,7 @@ std::vector 
FilterFactory::impl_getSortedFilterList(const QueryTokeniz
 else
 {
 // more complex search for all filters
-// We check first, which office modules are installed ...
+// We check first, which office modules are installed...
 std::vector lModules = impl_getListOfInstalledModules();
 for (auto const& module : lModules)
 {
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index 9d1b43f4b335..d1f0d7306b19 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -777,7 +777,7 @@ cmd/sc_grafattrcrop.png cmd/sc_crop.png
 # Group
 cmd/sc_formatgroup.png cmd/sc_group.png
 
-# Extrusion Rotat
+# Extrusion Rotate
 cmd/lc_rulerrowsvertical.png cmd/lc_extrusiontiltright.png
 cmd/lc_rulerrows.png cmd/lc_extrusiontiltleft.png
 cmd/sc_rulerrowsvertical.png cmd/sc_extrusiontiltright.png
diff --git a/icon-themes/colibre/links.txt b/icon-themes/colibre/links.txt
index 3c7d4e838d07..6adf549b5d24 100644
--- a/icon-themes/colibre/links.txt
+++ b/icon-themes/colibre/links.txt
@@ -766,7 +766,7 @@ cmd/sc_grafattrcrop.png cmd/sc_crop.png
 # Group
 cmd/sc_formatgroup.png cmd/sc_group.png
 
-# Extrusion Rotat
+# Extrusion Rotate
 cmd/lc_rulerrowsvertical.png cmd/lc_extrusiontiltright.png
 cmd/lc_rulerrows.png cmd/lc_extrusiontiltleft.png
 cmd/sc_rulerrowsvertical.png cmd/sc_extrusiontiltright.png
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 630e8694f0d0..2a1507ac6f7b 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -919,7 +919,7 @@ public:
 void setSuitableOutlinerBg(Outliner& rOutliner) const;
 
 protected:
-tools::RectangleaOutRect; // surrounding rectangle for 
Paint (incl. LineWdt, ...)
+tools::RectangleaOutRect; // surrounding rectangle for 
Paint (incl. LineWidth, ...)
 Point   aAnchor;  // anchor position (Writer)
 SdrObjUserCall* pUserCall;
 std::unique_ptr
diff --git a/sw/source/core/docnode/ndsect.cxx 
b/sw/source/core/docnode/ndsect.cxx
index 09ac4f83f61d..e14ffc63506c 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -1023,7 +1023,7 @@ SwFrame *SwSectionNode::MakeFrame( SwFrame *pSib )
 // The created ContentFrames are attached to the corresponding Layout
 void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx)
 {
-// Take my succsessive or preceding ContentFrame
+// Take my successive or preceding ContentFrame
 SwNodes& rNds = GetNodes();
 if( rNds.IsDocNodes() && 
rNds.GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
 {
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index a017ce95bc1e..7b6411163cb3 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -734,7 +734,7 @@ bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const
 return true;
 }
 
-// The following two methods try to put the Cursor into the next/succsessive
+// The following two methods try to put the Cursor into the next/successive
 // line. If we do not have a preceding/successive line we forward the call
 // to the base class.
 // The Cursor's horizontal justification is d

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

2018-11-07 Thread Libreoffice Gerrit user
 sd/source/ui/sidebar/SlideBackground.cxx |   46 +--
 sd/source/ui/sidebar/SlideBackground.hxx |3 +-
 sd/source/ui/view/drviews1.cxx   |   12 
 3 files changed, 28 insertions(+), 33 deletions(-)

New commits:
commit 92b56816cd9b568b808cb880be920d26bc9e2693
Author: Mark Dobo 
AuthorDate: Tue Nov 6 18:36:47 2018 +0100
Commit: Tamás Zolnai 
CommitDate: Wed Nov 7 11:32:37 2018 +0100

tdf#113660 - Wrong label on sidebar slide pane after switching to handout 
view

+simplifying variable assignment

Change-Id: I2f43783d6e58c16f9200d44f7f34b05974ee0772
Reviewed-on: https://gerrit.libreoffice.org/62970
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index b3b54bfde71d..930423a170a9 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -113,7 +113,8 @@ SlideBackground::SlideBackground(
 mpGradientItem(),
 mpHatchItem(),
 mpBitmapItem(),
-mbEditModeChangePending(false),
+mbSwitchModeToNormal(false),
+mbSwitchModeToMaster(false),
 mxFrame(rxFrame),
 maContext(),
 maDrawOtherContext(vcl::EnumContext::Application::Draw, 
vcl::EnumContext::Context::DrawPage),
@@ -480,38 +481,31 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener,
 populateMasterSlideDropdown();
 break;
 case EventMultiplexerEventId::EditModeNormal:
+mbSwitchModeToNormal = true;
+break;
 case EventMultiplexerEventId::EditModeMaster:
-mbEditModeChangePending = true;
+mbSwitchModeToMaster = true;
 break;
 case EventMultiplexerEventId::EditViewSelection:
 case EventMultiplexerEventId::EndTextEdit:
 {
-if (mbEditModeChangePending)
+if ( mbSwitchModeToMaster )
 {
-ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
-
-if (pMainViewShell)
-{
-DrawViewShell* pDrawViewShell = 
static_cast(pMainViewShell);
-EditMode eMode = pDrawViewShell->GetEditMode();
-
-if ( eMode == EditMode::MasterPage)
-{
-if( IsImpress() )
-SetPanelTitle(SdResId(STR_MASTERSLIDE_NAME));
-else
-SetPanelTitle(SdResId(STR_MASTERPAGE_NAME));
-}
-else // EditMode::Page
-{
-if( IsImpress() )
-SetPanelTitle(SdResId(STR_SLIDE_NAME));
-else
-SetPanelTitle(SdResId(STR_PAGE_NAME));
-}
-}
-mbEditModeChangePending = false;
+if( IsImpress() )
+SetPanelTitle(SdResId(STR_MASTERSLIDE_NAME));
+else
+SetPanelTitle(SdResId(STR_MASTERPAGE_NAME));
+mbSwitchModeToMaster = false;
 }
+else if ( mbSwitchModeToNormal )
+{
+if( IsImpress() )
+SetPanelTitle(SdResId(STR_SLIDE_NAME));
+else
+SetPanelTitle(SdResId(STR_PAGE_NAME));
+mbSwitchModeToNormal = false;
+}
+
 }
 break;
 case EventMultiplexerEventId::CurrentPageChanged:
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx 
b/sd/source/ui/sidebar/SlideBackground.hxx
index a1035ec5aab1..136e8cbdc556 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -120,7 +120,8 @@ private:
 std::unique_ptr< XFillHatchItem >   mpHatchItem;
 std::unique_ptr< XFillBitmapItem >  mpBitmapItem;
 
-bool mbEditModeChangePending;
+bool mbSwitchModeToNormal;
+bool mbSwitchModeToMaster;
 
 css::uno::Reference mxFrame;
 vcl::EnumContext maContext;
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index f51470312c4a..365a3b57b21e 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -343,6 +343,12 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 
 sal_uInt16 nActualPageId = maTabControl->GetPageId(0);
 
+if (mePageKind == PageKind::Handout)
+{
+// at handouts only allow MasterPage
+eEMode = EditMode::MasterPage;
+}
+
 GetViewShellBase().GetDrawController().FireChangeEditMode (eEMode == 
EditMode::MasterPage);
 GetViewShellBase().GetDrawController().FireChangeLayerMode 
(bIsLayerModeActive);
 
@@ -356,12 +362,6 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 pLayerBar->EndEditMode

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

2018-11-07 Thread Libreoffice Gerrit user
 svx/source/svdraw/svdopath.cxx |   28 
 1 file changed, 24 insertions(+), 4 deletions(-)

New commits:
commit bdc97ababa5017422f5bcdb345969f6691fc818d
Author: Noel Grandin 
AuthorDate: Wed Nov 7 10:34:51 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 11:23:51 2018 +0100

tdf120965 Phantom control point line in Bézier curve

regression from
commit f74b888244fcefa7c03fa25db4d42c839ebbf642
simplify PlusHdl logic
restore the structure of the original code here, which is completely
opaque to me

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

diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 0e56b63494e6..eda7c34db46a 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2021,14 +2021,33 @@ void SdrPathObj::AddToPlusHdlList(SdrHdlList& rHdlList, 
SdrHdl& rHdl) const
 
 if (nPntMax<=0)
 return;
-
 nPntMax--;
-for (sal_uInt32 nPlusNum = 0; nPlusNum <= nPntMax; ++nPlusNum)
+if (nPnt>nPntMax)
+return;
+
+// calculate the number of plus points
+sal_uInt16 nCnt = 0;
+if (rXPoly.GetFlags(nPnt)!=PolyFlags::Control)
+{
+if (nPnt==0 && IsClosed())
+nPnt=nPntMax;
+if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control)
+nCnt++;
+if (nPnt==nPntMax && IsClosed())
+nPnt=0;
+if (nPnt(rHdl.GetPointNum());
 std::unique_ptr pHdl(new SdrHdlBezWgt(&rHdl));
 pHdl->SetPolyNum(rHdl.GetPolyNum());
 
-if (nPnt==0 && IsClosed()) nPnt=nPntMax;
+if (nPnt==0 && IsClosed())
+nPnt=nPntMax;
 if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control && 
nPlusNum==0)
 {
 pHdl->SetPos(rXPoly[nPnt-1]);
@@ -2036,7 +2055,8 @@ void SdrPathObj::AddToPlusHdlList(SdrHdlList& rHdlList, 
SdrHdl& rHdl) const
 }
 else
 {
-if (nPnt==nPntMax && IsClosed()) nPnt=0;
+if (nPnt==nPntMax && IsClosed())
+nPnt=0;
 if (nPntSetPos(rXPoly[nPnt+1]);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - include/LibreOfficeKit include/sfx2 sfx2/source svx/source

2018-11-07 Thread Libreoffice Gerrit user
 include/LibreOfficeKit/LibreOfficeKitEnums.h |9 +
 include/sfx2/lokhelper.hxx   |4 
 sfx2/source/sidebar/ContextChangeBroadcaster.cxx |   10 ++
 sfx2/source/view/lokhelper.cxx   |9 +
 svx/source/sidebar/ContextChangeEventMultiplexer.cxx |9 +
 5 files changed, 41 insertions(+)

New commits:
commit 4f605d49ba5a436730ceddaf739544b99c0812fe
Author: Jan Holesovsky 
AuthorDate: Tue Nov 6 11:20:27 2018 +0100
Commit: Jan Holesovsky 
CommitDate: Wed Nov 7 11:10:37 2018 +0100

lok: Notify about the current editing context.

Change-Id: I47e67b680a6abdb66020b295f55ee6a73b7b5608

diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 767a0bb04366..f91b33886195 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -594,6 +594,15 @@ typedef enum
  * convenience.
  */
 LOK_CALLBACK_CLIPBOARD_CHANGED = 38,
+
+/**
+ * When the (editing) context changes - like the user switches from
+ * editing textbox in Impress to editing a shape there.
+ *
+ * Payload is the application ID and context, delimited by space.
+ * Eg. com.sun.star.presentation.PresentationDocument TextObject
+ */
+LOK_CALLBACK_CONTEXT_CHANGED = 39,
 }
 LibreOfficeKitCallbackType;
 
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 08424a90f770..9f68c6d7dd60 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -54,6 +54,10 @@ public:
 static void notifyVisCursorInvalidation(OutlinerViewShell const* 
pThisView, const OString& rRectangle);
 /// Notifies all views with the given type and payload.
 static void notifyAllViews(int nType, const OString& rPayload);
+
+/// Notify about the editing context change.
+static void notifyContextChange(SfxViewShell const* pViewShell, const 
OUString& aApplication, const OUString& aContext);
+
 /// A special value to signify 'infinity'.
 /// This value is chosen such that sal_Int32 will not overflow when 
manipulated.
 static const long MaxTwips = 1e9;
diff --git a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx 
b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
index bdbf62defb36..42aacef4591e 100644
--- a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
+++ b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
@@ -22,7 +22,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
+#include 
 
 using ::rtl::OUString;
 using namespace css;
@@ -87,6 +90,13 @@ void ContextChangeBroadcaster::BroadcastContextChange (
 return;
 }
 
+// notify the LOK too
+if (comphelper::LibreOfficeKit::isActive())
+{
+if (SfxViewShell* pViewShell = 
SfxViewShell::Get(rxFrame->getController()))
+SfxLokHelper::notifyContextChange(pViewShell, rsModuleName, 
rsContextName);
+}
+
 const css::ui::ContextChangeEventObject aEvent(
 rxFrame->getController(),
 rsModuleName,
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index e6fb475846a8..475317158158 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -226,4 +226,13 @@ void SfxLokHelper::notifyAllViews(int nType, const 
OString& rPayload)
 }
 }
 
+void SfxLokHelper::notifyContextChange(SfxViewShell const* pViewShell, const 
OUString& aApplication, const OUString& aContext)
+{
+OStringBuffer aBuffer;
+aBuffer.append(OUStringToOString(aApplication.replace(' ', '_'), 
RTL_TEXTENCODING_UTF8));
+aBuffer.append(' ');
+aBuffer.append(OUStringToOString(aContext.replace(' ', '_'), 
RTL_TEXTENCODING_UTF8));
+pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_CHANGED, 
aBuffer.makeStringAndClear().getStr());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/ContextChangeEventMultiplexer.cxx 
b/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
index 5591ee389200..c714627afdae 100644
--- a/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
+++ b/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
@@ -23,7 +23,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
@@ -37,6 +39,13 @@ void ContextChangeEventMultiplexer::NotifyContextChange (
 {
 if (rxController.is() && rxController->getFrame().is())
 {
+// notify the LOK too
+if (comphelper::LibreOfficeKit::isActive())
+{
+if (SfxViewShell* pViewShell = SfxViewShell::Get(rxController))
+SfxLokHelper::notifyContextChange(pViewShell, 
GetModuleName(rxController->getFrame()), 
vcl::EnumContext::GetContextName(eContext));
+}
+
 const css::ui::ContextChangeEventObject aEvent(
 rxController,
 GetModuleName(rxController->getFrame()),

Re: Crash test update

2018-11-07 Thread Caolán McNamara
On Tue, 2018-11-06 at 17:25 -0500, Kohei Yoshida wrote:
> On Mon, 2018-11-05 at 13:10 +, Caolán McNamara wrote:
> > On Mon, 2018-11-05 at 07:45 -0500, Kohei Yoshida wrote:
> > > Thanks.  I assume the other document ends with a similar error?
> > 
> > yeah, https://bz.apache.org/ooo/attachment.cgi?id=59846 IIRC its
> > the
> > same string
> 
> So both the document 
> 
> https://bz.apache.org/ooo/attachment.cgi?id=43970
> 
> and the one from above open fine for me, using the latest master
> branch build.  They both open in Calc, as they should.

I can reproduce it, with a dbgutil build, if the file is given a .xls
suffix, e.g. demo.xls with just

./instdir/program/soffice.bin --headless --convert-to pdf ./demo.xls

it has indeed been detected as a "calc_HTML_WebQuery"

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


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

2018-11-07 Thread Libreoffice Gerrit user
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3996a7fd31cd64169e34b7ddbeaffaa03c95bdd2
Author: andreas kainz 
AuthorDate: Tue Nov 6 23:56:29 2018 +0100
Commit: andreas_kainz 
CommitDate: Wed Nov 7 10:57:31 2018 +0100

Draw/Impress Sidebar show Position and Size instead of Shadow

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index af807dadf828..6f162ee14880 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -553,7 +553,7 @@
 Calc,   Draw,   visible ;
 Calc,   OLE,hidden  ;
 DrawImpress,3DObject,   visible ;
-DrawImpress,Draw,   visible ;
+DrawImpress,Draw,   hidden ;
 DrawImpress,Graphic,hidden  ;
 DrawImpress,TextObject, hidden  ;
 DrawImpress,OLE,hidden  ;
@@ -653,7 +653,7 @@
 Calc,   MultiObject, visible   ;
 Calc,   OLE, visible   ;
 DrawImpress,3DObject,visible   ;
-DrawImpress,Draw,hidden;
+DrawImpress,Draw,visible   ;
 DrawImpress,DrawLine,visible   ;
 DrawImpress,Form,visible   ;
 DrawImpress,Graphic, hidden;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 compilerplugins/clang/readability-redundant-pp.cxx |  129 +
 sw/source/core/doc/dbgoutsw.cxx|2 
 2 files changed, 129 insertions(+), 2 deletions(-)

New commits:
commit 13c247b7fee91b0ffb256e85bcd0cf416b3cd83e
Author: Noel Grandin 
AuthorDate: Wed Nov 7 08:58:45 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 10:49:22 2018 +0100

new loplugin readability-redundant-pp

code originally from vmiklos, copied from dev-tools repo

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

diff --git a/compilerplugins/clang/readability-redundant-pp.cxx 
b/compilerplugins/clang/readability-redundant-pp.cxx
new file mode 100644
index ..ed7fed1082c9
--- /dev/null
+++ b/compilerplugins/clang/readability-redundant-pp.cxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * Based on LLVM/Clang.
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ */
+
+#include 
+#include 
+
+#include "plugin.hxx"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/// Finds preprocessor usage which is redundant (only #ifndef for now).
+
+namespace loplugin
+{
+struct Entry
+{
+clang::SourceLocation m_aLoc;
+std::string m_aMacroName;
+};
+
+class RedundantPreprocessor : public clang::PPCallbacks, public Plugin
+{
+public:
+explicit RedundantPreprocessor(const InstantiationData& data);
+virtual void run() override;
+void Ifndef(clang::SourceLocation aLoc, const clang::Token& rMacroNameTok,
+const clang::MacroDefinition& rMacroDefinition) override;
+void Ifdef(clang::SourceLocation aLoc, const clang::Token& rMacroNameTok,
+   const clang::MacroDefinition& rMacroDefinition) override;
+void Endif(clang::SourceLocation aLoc, clang::SourceLocation aIfLoc) 
override;
+
+private:
+clang::Preprocessor& m_rPP;
+std::vector m_aDefStack;
+std::vector m_aNotDefStack;
+};
+
+RedundantPreprocessor::RedundantPreprocessor(const InstantiationData& data)
+: Plugin(data)
+, m_rPP(compiler.getPreprocessor())
+{
+
compiler.getPreprocessor().addPPCallbacks(std::unique_ptr(this));
+}
+
+void RedundantPreprocessor::run()
+{
+// nothing, only check preprocessor usage
+}
+
+void RedundantPreprocessor::Ifdef(clang::SourceLocation aLoc, const 
clang::Token& rMacroNameTok,
+  const clang::MacroDefinition& 
/*rMacroDefinition*/)
+{
+if (ignoreLocation(aLoc))
+return;
+
+if (m_rPP.getSourceManager().isInMainFile(aLoc))
+{
+std::string aMacroName = m_rPP.getSpelling(rMacroNameTok);
+for (const auto& rEntry : m_aDefStack)
+{
+if (rEntry.m_aMacroName == aMacroName)
+{
+report(DiagnosticsEngine::Warning, "nested ifdef", aLoc);
+report(DiagnosticsEngine::Note, "previous ifdef", 
rEntry.m_aLoc);
+}
+}
+}
+
+Entry aEntry;
+aEntry.m_aLoc = aLoc;
+aEntry.m_aMacroName = m_rPP.getSpelling(rMacroNameTok);
+m_aDefStack.push_back(aEntry);
+}
+
+void RedundantPreprocessor::Ifndef(clang::SourceLocation aLoc, const 
clang::Token& rMacroNameTok,
+   const clang::MacroDefinition& 
/*rMacroDefinition*/)
+{
+if (ignoreLocation(aLoc))
+return;
+
+if (m_rPP.getSourceManager().isInMainFile(aLoc))
+{
+std::string aMacroName = m_rPP.getSpelling(rMacroNameTok);
+for (const auto& rEntry : m_aNotDefStack)
+{
+if (rEntry.m_aMacroName == aMacroName)
+{
+report(DiagnosticsEngine::Warning, "nested ifndef", aLoc);
+report(DiagnosticsEngine::Note, "previous ifndef", 
rEntry.m_aLoc);
+}
+}
+}
+
+Entry aEntry;
+aEntry.m_aLoc = aLoc;
+aEntry.m_aMacroName = m_rPP.getSpelling(rMacroNameTok);
+m_aNotDefStack.push_back(aEntry);
+}
+
+void RedundantPreprocessor::Endif(clang::SourceLocation /*aLoc*/, 
clang::SourceLocation aIfLoc)
+{
+if (!m_aDefStack.empty())
+{
+if (aIfLoc == m_aDefStack.back().m_aLoc)
+m_aDefStack.pop_back();
+}
+if (!m_aNotDefStack.empty())
+{
+if (aIfLoc == m_aNotDefStack.back().m_aLoc)
+m_aNotDefStack.pop_back();
+}
+}
+
+static Plugin::Registration X("redundantpreprocessor");
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 9ffbc68866a0..9bd9ab22ef08 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -513,11 +513,9 @@ static OUString lcl_dbg_out(const SwNode & rNode)
 aTmpStr += OUString::number(r

[Libreoffice-commits] core.git: i18nutil/source include/i18nutil include/IwyuFilter_include.yaml

2018-11-07 Thread Libreoffice Gerrit user
 i18nutil/source/utility/casefolding.cxx |3 +++
 i18nutil/source/utility/oneToOneMapping.cxx |1 +
 i18nutil/source/utility/paper.cxx   |1 +
 i18nutil/source/utility/widthfolding.cxx|1 +
 include/IwyuFilter_include.yaml |6 ++
 include/i18nutil/casefolding.hxx|4 ++--
 include/i18nutil/oneToOneMapping.hxx|3 ---
 include/i18nutil/paper.hxx  |3 ++-
 include/i18nutil/searchopt.hxx  |1 -
 include/i18nutil/transliteration.hxx|1 -
 include/i18nutil/widthfolding.hxx   |6 --
 11 files changed, 20 insertions(+), 10 deletions(-)

New commits:
commit 511061b0d392f238a18a27477148731e3437b5ae
Author: Gabor Kelemen 
AuthorDate: Mon Oct 22 10:19:10 2018 +0200
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 10:04:47 2018 +0100

tdf#42949 Fix IWYU warnings in include/i18nutil/*

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

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

diff --git a/i18nutil/source/utility/casefolding.cxx 
b/i18nutil/source/utility/casefolding.cxx
index 140fa8cd71e0..0b01565a4466 100644
--- a/i18nutil/source/utility/casefolding.cxx
+++ b/i18nutil/source/utility/casefolding.cxx
@@ -19,8 +19,11 @@
 
 #include 
 #include "casefolding_data.h"
+#include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace com::sun::star::lang;
 using namespace com::sun::star::uno;
diff --git a/i18nutil/source/utility/oneToOneMapping.cxx 
b/i18nutil/source/utility/oneToOneMapping.cxx
index 0fdea0599004..d321b49de765 100644
--- a/i18nutil/source/utility/oneToOneMapping.cxx
+++ b/i18nutil/source/utility/oneToOneMapping.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 
 namespace i18nutil {
 
diff --git a/i18nutil/source/utility/paper.cxx 
b/i18nutil/source/utility/paper.cxx
index c2728f697183..9c1476c0dc03 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef UNX
 #include 
diff --git a/i18nutil/source/utility/widthfolding.cxx 
b/i18nutil/source/utility/widthfolding.cxx
index 535f76a894c4..62c4aa14b1e5 100644
--- a/i18nutil/source/utility/widthfolding.cxx
+++ b/i18nutil/source/utility/widthfolding.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include "widthfolding_data.h"
 
 using namespace com::sun::star::uno;
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index cdcaee4bfe10..3a29d0881a9c 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -278,3 +278,9 @@ blacklist:
 - com/sun/star/lang/XInitialization.hpp
 - com/sun/star/lang/XServiceInfo.hpp
 - com/sun/star/xml/sax/XFastParser.hpp
+include/i18nutil/casefolding.hxx:
+# Needed for template
+- o3tl/typed_flags_set.hxx
+include/i18nutil/transliteration.hxx:
+# Needed for template
+- o3tl/typed_flags_set.hxx
diff --git a/include/i18nutil/casefolding.hxx b/include/i18nutil/casefolding.hxx
index ca29cabb4959..1b7df9e74b5e 100644
--- a/include/i18nutil/casefolding.hxx
+++ b/include/i18nutil/casefolding.hxx
@@ -20,11 +20,11 @@
 #define INCLUDED_I18NUTIL_CASEFOLDING_HXX
 
 #include 
-#include 
-#include 
 #include 
 #include 
 
+namespace com { namespace sun { namespace star { namespace lang { struct 
Locale; } } } }
+
 enum class TransliterationFlags;
 
 enum class MappingType {
diff --git a/include/i18nutil/oneToOneMapping.hxx 
b/include/i18nutil/oneToOneMapping.hxx
index 80550d957158..b479005efe93 100644
--- a/include/i18nutil/oneToOneMapping.hxx
+++ b/include/i18nutil/oneToOneMapping.hxx
@@ -19,14 +19,11 @@
 #ifndef INCLUDED_I18NUTIL_ONETOONEMAPPING_HXX
 #define INCLUDED_I18NUTIL_ONETOONEMAPPING_HXX
 
-#include 
 #include 
 #include 
 
 namespace i18nutil {
 
-class widthfolding;
-
 struct OneToOneMappingTable_t
 {
 sal_Unicode first;
diff --git a/include/i18nutil/paper.hxx b/include/i18nutil/paper.hxx
index 75f77de05401..2b28942bc1e4 100644
--- a/include/i18nutil/paper.hxx
+++ b/include/i18nutil/paper.hxx
@@ -22,7 +22,8 @@
 
 #include 
 #include 
-#include 
+
+namespace com { namespace sun { namespace star { namespace lang { struct 
Locale; } } } }
 
 //!! The values of the following enumerators must correspond to the array 
position
 //!! of the respective paper size in the file i18nutil/source/utility/paper.cxx
diff --git a/include/i18nutil/searchopt.hxx b/include/i18nutil/searchopt.hxx
index 0acf47dfd82b..56bfaa3f87a6 100644
--- a/include/i18nutil/searchopt.hxx
+++ b/include/i18nutil/searchopt.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace i18nutil
diff --git a/include/i18nutil/transliteration.hxx 
b/include/i18nutil/transliteration.hxx
index f962929b2bdc..62c8af82e61f 100644
--- a/include/i18n

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

2018-11-07 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx  |6 --
 include/LibreOfficeKit/LibreOfficeKitEnums.h |5 +
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 30bb64dc2deb53409c72bc8d4c083bbc3fd99a7d
Author: Tomaž Vajngerl 
AuthorDate: Tue Oct 30 00:20:42 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 09:58:27 2018 +0100

lok: send signature status on document load

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index faf1dfa40936..baa87e12ca97 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1515,8 +1515,10 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
 return nullptr;
 }
 
-return new LibLODocument_Impl(xComponent);
-
+LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent);
+int nState = doc_getSignatureState(pDocument);
+pLib->mpCallback(LOK_CALLBACK_SIGNATURE_STATUS, 
OString::number(nState).getStr(), pLib->mpCallbackData);
+return pDocument;
 }
 catch (const uno::Exception& exception)
 {
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index e34efb3576ca..cb9091711acc 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -603,6 +603,11 @@ typedef enum
  * Eg. com.sun.star.presentation.PresentationDocument TextObject
  */
 LOK_CALLBACK_CONTEXT_CHANGED = 39,
+
+/**
+ * On-load notification of the document signature status.
+ */
+LOK_CALLBACK_SIGNATURE_STATUS = 40,
 }
 LibreOfficeKitCallbackType;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-07 Thread Libreoffice Gerrit user
 sw/source/core/doc/DocumentContentOperationsManager.cxx |7 -
 sw/source/core/doc/docfly.cxx   |7 -
 sw/source/core/doc/notxtfrm.cxx |9 --
 sw/source/core/docnode/ndtbl.cxx|   69 +---
 sw/source/core/layout/findfrm.cxx   |3 
 sw/source/core/layout/flylay.cxx|   11 --
 sw/source/core/layout/pagechg.cxx   |   29 +++---
 sw/source/core/layout/sectfrm.cxx   |   11 --
 sw/source/core/layout/tabfrm.cxx|7 -
 sw/source/core/text/frmform.cxx |7 -
 sw/source/core/text/itrcrsr.cxx |   11 --
 sw/source/core/text/pormulti.cxx|9 --
 sw/source/core/text/txtfrm.cxx  |   15 +--
 sw/source/core/txtnode/ndtxt.cxx|   19 +---
 sw/source/core/unocore/unoobj.cxx   |7 -
 sw/source/filter/basflt/shellio.cxx |   11 --
 sw/source/filter/ww8/wrtww8.cxx |9 --
 sw/source/filter/ww8/ww8graf.cxx|   39 -
 sw/source/filter/ww8/ww8par3.cxx|   31 +++
 sw/source/filter/ww8/ww8scan.cxx|   25 +
 sw/source/filter/xml/xmlmeta.cxx|   10 --
 sw/source/ui/envelp/mailmrge.cxx|6 -
 sw/source/ui/misc/outline.cxx   |   29 +++---
 sw/source/uibase/dbui/dbmgr.cxx |   23 ++---
 sw/source/uibase/docvw/edtwin2.cxx  |   11 --
 sw/source/uibase/ribbar/conarc.cxx  |7 -
 sw/source/uibase/ribbar/inputwin.cxx|   57 ++---
 27 files changed, 186 insertions(+), 293 deletions(-)

New commits:
commit 977ccf4b0fffc178ad550bda47421db5bc4c82fd
Author: Noel Grandin 
AuthorDate: Wed Nov 7 09:31:18 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 09:55:05 2018 +0100

loplugin:collapseif in sw

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

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 1b40c8605e49..37115a78c946 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2631,12 +2631,9 @@ void DocumentContentOperationsManager::TransliterateText(
 else if( pTNd && nSttCnt < nEndCnt )
 pTNd->TransliterateText( rTrans, nSttCnt, nEndCnt, pUndo.get() );
 
-if( pUndo )
+if( pUndo && pUndo->HasData() )
 {
-if( pUndo->HasData() )
-{
-m_rDoc.GetIDocumentUndoRedo().AppendUndo(std::move(pUndo));
-}
+m_rDoc.GetIDocumentUndoRedo().AppendUndo(std::move(pUndo));
 }
 m_rDoc.getIDocumentState().SetModified();
 }
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index ad1f406933a9..452112cc7073 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -561,12 +561,9 @@ bool SwDoc::SetFlyFrameAttr( SwFrameFormat& rFlyFormat, 
SfxItemSet& rSet )
 
 bool const bRet = lcl_SetFlyFrameAttr(*this, &SwDoc::SetFlyFrameAnchor, 
rFlyFormat, rSet);
 
-if (pSaveUndo)
+if (pSaveUndo && pSaveUndo->GetUndo() )
 {
-if ( pSaveUndo->GetUndo() )
-{
-GetIDocumentUndoRedo().AppendUndo( pSaveUndo->ReleaseUndo() );
-}
+GetIDocumentUndoRedo().AppendUndo( pSaveUndo->ReleaseUndo() );
 }
 
 getIDocumentState().SetModified();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index cea0bdb9a591..4f5cc43636ad 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -690,13 +690,10 @@ bool SwNoTextFrame::GetCharRect( SwRect &rRect, const 
SwPosition& rPos,
 else
 rRect.Intersection_( aFrameRect );
 
-if ( pCMS )
+if ( pCMS && pCMS->m_bRealHeight )
 {
-if ( pCMS->m_bRealHeight )
-{
-pCMS->m_aRealHeight.setY(rRect.Height());
-pCMS->m_aRealHeight.setX(0);
-}
+pCMS->m_aRealHeight.setY(rRect.Height());
+pCMS->m_aRealHeight.setX(0);
 }
 
 return true;
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index daba8542ef05..f206d2eb04a9 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1750,13 +1750,10 @@ bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, 
sal_uInt16 nCnt, bool bBehind )
 }
 }
 
-if( pUndo )
+if( pUndo && bRet )
 {
-if( bRet )
-{
-pUndo->SaveNewBoxes( *pTableNd, aTmpLst );
-GetIDocumentUndo

Most Beautiful Castles in Germany

2018-11-07 Thread AngelaMuse
Be it any time of the year, Switzerland always stands photogenic. Here are
the top ten attractions is Switzerland which you absolutely cannot miss when
you visit the country.

Most Beautiful Castles in Germany   



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


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

2018-11-07 Thread Libreoffice Gerrit user
 chart2/qa/extras/chart2import.cxx |   16 
 chart2/qa/extras/data/pptx/tdf121205.pptx |binary
 oox/inc/drawingml/textrun.hxx |1 +
 oox/source/drawingml/chart/titleconverter.cxx |2 +-
 4 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 57d4cd80dcaf01fe4897d79d89e906d355410243
Author: Vasily Melenchuk 
AuthorDate: Thu Nov 1 17:37:21 2018 +0100
Commit: Katarina Behrens 
CommitDate: Wed Nov 7 09:41:47 2018 +0100

tdf#121205: Convert  to newline chars in chart title

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 6076c63e3680..e478dbb66803 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -111,6 +111,7 @@ public:
 void testTdf115107_2(); // import complex data point labels in cobo charts 
with multiple data series
 
 void testTdf116163();
+void testTdf121205();
 
 CPPUNIT_TEST_SUITE(Chart2ImportTest);
 CPPUNIT_TEST(Fdo60083);
@@ -176,6 +177,7 @@ public:
 CPPUNIT_TEST(testTdf115107_2);
 
 CPPUNIT_TEST(testTdf116163);
+CPPUNIT_TEST(testTdf121205);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1583,6 +1585,20 @@ void Chart2ImportTest::testTdf116163()
 CPPUNIT_ASSERT_EQUAL(OUString("Dddd..."), xLabel3->getString());
 }
 
+void Chart2ImportTest::testTdf121205()
+{
+load("/chart2/qa/extras/data/pptx/", "tdf121205.pptx");
+Reference xChartDoc(getChartDocFromDrawImpress(0, 
0), uno::UNO_QUERY);
+
+uno::Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_MESSAGE("chart doc does not have title", xTitled.is());
+OUString aTitle = getTitleString(xTitled);
+
+// We expect title splitted in 3 lines
+CPPUNIT_ASSERT_EQUAL(OUString("Firstline\nSecondline\nThirdline"), aTitle);
+}
+
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/pptx/tdf121205.pptx 
b/chart2/qa/extras/data/pptx/tdf121205.pptx
new file mode 100644
index ..e60849ec02e0
Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf121205.pptx differ
diff --git a/oox/inc/drawingml/textrun.hxx b/oox/inc/drawingml/textrun.hxx
index 2f660a8cf306..8d3e2c499bc6 100644
--- a/oox/inc/drawingml/textrun.hxx
+++ b/oox/inc/drawingml/textrun.hxx
@@ -41,6 +41,7 @@ public:
 const TextCharacterProperties&   getTextCharacterProperties() const { 
return maTextCharacterProperties; }
 
 void setLineBreak() { mbIsLineBreak = true; }
+bool isLineBreak() const { return mbIsLineBreak; }
 
 virtual sal_Int32   insertAt(
 const ::oox::core::XmlFilterBase& 
rFilterBase,
diff --git a/oox/source/drawingml/chart/titleconverter.cxx 
b/oox/source/drawingml/chart/titleconverter.cxx
index daa1f2d8cb57..a4bb1ec70944 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -85,7 +85,7 @@ Sequence< Reference< XFormattedString > > 
TextConverter::createStringSequence(
 for( TextRunVector::const_iterator aRIt = 
rTextPara.getRuns().begin(), aREnd = rTextPara.getRuns().end(); aRIt != aREnd; 
++aRIt )
 {
 const TextRun& rTextRun = **aRIt;
-bool bAddNewLine = (aRIt + 1 == aREnd) && (aPIt + 1 != aPEnd);
+bool bAddNewLine = ((aRIt + 1 == aREnd) && (aPIt + 1 != 
aPEnd)) || rTextRun.isLineBreak();
 Reference< XFormattedString > xFmtStr = appendFormattedString( 
aStringVec, rTextRun.getText(), bAddNewLine );
 PropertySet aPropSet( xFmtStr );
 TextCharacterProperties aRunProps( rParaProps );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Delta.hpp

2018-11-07 Thread Libreoffice Gerrit user
 kit/Delta.hpp |   85 ++
 1 file changed, 63 insertions(+), 22 deletions(-)

New commits:
commit 175ddd4c401a636120d43efe1644be47c02f8a02
Author: Miklos Vajna 
AuthorDate: Wed Nov 7 09:09:01 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 7 09:09:12 2018 +0100

DeltaData: make members private

diff --git a/kit/Delta.hpp b/kit/Delta.hpp
index 1cc3afbac..7bffb071d 100644
--- a/kit/Delta.hpp
+++ b/kit/Delta.hpp
@@ -34,6 +34,47 @@ class DeltaGenerator {
 };
 
 struct DeltaData {
+void setWid(TileWireId wid)
+{
+_wid = wid;
+}
+
+TileWireId getWid() const
+{
+return _wid;
+}
+
+void setWidth(int width)
+{
+_width = width;
+}
+
+int getWidth() const
+{
+return _width;
+}
+
+void setHeight(int height)
+{
+_height = height;
+}
+
+int getHeight() const
+{
+return _height;
+}
+
+const std::vector& getRows() const
+{
+return _rows;
+}
+
+std::vector& getRows()
+{
+return _rows;
+}
+
+private:
 TileWireId _wid;
 int _width;
 int _height;
@@ -47,36 +88,36 @@ class DeltaGenerator {
 std::vector& output)
 {
 // TODO: should we split and compress alpha separately ?
-if (prev._width != cur._width || prev._height != cur._height)
+if (prev.getWidth() != cur.getWidth() || prev.getHeight() != 
cur.getHeight())
 {
-LOG_ERR("mis-sized delta: " << prev._width << "x" << prev._height 
<< " vs "
-<< cur._width << "x" << cur._height);
+LOG_ERR("mis-sized delta: " << prev.getWidth() << "x" << 
prev.getHeight() << " vs "
+<< cur.getWidth() << "x" << cur.getHeight());
 return false;
 }
 
 output.push_back('D');
-LOG_TRC("building delta of a " << cur._width << "x" << cur._height << 
" bitmap");
+LOG_TRC("building delta of a " << cur.getWidth() << "x" << 
cur.getHeight() << " bitmap");
 
 // row move/copy src/dest is a byte.
-assert (prev._height <= 256);
+assert (prev.getHeight() <= 256);
 // column position is a byte.
-assert (prev._width <= 256);
+assert (prev.getWidth() <= 256);
 
 // How do the rows look against each other ?
 size_t lastMatchOffset = 0;
 size_t lastCopy = 0;
-for (int y = 0; y < prev._height; ++y)
+for (int y = 0; y < prev.getHeight(); ++y)
 {
 // Life is good where rows match:
-if (prev._rows[y].identical(cur._rows[y]))
+if (prev.getRows()[y].identical(cur.getRows()[y]))
 continue;
 
 // Hunt for other rows
 bool matched = false;
-for (int yn = 0; yn < prev._height && !matched; ++yn)
+for (int yn = 0; yn < prev.getHeight() && !matched; ++yn)
 {
-size_t match = (y + lastMatchOffset + yn) % prev._height;
-if (prev._rows[match].identical(cur._rows[y]))
+size_t match = (y + lastMatchOffset + yn) % prev.getHeight();
+if (prev.getRows()[match].identical(cur.getRows()[y]))
 {
 // TODO: if offsets are >256 - use 16bits?
 if (lastCopy > 0)
@@ -106,19 +147,19 @@ class DeltaGenerator {
 continue;
 
 // Our row is just that different:
-const DeltaBitmapRow &curRow = cur._rows[y];
-const DeltaBitmapRow &prevRow = prev._rows[y];
-for (int x = 0; x < prev._width;)
+const DeltaBitmapRow &curRow = cur.getRows()[y];
+const DeltaBitmapRow &prevRow = prev.getRows()[y];
+for (int x = 0; x < prev.getWidth();)
 {
 int same;
-for (same = 0; same + x < prev._width &&
+for (same = 0; same + x < prev.getWidth() &&
  prevRow._pixels[x+same] == curRow._pixels[x+same];)
 ++same;
 
 x += same;
 
 int diff;
-for (diff = 0; diff + x < prev._width &&
+for (diff = 0; diff + x < prev.getWidth() &&
  (prevRow._pixels[x+diff] == curRow._pixels[x+diff] || 
diff < 2) &&
  diff < 254;)
 ++diff;
@@ -149,7 +190,7 @@ class DeltaGenerator {
 int bufferWidth, int bufferHeight)
 {
 auto data = std::make_shared();
-data->_wid = wid;
+data->setWid(wid);
 
 assert (startX + width <= (size_t)bufferWidth);
 assert (startY + height <= (size_t)bufferHeight);
@@ -160,12 +201,12 @@ class DeltaGenerator {
 << (width