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

2016-03-31 Thread Wastack
 compilerplugins/clang/staticanonymous.cxx |   67 ++
 1 file changed, 67 insertions(+)

New commits:
commit e097e419ee5c47239262a16526f4e37775fb2004
Author: Wastack 
Date:   Thu Mar 31 08:49:20 2016 +0200

tdf#97966 Compiler plugin

Warns about redundant 'static' keywords in unnamed namespace.

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

diff --git a/compilerplugins/clang/staticanonymous.cxx 
b/compilerplugins/clang/staticanonymous.cxx
new file mode 100644
index 000..da5724b
--- /dev/null
+++ b/compilerplugins/clang/staticanonymous.cxx
@@ -0,0 +1,67 @@
+/* -*- 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.
+ *
+ */
+#include "plugin.hxx"
+#include "compat.hxx"
+/*
+This is a compile check.
+
+Warns about functions with static keyword in an unnamed namespace.
+*/
+
+namespace loplugin
+{
+
+class StaticAnonymous
+: public RecursiveASTVisitor< StaticAnonymous >
+, public Plugin
+{
+public:
+StaticAnonymous( const InstantiationData& data );
+virtual void run() override;
+bool VisitFunctionDecl( FunctionDecl* func );
+
+};
+
+StaticAnonymous::StaticAnonymous( const InstantiationData& data )
+: Plugin( data )
+{
+}
+
+void StaticAnonymous::run()
+{
+TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
+}
+
+
+bool StaticAnonymous::VisitFunctionDecl( FunctionDecl* func )
+
+{
+if( ignoreLocation( func ) )
+return true;
+if( func -> isInAnonymousNamespace () )
+{
+  if ( !isa(func) && !compat::isInExternCContext(*func) )
+ {
+if(func-> getStorageClass() == SC_Static)
+   {
+report( DiagnosticsEngine::Warning,
+"redundant 'static' keyword in unnamed namespace",
+func->getLocStart());
+   }
+ }
+}
+
+return true;
+}
+
+// Register the plugin action with the LO plugin handling.
+static Plugin::Registration< StaticAnonymous > X( "staticanonymous",true);
+
+} // namespace
+
+/* 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: 2 commits - sw/source toolkit/source unoxml/source uui/source vcl/source vcl/unx xmloff/source

2016-03-31 Thread Wastack
 sw/source/core/bastyp/calc.cxx  |2 
 sw/source/core/crsr/bookmrk.cxx |6 +-
 sw/source/core/doc/CntntIdxStore.cxx|6 +-
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   42 
 sw/source/core/doc/DocumentFieldsManager.cxx|4 -
 sw/source/core/doc/DocumentRedlineManager.cxx   |   10 +--
 sw/source/core/doc/DocumentStylePoolManager.cxx |   14 ++---
 sw/source/core/doc/SwStyleNameMapper.cxx|   12 ++--
 sw/source/core/doc/docbm.cxx|   28 +-
 sw/source/core/doc/doccomp.cxx  |4 -
 sw/source/core/doc/doccorr.cxx  |8 +--
 sw/source/core/doc/docnum.cxx   |2 
 sw/source/core/draw/dcontact.cxx|2 
 sw/source/core/layout/flycnt.cxx|2 
 sw/source/core/text/itrform2.cxx|6 +-
 sw/source/core/tox/tox.cxx  |2 
 sw/source/core/txtnode/atrftn.cxx   |6 +-
 sw/source/core/txtnode/ndtxt.cxx|2 
 sw/source/core/unocore/unocoll.cxx  |4 -
 sw/source/core/unocore/unodraw.cxx  |2 
 sw/source/core/unocore/unoportenum.cxx  |6 +-
 sw/source/core/unocore/unotbl.cxx   |2 
 sw/source/filter/html/css1atr.cxx   |2 
 sw/source/filter/ww8/wrtw8esh.cxx   |4 -
 sw/source/ui/envelp/envfmt.cxx  |4 -
 sw/source/uibase/app/apphdl.cxx |2 
 sw/source/uibase/docvw/HeaderFooterWin.cxx  |6 +-
 sw/source/uibase/utlui/content.cxx  |8 +--
 toolkit/source/awt/vclxmenu.cxx |4 -
 toolkit/source/awt/vclxtoolkit.cxx  |6 +-
 toolkit/source/controls/controlmodelcontainerbase.cxx   |4 -
 toolkit/source/controls/grid/sortablegriddatamodel.cxx  |2 
 toolkit/source/controls/tree/treedatamodel.cxx  |2 
 toolkit/source/controls/unocontrols.cxx |2 
 unoxml/source/rdf/librdf_repository.cxx |   24 -
 uui/source/iahndl.cxx   |2 
 vcl/source/control/field.cxx|   10 +--
 vcl/source/control/imp_listbox.cxx  |4 -
 vcl/source/control/longcurr.cxx |   10 +--
 vcl/source/filter/wmf/enhwmf.cxx|2 
 vcl/source/gdi/print.cxx|4 -
 vcl/source/image/ImplImageTree.cxx  |6 +-
 vcl/source/window/toolbox.cxx   |2 
 vcl/unx/generic/fontmanager/fontconfig.cxx  |2 
 vcl/unx/generic/gdi/salgdi.cxx  |4 -
 vcl/unx/generic/window/salframe.cxx |2 
 vcl/unx/gtk/salprn-gtk.cxx  |   14 ++---
 xmloff/source/core/xmlimp.cxx   |2 
 xmloff/source/forms/propertyimport.cxx  |2 
 xmloff/source/style/xmlaustp.cxx|2 
 xmloff/source/text/txtexppr.cxx |8 +--
 xmloff/source/text/txtimppr.cxx |4 -
 xmloff/source/text/txtparae.cxx |4 -
 53 files changed, 163 insertions(+), 163 deletions(-)

New commits:
commit 84fd42c1f58627f3e03ee6062fa2812a4890d941
Author: Wastack 
Date:   Thu Mar 31 08:48:33 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

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

diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 7625353..c8e0601 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -300,7 +300,7 @@ UUIInteractionHelper::tryOtherInteractionHandler(
 namespace
 {
 
-static bool lcl_matchesRequest( const Any& i_rRequest, const OUString& 
i_rTypeName, const OUString& i_rPropagation )
+bool lcl_matchesRequest( const Any& i_rRequest, const OUString& 
i_rTypeName, const OUString& i_rPropagation )
 {
 const css::uno::TypeDescription aTypeDesc( i_rTypeName );
 const typelib_TypeDescription* pTypeDesc = aTypeDesc.get();
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 75565c5..849f2f0 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -51,7 +51,7 @@ namespace
 #define FORMAT_METRIC2
 #define FORMAT_CURRENCY  3
 
-static sal_Int64 ImplPower10( sal_uInt16 n )
+sal_Int64 ImplPower10( sal_uInt16 n )
 {
 sal_uInt16  i;
 sal_Int64   nValue = 1;

[Libreoffice-commits] core.git: 2 commits - pyuno/source reportdesign/source rsc/source sal/rtl sal/textenc sax/qa sax/source sc/source sd/source sfx2/source shell/source slideshow/source stoc/source

2016-03-31 Thread Wastack
 pyuno/source/module/pyuno_module.cxx |2 
 reportdesign/source/ui/report/propbrw.cxx|2 
 rsc/source/rsc/rsc.cxx   |6 -
 sal/rtl/strtmpl.cxx  |4 -
 sal/textenc/convertsimple.cxx|2 
 sax/qa/cppunit/test_converter.cxx|   14 
++--
 sax/source/expatwrap/saxwriter.cxx   |4 -
 sc/source/core/data/cellvalue.cxx|2 
 sc/source/core/data/formulacell.cxx  |   18 
++---
 sc/source/core/tool/interpr1.cxx |4 -
 sc/source/filter/xcl97/xcl97rec.cxx  |8 +-
 sd/source/ui/framework/tools/FrameworkHelper.cxx |2 
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx |4 -
 sfx2/source/appl/appserv.cxx |6 -
 sfx2/source/dialog/filedlghelper.cxx |2 
 sfx2/source/doc/guisaveas.cxx|8 +-
 sfx2/source/doc/objmisc.cxx  |2 
 sfx2/source/doc/objxtor.cxx  |2 
 shell/source/sessioninstall/SyncDbusSessionHelper.cxx|2 
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx |4 -
 stoc/source/implementationregistration/implreg.cxx   |   34 
+-
 stoc/source/javavm/javavm.cxx|2 
 stoc/source/proxy_factory/proxyfac.cxx   |6 -
 stoc/source/security/access_controller.cxx   |2 
 stoc/source/servicemanager/servicemanager.cxx|2 
 stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx|2 
 svgio/qa/cppunit/SvgImportTest.cxx   |2 
 svtools/source/control/calendar.cxx  |2 
 svtools/source/table/gridtablerenderer.cxx   |6 -
 svtools/source/uno/unoiface.cxx  |2 
 svtools/source/uno/wizard/unowizard.cxx  |6 -
 svx/source/accessibility/AccessibleControlShape.cxx  |8 +-
 svx/source/fmcomp/gridcell.cxx   |   12 +--
 svx/source/form/fmcontrollayout.cxx  |4 -
 svx/source/form/fmpgeimp.cxx |4 -
 svx/source/form/fmshimp.cxx  |2 
 svx/source/form/fmtextcontrolshell.cxx   |2 
 svx/source/form/fmtools.cxx  |2 
 svx/source/form/formcontrolfactory.cxx   |6 -
 svx/source/form/formcontroller.cxx   |2 
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx |2 
 svx/source/unodraw/unoshap2.cxx  |   10 +-
 42 files changed, 109 insertions(+), 109 deletions(-)

New commits:
commit cb495d71063d60da46215a2510736eccd910fa7a
Author: Wastack 
Date:   Thu Mar 31 08:46:49 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

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

diff --git 
a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx 
b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index ac7e4c2..d70d9a7 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -1394,7 +1394,7 @@ int permutation256 [256]= {
 116, 171,  99, 202,   7, 107, 253, 108
 };
 
-static void initPermTexture(GLuint *texID)
+void initPermTexture(GLuint *texID)
 {
 CHECK_GL_ERROR();
   glGenTextures(1, texID);
@@ -1597,7 +1597,7 @@ GLuint VortexTransition::makeShader() const
 return OpenGLHelper::LoadShaders( "vortexVertexShader", 
"vortexFragmentShader", "vortexGeometryShader" );
 }
 
-static glm::mat4 lookAt(glm::vec3 eye, glm::vec3 center, glm::vec3 up) {
+glm::mat4 lookAt(glm::vec3 eye, glm::vec3 center, glm::vec3 up) {
 glm::vec3 f = glm::normalize(center - eye);
 glm::vec3 u = glm::normalize(up);
 glm::vec3 s = glm::normalize(glm::cross(f, u));
diff --git a/stoc/source/implementationregistration/implreg.cxx 
b/stoc/source/implementationregistration/implreg.cxx
index c95159b..45d699f 100644
--- a/stoc/source/implementationregistration/implreg.cxx

[Libreoffice-commits] core.git: 2 commits - extensions/source filter/source forms/source fpicker/source framework/source i18nlangtag/qa l10ntools/source oox/source

2016-03-31 Thread Wastack
 extensions/source/propctrlr/eventhandler.cxx  |2 -
 extensions/source/propctrlr/formgeometryhandler.cxx   |2 -
 extensions/source/propctrlr/pushbuttonnavigation.cxx  |4 +--
 filter/source/svg/svgreader.cxx   |4 +--
 forms/source/component/DatabaseForm.cxx   |2 -
 forms/source/component/propertybaghelper.cxx  |2 -
 forms/source/misc/InterfaceContainer.cxx  |2 -
 forms/source/richtext/richtextcontrol.cxx |   12 
+-
 forms/source/richtext/rtattributehandler.cxx  |2 -
 forms/source/runtime/formoperations.cxx   |6 ++---
 forms/source/solar/component/navbarcontrol.cxx|2 -
 forms/source/solar/control/navtoolbar.cxx |4 +--
 forms/source/xforms/datatypes.cxx |4 +--
 fpicker/source/office/iodlg.cxx   |2 -
 framework/source/services/substitutepathvars.cxx  |2 -
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |4 +--
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |4 +--
 framework/source/uielement/popuptoolbarcontroller.cxx |2 -
 framework/source/uielement/statusbarmanager.cxx   |2 -
 framework/source/uielement/statusbarmerger.cxx|   10 

 i18nlangtag/qa/cppunit/test_languagetag.cxx   |2 -
 l10ntools/source/export.cxx   |4 +--
 l10ntools/source/lngmerge.cxx |2 -
 l10ntools/source/treemerge.cxx|6 ++---
 l10ntools/source/xmlparse.cxx |6 ++---
 oox/source/mathml/importutils.cxx |2 -
 26 files changed, 48 insertions(+), 48 deletions(-)

New commits:
commit 1271eadfac7e77ff7b249e64be3857ffdc0a261c
Author: Wastack 
Date:   Thu Mar 31 08:43:53 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

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

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index 3827e32..6263417 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -456,7 +456,7 @@ void SubstitutePathVariables_Impl::ImplCommit()
 {
 }
 
-static inline OperatingSystem GetOperatingSystem()
+inline OperatingSystem GetOperatingSystem()
 {
 #ifdef SOLARIS
 return OS_SOLARIS;
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index b862ad8..15b26ba 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -238,7 +238,7 @@ static const char   RESOURCEURL_PREFIX[] = 
"private:resource/";
 static const sal_Int32  RESOURCEURL_PREFIX_SIZE = 17;
 static const char   RESOURCEURL_CUSTOM_ELEMENT[] = "custom_";
 
-static sal_Int16 RetrieveTypeFromResourceURL( const OUString& aResourceURL )
+sal_Int16 RetrieveTypeFromResourceURL( const OUString& aResourceURL )
 {
 
 if (( aResourceURL.startsWith( RESOURCEURL_PREFIX ) ) &&
@@ -260,7 +260,7 @@ static sal_Int16 RetrieveTypeFromResourceURL( const 
OUString& aResourceURL )
 return ui::UIElementType::UNKNOWN;
 }
 
-static OUString RetrieveNameFromResourceURL( const OUString& aResourceURL )
+OUString RetrieveNameFromResourceURL( const OUString& aResourceURL )
 {
 if (( aResourceURL.startsWith( RESOURCEURL_PREFIX ) ) &&
 ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE ))
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index f90ef07..1bcb6ce 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -214,7 +214,7 @@ static const char* UIELEMENTTYPENAMES[] =
 static const char   RESOURCEURL_PREFIX[] = "private:resource/";
 static const sal_Int32  RESOURCEURL_PREFIX_SIZE = 17;
 
-static sal_Int16 RetrieveTypeFromResourceURL( const OUString& aResourceURL )
+sal_Int16 RetrieveTypeFromResourceURL( const OUString& aResourceURL )
 {
 
 if (( aResourceURL.startsWith( RESOURCEURL_PREFIX ) ) &&
@@ -236,7 +236,7 @@ static sal_Int16 RetrieveTypeFromResourceURL( const 
OUString& aResourceURL )
 return UIElementType::UNKNOWN;
 }
 
-static OUString RetrieveNameFromResourceURL( const OUStr

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

2016-03-31 Thread Wastack
 dbaccess/qa/unit/data/hsqldb_empty.odb.lck|binary
 dbaccess/source/core/api/resultset.cxx|2 +-
 dbaccess/source/core/dataaccess/ModelImpl.cxx |2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx  |8 
 dbaccess/source/core/dataaccess/documenteventexecutor.cxx |2 +-
 dbaccess/source/core/recovery/dbdocrecovery.cxx   |   14 +++---
 dbaccess/source/core/recovery/subcomponentrecovery.cxx|8 
 dbaccess/source/ext/macromigration/migrationengine.cxx|   12 ++--
 dbaccess/source/ext/macromigration/migrationlog.cxx   |2 +-
 dbaccess/source/ui/app/AppDetailPageHelper.cxx|2 +-
 dbaccess/source/ui/dlg/sqlmessage.cxx |2 +-
 dbaccess/source/ui/misc/UITools.cxx   |2 +-
 dbaccess/source/ui/misc/imageprovider.cxx |4 ++--
 desktop/source/app/dispatchwatcher.cxx|2 +-
 desktop/source/deployment/misc/dp_misc.cxx|2 +-
 15 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 9e596250a6e968c5d1e2fb0de582ae242e02acf9
Author: Wastack 
Date:   Thu Mar 31 08:40:23 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

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

diff --git a/dbaccess/qa/unit/data/hsqldb_empty.odb.lck 
b/dbaccess/qa/unit/data/hsqldb_empty.odb.lck
new file mode 100644
index 000..d64ce94
Binary files /dev/null and b/dbaccess/qa/unit/data/hsqldb_empty.odb.lck differ
diff --git a/dbaccess/source/core/api/resultset.cxx 
b/dbaccess/source/core/api/resultset.cxx
index e69cf2b..f268810 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -295,7 +295,7 @@ sal_Int32 OResultSet::findColumn(const OUString& 
columnName) throw( SQLException
 
 namespace
 {
-static Reference< XDatabaseMetaData > 
lcl_getDBMetaDataFromStatement_nothrow( const Reference< XInterface >& 
_rxStatement )
+Reference< XDatabaseMetaData > lcl_getDBMetaDataFromStatement_nothrow( 
const Reference< XInterface >& _rxStatement )
 {
 Reference< XDatabaseMetaData > xDBMetaData;
 try
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 318ed94..9df76e5 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1193,7 +1193,7 @@ namespace
 
 namespace
 {
-static void lcl_rebaseScriptStorage_throw( const Reference< 
XStorageBasedLibraryContainer >& _rxContainer,
+void lcl_rebaseScriptStorage_throw( const Reference< 
XStorageBasedLibraryContainer >& _rxContainer,
 const Reference< XStorage >& _rxNewRootStorage )
 {
 if ( _rxContainer.is() )
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index dc1f629..2922e8e 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -285,7 +285,7 @@ namespace
 return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator );
 }
 
-static void lcl_triggerStatusIndicator_throw( const 
::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const 
bool _bStart )
+void lcl_triggerStatusIndicator_throw( const 
::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const 
bool _bStart )
 {
 Reference< XStatusIndicator > xStatusIndicator( 
lcl_extractStatusIndicator( _rArguments ) );
 if ( !xStatusIndicator.is() )
@@ -307,7 +307,7 @@ namespace
 // note that |reset| can throw a DisposedException
 }
 
-static void lcl_extractStatusIndicator( const 
::comphelper::NamedValueCollection& _rArguments, Sequence< Any >& _rCallArgs )
+void lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& 
_rArguments, Sequence< Any >& _rCallArgs )
 {
 Reference< XStatusIndicator > xStatusIndicator( 
lcl_extractStatusIndicator( _rArguments ) );
 if ( !xStatusIndicator.is() )
@@ -318,7 +318,7 @@ namespace
 _rCallArgs[ nLength ] <<= xStatusIndicator;
 }
 
-static void lcl_extractAndStartStatusIndicator( const 
::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& 
_rxStatusIndicator,
+void lcl_extractAndStartStatusIndicator( const 
::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& 
_rxStatusIndicator,
 Sequence< Any >& _rCallArgs )
 {
 _rxStatusIndicator = lcl_extractStatusIndicator( _rArguments );
@@ -339,7 +339,7 @@ namespace
 }
 }
 
-static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source basic/source chart2/source codemaker/source comphelper/source connectivity/source cppu/source cui/source

2016-03-31 Thread Wastack
 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx   |4 ++--
 accessibility/source/extended/AccessibleGridControlTableCell.cxx |2 +-
 basctl/source/basicide/scriptdocument.cxx|2 +-
 basic/source/basmgr/vbahelper.cxx|2 +-
 chart2/source/model/template/PieChartTypeTemplate.cxx|2 +-
 chart2/source/view/main/AbstractShapeFactory.cxx |2 +-
 codemaker/source/cppumaker/cpputype.cxx  |2 +-
 comphelper/source/misc/accessibleeventnotifier.cxx   |6 +++---
 connectivity/source/commontools/FValue.cxx   |4 ++--
 connectivity/source/commontools/dbmetadata.cxx   |   10 
+-
 connectivity/source/commontools/dbtools.cxx  |2 +-
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx   |2 +-
 connectivity/source/parse/sqliterator.cxx|4 ++--
 cppu/source/uno/lbenv.cxx|6 +++---
 cui/source/customize/cfgutil.cxx |4 ++--
 cui/source/customize/selector.cxx|4 ++--
 cui/source/options/optgdlg.cxx   |4 ++--
 17 files changed, 31 insertions(+), 31 deletions(-)

New commits:
commit 62d1632498d92b6e73b952c9d379edebe3052341
Author: Wastack 
Date:   Thu Mar 31 08:38:10 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

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

diff --git a/connectivity/source/commontools/FValue.cxx 
b/connectivity/source/commontools/FValue.cxx
index 944ebe0..b9d6fc9 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -38,7 +38,7 @@ namespace connectivity
 {
 
 namespace {
-static bool isStorageCompatible(sal_Int32 _eType1, sal_Int32 _eType2)
+bool isStorageCompatible(sal_Int32 _eType1, sal_Int32 _eType2)
 {
 bool bIsCompatible = true;
 
@@ -104,7 +104,7 @@ namespace {
 return bIsCompatible;
 }
 
-static bool isStorageComparable(sal_Int32 _eType1, sal_Int32 _eType2)
+bool isStorageComparable(sal_Int32 _eType1, sal_Int32 _eType2)
 {
 bool bIsComparable = true;
 
diff --git a/connectivity/source/commontools/dbmetadata.cxx 
b/connectivity/source/commontools/dbmetadata.cxx
index f1a66cf..eb7cee3 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -95,7 +95,7 @@ namespace dbtools
 namespace
 {
 
-static void lcl_construct( DatabaseMetaData_Impl& _metaDataImpl, const 
Reference< XConnection >& _connection )
+void lcl_construct( DatabaseMetaData_Impl& _metaDataImpl, const 
Reference< XConnection >& _connection )
 {
 _metaDataImpl.xConnection = _connection;
 if ( !_metaDataImpl.xConnection.is() )
@@ -107,7 +107,7 @@ namespace dbtools
 }
 
 
-static void lcl_checkConnected( const DatabaseMetaData_Impl& 
_metaDataImpl )
+void lcl_checkConnected( const DatabaseMetaData_Impl& _metaDataImpl )
 {
 if ( !_metaDataImpl.xConnection.is() || 
!_metaDataImpl.xConnectionMetaData.is() )
 {
@@ -118,7 +118,7 @@ namespace dbtools
 }
 
 
-static bool lcl_getDriverSetting( const sal_Char* _asciiName, const 
DatabaseMetaData_Impl& _metaData, Any& _out_setting )
+bool lcl_getDriverSetting( const sal_Char* _asciiName, const 
DatabaseMetaData_Impl& _metaData, Any& _out_setting )
 {
 lcl_checkConnected( _metaData );
 const ::comphelper::NamedValueCollection& rDriverMetaData = 
_metaData.aDriverConfig.getMetaData( _metaData.xConnectionMetaData->getURL() );
@@ -129,7 +129,7 @@ namespace dbtools
 }
 
 
-static bool lcl_getConnectionSetting( const sal_Char* _asciiName, 
const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
+bool lcl_getConnectionSetting( const sal_Char* _asciiName, const 
DatabaseMetaData_Impl& _metaData, Any& _out_setting )
 {
 try
 {
@@ -160,7 +160,7 @@ namespace dbtools
 }
 
 
-static const OUString& lcl_getConnectionStringSetting(
+const OUString& lcl_getConnectionStringSetting(
 const DatabaseMetaData_Impl& _metaData, ::boost::optional< 
OUString >& _cachedSetting,
 OUString (SAL_CALL XDatabaseMetaData::*_getter)() )
 {
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index 0f1ee60..b9eb99f 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1309,7 +1309,7 @@ OUString comp

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

2016-03-31 Thread Stephan Bergmann
 cppu/source/uno/lbenv.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0de40868b49b9fc387391e2cbca1c8e910ef3bd3
Author: Stephan Bergmann 
Date:   Fri Apr 1 08:43:14 2016 +0200

loplugin:staticanonymous

Change-Id: I1a96ef6bff7a99ab46f7c88722426cba48b46c81

diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index b0eb821..2281bc1 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -52,7 +52,7 @@ namespace
 {
 
 
-inline static bool td_equals( typelib_InterfaceTypeDescription * pTD1,
+inline bool td_equals( typelib_InterfaceTypeDescription * pTD1,
   typelib_InterfaceTypeDescription * pTD2 )
 {
 return (pTD1 == pTD2 ||
@@ -830,7 +830,7 @@ namespace
 
 class theStaticOIdPart : public rtl::Static 
{};
 
-inline static const OUString & unoenv_getStaticOIdPart()
+inline const OUString & unoenv_getStaticOIdPart()
 {
 return theStaticOIdPart::get().getOIdPart();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Muhammet Kara
 sw/source/core/text/frmform.cxx |   33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 403793990c1258db5b2bc4f709e6028a3d5ea2cb
Author: Muhammet Kara 
Date:   Thu Mar 31 11:26:34 2016 +0300

tdf#90834 Cleanup in-line version control history comments

Turn in-line version control history comments into
meaningful good comments: frmform.cxx

Change-Id: Iadfeca748b7d1f0a8e5eadb684ebf66d8e026931
Reviewed-on: https://gerrit.libreoffice.org/23705
Tested-by: Jenkins 
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 12c7595..d596535 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -250,10 +250,10 @@ bool SwTextFrame::CalcFollow( const sal_Int32 nTextOfst )
  ( ! pSct->IsVertical() && !pSct->Frame().Height() 
) )
 break;
 }
-// OD 14.03.2003 #i11760# - intrinsic format of follow is 
controlled.
+// i#11760 - Intrinsic format of follow is controlled.
 if ( FollowFormatAllowed() )
 {
-// OD 14.03.2003 #i11760# - no nested format of follows, if
+// i#11760 - No nested format of follows, if
 // text frame is contained in a column frame.
 // Thus, forbid intrinsic format of follow.
 {
@@ -289,7 +289,7 @@ bool SwTextFrame::CalcFollow( const sal_Int32 nTextOfst )
 OSL_ENSURE( !pMyFollow->GetPrev(), 
"SwTextFrame::CalcFollow: very cheesy follow" );
 }
 
-// OD 14.03.2003 #i11760# - reset control flag for follow 
format.
+// i#11760 - Reset control flag for follow format.
 pMyFollow->AllowFollowFormat();
 }
 
@@ -405,8 +405,7 @@ void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool 
bHasToFit )
 MakePos();
 if ( aOldPos != Frame().Pos() )
 {
-// OD 2004-07-01 #i28701# - use new method 

-// No format is performed for the floating screen objects.
+// i#28701 - No format is performed for the floating 
screen objects.
 InvalidateObjs();
 }
 }
@@ -439,8 +438,7 @@ void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool 
bHasToFit )
 
 // We can get a bit of space in table cells, because there could be 
some
 // left through a vertical alignment to the top.
-// #115759# - assure, that first lower in upper
-// is the current one or is valid.
+// Assure that first lower in upper is the current one or is valid.
 if ( IsInTab() &&
  ( GetUpper()->Lower() == this ||
GetUpper()->Lower()->IsValid() ) )
@@ -642,8 +640,8 @@ SwContentFrame *SwTextFrame::JoinFrame()
 
 pFoll->MoveFlyInCnt( this, nStart, COMPLETE_STRING );
 pFoll->SetFootnote( false );
-// #i27138#
-// notify accessibility paragraphs objects about changed 
CONTENT_FLOWS_FROM/_TO relation.
+// i#27138
+// Notify accessibility paragraphs objects about changed 
CONTENT_FLOWS_FROM/_TO relation.
 // Relation CONTENT_FLOWS_FROM for current next paragraph will change
 // and relation CONTENT_FLOWS_TO for current previous paragraph, which
 // is , will change.
@@ -676,7 +674,7 @@ void SwTextFrame::SplitFrame( const sal_Int32 nTextPos )
 SetFollow( pNew );
 
 pNew->Paste( GetUpper(), GetNext() );
-// #i27138#
+// i#27138
 // notify accessibility paragraphs objects about changed 
CONTENT_FLOWS_FROM/_TO relation.
 // Relation CONTENT_FLOWS_FROM for current next paragraph will change
 // and relation CONTENT_FLOWS_TO for current previous paragraph, which
@@ -970,7 +968,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine,
!rFrameBreak.IsInside( rLine ) )
: rFrameBreak.IsBreakNow( rLine ) ) ) )
  ? 1 : 0;
-// --> OD #i84870#
+// i#84870
 // no split of text frame, which only contains a as-character anchored 
object
 bool bOnlyContainsAsCharAnchoredObj =
 !IsFollow() && nStrLen == 1 &&
@@ -985,7 +983,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine,
 {
 nNew = 0;
 }
-// <--
+
 if ( nNew )
 {
 SplitFrame( nEnd );
@@ -1062,7 +1060,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine,
 {
 // Only split frame, if the frame contains
 // content or contains no content, but has a numbering.
-// OD #i84870# - no split, if text frame only contains one
+// i#84870 - No split, if text frame only contains one
   

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

2016-03-31 Thread Muhammet Kara
 sw/source/core/text/itrform2.cxx |   38 --
 1 file changed, 20 insertions(+), 18 deletions(-)

New commits:
commit 20f98f52392504666c467417558fdf93e3c16c27
Author: Muhammet Kara 
Date:   Thu Mar 31 17:12:02 2016 +0300

tdf#90834 Cleanup in-line version control history comments

Turn in-line version control history comments into
meaningful good comments: itrform2.cxx

Change-Id: I5339c31d28dc840cfa21a22a96d1de73466009f7
Reviewed-on: https://gerrit.libreoffice.org/23706
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index db36bf6..ebdf61b 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -206,7 +206,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo 
&rInf )
 pPor = pPor->GetPortion();
 }
 pPor = pTmpPrev;
-if( pPor && // Flies + Initialen werden nicht beim Underflow 
mitgenommen
+if( pPor && // Skip flys and initials when underflow.
 ( pPor->IsFlyPortion() || pPor->IsDropPortion() ||
   pPor->IsFlyCntPortion() ) )
 {
@@ -220,7 +220,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo 
&rInf )
 // What? The under-flow portion is not in the portion chain?
 OSL_ENSURE( pPor, "SwTextFormatter::Underflow: overflow but underflow" );
 
-// OD 2004-05-26 #i29529# - correction: no delete of footnotes
+// i#29529 - correction: no delete of footnotes
 //if( rInf.IsFootnoteInside() && pPor && !rInf.IsQuick() )
 //{
 //SwLinePortion *pTmp = pPor->GetPortion();
@@ -312,7 +312,8 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
 pPor = m_pCurr->GetPortion();
 }
 
-// #i112181#
+// i#112181 - Prevent footnote anchor being wrapped to next line
+// without preceeding word
 rInf.SetOtherThanFootnoteInside( rInf.IsOtherThanFootnoteInside() || 
!pPor->IsFootnotePortion() );
 }
 else
@@ -740,7 +741,7 @@ void SwTextFormatter::CalcAscent( SwTextFormatInfo &rInf, 
SwLinePortion *pPor )
 pPor->SetAscent( rInf.GetAscent() );
 bCalc = true;
 }
-// #i89179#
+// i#89179
 // tab portion representing the list tab of a list label gets the
 // same height and ascent as the corresponding number portion
 else if ( pPor->InTabGrp() && pPor->GetLen() == 0 &&
@@ -1234,7 +1235,7 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
 if( !pPor )
 {
 if( ( !pMulti || pMulti->IsBidi() ) &&
-// #i42734#
+// i#42734
 // No multi portion if there is a hook character waiting:
 ( !rInf.GetRest() || '\0' == rInf.GetHookChar() ) )
 {
@@ -1281,7 +1282,7 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
 return pTmp;
 }
 }
-// 5010: Tabs und Felder
+// Tabs and Fields
 sal_Unicode cChar = rInf.GetHookChar();
 
 if( cChar )
@@ -1342,7 +1343,7 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
 SwTabPortion* pLastTabPortion = rInf.GetLastTab();
 if ( pLastTabPortion && cChar == rInf.GetTabDecimal() )
 {
-// #127428# Abandon dec. tab position if line is full
+// Abandon dec. tab position if line is full
 // We have a decimal tab portion in the line and the next 
character has to be
 // aligned at the tab stop position. We store the width 
from the beginning of
 // the tab stop portion up to the portion containing the 
decimal separator:
@@ -1567,7 +1568,7 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 
nStartPos)
 m_pCurr->CalcLine( *this, GetInfo() );
 CalcRealHeight( GetInfo().IsNewLine() );
 
-//#i120864# For Special case that at the first calculation couldn't get
+//i#120864 For Special case that at the first calculation couldn't get
 //correct height. And need to recalculate for the right height.
 SwLinePortion* pPorTmp = m_pCurr->GetPortion();
 if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && 
pPorTmp->IsFlyCntPortion() && !pPorTmp->GetPortion() &&
@@ -1846,7 +1847,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
 
 void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const
 {
-// 3260, 3860: Fly auf jeden Fall loeschen!
+// Fly auf jeden Fall loeschen!
 ClearFly( rInf );
 rInf.Init();
 
@@ -1856,7 +1857,8 @@ void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) 
const
 rInf.SetIdx( m_nStart );
 
 // Handle overflows:
-// #i34348# Changed type from sal_uInt16 to SwTwips
+// i#34348 Changed type from sal_uInt16 to SwTwips to enable
+// the text formatting to cop

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

2016-03-31 Thread Douglas Mencken
 sw/source/filter/ww8/wrtww8.cxx |   23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 94a061eae6f3ec82abf52e229cb30d201f9eabe6
Author: Douglas Mencken 
Date:   Thu Mar 31 12:00:04 2016 -0400

convert "Impossible" ensures to warns

... everything is possible

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

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 16a4135..3fbc18b 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2194,9 +2194,11 @@ void WW8AttributeOutput::TableOrientation( 
ww8::WW8TableNodeInfoInner::Pointer_t
 const SwTable * pTable = pTableTextNodeInfoInner->getTable();
 
 const SwFrameFormat *pFormat = pTable->GetFrameFormat();
-OSL_ENSURE(pFormat,"Impossible");
-if (!pFormat)
+if ( !pFormat )
+{
+SAL_WARN( "sw.ww8", "FrameFormat is nil" );
 return;
+}
 
 const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();
 const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
@@ -2294,9 +2296,11 @@ void WW8AttributeOutput::TableDefinition( 
ww8::WW8TableNodeInfoInner::Pointer_t
  */
 //const bool bNewTableModel = pTable->IsNewModel();
 const SwFrameFormat *pFormat = pTable->GetFrameFormat();
-OSL_ENSURE(pFormat,"Impossible");
-if (!pFormat)
+if ( !pFormat )
+{
+SAL_WARN( "sw.ww8", "FrameFormat is nil" );
 return;
+}
 
 const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();
 const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
@@ -2389,9 +2393,11 @@ void AttributeOutputBase::GetTablePageSize( 
ww8::WW8TableNodeInfoInner * pTableT
 const SwTable *pTable = pTableTextNodeInfoInner->getTable( );
 
 const SwFrameFormat *pFormat = pTable->GetFrameFormat();
-OSL_ENSURE(pFormat,"Impossible");
-if (!pFormat)
+if ( !pFormat )
+{
+SAL_WARN( "sw.ww8", "FrameFormat is nil" );
 return;
+}
 
 const SwFormatFrameSize &rSize = pFormat->GetFrameSize();
 int nWidthPercent = rSize.GetWidthPercent();
@@ -2437,12 +2443,13 @@ void AttributeOutputBase::GetTablePageSize( 
ww8::WW8TableNodeInfoInner * pTableT
 
 }
 
-OSL_ENSURE(nWidthPercent, "Impossible");
-if (nWidthPercent)
+if ( nWidthPercent )
 {
 nPageSize *= nWidthPercent;
 nPageSize /= 100;
 }
+else
+SAL_WARN( "sw.ww8", "nWidthPercent is zero" );
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: download.lst

2016-03-31 Thread Miklos Vajna
 download.lst |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 29f1c4ed9be3557894af3824213447cf96166534
Author: Miklos Vajna 
Date:   Thu Mar 31 20:21:25 2016 +0200

Upgrade libxmlsec to 1.2.18

A trivial one, upstream has a single bugfix in its XSLT module (a
feature that's rare in practice in ODF documents).

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

diff --git a/download.lst b/download.lst
index 8d6eed1..d3237a9 100644
--- a/download.lst
+++ b/download.lst
@@ -91,7 +91,7 @@ export LIBEXTTEXTCAT_TARBALL := 
10d61fbaa6a06348823651b1bd7940fe-libexttextcat-3
 export LIBGLTF_MD5SUM := d63a9f47ab048f5009d90693d6aa6424
 export LIBGLTF_TARBALL := libgltf-0.0.2.tar.bz2
 export LIBLANGTAG_TARBALL := 
aa899eff126216dafe721149fbdb511b-liblangtag-0.5.8.tar.bz2
-export LIBXMLSEC_TARBALL := 
d37daeccb841e5a457b9476d613a6012-xmlsec1-1.2.17.tar.gz
+export LIBXMLSEC_TARBALL := 
8694b4609aab647186607f79e1da7f1a-xmlsec1-1.2.18.tar.gz
 export LIBXML_TARBALL := daece17e045f1c107610e137ab50c179-libxml2-2.9.3.tar.gz
 export LIBXSLT_TARBALL := 
9667bf6f9310b957254fdcf6596600b7-libxslt-1.1.28.tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: download.lst external/graphite

2016-03-31 Thread Martin Hosken
 download.lst  |2 +-
 external/graphite/ubsan.patch |   11 ---
 2 files changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 2973476aac4a7bde6c17b93808a258fd205b8f37
Author: Martin Hosken 
Date:   Fri Apr 1 11:17:30 2016 +0700

Fix up upgrade to graphite 1.3.8

Change-Id: Idd7945176e1f667c29ff11144dc78870110bf562
Reviewed-on: https://gerrit.libreoffice.org/23716
Tested-by: Jenkins 
Reviewed-by: Martin Hosken 

diff --git a/download.lst b/download.lst
index 7ba8351..8d6eed1 100644
--- a/download.lst
+++ b/download.lst
@@ -56,7 +56,7 @@ export FREETYPE_TARBALL := 
dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.b
 export GLEW_TARBALL := 3941e9cab2f4f9d8faee3e8d57ae7664-glew-1.12.0.zip
 export GLM_TARBALL := 
bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
 export GLYPHY_TARBALL := 5d303fb955beb9bf112267316ca9d021-glyphy-0.2.0.tar.bz2
-export GRAPHITE_TARBALL := 
17df8301bcc459e83f8a8f3aca6183b2-graphite-minimal-1.3.6.tgz
+export GRAPHITE_TARBALL := 
4311dd9ace498b57c85f611e0670df64-graphite2-minimal-1.3.8.tgz
 export HARFBUZZ_MD5SUM := 0e27e531f4c4acff601ebff0957755c2
 export HARFBUZZ_TARBALL := harfbuzz-0.9.40.tar.bz2
 export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
diff --git a/external/graphite/ubsan.patch b/external/graphite/ubsan.patch
index b1617b1..2f3bf5e 100644
--- a/external/graphite/ubsan.patch
+++ b/external/graphite/ubsan.patch
@@ -1,14 +1,3 @@
 src/Pass.cpp
-+++ src/Pass.cpp
-@@ -294,7 +294,7 @@
- s->rules = begin;
- s->rules_end = (end - begin <= FiniteStateMachine::MAX_RULES)? end :
- begin + FiniteStateMachine::MAX_RULES;
--qsort(begin, end - begin, sizeof(RuleEntry), &cmpRuleEntry);
-+if (end != begin) qsort(begin, end - begin, sizeof(RuleEntry), 
&cmpRuleEntry);
- }
- 
- return true;
 --- src/gr_face.cpp
 +++ src/gr_face.cpp
 @@ -87,7 +87,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Road map? mobile devices...

2016-03-31 Thread Andrew McGlashan
Hi,

  --- resend ---

I was wondering if or when LibreOffice would be available for full use
on either or both of Android / iOS.

I know there is a viewer version for Android and I've considered setting
up LibreOffice with ownCloud, but I really would like to be able to
migrate users to full mobile use apps for use on their phones and tablets.

Without full mobile device support, too many people are subscribing to
Office 365 and that is what I want to avoid as soon as possible.

The last thing I want is for users to feel [or have little choice]  that
they have to enter in to the M$ world for mobile usage.

Thanks
AndrewM


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


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/opengl

2016-03-31 Thread Marco Cecchetti
 vcl/opengl/areaScaleFragmentShader.glsl |8 +--
 vcl/opengl/scale.cxx|   77 +---
 2 files changed, 76 insertions(+), 9 deletions(-)

New commits:
commit b8cc5b3dff66575329dee68e67c6191615c8c358
Author: Marco Cecchetti 
Date:   Tue Mar 29 22:32:53 2016 +0200

tdf#98960 fix OpenGL crash by optimized image scaling

using area scale shader - 2 passes impl - sqrt scale factor

(cherry-picked from the commit f11a228cfd326bc089d7ff1c11a1561cdf5ee986)

Change-Id: I973ae0a281735787b045ce8fd5df03f8caa8f189
Reviewed-on: https://gerrit.libreoffice.org/23613
Reviewed-by: László Németh 
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/opengl/areaScaleFragmentShader.glsl 
b/vcl/opengl/areaScaleFragmentShader.glsl
index b95b869..c83c5e0 100644
--- a/vcl/opengl/areaScaleFragmentShader.glsl
+++ b/vcl/opengl/areaScaleFragmentShader.glsl
@@ -48,11 +48,11 @@ void main(void)
 
 // How much each column/row will contribute to the resulting pixel.
 // assert( xscale <= 100 ); assert( yscale <= 100 );
-float xratio[ 100 + 2 ];
-float yratio[ 100 + 2 ];
+float xratio[ 16 + 2 ];
+float yratio[ 16 + 2 ];
 // For finding the first and last source pixel.
-int xpixel[ 100 + 2 ];
-int ypixel[ 100 + 2 ];
+int xpixel[ 16 + 2 ];
+int ypixel[ 16 + 2 ];
 
 int xpos = 0;
 int ypos = 0;
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 80bbdd6..d279229 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -208,11 +208,28 @@ bool OpenGLSalBitmap::ImplScaleArea( const 
rtl::Reference< OpenGLContext > &xCon
 bool fast = ( ixscale == int( ixscale ) && iyscale == int( iyscale )
 && int( nNewWidth * ixscale ) == mnWidth && int( nNewHeight * iyscale 
) == mnHeight );
 
+bool bTwoPasses = false;
+
 // The generic case has arrays only up to 100 ratio downscaling, which is 
hopefully enough
 // in practice, but protect against buffer overflows in case such an 
extreme case happens
 // (and in such case the precision of the generic algorithm probably 
doesn't matter anyway).
 if( ixscale > 100 || iyscale > 100 )
+{
 fast = true;
+}
+else
+{
+if (ixscale > 16 || iyscale > 16)
+{
+ixscale = std::floor(std::sqrt(ixscale));
+iyscale = std::floor(std::sqrt(iyscale));
+nNewWidth = int(mnWidth / ixscale);
+rScaleX *= ixscale; // second pass x-scale factor
+nNewHeight = int(mnHeight / iyscale);
+rScaleY *= iyscale; // second pass y-scale factor
+bTwoPasses = true;
+}
+}
 
 // TODO Make sure the framebuffer is alright
 
@@ -251,13 +268,58 @@ bool OpenGLSalBitmap::ImplScaleArea( const 
rtl::Reference< OpenGLContext > &xCon
 pProgram->DrawTexture( maTexture );
 pProgram->Clean();
 
-maTexture = aScratchTex;
-OpenGLContext::ReleaseFramebuffer( pFramebuffer );
-
-mnWidth = nNewWidth;
-mnHeight = nNewHeight;
+OpenGLContext::ReleaseFramebuffer(pFramebuffer);
 
 CHECK_GL_ERROR();
+
+if (bTwoPasses)
+{
+mnWidth = nNewWidth;
+mnHeight = nNewHeight;
+
+nNewWidth = int(mnWidth * rScaleX);
+nNewHeight = int (mnHeight * rScaleY);
+
+ixscale = 1 / rScaleX;
+iyscale = 1 / rScaleY;
+
+pProgram = xContext->UseProgram("textureVertexShader", 
OUString("areaScaleFragmentShader"));
+if (pProgram == nullptr)
+return false;
+
+OpenGLTexture aScratchTex2(nNewWidth, nNewHeight);
+
+pFramebuffer = xContext->AcquireFramebuffer(aScratchTex2);
+
+pProgram->SetUniform1f("xscale", ixscale);
+pProgram->SetUniform1f("yscale", iyscale);
+pProgram->SetUniform1i("swidth", mnWidth);
+pProgram->SetUniform1i("sheight", mnHeight);
+// For converting between <0,mnWidth-1> and <0.0,1.0> coordinate 
systems.
+pProgram->SetUniform1f("xsrcconvert", 1.0 / (mnWidth - 1));
+pProgram->SetUniform1f("ysrcconvert", 1.0 / (mnHeight - 1));
+pProgram->SetUniform1f("xdestconvert", 1.0 * (nNewWidth - 1));
+pProgram->SetUniform1f("ydestconvert", 1.0 * (nNewHeight - 1));
+
+pProgram->SetTexture("sampler", aScratchTex);
+pProgram->DrawTexture(aScratchTex);
+pProgram->Clean();
+
+OpenGLContext::ReleaseFramebuffer(pFramebuffer);
+
+CHECK_GL_ERROR();
+
+maTexture = aScratchTex2;
+mnWidth = nNewWidth;
+mnHeight = nNewHeight;
+}
+else
+{
+maTexture = aScratchTex;
+mnWidth = nNewWidth;
+mnHeight = nNewHeight;
+}
+
 return true;
 }
 
@@ -269,6 +331,11 @@ bool OpenGLSalBitmap::ImplScale( const double& rScaleX, 
const double& rScaleY, B
 OpenGLVCLContextZone aContextZone;
 rtl::Reference xContext = OpenGLContext::getVCLContext();
 
+if (rScaleX <= 1 && rSca

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

2016-03-31 Thread Henry Castro
 loleaflet/build/deps.js   |5 ++
 loleaflet/dist/leaflet.css|   36 +++
 loleaflet/src/layer/marker/ProgressOverlay.js |   62 ++
 loleaflet/src/layer/tile/TileLayer.js |3 -
 loleaflet/src/map/Map.js  |   16 ++
 5 files changed, 121 insertions(+), 1 deletion(-)

New commits:
commit a1e3c30d6e6019c7aa8306b9617561e8bd761480
Author: Henry Castro 
Date:   Thu Mar 31 21:26:19 2016 -0400

loleaflet: bccu#1622, add a marker progress bar

diff --git a/loleaflet/build/deps.js b/loleaflet/build/deps.js
index 9f0131f..13c6fe1 100644
--- a/loleaflet/build/deps.js
+++ b/loleaflet/build/deps.js
@@ -74,6 +74,11 @@ var deps = {
desc: 'Used to display an image over a particular rectangular 
area of the map.'
},
 
+   ProgressOverlay: {
+   src: ['layer/marker/ProgressOverlay.js'],
+   desc: 'Used to display a progress image over rectangular are of 
the map.'
+   },
+
Marker: {
src: ['layer/marker/Icon.js',
  'layer/marker/Icon.Default.js',
diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index 4170f47..5d48932 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -9,6 +9,7 @@
 .leaflet-map-pane canvas,
 .leaflet-zoom-box,
 .leaflet-image-layer,
+.leaflet-progress-layer,
 .leaflet-layer {
position: absolute;
left: 0;
@@ -649,3 +650,38 @@ a.leaflet-control-buttons:hover:first-child {
display: block;
margin: 0 auto;
}
+
+.leaflet-progress {
+   background: #ebebeb;
+   border-left: 1px solid transparent;
+   border-right: 1px solid transparent;
+   border-radius: 10px;
+   height:100%;
+   }
+
+.leaflet-progress > span {
+   position: relative;
+   float: left;
+   margin: 0 -1px;
+   height: 100%;
+   text-align: right;
+   background: #5aaadb;
+   border: 1px solid;
+   border-color: #459fd6 #3094d2 #277db2;
+   border-radius: 10px;
+   background-image: -webkit-linear-gradient(top, #aed5ed, #7bbbe2 70%, 
#5aaadb);
+   background-image: -moz-linear-gradient(top, #aed5ed, #7bbbe2 70%, 
#5aaadb);
+   background-image: -o-linear-gradient(top, #aed5ed, #7bbbe2 70%, 
#5aaadb);
+   background-image: linear-gradient(to bottom, #aed5ed, #7bbbe2 70%, 
#5aaadb);
+   -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), 0 1px 2px 
rgba(0, 0, 0, 0.2);
+   box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 
0, 0.2);
+   }
+
+.leaflet-progress > span > span {
+   padding: 0 8px;
+   font-size: 11px;
+   font-weight: bold;
+   color: #404040;
+   color: rgba(0, 0, 0, 0.7);
+   text-shadow: 0 1px rgba(255, 255, 255, 0.4);
+   }
diff --git a/loleaflet/src/layer/marker/ProgressOverlay.js 
b/loleaflet/src/layer/marker/ProgressOverlay.js
new file mode 100644
index 000..055f7dd
--- /dev/null
+++ b/loleaflet/src/layer/marker/ProgressOverlay.js
@@ -0,0 +1,62 @@
+/*
+ * L.ProgressOverlay is used to overlay progress images over the map.
+ */
+
+L.ProgressOverlay = L.Layer.extend({
+
+   initialize: function (latlng, size) {
+   this._latlng = L.latLng(latlng);
+   this._size = size;
+   },
+
+   onAdd: function () {
+   this._initLayout();
+   this.update();
+   },
+
+   onRemove: function () {
+   L.DomUtil.remove(this._container);
+   },
+
+   update: function () {
+   if (this._container) {
+   var offset = this._size.divideBy(2, true);
+   var pos = 
this._map.latLngToLayerPoint(this._latlng).round();
+   this._setPos(pos.subtract(offset));
+   }
+   return this;
+   },
+
+   _initLayout: function () {
+   this._container = L.DomUtil.create('div', 
'leaflet-progress-layer');
+   this._progress = L.DomUtil.create('div', 'leaflet-progress', 
this._container);
+   this._bar = L.DomUtil.create('span', '', this._progress);
+   this._label = L.DomUtil.create('span', '', this._bar);
+
+   L.DomUtil.setStyle(this._label, 'line-height', this._size.y + 
'px');
+
+   this._container.style.width  = this._size.x + 'px';
+   this._container.style.height = this._size.y + 'px';
+
+   L.DomEvent
+   .disableClickPropagation(this._progress)
+   .disableScrollPropagation(this._container);
+
+   if (this._container) {
+   this.getPane().appendChild(this._container);
+   }
+   },
+
+   _setPos: function (pos) {
+   L.DomUtil.setPosition(this._container, pos);
+   },
+
+   setValue: function (value) {
+   this._bar.style.width

Re: linux dbgutil tinderbox stuck -> backtrace

2016-03-31 Thread Norbert Thiebaud
On Thu, Mar 31, 2016 at 8:43 AM, Michael Stahl  wrote:
> On 31.03.2016 15:23, Noel Grandin wrote:
>>
>>
>> On 2016/03/31 3:17 PM, Norbert Thiebaud wrote:
>>>
>>> What I really wish for is a reliable hard timeout on all these tests.
>>>
>>
>> Not sure how much it helps, but Java has a built-in thread deadlock detector 
>> (which may or may not fire here, since it
>> only detects deadlocks where the locks in question are all Java-level locks)
>>
>> I have code that I can contribute that runs a watchdog thread that queries 
>> the Java deadlock detector every 2 seconds
>> and kills the program when a deadlock is detected.
>
> hmm... that would help in this particular case, but generally speaking,
> this is the first and only java-only deadlock i've ever seen in a test,
> usually 2 C++ threads are involved in a deadlock.
>
>> Of course, it may be simpler and safer to simply surround the relevant tests 
>> with a brute-force-5-min-timeout-and-kill.
>
> that depends on the build configuration, if you're running the test with
> ASAN / valgrind / drmemory the timeout needs to be much longer or disabled.

we could have multiplier in gbuild for these case.

like default base timeout 10 minutes
multiplier = 1
if asan multiplier = 3  (for example)

and then the actual watchdog use base_timeout * multiplier minutes as timeout

Norbert

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


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

2016-03-31 Thread Eike Rathke
 sc/source/core/data/formulacell.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6959ed39e4f6f4a71a860acbf734b19b14f9c604
Author: Eike Rathke 
Date:   Fri Apr 1 00:59:09 2016 +0200

re-enable copying global names to other docs

Change-Id: Ide022525decbbec1fb4a498074752615786daab4

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index c3db7a9..e234bf0 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -728,7 +728,7 @@ void adjustRangeName(formula::FormulaToken* pToken, 
ScDocument& rNewDoc, const S
 pOldRangeData, rNewDoc, pOldDoc, rNewPos, rOldPos,
 bGlobalNamesToLocal, nTmpSheet, nNewSheet, bSameDoc);
 }
-if (bGlobalNamesToLocal && !aReferencingNames.isEmpty(-1))
+if ((bGlobalNamesToLocal || !bSameDoc) && 
!aReferencingNames.isEmpty(-1))
 {
 const SCTAB nTmpSheet = -1;
 ScRangeData* pTmpData = copyRangeNames( aSheetIndexMap, 
aRangeDataVec, aReferencingNames, -1,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Help in solving a bug in TOC

2016-03-31 Thread Michael Stahl
On 29.03.2016 23:03, Mohamed Thabet wrote:
> Hello,
> 
> I'm working on this bug
> https://bugs.documentfoundation.org/show_bug.cgi?id=44282
> 
> Currently I want to add a tab separator after the number in the table of
> contents, but I can't get the correct tab stop position.
> 
> My goal is to mimic the behaviour of normal numbered lists, so how can I
> determine the tab position?

hi Mohamed,

SwTextNode::GetLabelFollowedBy() to get the type of spacing.

SwTextNode::GetListTabStopPosition() would give a tab stop position but
i think it may be the wrong one for your case - we probably don't want
to apply a first-line indent of the paragraph to ToX entries and the
list style also may have indents which probably shouldn't be applied
either, although i'm less sure of that...

well i don't know the details of numbering well enough, the general idea
sounds right but it's not immediately obvious to me what exactly this
should do.

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


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

2016-03-31 Thread Michael Stahl
 external/breakpad/Module_breakpad.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 37f5df5537341232fdb0d68868408dec8fd84116
Author: Michael Stahl 
Date:   Thu Mar 31 23:58:14 2016 +0200

breakpad: fix module makefile

ff9b7d118b34b53ec947af881fccd822e2aeb1fd removed the ExternalPackage
instead of the ExternalProject.

Change-Id: I9240526b29d0559e1485253383d39b5858e4039b

diff --git a/external/breakpad/Module_breakpad.mk 
b/external/breakpad/Module_breakpad.mk
index 3880760..6cc740a 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -10,8 +10,8 @@
 $(eval $(call gb_Module_Module,breakpad))
 
 $(eval $(call gb_Module_add_targets,breakpad,\
-   ExternalProject_breakpad \
UnpackedTarball_breakpad \
+   ExternalPackage_breakpad \
 ))
 
 ifneq ($(OS)$(COM),WNTMSC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Eike Rathke
 sc/inc/document.hxx  |   13 ++
 sc/qa/unit/ucalc.hxx |1 
 sc/qa/unit/ucalc_formula.cxx |   83 +++
 sc/source/core/data/documen3.cxx |   10 
 4 files changed, 107 insertions(+)

New commits:
commit 3d88efbe9ed1c42f2e8ccd2e71724f0cb96d3c3e
Author: Eike Rathke 
Date:   Thu Mar 31 23:34:01 2016 +0200

unit test for copying nested names during copying sheet

Change-Id: Id165e7e2ce229949b919424338a4938e15aaab4d

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index d284597..1f469b1 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -151,6 +151,7 @@ public:
 void testFormulaRefUpdateNameExpandRef();
 void testFormulaRefUpdateNameDeleteRow();
 void testFormulaRefUpdateNameCopySheet();
+void testFormulaRefUpdateNameCopySheetCheckTab( SCTAB Tab, bool 
bCheckNames );
 void testFormulaRefUpdateNameDelete();
 void testFormulaRefUpdateValidity();
 void testMultipleOperations();
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 6c1ac90..634576f 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3216,6 +3216,89 @@ void Test::testFormulaRefUpdateNameCopySheet()
 m_pDoc->DeleteTab(2);
 m_pDoc->DeleteTab(1);
 m_pDoc->DeleteTab(0);
+m_pDoc->SetRangeName(nullptr);
+
+// Test nested names during copying sheet.
+
+m_pDoc->InsertTab(0, "Test2");
+ScAddress aPos(0,0,0);
+bInserted = m_pDoc->InsertNewRangeName( "global", aPos, "$Test2.$A$1");
+CPPUNIT_ASSERT(bInserted);
+bInserted = m_pDoc->InsertNewRangeName( aPos.Tab(), "local", aPos, 
"$Test2.$A$2");
+CPPUNIT_ASSERT(bInserted);
+bInserted = m_pDoc->InsertNewRangeName( "global_global", aPos, 
"global*100");
+CPPUNIT_ASSERT(bInserted);
+bInserted = m_pDoc->InsertNewRangeName( "global_local", aPos, 
"local*1000");
+CPPUNIT_ASSERT(bInserted);
+bInserted = m_pDoc->InsertNewRangeName( aPos.Tab(), "local_global", aPos, 
"global*1");
+CPPUNIT_ASSERT(bInserted);
+bInserted = m_pDoc->InsertNewRangeName( aPos.Tab(), "local_local", aPos, 
"local*10");
+CPPUNIT_ASSERT(bInserted);
+
+m_pDoc->SetString(aPos, "=SHEET()");
+aPos.IncRow();
+m_pDoc->SetString(aPos, "=A1*10+SHEET()");
+aPos.IncRow();
+m_pDoc->SetString(aPos, "=global_global");
+aPos.IncRow();
+m_pDoc->SetString(aPos, "=global_local");
+aPos.IncRow();
+m_pDoc->SetString(aPos, "=local_global");
+aPos.IncRow();
+m_pDoc->SetString(aPos, "=local_local");
+
+testFormulaRefUpdateNameCopySheetCheckTab( 0, false);
+
+// Copy sheet after.
+m_pDoc->CopyTab(0, 1);
+testFormulaRefUpdateNameCopySheetCheckTab( 0, false);
+testFormulaRefUpdateNameCopySheetCheckTab( 1, true);
+
+// Copy sheet before, shifting following now two sheets.
+m_pDoc->CopyTab(1, 0);
+testFormulaRefUpdateNameCopySheetCheckTab( 0, true);
+testFormulaRefUpdateNameCopySheetCheckTab( 1, false);
+testFormulaRefUpdateNameCopySheetCheckTab( 2, true);
+
+m_pDoc->DeleteTab(2);
+m_pDoc->DeleteTab(1);
+m_pDoc->DeleteTab(0);
+}
+
+void Test::testFormulaRefUpdateNameCopySheetCheckTab( SCTAB nTab, bool 
bCheckNames )
+{
+if (bCheckNames)
+{
+const ScRangeData* pName;
+pName = m_pDoc->GetRangeName(nTab)->findByUpperName("GLOBAL");
+CPPUNIT_ASSERT_MESSAGE("Sheet-local name GLOBAL should exist", pName);
+pName = m_pDoc->GetRangeName(nTab)->findByUpperName("LOCAL");
+CPPUNIT_ASSERT_MESSAGE("Sheet-local name LOCAL should exist", pName);
+pName = m_pDoc->GetRangeName(nTab)->findByUpperName("GLOBAL_GLOBAL");
+CPPUNIT_ASSERT_MESSAGE("Sheet-local name GLOBAL_GLOBAL should exist", 
pName);
+pName = m_pDoc->GetRangeName(nTab)->findByUpperName("GLOBAL_LOCAL");
+CPPUNIT_ASSERT_MESSAGE("Sheet-local name GLOBAL_LOCAL should exist", 
pName);
+pName = m_pDoc->GetRangeName(nTab)->findByUpperName("LOCAL_GLOBAL");
+CPPUNIT_ASSERT_MESSAGE("Sheet-local name LOCAL_GLOBAL should exist", 
pName);
+pName = m_pDoc->GetRangeName(nTab)->findByUpperName("LOCAL_LOCAL");
+CPPUNIT_ASSERT_MESSAGE("Sheet-local name LOCAL_LOCAL should exist", 
pName);
+}
+
+ScAddress aPos(0,0,0);
+aPos.SetRow(0);
+aPos.SetTab(nTab);
+int nSheet = nTab + 1;
+CPPUNIT_ASSERT_EQUAL( 1.0 * nSheet, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL( 11.0 * nSheet, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL( 100.0 * nSheet, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL( 11000.0 * nSheet, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL( 1.0 * nSheet, m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL( 110.0 * nSheet, m_pDoc->GetValue(aPos));
 }
 
 void Test::testFormulaRefUpdateNameDelete()
commit 58f4f2491b4f1705ad706413

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

2016-03-31 Thread Maxim Monastirsky
 framework/source/uielement/popuptoolbarcontroller.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 30b10b1a589945b570445518163feb6eac8e95e1
Author: Maxim Monastirsky 
Date:   Fri Apr 1 00:20:25 2016 +0300

tdf#98849 SaveToolbarController: Correct initial modified state

Regression of 69882b0ef861099fd6bfa802d6f7ba5d1391c269

Change-Id: I3698efff2f1e62e513d779400eff7f1c4a4145e4

diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx 
b/framework/source/uielement/popuptoolbarcontroller.cxx
index 50f7ec3..b64ff51 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -395,7 +395,10 @@ void SaveToolbarController::initialize( const 
css::uno::Sequence< css::uno::Any
 m_xModifiable.set( xController, css::uno::UNO_QUERY );
 
 if ( m_xModifiable.is() )
+{
 m_xModifiable->addModifyListener( this );
+m_bModified = m_xModifiable->isModified();
+}
 }
 
 sal_Bool SaveToolbarController::opensSubToolbar()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source basegfx/source

2016-03-31 Thread slideon
 avmedia/source/gstreamer/gstplayer.cxx|8 +-
 basegfx/source/curve/b2dcubicbezier.cxx   |4 -
 basegfx/source/polygon/b2dlinegeometry.cxx|4 -
 basegfx/source/polygon/b2dpolygonclipper.cxx  |   12 ++--
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx  |   58 +--
 basegfx/source/polygon/b2dpolygontools.cxx|   66 +++---
 basegfx/source/polygon/b2dpolygontriangulator.cxx |6 +-
 basegfx/source/polygon/b2dpolypolygon.cxx |   12 ++--
 basegfx/source/polygon/b2dpolypolygoncutter.cxx   |   18 +++---
 basegfx/source/polygon/b2dpolypolygontools.cxx|   58 +--
 basegfx/source/polygon/b3dpolygon.cxx |   42 +++---
 basegfx/source/polygon/b3dpolygontools.cxx|   18 +++---
 basegfx/source/polygon/b3dpolypolygon.cxx |8 +-
 basegfx/source/polygon/b3dpolypolygontools.cxx|   22 +++
 basegfx/source/tools/unotools.cxx |4 -
 15 files changed, 170 insertions(+), 170 deletions(-)

New commits:
commit 75092faa821b236eaed27b7d0e6f1f1a28d1a2e2
Author: slideon 
Date:   Sun Mar 27 16:18:03 2016 -0400

tdf#96505 Remove 0L occurences from avmedia and basegfx modules

No compiler warnings on my machine

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

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 6d3ff6d..620f5e0 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -432,7 +432,7 @@ static gboolean wrap_element_query_position (GstElement 
*element, GstFormat form
 {
 #ifdef AVMEDIA_GST_0_10
 GstFormat my_format = format;
-return gst_element_query_position( element, &my_format, cur) && my_format 
== format && *cur > 0L;
+return gst_element_query_position( element, &my_format, cur) && my_format 
== format && *cur > 0;
 #else
 return gst_element_query_position( element, format, cur );
 #endif
@@ -443,7 +443,7 @@ static gboolean wrap_element_query_duration (GstElement 
*element, GstFormat form
 {
 #ifdef AVMEDIA_GST_0_10
 GstFormat my_format = format;
-return gst_element_query_duration( element, &my_format, duration) && 
my_format == format && *duration > 0L;
+return gst_element_query_duration( element, &my_format, duration) && 
my_format == format && *duration > 0;
 #else
 return gst_element_query_duration( element, format, duration );
 #endif
@@ -502,7 +502,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " change 
to paused received" );
 
 if( mnDuration == 0) {
-gint64 gst_duration = 0L;
+gint64 gst_duration = 0;
 if( wrap_element_query_duration( mpPlaybin, 
GST_FORMAT_TIME, &gst_duration) )
 mnDuration = gst_duration;
 }
@@ -546,7 +546,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 // We get to use the exciting new playbin2 ! (now known as playbin)
 if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ASYNC_DONE ) {
 if( mnDuration == 0) {
-gint64 gst_duration = 0L;
+gint64 gst_duration = 0;
 if( wrap_element_query_duration( mpPlaybin, GST_FORMAT_TIME, 
&gst_duration) )
 mnDuration = gst_duration;
 }
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx 
b/basegfx/source/curve/b2dcubicbezier.cxx
index 612922a..ffa5a6e 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -678,10 +678,10 @@ namespace basegfx
 
 // now look for the closest point
 const sal_uInt32 nPointCount(aInitialPolygon.count());
-B2DVector aVector(rTestPoint - aInitialPolygon.getB2DPoint(0L));
+B2DVector aVector(rTestPoint - aInitialPolygon.getB2DPoint(0));
 double fQuadDist(aVector.getX() * aVector.getX() + aVector.getY() * 
aVector.getY());
 double fNewQuadDist;
-sal_uInt32 nSmallestIndex(0L);
+sal_uInt32 nSmallestIndex(0);
 
 for(sal_uInt32 a(1L); a < nPointCount; a++)
 {
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx 
b/basegfx/source/polygon/b2dlinegeometry.cxx
index 33dd570..9d05520 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -47,7 +47,7 @@ namespace basegfx
 {
 B2DPolyPolygon aRetval;
 OSL_ENSURE(rCandidate.count() > 1L, 
"createAreaGeometryForLineStartEnd: Line polygon has too less points (!)");
-OSL_ENSURE(rArrow.count() > 0L, 
"createAreaGeometryForLineStartEnd: Empty arrow tools::PolyPolygon (!)");
+OSL_ENSURE(rArrow.count() > 0, "createAreaGeometryForLineStartEnd: 
E

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

2016-03-31 Thread Adolfo Jayme Barrientos
 source/text/shared/02/01170103.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5aa3e6e32c24f5f695629d6e9627f5d8502452a3
Author: Adolfo Jayme Barrientos 
Date:   Thu Mar 31 13:58:20 2016 -0600

People who confuse “lose” and “loose” make me cringe

• https://en.wiktionary.org/wiki/loose
• https://en.wiktionary.org/wiki/lose

Change-Id: I8e1ca11b1dcffd9df7d0f3291d9604e8ec1afb43

diff --git a/source/text/shared/02/01170103.xhp 
b/source/text/shared/02/01170103.xhp
index 60f33af..21ffdef 100644
--- a/source/text/shared/02/01170103.xhp
+++ b/source/text/shared/02/01170103.xhp
@@ -67,7 +67,7 @@
 
 When losing focus
-  The When losing focus 
event takes place if a control field looses the 
focus.
+  The When losing focus event takes place if 
a control field loses the focus.
 
 Key pressed
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-03-31 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 485c4f5ba17bdad12db19770ff708b84c938694a
Author: Adolfo Jayme Barrientos 
Date:   Thu Mar 31 13:58:20 2016 -0600

Updated core
Project: help  5aa3e6e32c24f5f695629d6e9627f5d8502452a3

People who confuse “lose” and “loose” make me cringe

• https://en.wiktionary.org/wiki/loose
• https://en.wiktionary.org/wiki/lose

Change-Id: I8e1ca11b1dcffd9df7d0f3291d9604e8ec1afb43

diff --git a/helpcontent2 b/helpcontent2
index 721523d..5aa3e6e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 721523df6af6ea33f2a7b7bc3d7d6a269c28bb1f
+Subproject commit 5aa3e6e32c24f5f695629d6e9627f5d8502452a3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Eike Rathke
 sc/inc/refupdatecontext.hxx  |1 
 sc/source/core/data/formulacell.cxx  |  266 ---
 sc/source/core/data/refupdatecontext.cxx |6 
 3 files changed, 251 insertions(+), 22 deletions(-)

New commits:
commit d2a2d436aa10839c83a5471c9d37e2d69011825a
Author: Eike Rathke 
Date:   Wed Mar 30 22:11:47 2016 +0200

copy and adjust nested named expressions during sheet-copy

Change-Id: Idec3d7f2282bb2521c1f46e4488bf85a47b19ea4

diff --git a/sc/inc/refupdatecontext.hxx b/sc/inc/refupdatecontext.hxx
index 272c3a2..2c47563 100644
--- a/sc/inc/refupdatecontext.hxx
+++ b/sc/inc/refupdatecontext.hxx
@@ -35,6 +35,7 @@ public:
 void setUpdatedName(SCTAB nTab, sal_uInt16 nIndex);
 bool isNameUpdated(SCTAB nTab, sal_uInt16 nIndex) const;
 NameIndicesType getUpdatedNames(SCTAB nTab) const;
+bool isEmpty(SCTAB nTab) const;
 
 private:
 typedef std::unordered_map UpdatedNamesType;
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index a8f8291..c3db7a9 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -420,9 +420,104 @@ bool lcl_isReference(const FormulaToken& rToken)
 rToken.GetType() == svDoubleRef;
 }
 
+enum MightReferenceSheet
+{
+UNKNOWN,
+NONE,
+CODE,
+NAME
+};
+
+MightReferenceSheet mightRangeNameReferenceSheet( ScRangeData* pData, SCTAB 
nRefTab)
+{
+ScTokenArray* pCode = pData->GetCode();
+if (!pCode)
+return MightReferenceSheet::NONE;
+
+for (const FormulaToken* p = pCode->First(); p; p = pCode->Next())
+{
+if (p->GetOpCode() == ocName)
+return MightReferenceSheet::NAME;
+}
+
+return pCode->ReferencesSheet( nRefTab, pData->GetPos().Tab()) ?
+MightReferenceSheet::CODE : MightReferenceSheet::NONE;
+}
+
+// See also lcl_FindRangeNamesInUse() below.
+/** Recursively find all named expressions that directly or indirectly (nested)
+reference a given sheet.
+
+@param  pToken
+A token of type svIndex with OpCode ocName.
+ */
+bool findRangeNamesReferencingSheet( sc::UpdatedRangeNames& rIndexes, const 
FormulaToken* pToken,
+const ScDocument* pDoc, SCTAB nGlobalRefTab, SCTAB nLocalRefTab,
+SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement, int nRecursion)
+{
+const sal_uInt16 nTokenIndex = pToken->GetIndex();
+SCTAB nTokenTab = pToken->GetSheet();
+if (nTokenTab < -1)
+{
+SAL_WARN("sc.core", "findRangeNamesReferencingSheet - nTokenTab < -1 : 
" <<
+nTokenTab << ", nTokenIndex " << nTokenIndex << " Fix the 
creator!");
+#if OSL_DEBUG_LEVEL > 0
+const ScRangeData* pData = pDoc->FindRangeNameByIndexAndSheet( 
nTokenIndex, nTokenTab);
+SAL_WARN_IF( pData, "sc.core", "findRangeNamesReferencingSheet - named 
expression is: " << pData->GetName());
+#endif
+nTokenTab = -1;
+}
+SCTAB nRefTab = nGlobalRefTab;
+if (nTokenTab == nOldTokenTab)
+{
+nTokenTab = nOldTokenTabReplacement;
+nRefTab = nLocalRefTab;
+}
+else if (nTokenTab == nOldTokenTabReplacement)
+{
+nRefTab = nLocalRefTab;
+}
+
+if (rIndexes.isNameUpdated( nTokenTab, nTokenIndex))
+return true;
+
+ScRangeData* pData = pDoc->FindRangeNameByIndexAndSheet( nTokenIndex, 
nTokenTab);
+if (!pData)
+return false;
+
+ScTokenArray* pCode = pData->GetCode();
+if (!pCode)
+return false;
+
+bool bRef = false;
+if (nRecursion < 126)   // whatever.. 42*3
+{
+for (const FormulaToken* p = pCode->First(); p; p = pCode->Next())
+{
+if (p->GetOpCode() == ocName)
+{
+bRef |= findRangeNamesReferencingSheet( rIndexes, p, pDoc, 
nGlobalRefTab, nLocalRefTab,
+nOldTokenTab, nOldTokenTabReplacement, nRecursion+1);
+}
+}
+}
+
+if (!bRef)
+{
+SCTAB nPosTab = pData->GetPos().Tab();
+if (nPosTab == nOldTokenTab)
+nPosTab = nOldTokenTabReplacement;
+bRef = pCode->ReferencesSheet( nRefTab, nPosTab);
+}
+if (bRef)
+rIndexes.setUpdatedName( nTokenTab, nTokenIndex);
+
+return bRef;
+}
+
 ScRangeData* copyRangeName( const ScRangeData* pOldRangeData, ScDocument& 
rNewDoc, const ScDocument* pOldDoc,
 const ScAddress& rNewPos, const ScAddress& rOldPos, bool 
bGlobalNamesToLocal,
-SCTAB nOldSheet, SCTAB & nNewSheet)
+SCTAB nOldSheet, SCTAB & nNewSheet, bool bSameDoc)
 {
 ScAddress aRangePos( pOldRangeData->GetPos());
 if (nOldSheet < 0 && !bGlobalNamesToLocal)
@@ -437,7 +532,6 @@ ScRangeData* copyRangeName( const ScRangeData* 
pOldRangeData, ScDocument& rNewDo
 ScRangeData* pRangeData = new ScRangeData(*pOldRangeData, &rNewDoc, 
&aRangePos);
 pRangeData->SetIndex(0);// needed for insert to assign a new index
 ScTokenArray* pRangeNameToken = pRangeData->G

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

2016-03-31 Thread Aleksas Pantechovskis
 sc/source/ui/view/spelleng.cxx |   19 +--
 sc/source/ui/view/viewfunc.cxx |9 +
 2 files changed, 18 insertions(+), 10 deletions(-)

New commits:
commit e3e0ac4d3d3d7f701618358ccbb3d667683c6b20
Author: Aleksas Pantechovskis 
Date:   Wed Mar 30 23:05:19 2016 +0300

tdf#98893 Remove expensive calls to GetCellType + GetValue/... in calc

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

diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 871de86..ffb20f5 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -34,6 +34,8 @@
 #include "spelldialog.hxx"
 #include "tabvwsh.hxx"
 #include "docsh.hxx"
+#include "cellvalue.hxx"
+#include "cellform.hxx"
 #include "formulacell.hxx"
 #include "patattr.hxx"
 #include "waitoff.hxx"
@@ -247,19 +249,24 @@ void ScConversionEngineBase::FillFromCell( SCCOL nCol, 
SCROW nRow, SCTAB nTab )
 {
 ScAddress aPos(nCol, nRow, nTab);
 
-switch (mrDoc.GetCellType(aPos))
+ScRefCellValue aCell(mrDoc, aPos);
+switch (aCell.meType)
 {
 case CELLTYPE_STRING:
 {
-OUString aText = mrDoc.GetString(aPos);
-SetText( aText );
+SvNumberFormatter* pFormatter = mrDoc.GetFormatTable();
+sal_uLong nNumFmt = mrDoc.GetNumberFormat(aPos);
+OUString aText;
+Color* pColor;
+ScCellFormat::GetString(aCell, nNumFmt, aText, &pColor, 
*pFormatter, &mrDoc);
+
+SetText(aText);
 }
 break;
 case CELLTYPE_EDIT:
 {
-const EditTextObject* pNewEditObj = mrDoc.GetEditText(aPos);
-if (pNewEditObj)
-SetText(*pNewEditObj);
+const EditTextObject* pNewEditObj = aCell.mpEditText;
+SetText(*pNewEditObj);
 }
 break;
 default:
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index f43695d..2e26c66 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1189,13 +1189,14 @@ void ScViewFunc::ApplySelectionPattern( const 
ScPatternAttr& rAttr, bool bCursor
 EditTextObject* pOldEditData = nullptr;
 EditTextObject* pNewEditData = nullptr;
 ScAddress aPos(nCol, nRow, nTab);
-if (rDoc.GetCellType(aPos) == CELLTYPE_EDIT)
+ScRefCellValue aCell(rDoc, aPos);
+if (aCell.meType == CELLTYPE_EDIT)
 {
-const EditTextObject* pEditObj = rDoc.GetEditText(aPos);
-pOldEditData = pEditObj ? pEditObj->Clone() : nullptr;
+const EditTextObject* pEditObj = aCell.mpEditText;
+pOldEditData = pEditObj->Clone();
 rDoc.RemoveEditTextCharAttribs(aPos, rAttr);
 pEditObj = rDoc.GetEditText(aPos);
-pNewEditData = pEditObj ? pEditObj->Clone() : nullptr;
+pNewEditData = pEditObj->Clone();
 }
 
 aChangeRanges.Append(aPos);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Firebird-devel] Icu error with Firebird 3.0 patch

2016-03-31 Thread Adriano dos Santos Fernandes
On 31/03/2016 16:07, marius adrian popa wrote:
> I started refactoring firebird 3.0 patch for libreoffice (updated to rc2)
>
> https://gist.github.com/mariuz/bcde7f783b657b2465e5
>
> and there are few issues with icu linking
>
> https://gist.github.com/mariuz/68588eabb4f40c8aa008a601eade91e2
>
> https://gist.github.com/mariuz/68588eabb4f40c8aa008a601eade91e2#gistcomment-1739036
>

Maybe if you explain how this patch or build environment differ from the
standalone Firebird one which is working...


Adriano

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


Icu error with Firebird 3.0 patch

2016-03-31 Thread marius adrian popa
I started refactoring firebird 3.0 patch for libreoffice (updated to rc2)

https://gist.github.com/mariuz/bcde7f783b657b2465e5

and there are few issues with icu linking

https://gist.github.com/mariuz/68588eabb4f40c8aa008a601eade91e2

https://gist.github.com/mariuz/68588eabb4f40c8aa008a601eade91e2#gistcomment-1739036
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-03-31 Thread Miklos Vajna
 sw/inc/IDocumentSettingAccess.hxx   |1 
 sw/qa/extras/uiwriter/data/tdf98987.docx|binary
 sw/qa/extras/uiwriter/uiwriter.cxx  |   19 
+
 sw/source/core/doc/DocumentSettingManager.cxx   |5 ++
 sw/source/core/inc/DocumentSettingManager.hxx   |1 
 sw/source/core/inc/anchoredobjectposition.hxx   |7 ++-
 sw/source/core/inc/txtfrm.hxx   |4 ++
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |   16 
++--
 sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx  |   20 
+-
 sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx |4 +-
 sw/source/core/text/txtfrm.cxx  |   13 
++
 sw/source/uibase/uno/SwXDocumentSettings.cxx|   13 
++
 writerfilter/source/filter/WriterFilter.cxx |1 
 13 files changed, 87 insertions(+), 17 deletions(-)

New commits:
commit 50223ea6e212b60b7d33839c2753c5601fb50f95
Author: Miklos Vajna 
Date:   Thu Mar 31 15:05:48 2016 +0200

tdf#98987 sw: add AddVerticalFrameOffsets compat mode

The situation is the following: we have a text frame, with at least two
anchored objects: one is wrapped not-wrap-through, the other is. In case
the non-wrap-though one shifts the text content of the text frame right or
down, then layout may or may not want to re-consider what is the top
left corner of the text frame for anchoring purposes.

Regarding the x position, sw layout repositioned the anchor point
depending on the AddFrameOffsets compat mode: it's enabled for documents
imported from Word, disabled otherwise.  Regarding the y position, no
repositioning was done, however the bugdoc shows that Word does the same
repositioning on the vertical axis as well.

Add a new AddVerticalFrameOffsets compat mode that enables vertical
repositioning as well, and enable that mode for documents imported from
DOCX.

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

diff --git a/sw/inc/IDocumentSettingAccess.hxx 
b/sw/inc/IDocumentSettingAccess.hxx
index 08359a2..e02cbce 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -37,6 +37,7 @@ enum class DocumentSettingId
 TAB_COMPAT,
 
 ADD_FLY_OFFSETS,
+ADD_VERTICAL_FLY_OFFSETS,
 
 OLD_NUMBERING,
 
diff --git a/sw/qa/extras/uiwriter/data/tdf98987.docx 
b/sw/qa/extras/uiwriter/data/tdf98987.docx
new file mode 100644
index 000..3b24e34
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf98987.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 135e1e9..b450520 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -194,6 +194,7 @@ public:
 void testTdf88453();
 void testTdf88453Table();
 void testClassificationPaste();
+void testTdf98987();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -290,6 +291,7 @@ public:
 CPPUNIT_TEST(testTdf88453);
 CPPUNIT_TEST(testTdf88453Table);
 CPPUNIT_TEST(testClassificationPaste);
+CPPUNIT_TEST(testTdf98987);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -3573,6 +3575,23 @@ void SwUiWriterTest::testClassificationPaste()
 xSourceComponent->dispose();
 }
 
+void SwUiWriterTest::testTdf98987()
+{
+createDoc("tdf98987.docx");
+calcLayout();
+xmlDocPtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, 
"/root/page/body/txt/anchored/SwAnchoredDrawObject[2]/sdrObject", "name", 
"Rectangle 1");
+sal_Int32 nRectangle1 = getXPath(pXmlDoc, 
"/root/page/body/txt/anchored/SwAnchoredDrawObject[2]/bounds", "top").toInt32();
+assertXPath(pXmlDoc, 
"/root/page/body/txt/anchored/SwAnchoredDrawObject[1]/sdrObject", "name", 
"Rectangle 2");
+sal_Int32 nRectangle2 = getXPath(pXmlDoc, 
"/root/page/body/txt/anchored/SwAnchoredDrawObject[1]/bounds", "top").toInt32();
+CPPUNIT_ASSERT(nRectangle1 < nRectangle2);
+
+assertXPath(pXmlDoc, 
"/root/page/body/txt/anchored/SwAnchoredDrawObject[3]/sdrObject", "name", 
"Rectangle 3");
+sal_Int32 nRectangle3 = getXPath(pXmlDoc, 
"/root/page/body/txt/anchored/SwAnchoredDrawObject[3]/bounds", "top").toInt32();
+// This failed: the 3rd rectangle had a smaller "top" value than the 2nd 
one, it even overlapped with the 1st one.
+CPPUNIT_ASSERT(nRectangle2 < nRectangle3);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx 
b/sw/source/core/doc/DocumentSettingManager.cxx
index b2d251c..bdcc1ea 100644
--- a/sw/source/core/doc

[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp

2016-03-31 Thread Pranav Kant
 loolwsd/LOOLKit.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d186e05a0d893b5afcc8c6246639c82502898be6
Author: Pranav Kant 
Date:   Thu Mar 31 22:47:05 2016 +0530

loolwsd: Use filename in admin console

... instead of long URIs.

Change-Id: I9d13285ce81967a4ff9eb518086743540d7a2a90

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 2bce3e8..b10a08f 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -667,7 +667,7 @@ private:
 std::ostringstream message;
 message << "document" << " "
 << Process::id() << " "
-<< _url << " "
+<< uri.substr(uri.find_last_of("/") + 1) << " "
 << "\r\n";
 IoUtil::writeFIFO(writerNotify, message.str());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Tor Lillqvist
 sd/qa/unit/tiledrendering/tiledrendering.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a88837470d7a01e63c28ac3930c1f10d84dc218d
Author: Tor Lillqvist 
Date:   Thu Mar 31 19:31:18 2016 +0300

loplugin:unreffun

Presumably the use of testSearchAllFollowedBySearch was removed by accident.

Change-Id: I074426cd644fb64d0a8d3682b361e1aa8c20be0f

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index ae85a4b..585c3f9 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -75,6 +75,7 @@ public:
 CPPUNIT_TEST(testSearchAll);
 CPPUNIT_TEST(testSearchAllSelections);
 CPPUNIT_TEST(testSearchAllNotifications);
+CPPUNIT_TEST(testSearchAllFollowedBySearch);
 CPPUNIT_TEST(testInsertDeletePage);
 CPPUNIT_TEST(testInsertTable);
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Markus Mohrhard
 sc/source/core/data/patattr.cxx |   54 +++-
 1 file changed, 42 insertions(+), 12 deletions(-)

New commits:
commit c1f94a5ea387551e9140cf43d4ed7ca5dcae8298
Author: Markus Mohrhard 
Date:   Wed Feb 3 20:28:40 2016 +0100

tdf#93300, handle hard formatting with cond format correct

For number formats we always applied the conditional format above the
hard formatting.

Now we handle styles, conditional formatting and hard formatting
correctly.

Reviewed-on: https://gerrit.libreoffice.org/22574
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 2c728b0ae7f52691b1a3d5ab555225f5e8ac95a5)

 Conflicts:
sc/source/core/data/patattr.cxx

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

diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index ea53285..fe70300 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1293,12 +1293,24 @@ bool ScPatternAttr::IsSymbolFont() const
 return false;
 }
 
+namespace {
+
+sal_uInt32 getNumberFormatKey(const SfxItemSet& rSet)
+{
+return static_cast(rSet.Get(ATTR_VALUE_FORMAT)).GetValue();
+}
+
+LanguageType getLanguageType(const SfxItemSet& rSet)
+{
+return static_cast(rSet.Get(ATTR_LANGUAGE_FORMAT)).GetLanguage();
+}
+
+}
+
 sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
 {
-sal_uLong nFormat =
-static_cast(&GetItemSet().Get( ATTR_VALUE_FORMAT 
))->GetValue();
-LanguageType eLang =
-static_cast(&GetItemSet().Get( 
ATTR_LANGUAGE_FORMAT ))->GetLanguage();
+sal_uLong nFormat = getNumberFormatKey(GetItemSet());
+LanguageType eLang = getLanguageType(GetItemSet());
 if ( nFormat < SV_COUNTRY_LANGUAGE_OFFSET && eLang == LANGUAGE_SYSTEM )
 ;   // it remains as it is
 else if ( pFormatter )
@@ -1311,19 +1323,37 @@ sal_uLong ScPatternAttr::GetNumberFormat( 
SvNumberFormatter* pFormatter ) const
 sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
 const SfxItemSet* pCondSet ) const
 {
-OSL_ENSURE(pFormatter,"GetNumberFormat without Formatter");
+assert(pFormatter);
+if (!pCondSet)
+return GetNumberFormat(pFormatter);
+
+/* In the case of a conditional format we need to overwrite a cell style
+ * but leave a hard cell formatting alone. So check first if the number
+ * format is set in the cell format, then the conditional format and
+ * finally in the style.
+ *
+ * The style is represented here if the name is empty.
+ */
 
 const SfxPoolItem* pFormItem;
-if ( !pCondSet || 
pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SfxItemState::SET )
-pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT);
+sal_uLong nFormat = 0;
+if (GetItemSet().GetItemState(ATTR_VALUE_FORMAT, false, &pFormItem) == 
SfxItemState::SET)
+nFormat = static_cast(pFormItem)->GetValue();
+else if (pCondSet->GetItemState(ATTR_VALUE_FORMAT, true, &pFormItem) == 
SfxItemState::SET )
+nFormat = getNumberFormatKey(*pCondSet);
+else
+nFormat = getNumberFormatKey(GetItemSet());
 
 const SfxPoolItem* pLangItem;
-if ( !pCondSet || 
pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != 
SfxItemState::SET )
-pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT);
+LanguageType eLang;
+if (GetItemSet().GetItemState(ATTR_LANGUAGE_FORMAT, false, &pLangItem) == 
SfxItemState::SET)
+eLang = static_cast(pLangItem)->GetLanguage();
+else if (pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT, true, &pLangItem) == 
SfxItemState::SET)
+eLang = getLanguageType(*pCondSet);
+else
+eLang = getLanguageType(GetItemSet());
 
-return pFormatter->GetFormatForLanguageIfBuiltIn(
-static_cast(pFormItem)->GetValue(),
-static_cast(pLangItem)->GetLanguage() );
+return pFormatter->GetFormatForLanguageIfBuiltIn(nFormat, eLang);
 }
 
 const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nWhich, const 
SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Markus Mohrhard
 sc/source/core/data/patattr.cxx |   50 +++-
 1 file changed, 39 insertions(+), 11 deletions(-)

New commits:
commit 2c728b0ae7f52691b1a3d5ab555225f5e8ac95a5
Author: Markus Mohrhard 
Date:   Wed Feb 3 20:28:40 2016 +0100

tdf#93300, handle hard formatting with cond format correct

For number formats we always applied the conditional format above the
hard formatting.

Now we handle styles, conditional formatting and hard formatting
correctly.

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

diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index eead1a6..fccfb43 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1291,12 +1291,24 @@ bool ScPatternAttr::IsSymbolFont() const
 return false;
 }
 
+namespace {
+
+sal_uInt32 getNumberFormatKey(const SfxItemSet& rSet)
+{
+return static_cast(rSet.Get(ATTR_VALUE_FORMAT)).GetValue();
+}
+
+LanguageType getLanguageType(const SfxItemSet& rSet)
+{
+return static_cast(rSet.Get(ATTR_LANGUAGE_FORMAT)).GetLanguage();
+}
+
+}
+
 sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
 {
-sal_uLong nFormat =
-static_cast(&GetItemSet().Get( ATTR_VALUE_FORMAT 
))->GetValue();
-LanguageType eLang =
-static_cast(&GetItemSet().Get( 
ATTR_LANGUAGE_FORMAT ))->GetLanguage();
+sal_uLong nFormat = getNumberFormatKey(GetItemSet());
+LanguageType eLang = getLanguageType(GetItemSet());
 if ( nFormat < SV_COUNTRY_LANGUAGE_OFFSET && eLang == LANGUAGE_SYSTEM )
 ;   // it remains as it is
 else if ( pFormatter )
@@ -1313,17 +1325,33 @@ sal_uLong ScPatternAttr::GetNumberFormat( 
SvNumberFormatter* pFormatter,
 if (!pCondSet)
 return GetNumberFormat(pFormatter);
 
+/* In the case of a conditional format we need to overwrite a cell style
+ * but leave a hard cell formatting alone. So check first if the number
+ * format is set in the cell format, then the conditional format and
+ * finally in the style.
+ *
+ * The style is represented here if the name is empty.
+ */
+
 const SfxPoolItem* pFormItem;
-if ( pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != 
SfxItemState::SET )
-pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT);
+sal_uLong nFormat = 0;
+if (GetItemSet().GetItemState(ATTR_VALUE_FORMAT, false, &pFormItem) == 
SfxItemState::SET)
+nFormat = static_cast(pFormItem)->GetValue();
+else if (pCondSet->GetItemState(ATTR_VALUE_FORMAT, true, &pFormItem) == 
SfxItemState::SET )
+nFormat = getNumberFormatKey(*pCondSet);
+else
+nFormat = getNumberFormatKey(GetItemSet());
 
 const SfxPoolItem* pLangItem;
-if ( pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != 
SfxItemState::SET )
-pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT);
+LanguageType eLang;
+if (GetItemSet().GetItemState(ATTR_LANGUAGE_FORMAT, false, &pLangItem) == 
SfxItemState::SET)
+eLang = static_cast(pLangItem)->GetLanguage();
+else if (pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT, true, &pLangItem) == 
SfxItemState::SET)
+eLang = getLanguageType(*pCondSet);
+else
+eLang = getLanguageType(GetItemSet());
 
-return pFormatter->GetFormatForLanguageIfBuiltIn(
-static_cast(pFormItem)->GetValue(),
-static_cast(pLangItem)->GetLanguage() );
+return pFormatter->GetFormatForLanguageIfBuiltIn(nFormat, eLang);
 }
 
 const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nWhich, const 
SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Michael Stahl
 sd/qa/unit/tiledrendering/tiledrendering.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit eaced256be7e5c2ebcea01d14b2f521629e22848
Author: Michael Stahl 
Date:   Thu Mar 31 18:02:59 2016 +0200

sd: overloading in C++ fail episode 6315

Change-Id: I334037739f00bbb318fa780fcca898e099bc8fb8

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index f62fa5e..ae85a4b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -636,8 +636,8 @@ void SdTiledRenderingTest::testInsertTable()
 
 uno::Sequence aArgs(comphelper::InitPropertySequence(
 {
-{"Rows", uno::makeAny(3)},
-{"Columns", uno::makeAny(5)}
+{ "Rows", uno::makeAny(sal_Int32(3)) },
+{ "Columns", uno::makeAny(sal_Int32(5)) }
 }
 ));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Arul Michael
 sc/source/core/data/column2.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 527f2cd0b75f901efc683efd92a51af771b860b5
Author: Arul Michael 
Date:   Thu Mar 31 17:17:58 2016 +0530

tdf#92963 Pasting a whole row with data crashes all open LibO apps

 In ScColumn::GetNeededSize the memory pointed by rOptions.pPattern is 
freed and
new value is set again in ScFormulaCell::InterpretTail function in 
pDocument->SetNumberFormat
when pDocument->GetCondResult is called in column2.cxx:130.For fix setting 
the newly calculated
ScPatternAttr* value after the GetCondResult call.

Change-Id: I045404465b6dfa561b0821bb3b1875463aa7887a
Reviewed-on: https://gerrit.libreoffice.org/23688
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 99bf0b931401f556033f67297aa9783c4cf19b00)
Reviewed-on: https://gerrit.libreoffice.org/23709

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 8929ecd..0d4b869 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -127,6 +127,13 @@ long ScColumn::GetNeededSize(
 //  conditional formatting
 const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab );
 
+//The pPattern may change in GetCondResult
+if (aCell.meType == CELLTYPE_FORMULA)
+{
+pPattern = pAttrArray->GetPattern( nRow );
+if (ppPatternChange)
+*ppPatternChange = pPattern;
+}
 //  line break?
 
 const SfxPoolItem* pCondItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Arul Michael
 sc/source/core/data/column2.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 7a9a28857a4da8d2353c88ce90d8a60030d89e48
Author: Arul Michael 
Date:   Thu Mar 31 17:17:58 2016 +0530

tdf#92963 Pasting a whole row with data crashes all open LibO apps

 In ScColumn::GetNeededSize the memory pointed by rOptions.pPattern is 
freed and
new value is set again in ScFormulaCell::InterpretTail function in 
pDocument->SetNumberFormat
when pDocument->GetCondResult is called in column2.cxx:130.For fix setting 
the newly calculated
ScPatternAttr* value after the GetCondResult call.

Change-Id: I045404465b6dfa561b0821bb3b1875463aa7887a
Reviewed-on: https://gerrit.libreoffice.org/23688
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 99bf0b931401f556033f67297aa9783c4cf19b00)
Reviewed-on: https://gerrit.libreoffice.org/23708

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 01dde57..8c15aae 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -129,6 +129,13 @@ long ScColumn::GetNeededSize(
 //  conditional formatting
 const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab );
 
+//The pPattern may change in GetCondResult
+if (aCell.meType == CELLTYPE_FORMULA)
+{
+pPattern = pAttrArray->GetPattern( nRow );
+if (ppPatternChange)
+*ppPatternChange = pPattern;
+}
 //  line break?
 
 const SfxPoolItem* pCondItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Arul Michael
 sc/source/core/data/column2.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 99bf0b931401f556033f67297aa9783c4cf19b00
Author: Arul Michael 
Date:   Thu Mar 31 17:17:58 2016 +0530

tdf#92963 Pasting a whole row with data crashes all open LibO apps

 In ScColumn::GetNeededSize the memory pointed by rOptions.pPattern is 
freed and
new value is set again in ScFormulaCell::InterpretTail function in 
pDocument->SetNumberFormat
when pDocument->GetCondResult is called in column2.cxx:130.For fix setting 
the newly calculated
ScPatternAttr* value after the GetCondResult call.

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

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index b520d0a..3c2986e 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -129,6 +129,13 @@ long ScColumn::GetNeededSize(
 //  conditional formatting
 const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab );
 
+//The pPattern may change in GetCondResult
+if (aCell.meType == CELLTYPE_FORMULA)
+{
+pPattern = pAttrArray->GetPattern( nRow );
+if (ppPatternChange)
+*ppPatternChange = pPattern;
+}
 //  line break?
 
 const SfxPoolItem* pCondItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Samuel Mehrbrodt
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |   16 
++
 1 file changed, 16 insertions(+)

New commits:
commit 1877fc4b4154dcc48fb743e33874d321dc464ba2
Author: Samuel Mehrbrodt 
Date:   Thu Mar 31 17:07:41 2016 +0200

Label these uno commands

They appear in the Customize dialog with just the uno command name.

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 3efc1ef..5cc9ca7 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -552,6 +552,14 @@
   1
 
   
+  
+
+  Current Mail Merge Entry
+
+
+  1
+
+  
   
 
   Next Mail Merge Entry
@@ -568,6 +576,14 @@
   1
 
   
+  
+
+  Exclude Mail Merge Entry
+
+
+  1
+
+  
   
 
   Edit Individual Documents
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Noel Grandin
 sc/inc/dpobject.hxx|2 +-
 sc/inc/scabstdlg.hxx   |2 +-
 sc/source/core/data/dpobject.cxx   |   12 
 sc/source/ui/attrdlg/scdlgfact.cxx |2 +-
 sc/source/ui/attrdlg/scdlgfact.hxx |2 +-
 sc/source/ui/dbgui/dapitype.cxx|7 ++-
 sc/source/ui/inc/dapitype.hxx  |2 +-
 sc/source/ui/view/cellsh1.cxx  |2 +-
 8 files changed, 12 insertions(+), 19 deletions(-)

New commits:
commit 374b69716dcf83dbbc1e240eb02e5101d9b6a983
Author: Noel Grandin 
Date:   Tue Mar 8 20:33:57 2016 +0200

sequence->vector in sc

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

diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 4ecdd8f..5876bd9 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -235,7 +235,7 @@ public:
 bool SyncAllDimensionMembers();
 
 static bool HasRegisteredSources();
-static css::uno::Sequence GetRegisteredSources();
+static std::vector GetRegisteredSources();
 static css::uno::Reference
 CreateSource( const ScDPServiceDesc& rDesc );
 
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 8b46a09..b59142b 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -351,7 +351,7 @@ public:
 bool bEnableExternal) = 0;
 
 virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( 
vcl::Window* pParent,
-const 
css::uno::Sequence& rServices,
+const 
std::vector& rServices,
 int 
nId ) = 0;
 
 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg(vcl::Window* 
pParent, bool bDisallowCellMove = false) = 0 ;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 7324c7f..c70e02e 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2669,9 +2669,9 @@ bool ScDPObject::HasRegisteredSources()
 return bFound;
 }
 
-uno::Sequence ScDPObject::GetRegisteredSources()
+std::vector ScDPObject::GetRegisteredSources()
 {
-uno::Sequence aSeq(0);
+std::vector aVec;
 
 //  use implementation names...
 
@@ -2683,7 +2683,6 @@ uno::Sequence ScDPObject::GetRegisteredSources()
 SCDPSOURCE_SERVICE );
 if ( xEnum.is() )
 {
-long nCount = 0;
 while ( xEnum->hasMoreElements() )
 {
 uno::Any aAddInAny = xEnum->nextElement();
@@ -2697,10 +2696,7 @@ uno::Sequence 
ScDPObject::GetRegisteredSources()
 if ( xInfo.is() )
 {
 OUString sName = xInfo->getImplementationName();
-
-aSeq.realloc( nCount+1 );
-aSeq.getArray()[nCount] = sName;
-++nCount;
+aVec.push_back( sName );
 }
 }
 }
@@ -2708,7 +2704,7 @@ uno::Sequence ScDPObject::GetRegisteredSources()
 }
 }
 
-return aSeq;
+return aVec;
 }
 
 uno::Reference ScDPObject::CreateSource( const 
ScDPServiceDesc& rDesc )
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 9f6b795..178e589 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -661,7 +661,7 @@ AbstractScDataPilotSourceTypeDlg* 
ScAbstractDialogFactory_Impl::CreateScDataPilo
 }
 
 AbstractScDataPilotServiceDlg* 
ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( vcl::Window* pParent,
-const 
css::uno::Sequence& rServices,
+const 
std::vector& rServices,
 int nId )
 {
 VclPtr pDlg;
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 7a84d73..0ec96c0 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -417,7 +417,7 @@ public:
 bool bEnableExternal) override;
 
 virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( 
vcl::Window* pParent,
-const 
css::uno::Sequence& rServices,
+const 
std::vector& rServices,
 int 
nId ) override;
 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg(vcl::Window* 
pParent, bool bDisallowCellMove = false ) override;
 
diff --git a/s

Re: switching to XFastParser

2016-03-31 Thread Michael Meeks

On Thu, 2016-03-31 at 15:20 +0200, Noel Grandin wrote:
> Sounds reasonable, sure I'd be happy to help.

Neato - are you signed up as a GSOC mentor ? would be great to do that
and click the "will mentor" button vs. that proposal.   

> I took a brief look through this stuff a couple of weeks back, and
> our XML parsing code is fairly hairy to update.

Heh =)

> Large chunks of our code for parsing config type stuff seem to be passing
> their work through some kind of XSLT layer, which confuses me.

Really ? IIRC configmgr/ uses a different XML pull parser to parse its
files.

> Various things in xmloff/ implement both XFastParser and XParser helper
> code, and it's not obvious what subclasses need to implement to tie into
> the helper routines, etc, etc.

I think that's only on the branch to any significant extent, although
there was this:

commit c0a5d390e519603dbc19a38c610d0a114b80cfa1
Author: Daniel Sikeler 
Date:   Fri Oct 24 07:22:31 2014 +

fdo#80403: Import baseclasses implement FastParser interfaces

But I suspect that that is not used.

> I think Azorpid will have his work cut out :-)

Hopefully doing a nice, standalone mapping between the old and new
style interfaces is something that can be implemented and heavily unit
tested nicely =)

ATB,

Michael.

-- 
 michael.me...@collabora.com  <><, Pseudo Engineer, itinerant idiot

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


minutes of ESC call ...

2016-03-31 Thread Michael Meeks
* Present:
+ Norbert, Sophie, jani, Armin, Thorsten, Bjoern, Kendy, Miklos,
  Robinson, Stephan, Eike, Jacobo, Olivier, Michael S, Michael M
 
* Completed Action Items:
+ UI changes from non-committers in gerrit: post list to UX team (Kendy)
 [ ~impossible to find these in gerrit
   if you see it; please add Yousuf Philips & Adolfo Jayme Barrientos
   as reviewers.
   does have -owner in gerrit ? (Bjoern)
   + yep - but lots of non-UI (Kendy)
   + ok with doing that (JanI).
7 open right now, will update them shortly. ]
 
* Pending Action Items:
+ tweak UI and get LiveConnect API key / build case for board (Christian)
+ attempt to re-build a recent gstreamer 1.0 / core spec file
  on our CentOS6 base (tdf#94508) (Christian)
+ script XML / l10n string translation changes (Christian)
 [ still pending => ignore translating it for now (Cloph) ].
+ provide Italo some data:
"thanks to 10,000 UI survey respondants in last year" (Kendy)
+ investigate clobberring glew instead of lots of #ifdefs: (Oliver, Moggi)
 [ patch merged without account of ESC feedback (Michael)
   + apologies for _accidental_ premature merge here (Thorsten)
   + after fixing android build found t-box not running (Miklos)
   Oliver on vacation this week (Thorsten)
   Marco working on improving glew (Michael)
   + Plan to revert most of that & switch to a glew based approach 
when done
   Concern wrt. run-time configuration (Thorsten)
   + stuff that will never work with S/W openGL - why build & ship 
it ?
   + adds fat to something that doesn't need it.
   + why force OGL charts on everyone.
   + still up for OpenGL only as a future.
   Goal to have a custom installation ? (Kendy)
   + pkg maintainers like a minimal installation too
   + something that has to be re-compiled: lower value.
   + if able; compile just once - completely headless.
   + right - but the usual runtime optional feature is a separate 
shared library / uno component (Thorsten)
prefers to have technical details hashed out by people working on 
that part (Thorsten)
 ]
 
* Release Engineering update (JanI)
+ 5.0.6 RC1 - due April 12th.
+ approaching 5.0.6 - last release (Bjoern)
  + would be good to fix bibisected regressions (Writer only for 
starters)
between 4.4 and 5.0.6
  + mail on the list.
+ 5.1.2.2 (RC2) - due March 29th: Tuesday morning.
   + done, due to problems
  + some windows / firebird problems.
 + VM - failed on firebird; debugging why.
  + Cloph made win/lin binaries
   + push to mirrors outstanding
+ Android & iOS Remote
 
* Documentation (Olivier)
+ Chapter 2 "Setting up LibreOffice" updated to 5.1 in Draft LO 5.1 
@ODFAuthors
+ Missing information on OpenCL & LO for documentation purposes, CMIS too
+ Patches committed into helpcontent2/
+ Patches submitted to gerrit for review
+ some infra pieces need addressing too.
+ one XSLT thing to add (Kendy)
   + like re-using original XSLT approach
   + should be possible not to have to touch the existing XHPs
   + can do this in javascript.
   + XHPs should be improved (Olivier)
   + eg. using MathML to draw equations in help.
   + happy with JS if necessary.
  + will be for indexing (Kendy)
 
* l10n (Sophie)
+ work ongoing, no problems.
 
* GSoC 2016 (Thorsten/JanI)
+ https://wiki.documentfoundation.org/Development/GSoC/Ideas
+ 3 admin volunteers: janI, Moggi, Thorsten
+ Still have many proposals to evaluate
+ Quality as usual, but enough good proposals to keep mentors busy
+ Some mentors still have not pressed "I want to mentor" button
+ go press this button on at least one student.
AI: + accept invite for mentoring (Muthu)
+ April 1st (no joke) last day for submitting easyHacks
+ April 11th, last day for slot requests
+ need to be reviewed by this date.
+ propose deadline of next week for accepting mentoring (JanI)
+ poking on IRC etc. appreciated in advance (Bjoern)
+ go to https://summerofcode.withgoogle.com/dashboard/
+ and review - please check the proposals for
  those with a title of your idea.
+ If you have multiple google accounts and pressing login just throws 
you
  back at the page, going to plus.google.com, click on your ava in the 
top
  left corner, click "add account" to get to another acocunt, and than 
it
  'obviously' might work better ...
+ we will want an ordering - done in a spreadsheet or somesuch later, post 
initial 'want to mentor' deadline.
 
* UX Update (Kendy)
+ missed the meeti

[Libreoffice-commits] online.git: 2 commits - loleaflet/dist loleaflet/src loolwsd/ChildProcessSession.cpp loolwsd/DocumentBroker.cpp loolwsd/DocumentBroker.hpp loolwsd/LOOLWSD.cpp loolwsd/MasterProce

2016-03-31 Thread Pranav Kant
 loleaflet/dist/toolbar/toolbar.js |   36 
 loleaflet/src/layer/tile/TileLayer.js |   10 +
 loolwsd/ChildProcessSession.cpp   |7 +++
 loolwsd/DocumentBroker.cpp|   53 ++
 loolwsd/DocumentBroker.hpp|   18 +-
 loolwsd/LOOLWSD.cpp   |   60 ++
 loolwsd/MasterProcessSession.cpp  |   22 +++-
 loolwsd/MasterProcessSession.hpp  |   13 ++-
 8 files changed, 188 insertions(+), 31 deletions(-)

New commits:
commit b81abc4079047c2735b1f5160f18fffda70aed72
Author: Pranav Kant 
Date:   Thu Mar 24 00:48:21 2016 +0530

loleaflet: Edit lock implemention on front-end

Change-Id: I97c2b2e0a4ef51c6335cefe3e9ec8f5904deb9f4

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 5f1da68..6e3e174 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -137,6 +137,10 @@ $(function () {
{ type: 'button',  id: 'duplicatepage', img: 
'duplicatepage', hint: _("Duplicate Page") },
{ type: 'button',  id: 'deletepage', img: 'deletepage', 
hint: _("Delete Page") },
{ type: 'html', id: 'right' },
+   { type: 'break' },
+   { type: 'button',  id: 'takeedit', img: 'edit', hint: 
_("Take edit lock (others can only view)")},
+   { type: 'html',id: 'takeedit_text', html: 'VIEWING' },
+   { type: 'break' },
{ type: 'button',  id: 'prev', img: 'prev', hint: 
_("Previous page/part") },
{ type: 'button',  id: 'next', img: 'next', hint: 
_("Next page/part") },
{ type: 'break' },
@@ -271,6 +275,11 @@ function onClick(id) {
callback: onSaveAs
});
}
+   else if (id === 'takeedit') {
+   if (!item.checked) {
+   map._socket.sendMessage('takeedit');
+   }
+   }
else if (id === 'searchprev') {
map.search(L.DomUtil.get('search-input').value, true);
}
@@ -869,6 +878,33 @@ map.on('hyperlinkclicked', function (e) {
window.open(e.url, '_blank');
 });
 
+map.on('editlock', function (e) {
+   var toolbar = w2ui['toolbar-down'];
+   if (e.value) {
+   toolbar.check('takeedit');
+   toolbar.disable('takeedit');
+   toolbar.set('takeedit', {hint: _('You are editing (others can 
only view)')});
+
+   $('#takeedit_text')
+   .w2tag('You are editing now')
+   .html('EDITING');
+   setTimeout(function() {
+   $('#takeedit_text').w2tag('');
+   }, 5000);
+   }
+   else {
+   toolbar.uncheck('takeedit');
+   toolbar.enable('takeedit');
+   toolbar.set('takeedit', {hint: _('Take edit lock (others can 
only view)')});
+   $('#takeedit_text')
+   .w2tag('You are viewing now')
+   .html('VIEWING');
+   setTimeout(function() {
+   $('#takeedit_text').w2tag('');
+   }, 5000);
+   }
+});
+
 $(window).resize(function() {
resizeToolbar();
 });
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 202fb0d..5eee647 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -330,6 +330,9 @@ L.TileLayer = L.GridLayer.extend({
else if (textMsg.startsWith('unocommandresult:')) {
this._onUnoCommandResultMsg(textMsg);
}
+   else if (textMsg.startsWith('editlock')) {
+   this._onEditLock(textMsg);
+   }
},
 
_onCommandValuesMsg: function (textMsg) {
@@ -1237,6 +1240,13 @@ L.TileLayer = L.GridLayer.extend({
}
},
 
+   _onEditLock: function (textMsg) {
+   var val = parseInt(textMsg.split(' ')[1]);
+   if (!isNaN(val)) {
+   this._map.fire('editlock', {value: val});
+   }
+   },
+
 _invalidatePreviews: function () {
if (this._map._docPreviews && this._previewInvalidations.length 
> 0) {
var toInvalidate = {};
commit b8e9075f23f0f474874c52fd62bd6057de260c86
Author: Pranav Kant 
Date:   Wed Mar 23 22:25:28 2016 +0530

bccu#1621: Introduce an edit lock

... which can be taken only one at a time. Others can only view,
not edit. When a session with edit lock exits, the edit lock is
handed over to the next alive session.

Change-Id: I712a4e70369f1d07c1d83af416a0f5c288b05c7d

diff --git a/loolwsd/ChildProcessSession.cpp b/loolwsd/ChildProcessSession.cpp
ind

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

2016-03-31 Thread Jan Holesovsky
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   37 ---
 sd/source/ui/table/tablefunction.cxx |   20 ++
 2 files changed, 49 insertions(+), 8 deletions(-)

New commits:
commit 8c32ffd59aef2c7b319d64c310e7d0a46dbb9e2c
Author: Jan Holesovsky 
Date:   Thu Mar 31 15:48:52 2016 +0200

sd lok bccu#1525: Unit test for the fix.

Change-Id: I55107bd36a9b716ecbef4d01dd670617b141cc48

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 1d6775f..f62fa5e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -46,7 +46,6 @@ public:
 virtual void tearDown() override;
 
 #if !defined(_WIN32) && !defined(MACOSX)
-void testInsertDeletePage();
 void testRegisterCallback();
 void testPostKeyEvent();
 void testPostMouseEvent();
@@ -59,11 +58,12 @@ public:
 void testSearchAllSelections();
 void testSearchAllNotifications();
 void testSearchAllFollowedBySearch();
+void testInsertDeletePage();
+void testInsertTable();
 #endif
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 #if !defined(_WIN32) && !defined(MACOSX)
-CPPUNIT_TEST(testInsertDeletePage);
 CPPUNIT_TEST(testRegisterCallback);
 CPPUNIT_TEST(testPostKeyEvent);
 CPPUNIT_TEST(testPostMouseEvent);
@@ -75,7 +75,8 @@ public:
 CPPUNIT_TEST(testSearchAll);
 CPPUNIT_TEST(testSearchAllSelections);
 CPPUNIT_TEST(testSearchAllNotifications);
-CPPUNIT_TEST(testSearchAllFollowedBySearch);
+CPPUNIT_TEST(testInsertDeletePage);
+CPPUNIT_TEST(testInsertTable);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -628,6 +629,36 @@ void SdTiledRenderingTest::testInsertDeletePage()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SdTiledRenderingTest::testInsertTable()
+{
+comphelper::LibreOfficeKit::setActive();
+SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+
+uno::Sequence aArgs(comphelper::InitPropertySequence(
+{
+{"Rows", uno::makeAny(3)},
+{"Columns", uno::makeAny(5)}
+}
+));
+
+comphelper::dispatchCommand(".uno:InsertTable", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+// get the table
+sd::ViewShell* pViewShell = 
pXImpressDocument->GetDocShell()->GetViewShell();
+SdPage* pActualPage = pViewShell->GetActualPage();
+SdrObject* pObject = pActualPage->GetObj(1);
+CPPUNIT_ASSERT(pObject);
+
+// check that the table is not in the top left corner
+Point aPos(pObject->GetRelativePos());
+
+CPPUNIT_ASSERT(aPos.X() != 0);
+CPPUNIT_ASSERT(aPos.Y() != 0);
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
commit ee246512cb0103f22f8afc0de245ea7f82143776
Author: Jan Holesovsky 
Date:   Thu Mar 31 12:26:54 2016 +0200

sd lok bccu#1525: Don't rely on the window size in the LOK case.

Otherwise the table is inserted in the top left corner.

Change-Id: Ia5d7099d4bace6f18cd7e8d3409427119240b756

diff --git a/sd/source/ui/table/tablefunction.cxx 
b/sd/source/ui/table/tablefunction.cxx
index 4d20312..fd58cd4 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #include 
@@ -149,16 +150,25 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
 Size aSize( 14100, 2000 );
 
 Point aPos;
-Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
+Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel());
 aWinRect = GetActiveWindow()->PixelToLogic(aWinRect);
 
 // make sure that the default size of the table fits on the paper 
and is inside the viewing area.
 // if zoomed in close, don't make the table bigger than the 
viewing window.
 Size aMaxSize = getCurrentPage()->GetSize();
-if( aMaxSize.Height() > aWinRect.getHeight() )
-aMaxSize.setHeight( aWinRect.getHeight() );
-if( aMaxSize.Width() > aWinRect.getWidth() )
-aMaxSize.setWidth( aWinRect.getWidth() );
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+// aWinRect is nonsensical in the LOK case
+aWinRect = Rectangle(aPos, aMaxSize);
+}
+else
+{
+if( aMaxSize.Height() > aWinRect.getHeight() )
+aMaxSize.setHeight( aWinRect.getHeight() );
+if( aMaxSize.Width() > aWinRect.getWidth() )
+aMaxSize.setWidth( aWinRect.getWidth() );
+}
 
 if( aSize.Width() > aMaxSize.getWidth() )
 aSize.setWidth( aMaxSize.getWidth() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freede

New Defects reported by Coverity Scan for LibreOffice

2016-03-31 Thread scan-admin

Hi,

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

3 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 3 of 3 defect(s)


** CID 1358029:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 435 in BookmarkTable::GetNameProposal()()



*** CID 1358029:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 435 in BookmarkTable::GetNameProposal()()
429 sal_Int32 nIndex = 0;
430 if (sName.getToken(0, ' ', nIndex) == sDefaultBookmarkName)
431 {
432 sal_Int32 nCurrBookmarkId = sName.getToken(0, ' ', 
nIndex).toInt32();
433 nHighestBookmarkId = 
std::max(nHighestBookmarkId, nCurrBookmarkId);
434 }
>>> CID 1358029:  Null pointer dereferences  (NULL_RETURNS)
>>> Assigning: "pEntry" = null return value from "Next".
435 pEntry = Next(pEntry);
436 }
437 return sDefaultBookmarkName + " " + 
OUString::number(nHighestBookmarkId + 1);
438 }
439 

** CID 1358028:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 398 in 
BookmarkTable::GetRowByBookmarkName(const rtl::OUString &)()



*** CID 1358028:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 398 in 
BookmarkTable::GetRowByBookmarkName(const rtl::OUString &)()
392 {
393 sw::mark::IMark* pBookmark = 
static_cast(pEntry->GetUserData());
394 if (pBookmark->GetName() == sName)
395 {
396 return pEntry;
397 }
>>> CID 1358028:  Null pointer dereferences  (NULL_RETURNS)
>>> Assigning: "pEntry" = null return value from "Next".
398 pEntry = Next(pEntry);
399 }
400 return nullptr;
401 }
402 
403 sw::mark::IMark* BookmarkTable::GetBookmarkByName(const OUString& sName)

** CID 1358027:  API usage errors  (INVALIDATE_ITERATOR)
/reportdesign/source/ui/dlg/GroupsSorting.cxx: 679 in 
rptui::OFieldExpressionControl::elementRemoved(const 
com::sun::star::container::ContainerEvent &)()



*** CID 1358027:  API usage errors  (INVALIDATE_ITERATOR)
/reportdesign/source/ui/dlg/GroupsSorting.cxx: 679 in 
rptui::OFieldExpressionControl::elementRemoved(const 
com::sun::star::container::ContainerEvent &)()
673 if ( evt.Accessor >>= nGroupPos )
674 {
675 ::std::vector::iterator aFind = 
::std::find(m_aGroupPositions.begin(),m_aGroupPositions.end(),nGroupPos);
676 ::std::vector::const_iterator aEnd  = 
m_aGroupPositions.end();
677 if (aFind != aEnd)
678 {
>>> CID 1358027:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "aFind" though it is already past the end of its 
>>> container.
679 *aFind = NO_GROUP;
680 for(++aFind;aFind != aEnd;++aFind)
681 if ( *aFind != NO_GROUP )
682 --*aFind;
683 Invalidate();
684 }



To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?tab=overview

To manage Coverity Scan email notifications for 
"libreoffice@lists.freedesktop.org", click 
https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939

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


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

2016-03-31 Thread Stephan Bergmann
 compilerplugins/clang/nullptr.cxx |   17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 2d74cbe769e4562d6edcd0d35868fa80e6d9dd15
Author: Stephan Bergmann 
Date:   Thu Mar 31 15:49:28 2016 +0200

loplugin:nullptr: Check for more pointer types

(but did not turn up further matches)

Change-Id: I7e4843d00a2e3b46edec46c5b56b6ba1b2e098fd

diff --git a/compilerplugins/clang/nullptr.cxx 
b/compilerplugins/clang/nullptr.cxx
index 1e6311b..34e27e6 100644
--- a/compilerplugins/clang/nullptr.cxx
+++ b/compilerplugins/clang/nullptr.cxx
@@ -34,6 +34,11 @@ char const * kindName(Expr::NullPointerConstantKind kind) {
 }
 }
 
+bool isAnyKindOfPointerType(QualType type) {
+return type->isAnyPointerType() || type->isFunctionPointerType()
+|| type->isMemberPointerType();
+}
+
 class Nullptr:
 public RecursiveASTVisitor, public loplugin::RewritePlugin
 {
@@ -136,13 +141,13 @@ bool Nullptr::VisitBinaryOperator(BinaryOperator const * 
expr) {
 switch (expr->getOpcode()) {
 case BO_EQ:
 case BO_NE:
-if (expr->getRHS()->getType()->isPointerType()) {
+if (isAnyKindOfPointerType(expr->getRHS()->getType())) {
 e = expr->getLHS();
 break;
 }
 // fall through
 case BO_Assign:
-if (expr->getLHS()->getType()->isPointerType()) {
+if (isAnyKindOfPointerType(expr->getLHS()->getType())) {
 e = expr->getRHS();
 break;
 }
@@ -162,13 +167,13 @@ bool 
Nullptr::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const * expr) {
 switch (expr->getOperator()) {
 case OO_EqualEqual:
 case OO_ExclaimEqual:
-if (expr->getArg(1)->getType()->isPointerType()) {
+if (isAnyKindOfPointerType(expr->getArg(1)->getType())) {
 e = expr->getArg(0);
 break;
 }
 // fall through
 case OO_Equal:
-if (expr->getArg(0)->getType()->isPointerType()) {
+if (isAnyKindOfPointerType(expr->getArg(0)->getType())) {
 e = expr->getArg(1);
 break;
 }
@@ -184,7 +189,7 @@ bool Nullptr::VisitParmVarDecl(ParmVarDecl const * decl) {
 if (ignoreLocation(decl)) {
 return true;
 }
-if (!decl->getType()->isPointerType()) {
+if (!isAnyKindOfPointerType(decl->getType())) {
 return true;
 }
 auto e = decl->getDefaultArg();
@@ -231,7 +236,7 @@ void Nullptr::visitCXXCtorInitializer(CXXCtorInitializer 
const * init) {
 return;
 }
 auto d = init->getAnyMember();
-if (d == nullptr || !d->getType()->isPointerType()) {
+if (d == nullptr || !isAnyKindOfPointerType(d->getType())) {
 return;
 }
 if (auto e2 = dyn_cast(e)) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: config_host/config_global.h.in configure.ac oox/source xmlsecurity/source

2016-03-31 Thread Stephan Bergmann
 config_host/config_global.h.in |2 +-
 configure.ac   |2 +-
 oox/source/export/shapes.cxx   |4 ++--
 xmlsecurity/source/helper/ooxmlsecexporter.cxx |4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 4c363dd65a18e9b8d4dcd1b0aaf545a40c3dbec5
Author: Stephan Bergmann 
Date:   Thu Mar 31 15:47:54 2016 +0200

Typo in HAVE_BROKEN_STATIC_INITILIZER_LIST

Change-Id: Ia29868d1832b529d438a5a5448b751683c226846

diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index c7c5987..dd959a9 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -22,7 +22,7 @@ Any change in this header will cause a rebuild of almost 
everything.
 #define HAVE_GCC_DEPRECATED_MESSAGE 0
 #define HAVE_THREADSAFE_STATICS 0
 #define HAVE_BROKEN_CONST_ITERATORS 0
-#define HAVE_BROKEN_STATIC_INITILIZER_LIST 0
+#define HAVE_BROKEN_STATIC_INITIALIZER_LIST 0
 #define HAVE_SYSLOG_H 0
 /* Compiler supports __attribute__((warn_unused)). */
 #define HAVE_GCC_ATTRIBUTE_WARN_UNUSED 0
diff --git a/configure.ac b/configure.ac
index 9b88fd4..7ee051c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12692,7 +12692,7 @@ LIBS=$save_LIBS
 CXXFLAGS=$save_CXXFLAGS
 AC_MSG_RESULT([$broken])
 if test "$broken" = yes; then
-AC_DEFINE([HAVE_BROKEN_STATIC_INITILIZER_LIST])
+AC_DEFINE([HAVE_BROKEN_STATIC_INITIALIZER_LIST])
 fi
 
 
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index f7e84db..f833902 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -535,7 +535,7 @@ ShapeExport& 
ShapeExport::WriteGroupShape(uno::Reference xShape
 
 static bool lcl_IsOnBlacklist(OUString& rShapeType)
 {
-#if !HAVE_BROKEN_STATIC_INITILIZER_LIST
+#if !HAVE_BROKEN_STATIC_INITIALIZER_LIST
 static
 #endif
 const std::initializer_list vBlacklist = {
@@ -601,7 +601,7 @@ static bool lcl_IsOnBlacklist(OUString& rShapeType)
 
 static bool lcl_IsOnWhitelist(OUString& rShapeType)
 {
-#if !HAVE_BROKEN_STATIC_INITILIZER_LIST
+#if !HAVE_BROKEN_STATIC_INITIALIZER_LIST
 static
 #endif
 const std::initializer_list vWhitelist = {
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx 
b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index d88d542..590d33e 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -74,7 +74,7 @@ struct OOXMLSecExporter::Impl
 
 bool OOXMLSecExporter::Impl::isOOXMLBlacklist(const OUString& rStreamName)
 {
-#if !HAVE_BROKEN_STATIC_INITILIZER_LIST
+#if !HAVE_BROKEN_STATIC_INITIALIZER_LIST
 static
 #endif
 const std::initializer_list vBlacklist =
@@ -94,7 +94,7 @@ bool OOXMLSecExporter::Impl::isOOXMLBlacklist(const OUString& 
rStreamName)
 
 bool OOXMLSecExporter::Impl::isOOXMLRelationBlacklist(const OUString& 
rRelationName)
 {
-#if !HAVE_BROKEN_STATIC_INITILIZER_LIST
+#if !HAVE_BROKEN_STATIC_INITIALIZER_LIST
 static
 #endif
 const std::initializer_list vBlacklist =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Stephan Bergmann
 configmgr/source/modifications.hxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f0070f535f34d69ac2bb198e4673e06552756b8b
Author: Stephan Bergmann 
Date:   Thu Mar 31 15:47:12 2016 +0200

Missing include

Change-Id: I0babe806f04aa41110e87f9fd6b6febf892cd66d

diff --git a/configmgr/source/modifications.hxx 
b/configmgr/source/modifications.hxx
index 7aa93bf..2b4dfba 100644
--- a/configmgr/source/modifications.hxx
+++ b/configmgr/source/modifications.hxx
@@ -22,8 +22,9 @@
 
 #include 
 
-#include 
+#include 
 
+#include 
 #include 
 
 namespace configmgr {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/inc vcl/win

2016-03-31 Thread Michael Stahl
 vcl/inc/win/salgdi.h |2 ++
 vcl/win/source/gdi/salgdi3.cxx   |   17 +
 vcl/win/source/gdi/winlayout.cxx |6 ++
 3 files changed, 25 insertions(+)

New commits:
commit 988847aae823c7ea47a9925f1a40cdd61cc59f5c
Author: Michael Stahl 
Date:   Thu Mar 24 22:20:06 2016 +0100

vcl: tdf#98812: acquire reference count of WinFontInstances

... when they are inserted in WinSalGraphics::mpWinFontEntry.

Not sure why one of these drops to 0 but is not removed from the
WinSalGraphics when formatting this particular bugdoc.

Acquiring the instances when retaining pointers to them should make
the life cycle a little less insane.

(cherry picked from commit 99207a26df0083851ba8e23be72d5c6974f98a3b)

Reviewed-on: https://gerrit.libreoffice.org/23504
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 4ae7ec8c8d22e751b868459e1f51fcecc37dd6b1)

tdf#98812: follow-up

pFont->mpFontInstance can be NULL.

Reviewed-on: https://gerrit.libreoffice.org/23654
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 9fa87bb1a42c45446f78b4d8c8096d7ce90a8022)
Signed-off-by: Michael Stahl 
(cherry picked from commit 4ab36bbd1816d6f297892a638e6826f28ca87150)

Change-Id: If1404f46a13736b2a226e198bdf0c3ca8e09bb38
Reviewed-on: https://gerrit.libreoffice.org/23651
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 18b7ecf..790c3f9 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -216,6 +216,8 @@ private:
 ImplFontAttrCache*  mpFontAttrCache;// Cache font attributes from 
files in so/share/fonts
 int mnPenWidth; // Linienbreite
 
+ImplFontEntry* GetWinFontEntry(int nFallbackLevel);
+
 public:
 HDC getHDC() const { return mhLocalDC; }
 void setHDC(HDC aNew) { mhLocalDC = aNew; }
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 419fa26a..2b78abc 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1522,12 +1522,28 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* 
pFont, int nFallbackLevel
 if( mhFonts[i] )
 ::DeleteFont( mhFonts[i] );
 mhFonts[ i ] = 0;
+if (mpWinFontEntry[i])
+{
+GetWinFontEntry(i)->m_pFontCache->Release(GetWinFontEntry(i));
+}
+mpWinFontEntry[i] = nullptr;
+mpWinFontData[i] = nullptr;
 }
 mhDefFont = 0;
 return 0;
 }
 
 DBG_ASSERT( pFont->mpFontData, "WinSalGraphics mpFontData==NULL");
+if (mpWinFontEntry[nFallbackLevel])
+{
+
GetWinFontEntry(nFallbackLevel)->m_pFontCache->Release(GetWinFontEntry(nFallbackLevel));
+}
+// WinSalGraphics::GetEmbedFontData does not set mpFontInstance/mpFontEntry
+// since it is interested in font file data only.
+if (pFont->mpFontEntry)
+{
+pFont->mpFontEntry->m_pFontCache->Acquire(pFont->mpFontEntry);
+}
 mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast( 
pFont->mpFontEntry );
 mpWinFontData[ nFallbackLevel ] = static_cast( 
pFont->mpFontData );
 
@@ -1550,6 +1566,7 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* 
pFont, int nFallbackLevel
 ::DeleteFont( mhFonts[i] );
 mhFonts[i] = 0;
 }
+// note: removing mpWinFontEntry[i] here has obviously bad effects
 }
 }
 
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 261e1b0..b28fa67 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -475,6 +475,7 @@ WinLayout::WinLayout(HDC hDC, const ImplWinFontData& rWFD, 
ImplWinFontEntry& rWF
 mrWinFontEntry(rWFE),
 mbUseOpenGL(bUseOpenGL)
 {
+assert(mrWinFontEntry.mnRefCount > 0);
 // keep mrWinFontEntry alive
 mrWinFontEntry.m_pFontCache->Acquire(&mrWinFontEntry);
 }
@@ -2527,6 +2528,11 @@ intWinSalGraphics::GetMinKashidaWidth()
 return nMinKashida;
 }
 
+ImplFontEntry * WinSalGraphics::GetWinFontEntry(int const nFallbackLevel)
+{
+return mpWinFontEntry[nFallbackLevel];
+}
+
 ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD )
 :   ImplFontEntry( rFSD )
 ,   maWidthMap( 512 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: linux dbgutil tinderbox stuck -> backtrace

2016-03-31 Thread Michael Stahl
On 31.03.2016 15:23, Noel Grandin wrote:
> 
> 
> On 2016/03/31 3:17 PM, Norbert Thiebaud wrote:
>>
>> What I really wish for is a reliable hard timeout on all these tests.
>>
> 
> Not sure how much it helps, but Java has a built-in thread deadlock detector 
> (which may or may not fire here, since it 
> only detects deadlocks where the locks in question are all Java-level locks)
> 
> I have code that I can contribute that runs a watchdog thread that queries 
> the Java deadlock detector every 2 seconds 
> and kills the program when a deadlock is detected.

hmm... that would help in this particular case, but generally speaking,
this is the first and only java-only deadlock i've ever seen in a test,
usually 2 C++ threads are involved in a deadlock.

> Of course, it may be simpler and safer to simply surround the relevant tests 
> with a brute-force-5-min-timeout-and-kill.

that depends on the build configuration, if you're running the test with
ASAN / valgrind / drmemory the timeout needs to be much longer or disabled.

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


Re: linux dbgutil tinderbox stuck -> backtrace

2016-03-31 Thread Norbert Thiebaud
On Thu, Mar 31, 2016 at 8:23 AM, Noel Grandin  wrote:
> Of course, it may be simpler and safer to simply surround the relevant tests
> with a brute-force-5-min-timeout-and-kill.

yeah.. except the timeout value should probably be longer or smarter,
or an optional parameter in gbuild invocation for outlier...
we do not want it triggering abusively on slow machines... for ci purpose
even 15 minutes would be tolerable... (and really a test that
'normally' run for longer than that should be split anyway)

beside this is not necessarily a java only issue... on occasion some
other tests not involving java can dead-lock or cpu-loop...

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


Re: linux dbgutil tinderbox stuck -> backtrace

2016-03-31 Thread Noel Grandin



On 2016/03/31 3:17 PM, Norbert Thiebaud wrote:


What I really wish for is a reliable hard timeout on all these tests.



Not sure how much it helps, but Java has a built-in thread deadlock detector (which may or may not fire here, since it 
only detects deadlocks where the locks in question are all Java-level locks)


I have code that I can contribute that runs a watchdog thread that queries the Java deadlock detector every 2 seconds 
and kills the program when a deadlock is detected.


Of course, it may be simpler and safer to simply surround the relevant tests 
with a brute-force-5-min-timeout-and-kill.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: switching to XFastParser

2016-03-31 Thread Noel Grandin



On 2016/03/31 3:07 PM, Michael Meeks wrote:


That was my plan; I'd love some help mentoring and working alongside
that task though ! it would be great to accelerate the move there.



Sounds reasonable, sure I'd be happy to help.

I took a brief look through this stuff a couple of weeks back, and our XML 
parsing code is fairly hairy to update.

Large chunks of our code for parsing config type stuff seem to be passing their work through some kind of XSLT layer, 
which confuses me.


Various things in xmloff/ implement both XFastParser and XParser helper code, and it's not obvious what subclasses need 
to implement to tie into the helper routines, etc, etc.


I think Azorpid will have his work cut out :-)

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


Re: linux dbgutil tinderbox stuck -> backtrace

2016-03-31 Thread Norbert Thiebaud
On Thu, Mar 31, 2016 at 7:59 AM, Michael Stahl  wrote:

>
> it's a pretty rare deadlock, i've hit it once and sberg too once AFAIK.

The problem is that on a ci system that do 1800+ build a week rare
deadlock are much more common :-)

I've hit that one 3 times this month.

What I really wish for is a reliable hard timeout on all these tests.

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


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

2016-03-31 Thread Michael Stahl
 onlineupdate/source/update/common/uachelper.cxx   |2 
 onlineupdate/source/update/common/updatehelper.cxx|7 -
 onlineupdate/source/update/common/updatelogging.cxx   |4 
 onlineupdate/source/update/updater/loaddlls.cxx   |2 
 onlineupdate/source/update/updater/progressui_win.cxx |4 
 onlineupdate/source/update/updater/updater.cxx|   86 +-
 onlineupdate/source/update/updater/win_dirent.cxx |6 -
 7 files changed, 56 insertions(+), 55 deletions(-)

New commits:
commit 1ab775bdbae1aa148faee2a51f2f4aadae57
Author: Michael Stahl 
Date:   Thu Mar 31 13:07:05 2016 +0200

onlineupdate: revert SAL_N_ELEMENTS changes

It's not clear if the foreign code in onlineupdate is supposed to
include sal headers, so revert the 2 changes from earlier today there.

Change-Id: I604720b4bd4897204e354ec230582b0fd2036716

diff --git a/onlineupdate/source/update/common/uachelper.cxx 
b/onlineupdate/source/update/common/uachelper.cxx
index 6937e00..4cae3ad 100644
--- a/onlineupdate/source/update/common/uachelper.cxx
+++ b/onlineupdate/source/update/common/uachelper.cxx
@@ -191,7 +191,7 @@ BOOL
 UACHelper::DisablePrivileges(HANDLE token)
 {
   static const size_t PrivsToDisableSize =
-SAL_N_ELEMENTS(UACHelper::PrivsToDisable);
+sizeof(UACHelper::PrivsToDisable) / sizeof(UACHelper::PrivsToDisable[0]);
 
   return DisableUnneededPrivileges(token, UACHelper::PrivsToDisable,
PrivsToDisableSize);
diff --git a/onlineupdate/source/update/common/updatehelper.cxx 
b/onlineupdate/source/update/common/updatehelper.cxx
index 704dde8..c10ea8d 100644
--- a/onlineupdate/source/update/common/updatehelper.cxx
+++ b/onlineupdate/source/update/common/updatehelper.cxx
@@ -100,7 +100,7 @@ LaunchWinPostProcess(const WCHAR *installationDir,
 
   if (!GetPrivateProfileStringW(L"PostUpdateWin", L"ExeAsync", L"TRUE",
 exeasync,
-SAL_N_ELEMENTS(exeasync),
+sizeof(exeasync)/sizeof(exeasync[0]),
 inifile)) {
 return FALSE;
   }
@@ -123,7 +123,7 @@ LaunchWinPostProcess(const WCHAR *installationDir,
   }
 
   WCHAR dummyArg[14] = { L'\0' };
-  wcsncpy(dummyArg, L"argv0ignored ", SAL_N_ELEMENTS(dummyArg) - 1);
+  wcsncpy(dummyArg, L"argv0ignored ", sizeof(dummyArg) / sizeof(dummyArg[0]) - 
1);
 
   size_t len = wcslen(exearg) + wcslen(dummyArg);
   WCHAR *cmdline = (WCHAR *) malloc((len + 1) * sizeof(WCHAR));
@@ -266,7 +266,8 @@ StartServiceUpdate(LPCWSTR installDir)
   si.lpDesktop = L"";
   PROCESS_INFORMATION pi = {0};
   WCHAR cmdLine[64] = { '\0' };
-  wcsncpy(cmdLine, L"dummyparam.exe upgrade", SAL_N_ELEMENTS(cmdLine) - 1);
+  wcsncpy(cmdLine, L"dummyparam.exe upgrade",
+  sizeof(cmdLine) / sizeof(cmdLine[0]) - 1);
   BOOL svcUpdateProcessStarted = CreateProcessW(tmpService,
 cmdLine,
 nullptr, nullptr, FALSE,
diff --git a/onlineupdate/source/update/common/updatelogging.cxx 
b/onlineupdate/source/update/common/updatelogging.cxx
index c1ffcb0..22a74e1 100644
--- a/onlineupdate/source/update/common/updatelogging.cxx
+++ b/onlineupdate/source/update/common/updatelogging.cxx
@@ -30,11 +30,11 @@ void UpdateLog::Init(NS_tchar* sourcePathParam,
 
   sourcePath = sourcePathParam;
   NS_tchar logFile[MAXPATHLEN];
-  NS_tsnprintf(logFile, SAL_N_ELEMENTS(logFile),
+  NS_tsnprintf(logFile, sizeof(logFile)/sizeof(logFile[0]),
 NS_T("%s/%s"), sourcePathParam, fileName);
 
   if (alternateFileName && NS_taccess(logFile, F_OK)) {
-NS_tsnprintf(logFile, SAL_N_ELEMENTS(logFile),
+NS_tsnprintf(logFile, sizeof(logFile)/sizeof(logFile[0]),
   NS_T("%s/%s"), sourcePathParam, alternateFileName);
   }
 
diff --git a/onlineupdate/source/update/updater/loaddlls.cxx 
b/onlineupdate/source/update/updater/loaddlls.cxx
index 0ec061d..94a4222 100644
--- a/onlineupdate/source/update/updater/loaddlls.cxx
+++ b/onlineupdate/source/update/updater/loaddlls.cxx
@@ -90,7 +90,7 @@ struct AutoLoadSystemDependencies
 }
 
 // For each known DLL ensure it is loaded from the system32 directory
-for (size_t i = 0; i < SAL_N_ELEMENTS(delayDLLs); ++i) {
+for (size_t i = 0; i < sizeof(delayDLLs) / sizeof(delayDLLs[0]); ++i) {
   size_t fileLen = wcslen(delayDLLs[i]);
   wcsncpy(systemDirectory + systemDirLen, delayDLLs[i],
   MAX_PATH - systemDirLen);
diff --git a/onlineupdate/source/update/updater/progressui_win.cxx 
b/onlineupdate/source/update/updater/progressui_win.cxx
index cdef03f..7a0ff24 100644
--- a/onlineupdate/source/update/updater/progressui_win.cxx
+++ b/onlineupdate/source/update/updater/progressui_win.cxx
@@ -111,9 +111,9 @@ InitDialog(HWND hDlg)
   WCHAR szwInfo[MAX_TEXT_LEN];
 
   MultiByteToWideChar(CP_UTF8, 0, sUIStrings.title, -1, szwTitle,
-  SAL_N_ELE

Re: switching to XFastParser

2016-03-31 Thread Michael Meeks
Hi Noel,

On Thu, 2016-03-31 at 14:11 +0200, Noel Grandin wrote:
> [Including the original off-list discussion below for context for anyone who 
> cares]

=)

> So I took a look a Daniel Sikeler's branch at
> https://cgit.freedesktop.org/libreoffice/core/log/?h=feature/fastparser
> and it looks like he did a pretty thorough job of converting everything to 
> XFastParser.

So - I've asked a GSOC student to re-do this work; starting from
scratch and adopt an incremental approach instead.

> What was the reason this did not get merged?

There was no time to mentor it, no-one reviewed the code, the potential
for large-scale regression is huge, the parsing code creeps out of
xmloff/ into the components etc.

> Would it suffice to simply pull the commits out of this tree one-by-one,
> dust them off, pretty them up, verify them through 'make check' and push
> them to master?

I think not; since it is not an incremental approach. It is an "all or
nothing" and I'm deeply skeptical of that.

So - I've asked 'Azorpid' to submit an incremental approach for GSOC.
So we start by implementing the legacy parsing interfaces in terms of
the new XFastParser. That should get us some performance win, and then
we can start to use the tokanized XFastParser API to replace the xmloff/
custom tokenization and incrementally re-purpose Daniel's work patch by
patch.

That was my plan; I'd love some help mentoring and working alongside
that task though ! it would be great to accelerate the move there.

ATB,

Michael.

-- 
 michael.me...@collabora.com  <><, Pseudo Engineer, itinerant idiot

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


Re: linux dbgutil tinderbox stuck -> backtrace

2016-03-31 Thread Michael Stahl
On 26.03.2016 19:35, Norbert Thiebaud wrote:
> Has it has heepen from time to time recently... the ci tinderbox got
> stuck in a run
> 
> This time I was able to catch a backtrace:
> Note: tehre was 78 threads!! yeah that sound abusive.
> so I skipped over thread that merely were a clone of a previous one (bt-wise)

> Thread 9 (Thread 0x2afd1316d700 (LWP 24823)):
> #0  0x2afcb6b54a82 in pthread_cond_timedwait@@GLIBC_2.3.2 () at
> /lib64/libpthread.so.0
> #1  0x2afce1d5f392 in os::PlatformEvent::park(long) () at
> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el7_2.x86_64/jre/lib/amd64/server/libjvm.so
> #2  0x2afce1d20354 in Monitor::IWait(Thread*, long) () at

java thread waiting for a lock

> Thread 8 (Thread 0x2afd13fe8700 (LWP 24885)):
> #0  0x2afcb6b54a82 in pthread_cond_timedwait@@GLIBC_2.3.2 () at
> /lib64/libpthread.so.0
> #1  0x2afce1d5f392 in os::PlatformEvent::park(long) () at
> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el7_2.x86_64/jre/lib/amd64/server/libjvm.so
> #2  0x2afce1d4a093 in ObjectMonitor::EnterI(Thread*) () at
> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el7_2.x86_64/jre/lib/amd64/server/libjvm.so

java thread waiting for a lock

> Thread 2 (Thread 0x2afd15230700 (LWP 32394)):
> #0  0x2afcb6b546d5 in pthread_cond_wait@@GLIBC_2.3.2 () at
> /lib64/libpthread.so.0
> #1  0x2afcb61af434 in osl_waitCondition(oslCondition, TimeValue
> const*) (Condition=0x2453770, pTimeout=0x0) at
> /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sal/osl/unx/conditn.cxx:228
> #2  0x2afce090f9c0 in osl::Condition::wait(TimeValue const*)
> (this=0x2453990, pTimeout=0x0) at
> /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/osl/conditn.hxx:84
> #3  0x2afce090ef82 in AffineBridge::outerDispatch(int)
> (this=0x2453910, loop=1) at
> /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/AffineBridge/AffineBridge.cxx:189
> #4  0x2afce090f1ec in AffineBridge::v_callInto_v(void
> (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) (this=0x2453910,
> pCallee=0x2afcb825bfc8 , pParam=0x2afd1522dd70)
> at 
> /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/AffineBridge/AffineBridge.cxx:270

affine bridge, that probably means JDBC, on Linux?

> #21 0x2afce03cbf09 in
> connectivity::hsqldb::ODriverDelegator::preCommit(com::sun::star::lang::EventObject
> const&) (this=0x244ebb0, aEvent=...)
> at 
> /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/connectivity/source/drivers/hsqldb/HDriver.cxx:655

ah, HSQLDB

i think you hit a deadlock inside HSQLDB:
https://bugs.documentfoundation.org/show_bug.cgi?id=96387

though we'd need the jstack output to be sure it's the same bug. (note:
jstack will even tell you which stack frames hold which locks...)

it's a pretty rare deadlock, i've hit it once and sberg too once AFAIK.


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


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

2016-03-31 Thread Juergen Funk
 sc/qa/unit/data/README.cellborders  |   93 
 sc/qa/unit/data/ods/test_borders_export.ods |binary
 sc/qa/unit/subsequent_export-test.cxx   |   90 +++
 sc/source/filter/excel/xestyle.cxx  |  107 
 sc/source/filter/oox/stylesbuffer.cxx   |6 +
 5 files changed, 250 insertions(+), 46 deletions(-)

New commits:
commit 51737960911d41593ffd9792a6a85aeaa86824fd
Author: Juergen Funk 
Date:   Wed Feb 24 13:13:23 2016 +0100

tdf#79787 Normal cell borders are showing dashed/dotted reopen in MSO

New Mapping from LO to MS, decription in
  sc/qa/unit/data/README.cellborders

Add a Unit-Test for testing the mapping

Change-Id: I5324bf85b6299dbc63ce3c8ef479f19b0b1b3f1f
Reviewed-on: https://gerrit.libreoffice.org/22665
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/sc/qa/unit/data/README.cellborders 
b/sc/qa/unit/data/README.cellborders
new file mode 100644
index 000..00db85a
--- /dev/null
+++ b/sc/qa/unit/data/README.cellborders
@@ -0,0 +1,93 @@
+
+Differences in borders between Excel and LibreOffice Calc.
+
+The sources for this Document is:
+ - sc/qa/unit/data/ods/test_borders_export.ods  (new Test-Document)
+ - sc/qa/unit/subsequent_export-test.cxx
(ScExportTest::testBordersExchangeXLSX)
+
+ - sc/source/filter/excel/xestyle.cxx   (void lclGetBorderLine)
+ - sc/source/filter/oox/stylesbuffer.cxx(Border::convertBorderLine)
+
+ Bug-Ticket: tdf#79787
+
+
+In LibreOffice the lines are defined by two information: the style and the 
width of the line. There are seven different line styles available. And the 
following line width can be selected: 0.05 pt, 0.25 pt, 0.50 pt, 0.75 pt, 1.0 
pt, 1.25 pt, 1.50 pt, … until 9pt.
+In Excel you can only define the style of the line. There are 13 different 
styles available. The width cannot be entered explicitly, instead you have 
different styles for a solid line with different width (s. Screenshots below).
+The question is now: how to map the borderlines of LibreOffice to Excel and 
vice versa.
+In the overview below you can see the mapping as it is and some suggestions 
how to improve it. As the borders are defined different, it will not be 
possible to define a 1:1 mapping."
+
+The current mapping is mainly defined of the width, but i think better is the 
line-style, i think user see that first
+
+Base for the evaluation is LibreOffice master (commit  
[bbfeab3b13b48c99cfa2f94c8c34bc3efef7faa9] ) and Excel 2013
+
+   EXCEL  ||   
  LIBREOFFICE
+Excel-Line Name  Value||   
 LO-Line  Name  Value
+  KeineEXC_LINE_NONE   0  ||   
   none   table::BorderLineStyle::NONE  32767 (-1)
+1  EXC_LINE_HAIR   7  ||   
1 table::BorderLineStyle::SOLID 0
+2  EXC_LINE_DOTTED 4  ||   
2 table::BorderLineStyle::DOTTED1
+3  EXC_LINE_THIN_DASHDOTDOT11 ||   
3 table::BorderLineStyle::DASHED2
+4  EXC_LINE_THIN_DASHDOT   9  ||   
4 table::BorderLineStyle::FINE_DASHED   14
+5  EXC_LINE_DASHED 3  ||   
5 table::BorderLineStyle::DASH_DOT  16
+6  EXC_LINE_THIN   1  ||   
6 table::BorderLineStyle::DASH_DOT_DOT  17
+7  EXC_LINE_MEDIUM_DASHDOTDOT  12 ||   
7 table::BorderLineStyle::DOUBLE_THIN   15
+8  EXC_LINE_MEDIUM_SLANT_DASHDOT   13 ||
+9  EXC_LINE_MEDIUM_DASHDOT 10 ||
+10 EXC_LINE_MEDIUM_DASHED  8  ||
+11 EXC_LINE_MEDIUM 2  ||
+12 EXC_LINE_THICK  5  ||
+13 EXC_LINE_DOUBLE 6  ||
+
+In the following cases a 1:1 mapping is not possible.
+
+Excel -> LibreOffice: Create in Excel and open it in LibreOffice. ||
LibreOffice -> Excel: Create Sheet in LibreOffice and save as XLSX.
+Create in|  In Excel save as XLSX, | In Excel save as ODS,||  
Created in |Load saved xlsx-file | Load saved xlsx-file
+Excel2013|   Load in LibreOffice   |  Load in LibreOffice 
||LibreOffice with |  in LibreOffice |  in Excel
+_

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

2016-03-31 Thread Jakub Trzebiatowski
 sw/inc/globals.hrc |3 +++
 sw/source/ui/app/app.src   |   10 ++
 sw/source/ui/misc/bookmark.cxx |8 
 3 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 8d123bf1491bcc7415f4dde3ddd397a11146bb38
Author: Jakub Trzebiatowski 
Date:   Sat Mar 26 12:54:18 2016 +0100

tdf#90855 add table header entries to resources

removed hardcoded table header entries

Change-Id: Ib0268421d1b0035e7764555054377d08ee47a29d
Reviewed-on: https://gerrit.libreoffice.org/23520
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index a907906..4471435 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -95,6 +95,9 @@
 
 // free
 
+#define STR_BOOKMARK_NAME   (RC_GLOBALS_BEGIN + 36)
+#define STR_BOOKMARK_TEXT   (RC_GLOBALS_BEGIN + 37)
+
 #define STR_LOAD_HTML_DOC   (RC_GLOBALS_BEGIN + 38)
 
 #define STR_JAVA_EDIT   (RC_GLOBALS_BEGIN + 39)
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 74c3ce1..4f16b1d 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -223,6 +223,16 @@ String STR_REMOVE_WARNING
 Text [ en-US ] = "The following characters are not valid and have been 
removed: ";
 };
 
+String STR_BOOKMARK_NAME
+{
+Text [ en-US ] = "Name";
+};
+
+String STR_BOOKMARK_TEXT
+{
+Text [ en-US ] = "Text";
+};
+
 String SW_STR_NONE
 {
 Text [ en-US ] = "[None]" ;
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index a65ddaf..ba9fc87 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -337,13 +337,13 @@ void SwInsertBookmarkDlg::dispose()
 BookmarkTable::BookmarkTable(SvSimpleTableContainer& rParent) :
 SvSimpleTable(rParent, 0)
 {
-static long nTabs[] = {3, 0, 30, 150};
+static long nTabs[] = {3, 0, 40, 150};
 
 SetTabs(nTabs, MAP_PIXEL);
 SetSelectionMode(MULTIPLE_SELECTION);
-InsertHeaderEntry("Page");
-InsertHeaderEntry("Name");
-InsertHeaderEntry("Text");
+InsertHeaderEntry(OUString(SW_RES(STR_PAGE)));
+InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_NAME)));
+InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_TEXT)));
 
 rParent.SetTable(this);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Jakub Trzebiatowski
 cui/source/dialogs/hlinettp.cxx  |   33 ---
 cui/source/inc/hlinettp.hxx  |2 -
 cui/uiconfig/ui/hyperlinkinternetpage.ui |   14 -
 3 files changed, 49 deletions(-)

New commits:
commit bb2fdee74fddd42914d0fa7d7b3820d0bd33237a
Author: Jakub Trzebiatowski 
Date:   Tue Mar 29 15:46:18 2016 +0200

tdf#98885 - hyperlink dialog - remove useless button

removed browse button and its code

Change-Id: I0b2a611760d346d5f0fff6d129676410aea30c41
Reviewed-on: https://gerrit.libreoffice.org/23599
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 700a58f..7c92332 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -45,19 +45,12 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( 
vcl::Window *pParent,
 get(m_pRbtLinktypFTP, "linktyp_ftp");
 get(m_pCbbTarget, "target");
 m_pCbbTarget->SetSmartProtocol(INetProtocol::Http);
-get(m_pBtBrowse, "browse");
-BitmapEx aBitmap = Image(CUI_RES (RID_SVXBMP_BROWSE)).GetBitmapEx();
-
aBitmap.Scale(GetDPIScaleFactor(),GetDPIScaleFactor(),BmpScaleFlag::BestQuality 
);
-m_pBtBrowse->SetModeImage(Image(aBitmap));
 get(m_pFtLogin, "login_label");
 get(m_pEdLogin, "login");
 get(m_pFtPassword, "password_label");
 get(m_pEdPassword, "password");
 get(m_pCbAnonymous, "anonymous");
 
-// Disable display of bitmap names.
-m_pBtBrowse->EnableTextDisplay (false);
-
 InitStdControls();
 
 m_pCbbTarget->Show();
@@ -68,7 +61,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window 
*pParent,
 
 // set defaults
 m_pRbtLinktypInternet->Check ();
-m_pBtBrowse->Enable();
 
 
 // set handlers
@@ -76,7 +68,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window 
*pParent,
 m_pRbtLinktypInternet->SetClickHdl( aLink );
 m_pRbtLinktypFTP->SetClickHdl ( aLink );
 m_pCbAnonymous->SetClickHdl   ( LINK ( this, SvxHyperlinkInternetTp, 
ClickAnonymousHdl_Impl ) );
-m_pBtBrowse->SetClickHdl  ( LINK ( this, SvxHyperlinkInternetTp, 
ClickBrowseHdl_Impl ) );
 m_pEdLogin->SetModifyHdl  ( LINK ( this, SvxHyperlinkInternetTp, 
ModifiedLoginHdl_Impl ) );
 m_pCbbTarget->SetLoseFocusHdl ( LINK ( this, SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl ) );
 m_pCbbTarget->SetModifyHdl( LINK ( this, SvxHyperlinkInternetTp, 
ModifiedTargetHdl_Impl ) );
@@ -93,7 +84,6 @@ void SvxHyperlinkInternetTp::dispose()
 m_pRbtLinktypInternet.clear();
 m_pRbtLinktypFTP.clear();
 m_pCbbTarget.clear();
-m_pBtBrowse.clear();
 m_pFtLogin.clear();
 m_pEdLogin.clear();
 m_pFtPassword.clear();
@@ -386,29 +376,6 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl, Control&,
 RefreshMarkWindow();
 }
 
-/*
-|*
-|* Click on imagebutton : Browse
-|*
-|/
-
-IMPL_LINK_NOARG_TYPED(SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, Button*, 
void)
-{
-
-// Open URL if available
-
-SfxStringItem aName( SID_FILE_NAME, OUString("http://";) );
-SfxStringItem aRefererItem( SID_REFERER, OUString("private:user") );
-SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, true );
-SfxBoolItem aSilent( SID_SILENT, true );
-SfxBoolItem aReadOnly( SID_DOC_READONLY, true );
-
-SfxBoolItem aBrowse( SID_BROWSE, true );
-
-const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, 
&aRefererItem, &aBrowse, nullptr };
-static_cast(mpDialog.get())->GetBindings()->Execute( 
SID_OPENDOC, ppItems, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
-}
-
 void SvxHyperlinkInternetTp::RefreshMarkWindow()
 {
 if ( m_pRbtLinktypInternet->IsChecked() && IsMarkWndVisible() )
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index f70b8f7..05e2467 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -35,7 +35,6 @@ private:
 VclPtrm_pRbtLinktypInternet;
 VclPtr m_pRbtLinktypFTP;
 VclPtr  m_pCbbTarget;
-VclPtr  m_pBtBrowse;
 VclPtr   m_pFtLogin;
 VclPtrm_pEdLogin;
 VclPtr   m_pFtPassword;
@@ -49,7 +48,6 @@ private:
 
 DECL_LINK_TYPED( Click_SmartProtocol_Impl  , Button*, void ); ///< 
Radiobutton clicked: Type HTTP or FTP
 DECL_LINK_TYPED( ClickAnonymousHdl_Impl, Button*, void ); ///< 
Checkbox : Anonymous User
-DECL_LINK_TYPED( ClickBrowseHdl_Impl   , Button*, void ); ///< Button 
: Browse
 DECL_LINK_TYPED( ModifiedLoginHdl_Impl , Edit&,   void ); ///< 
Contents of editfield "Login" modified
 DECL_LINK_TYPED( LostFocusTargetHdl_Impl,Control&, void ); ///< 
Combobox "Target" lost its focus
 DECL_LINK_TYPED( 

switching to XFastParser

2016-03-31 Thread Noel Grandin

Hi

[Including the original off-list discussion below for context for anyone who 
cares]

So I took a look a Daniel Sikeler's branch at
   https://cgit.freedesktop.org/libreoffice/core/log/?h=feature/fastparser
and it looks like he did a pretty thorough job of converting everything to 
XFastParser.

What was the reason this did not get merged?

Would it suffice to simply pull the commits out of this tree one-by-one, dust them off, pretty them up, verify them 
through 'make check' and push them to master?


Regards, Noel


On 2016/02/29 12:36 PM, Michael Meeks wrote:

Hi Noel,

This belongs CC'd to the dev. list; please do fwd it there to contine
the discussion =)

On Sun, 2016-02-28 at 09:05 +0200, Noel Grandin wrote:

When you guys did the SAX parsing improvements (XFastParser2), why did
we maintain the UNO API?


Is there an XFastParser2 API ?


Why not use libxml/expat directly ?


The libxml2 API (the faster parser) is horrendous - the XFastParser API
is at least a tokenized API - which is essentially what we want the code
to consume; ultimately we want to patch libxml2 some more as well to
improve load performance - removing some of the more stupid pieces;
quite possibly we also want to implement an even faster compressed XML
parsing scheme I have up my sleeve behind that API.

We did short-circuit UNO for the tokenization piece - which saved a
huge chunk of time, and profiled it rather intensively. Last I looked, I
saw no significant performance cost from the UNO interface.

Finally - the libxml2 and expat APIs are (like most SAX APIs)
synchronous, and same-thread; a big part of our load-time speed win
comes from doing the XML parse + tokenize in another thread, and
emitting the events in the main thread [ cf. slide decks at several
LibreOffice conferences on the topic ].

ie. nothing to 'fix' there =)


I'm assuming there is something I'm missing?


Depends what you're trying to achieve =) if you want to improve
performance and cleanliness -by-far- the most useful thing remaining to
be done there is to switch the ODF filters in xmloff/ to use the
FastParser API - currently they do tokenization themselves in a horribly
inefficient way; and of course they don't take advantage of the threaded
parsing etc.

There was a Munich student (Daniel Sikeler) working on that -
unfortunately with very little time for mentoring; so it may be a
challenge to try to rescue that work. xmloff/ is quite big - and built
on outside in the main components too. So - almost certainly by far the
best way here is an incremental one.

We need to write a good, clean XFastParser <-> XParser mapping, prolly
that will require some love in sax/ some of the semantics don't map
entirely perfectly in corner cases. I believe Daniel's branch is
feature/fastparser - and you could rescue just this mapper from there I
think.

That would then allow the threaded processing & tokenization (we would
need to de-tokenize again to the XParser interface but I think we would
still get some nice wins ;-). When that works nicely - we need to
connect the xmloff/ tokenization code to the XFastParser tokenized
results to avoid doing all of that twice, and slowly and carefully push
the interface change across the code to kill the XParser variant.

At least - that would be my suggestion of something worthwhile & juicy
to dig teeth into =) it is

ATB,

Michael.


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


Re: master build fails

2016-03-31 Thread Jean-Baptiste Faure
Le 31/03/2016 13:45, Stephan Bergmann a écrit :
> On 03/31/2016 12:47 PM, Jean-Baptiste Faure wrote:
>>> [build CXX] avmedia/source/vlc/vlcmanager.cxx
>>> [...]/master/avmedia/source/vlc/vlcmanager.cxx: In constructor
>>> ‘avmedia::vlc::Manager::Manager(const
>>> com::sun::star::uno::Reference&)’:
>>>
>>> [...]/master/avmedia/source/vlc/vlcmanager.cxx:52:64: error: no
>>> matching function for call to
>>> ‘avmedia::vlc::wrapper::Instance::Instance(long unsigned int)’
>>>   mInstance.reset(new Instance( SAL_N_ELEMENTS(VLC_ARGS) ),
>>> VLC_ARGS ));
>>>  ^
> 
> got fixed with
> 
> "Spurious closing parenthesis"

Thank you very much.

Best regards.
JBF

-- 
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.
Disclaimer: my Internet Provider being located in France, each of our
exchanges over Internet will be scanned by French spying services.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: loolwsd/Auth.cpp

2016-03-31 Thread Pranav Kant
 loolwsd/Auth.cpp |   96 ---
 1 file changed, 64 insertions(+), 32 deletions(-)

New commits:
commit 26dd4e0b4bde61ea486dd271dbf44c04512919eb
Author: Pranav Kant 
Date:   Thu Mar 31 13:10:22 2016 +0530

loolwsd: Verify JWT token's expiry time

Change-Id: I6e6913e7918ac4c36ab98457054e5660cce3a854

diff --git a/loolwsd/Auth.cpp b/loolwsd/Auth.cpp
index 5d079d4..71f2d2b 100644
--- a/loolwsd/Auth.cpp
+++ b/loolwsd/Auth.cpp
@@ -14,8 +14,11 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -26,9 +29,12 @@
 #include "Auth.hpp"
 #include "Util.hpp"
 
+using Poco::Base64Decoder;
+using Poco::Base64Encoder;
+using Poco::OutputLineEndingConverter;
 
 //
-// OAuth Impl
+// JWTAuth Impl
 //
 const std::string JWTAuth::getAccessToken()
 {
@@ -61,8 +67,8 @@ const std::string JWTAuth::getAccessToken()
 // The signature generated contains CRLF line endings.
 // Use a line ending converter to remove these CRLF
 std::ostringstream ostr;
-Poco::OutputLineEndingConverter lineEndingConv(ostr, "");
-Poco::Base64Encoder encoder(lineEndingConv);
+OutputLineEndingConverter lineEndingConv(ostr, "");
+Base64Encoder encoder(lineEndingConv);
 encoder << std::string(digest.begin(), digest.end());
 encoder.close();
 std::string encodedSig = ostr.str();
@@ -87,34 +93,60 @@ bool JWTAuth::verify(const std::string& accessToken)
 {
 Poco::StringTokenizer tokens(accessToken, ".", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
 
-std::string encodedBody = tokens[0] + "." + tokens[1];
-_digestEngine.update(encodedBody.c_str(), 
static_cast(encodedBody.length()));
-Poco::Crypto::DigestEngine::Digest digest = _digestEngine.signature();
-
-std::ostringstream ostr;
-Poco::OutputLineEndingConverter lineEndingConv(ostr, "");
-Poco::Base64Encoder encoder(lineEndingConv);
-
-encoder << std::string(digest.begin(), digest.end());
-encoder.close();
-std::string encodedSig = ostr.str();
-
-// trim '=' from end of encoded signature.
-encodedSig.erase(std::find_if(encodedSig.rbegin(), encodedSig.rend(),
-  [](char& ch)->bool { return ch != '='; 
}).base(), encodedSig.end());
-
-// Make the encoded sig URL and filename safe
-std::replace(encodedSig.begin(), encodedSig.end(), '+', '-');
-std::replace(encodedSig.begin(), encodedSig.end(), '/', '_');
-
-if (encodedSig != tokens[2])
+try
+{
+std::string encodedBody = tokens[0] + "." + tokens[1];
+_digestEngine.update(encodedBody.c_str(), 
static_cast(encodedBody.length()));
+Poco::Crypto::DigestEngine::Digest digest = _digestEngine.signature();
+
+std::ostringstream ostr;
+OutputLineEndingConverter lineEndingConv(ostr, "");
+Base64Encoder encoder(lineEndingConv);
+
+encoder << std::string(digest.begin(), digest.end());
+encoder.close();
+std::string encodedSig = ostr.str();
+
+// trim '=' from end of encoded signature.
+encodedSig.erase(std::find_if(encodedSig.rbegin(), encodedSig.rend(),
+  [](char& ch)->bool { return ch != '='; 
}).base(), encodedSig.end());
+
+// Make the encoded sig URL and filename safe
+std::replace(encodedSig.begin(), encodedSig.end(), '+', '-');
+std::replace(encodedSig.begin(), encodedSig.end(), '/', '_');
+
+if (encodedSig != tokens[2])
+{
+Log::info("JWTAuth: verification failed; Expected: " + encodedSig 
+ ", Received: " + tokens[2]);
+return false;
+}
+
+std::istringstream istr(tokens[1]);
+std::string decodedPayload;
+Base64Decoder decoder(istr);
+decoder >> decodedPayload;
+
+Log::info("JWTAuth:verify: decoded payload: " + decodedPayload);
+
+// Verify if the token is not already expired
+Poco::JSON::Parser parser;
+Poco::Dynamic::Var result = parser.parse(decodedPayload);
+Poco::JSON::Object::Ptr object = 
result.extract();
+std::time_t decodedExptime = object->get("exp").convert();
+
+std::time_t curtime = Poco::Timestamp().epochTime();
+if (curtime > decodedExptime)
+{
+Log::info("JWTAuth:verify: JWT expired; curtime:" + 
std::to_string(curtime) + ", exp:" + std::to_string(decodedExptime));
+return false;
+}
+}
+catch(Poco::Exception& exc)
 {
-Log::info("JWTAuth::Token verification failed; Expected: " + 
encodedSig + ", Received: " + tokens[2]);
+Log::warn("JWTAuth:verify: Exception: " + exc.displayText());
 return false;
 }
 
-// TODO: Check for expiry etc.
-
 return true;
 }
 
@@ -125,8 +157,8 @@ const std::string JWTAuth::createHeader()
 
 Log::info("JWT Header: " + h

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

2016-03-31 Thread Noel Grandin
 sw/source/core/inc/swfont.hxx |4 ++--
 sw/source/core/txtnode/swfont.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c8fd5210b638fca6b20f4884f00f314eeca67b56
Author: Noel Grandin 
Date:   Thu Mar 31 13:45:16 2016 +0200

fix MSVC build

after commit 41bdaa37cc62f656cc164992c4c7d39bec7e57e2
"tdf#84938 convert SW_* script constants to scoped enum"

o3tl::enumarray and MSVC does not like classes with private constructors

Change-Id: Id954ecb6100b0a51c25b4405e322d20c37e09fea

diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 8070d1e..c684a96 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -57,8 +57,6 @@ class SwSubFont : public SvxFont
 sal_uInt16  m_nOrgAscent; // ascent including escapement/proportion
 sal_uInt16  m_nProportionalWidth; // proportional width
 bool m_bSmallCapsPercentage66;
-inline SwSubFont() : m_aSize(0,0)
-{ m_pMagic = nullptr; m_nFontIndex = m_nOrgHeight = m_nOrgAscent = 0; 
m_nProportionalWidth =100; m_bSmallCapsPercentage66 = false; }
 
 sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const;
 sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight,
@@ -115,6 +113,8 @@ class SwSubFont : public SvxFont
 inline void SetPropWidth( const sal_uInt16 nNew )
 { m_pMagic = nullptr; m_nProportionalWidth = nNew; }
 public:
+inline SwSubFont() : m_aSize(0,0)
+{ m_pMagic = nullptr; m_nFontIndex = m_nOrgHeight = m_nOrgAscent = 0; 
m_nProportionalWidth =100; m_bSmallCapsPercentage66 = false; }
 sal_uInt16 GetPropWidth() const { return m_nProportionalWidth; }
 };
 
diff --git a/sw/source/core/txtnode/swfont.cxx 
b/sw/source/core/txtnode/swfont.cxx
index b92dccc..7d72689 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -739,7 +739,7 @@ SwFont::SwFont( const SwFont &rFont )
 
 SwFont::SwFont( const SwAttrSet* pAttrSet,
 const IDocumentSettingAccess* pIDocumentSettingAccess )
-: m_aSub { SwSubFont(), SwSubFont(), SwSubFont() }
+: m_aSub()
 {
 m_nActual = SwFontScript::Latin;
 m_nToxCount = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win

2016-03-31 Thread Marco Cecchetti
 vcl/win/source/gdi/salgdi3.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 4ab36bbd1816d6f297892a638e6826f28ca87150
Author: Marco Cecchetti 
Date:   Wed Mar 30 19:41:57 2016 +0200

tdf#98812: follow-up

pFont->mpFontInstance can be NULL.

Reviewed-on: https://gerrit.libreoffice.org/23654
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 9fa87bb1a42c45446f78b4d8c8096d7ce90a8022)
Signed-off-by: Michael Stahl 

Change-Id: I934703bc40621dc412e444cc9a370c7031cbbb86

diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index b1f865d..964f25f 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1548,7 +1548,12 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* 
pFont, int nFallbackLevel
 {
 
GetWinFontEntry(nFallbackLevel)->m_pFontCache->Release(GetWinFontEntry(nFallbackLevel));
 }
-pFont->mpFontEntry->m_pFontCache->Acquire(pFont->mpFontEntry);
+// WinSalGraphics::GetEmbedFontData does not set mpFontInstance/mpFontEntry
+// since it is interested in font file data only.
+if (pFont->mpFontEntry)
+{
+pFont->mpFontEntry->m_pFontCache->Acquire(pFont->mpFontEntry);
+}
 mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast( 
pFont->mpFontEntry );
 mpWinFontData[ nFallbackLevel ] = static_cast( 
pFont->mpFontData );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: master build fails

2016-03-31 Thread Stephan Bergmann

On 03/31/2016 12:47 PM, Jean-Baptiste Faure wrote:

[build CXX] avmedia/source/vlc/vlcmanager.cxx
[...]/master/avmedia/source/vlc/vlcmanager.cxx: In constructor 
‘avmedia::vlc::Manager::Manager(const 
com::sun::star::uno::Reference&)’:
[...]/master/avmedia/source/vlc/vlcmanager.cxx:52:64: error: no matching 
function for call to ‘avmedia::vlc::wrapper::Instance::Instance(long unsigned 
int)’
  mInstance.reset(new Instance( SAL_N_ELEMENTS(VLC_ARGS) ), VLC_ARGS ));
 ^


got fixed with 
 
"Spurious closing parenthesis"

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


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

2016-03-31 Thread Marco Cecchetti
 vcl/win/gdi/salfont.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 9fa87bb1a42c45446f78b4d8c8096d7ce90a8022
Author: Marco Cecchetti 
Date:   Wed Mar 30 19:41:57 2016 +0200

tdf#98812: follow-up

pFont->mpFontInstance can be NULL.

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

diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 48a3c92..6819d21 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1458,7 +1458,12 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* 
pFont, int nFallbackLevel
 {
 
GetWinFontEntry(nFallbackLevel)->mpFontCache->Release(GetWinFontEntry(nFallbackLevel));
 }
-pFont->mpFontInstance->mpFontCache->Acquire(pFont->mpFontInstance);
+// WinSalGraphics::GetEmbedFontData does not set mpFontInstance
+// since it is interested in font file data only.
+if (pFont->mpFontInstance)
+{
+pFont->mpFontInstance->mpFontCache->Acquire(pFont->mpFontInstance);
+}
 mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast( 
pFont->mpFontInstance );
 mpWinFontData[ nFallbackLevel ] = static_cast( 
pFont->mpFontData );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Noel Grandin
 sw/inc/swabstdlg.hxx  |3 
 sw/inc/swmodule.hxx   |   13 -
 sw/source/core/access/accmap.cxx  |   23 --
 sw/source/core/access/accpara.cxx |2 
 sw/source/core/crsr/callnk.cxx|2 
 sw/source/core/doc/DocumentDeviceManager.cxx  |2 
 sw/source/core/doc/DocumentSettingManager.cxx |4 
 sw/source/core/doc/lineinfo.cxx   |4 
 sw/source/core/doc/notxtfrm.cxx   |2 
 sw/source/core/docnode/node2lay.cxx   |2 
 sw/source/core/fields/reffld.cxx  |6 
 sw/source/core/frmedt/fews.cxx|   22 -
 sw/source/core/frmedt/tblsel.cxx  |4 
 sw/source/core/inc/SwXMLTextBlocks.hxx|2 
 sw/source/core/inc/ascharanchoredobjectposition.hxx   |   49 ++--
 sw/source/core/inc/frame.hxx  |  108 
+
 sw/source/core/inc/frmtool.hxx|4 
 sw/source/core/inc/ftnboss.hxx|   13 -
 sw/source/core/inc/hffrm.hxx  |6 
 sw/source/core/inc/layfrm.hxx |4 
 sw/source/core/inc/rootfrm.hxx|   26 +-
 sw/source/core/inc/sectfrm.hxx|9 
 sw/source/core/inc/swblocks.hxx   |   16 -
 sw/source/core/layout/atrfrm.cxx  |8 
 sw/source/core/layout/calcmove.cxx|6 
 sw/source/core/layout/colfrm.cxx  |2 
 sw/source/core/layout/dbg_lay.cxx |   10 
 sw/source/core/layout/dumpfilter.cxx  |2 
 sw/source/core/layout/flowfrm.cxx |2 
 sw/source/core/layout/fly.cxx |4 
 sw/source/core/layout/flylay.cxx  |   15 -
 sw/source/core/layout/frmtool.cxx |   28 +-
 sw/source/core/layout/ftnfrm.cxx  |   30 +-
 sw/source/core/layout/hffrm.cxx   |2 
 sw/source/core/layout/layouter.cxx|2 
 sw/source/core/layout/newfrm.cxx  |2 
 sw/source/core/layout/pagechg.cxx |   11 
 sw/source/core/layout/pagedesc.cxx|4 
 sw/source/core/layout/paintfrm.cxx|2 
 sw/source/core/layout/sectfrm.cxx |   18 -
 sw/source/core/layout/tabfrm.cxx  |8 
 sw/source/core/layout/trvlfrm.cxx |9 
 sw/source/core/layout/wsfrm.cxx   |  114 
+-
 sw/source/core/objectpositioning/anchoredobjectposition.cxx   |4 
 sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx |   20 -
 sw/source/core/swg/SwXMLTextBlocks.cxx|4 
 sw/source/core/swg/swblocks.cxx   |   23 +-
 sw/source/core/text/EnhancedPDFExportHelper.cxx   |   24 +-
 sw/source/core/text/itrform2.cxx  |   22 -
 sw/source/core/text/porfly.cxx|   12 -
 sw/source/core/text/porfly.hxx|6 
 sw/source/core/text/porrst.cxx|4 
 sw/source/core/text/txtfly.cxx|2 
 sw/source/core/text/txtfrm.cxx|2 
 sw/source/core/text/txtftn.cxx|2 
 sw/source/core/text/xmldump.cxx   |   34 +-
 sw/source/core/view/viewsh.cxx|   24 +-
 sw/source/ui/chrdlg/chardlg.cxx   |8 
 sw/source/ui/dialog/swdlgfact.cxx |2 
 sw/source/ui/dialog/swdlgfact.hxx |2 
 sw/source/ui/envelp/envfmt.cxx|2 
 sw/source/uibase/app/appopt.cxx   |2 
 sw/source/uibase/app/swmodul1.cxx |8 
 sw/source/uibase/docvw/PostItMgr.cxx  |2 
 sw/source/uibase/inc/chrdlg.hxx   |   12 -
 sw/source/uibase/inc/chrdlgmodes.hxx  |7

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

2016-03-31 Thread Stephan Bergmann
 sal/osl/w32/signal.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8d463bbf6ac7f76054924c1f35a71ffa4bdd4c96
Author: Stephan Bergmann 
Date:   Thu Mar 31 13:21:32 2016 +0200

...one more detail to get things fixed

Change-Id: If5d3cb2242e08e559380a4e2c86c96dc6cdc0c71

diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index d4a7967..cb4c668 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -172,6 +172,8 @@ void win_seh_translator( unsigned nSEHCode, 
_EXCEPTION_POINTERS* /* pExcPtrs */)
 throw std::runtime_error( pSEHName);
 }
 
+}
+
 void onErrorReportingChanged(bool bEnable)
 {
 #if defined _MSC_VER
@@ -183,6 +185,4 @@ void onErrorReportingChanged(bool bEnable)
 #endif
 }
 
-}
-
 /* 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: accessibility/inc basctl/inc chart2/inc chart2/source cppcanvas/inc cui/inc dbaccess/inc desktop/inc editeng/inc framework/inc include/vcl reportdesign/inc sc/inc sc/so

2016-03-31 Thread Jochen Nitschke
 accessibility/inc/pch/precompiled_acc.hxx   |1 
 basctl/inc/pch/precompiled_basctl.hxx   |1 
 chart2/inc/pch/precompiled_chartcontroller.hxx  |1 
 chart2/source/view/inc/GL3DBarChart.hxx |1 
 cppcanvas/inc/pch/precompiled_cppcanvas.hxx |1 
 cui/inc/pch/precompiled_cui.hxx |1 
 dbaccess/inc/pch/precompiled_dbmm.hxx   |1 
 desktop/inc/pch/precompiled_sofficeapp.hxx  |1 
 editeng/inc/pch/precompiled_editeng.hxx |1 
 framework/inc/pch/precompiled_fwe.hxx   |1 
 framework/inc/pch/precompiled_fwl.hxx   |1 
 include/vcl/impdel.hxx  |   81 
 include/vcl/menu.hxx|1 
 include/vcl/vclevent.hxx|1 
 reportdesign/inc/pch/precompiled_rpt.hxx|1 
 reportdesign/inc/pch/precompiled_rptui.hxx  |1 
 sc/inc/pch/precompiled_sc.hxx   |1 
 sc/source/core/inc/addinlis.hxx |1 
 sd/inc/pch/precompiled_sdui.hxx |1 
 slideshow/inc/pch/precompiled_slideshow.hxx |1 
 svtools/inc/pch/precompiled_svt.hxx |1 
 svx/inc/pch/precompiled_svxcore.hxx |1 
 sw/inc/pch/precompiled_msword.hxx   |1 
 sw/inc/pch/precompiled_swui.hxx |1 
 sw/inc/pch/precompiled_vbaswobj.hxx |1 
 vbahelper/inc/pch/precompiled_msforms.hxx   |1 
 vcl/inc/impdel.hxx  |   81 
 vcl/inc/salframe.hxx|1 
 vcl/inc/window.h|1 
 xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx |1 
 30 files changed, 86 insertions(+), 104 deletions(-)

New commits:
commit ef9757605619c6bcbdde61c93c834a0467453d67
Author: Jochen Nitschke 
Date:   Wed Mar 30 22:29:16 2016 +0200

tdf#97525 vcl: make DeletionListener internal

move include/vcl/impdel.hxx to vcl/inc/
include impdel.hxx in salframe.hxx
remove vcl/impdel.hxx includes in pch
add missing  includes

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

diff --git a/accessibility/inc/pch/precompiled_acc.hxx 
b/accessibility/inc/pch/precompiled_acc.hxx
index ab8663a..32ef6ba 100644
--- a/accessibility/inc/pch/precompiled_acc.hxx
+++ b/accessibility/inc/pch/precompiled_acc.hxx
@@ -126,7 +126,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/basctl/inc/pch/precompiled_basctl.hxx 
b/basctl/inc/pch/precompiled_basctl.hxx
index 184274a..cdc9245 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -141,7 +141,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx 
b/chart2/inc/pch/precompiled_chartcontroller.hxx
index 360fa32..7aa7fdd 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -130,7 +130,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx 
b/chart2/source/view/inc/GL3DBarChart.hxx
index 6cf7ee3..e7ae9ac 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -12,6 +12,7 @@
 
 #include 
 
+#include 
 #include 
 #include "VDataSeries.hxx"
 
diff --git a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx 
b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
index 41fcc7b..fa5fc4a 100644
--- a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
+++ b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
@@ -104,7 +104,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index f1a218e..81841ce 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -139,7 +139,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/dbaccess/inc/pch/precompiled_dbmm.hxx 
b/dbaccess/inc/pch/precompiled_dbmm.hxx
index ee91956..4601561 100644
--- a/dbaccess/inc/pch/precompiled_dbmm.hxx
+++ b/dbaccess/inc/pch/precompiled_dbmm.hxx
@@ -107,7 +107,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx 
b/desktop/inc/pch/precompiled_sofficeapp.hxx
index a1cce46..5fdb0c3 100644
--- a/desktop/inc/pch/precompiled_sofficeapp.hxx
+++ b/desktop/inc/pch/precompiled_sofficeapp.hxx
@@ -129,7 +129,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/editeng/inc/pch/precompiled_editeng.hxx 
b/editeng/inc/pch/precompiled_editeng.hxx
index ee69b6b..bd2786b 100644
--- a/editeng/inc/pch/precompiled

[Libreoffice-commits] core.git: avmedia/source basctl/source cui/source include/sfx2 sc/source sd/qa sd/source sfx2/source starmath/source svx/source sw/source

2016-03-31 Thread Michael Stahl
 avmedia/source/framework/mediaplayer.cxx|3 
 basctl/source/basicide/basicbox.cxx |6 -
 basctl/source/basicide/bastype2.cxx |6 -
 basctl/source/basicide/bastypes.cxx |4 -
 basctl/source/basicide/macrodlg.cxx |   12 +--
 basctl/source/basicide/moduldl2.cxx |   12 +--
 basctl/source/basicide/moduldlg.cxx |   32 
 cui/source/dialogs/cuihyperdlg.cxx  |4 -
 cui/source/dialogs/hldocntp.cxx |   13 +--
 cui/source/options/treeopt.cxx  |   16 ++--
 include/sfx2/dispatch.hxx   |8 +-
 sc/source/core/data/global.cxx  |   11 +-
 sc/source/ui/app/inputwin.cxx   |4 -
 sc/source/ui/condformat/condformatdlgentry.cxx  |7 -
 sc/source/ui/dbgui/PivotLayoutDialog.cxx|3 
 sc/source/ui/dbgui/consdlg.cxx  |4 -
 sc/source/ui/dbgui/filtdlg.cxx  |4 -
 sc/source/ui/dbgui/sfiltdlg.cxx |6 -
 sc/source/ui/dialogs/searchresults.cxx  |4 -
 sc/source/ui/docshell/docsh4.cxx|5 -
 sc/source/ui/formdlg/formula.cxx|4 -
 sc/source/ui/miscdlgs/solvrdlg.cxx  |4 -
 sc/source/ui/miscdlgs/tabopdlg.cxx  |4 -
 sc/source/ui/navipi/navipi.cxx  |   20 ++---
 sc/source/ui/navipi/scenwnd.cxx |3 
 sc/source/ui/pagedlg/areasdlg.cxx   |6 -
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx |   17 ++--
 sc/source/ui/sidebar/CellBorderStyleControl.cxx |   21 +++--
 sc/source/ui/sidebar/CellLineStyleControl.cxx   |3 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx  |6 +
 sc/source/ui/view/gridwin.cxx   |   15 ++--
 sc/source/ui/view/tabcont.cxx   |4 -
 sc/source/ui/view/tabvwsh5.cxx  |4 -
 sc/source/ui/view/tabvwsh9.cxx  |4 -
 sc/source/ui/view/tabvwshe.cxx  |8 +-
 sc/source/ui/view/viewfun2.cxx  |4 -
 sc/source/ui/view/viewfun4.cxx  |9 +-
 sc/source/ui/view/viewfun5.cxx  |4 -
 sc/source/ui/view/viewfun6.cxx  |4 -
 sc/source/ui/view/viewutil.cxx  |3 
 sd/qa/unit/tiledrendering/tiledrendering.cxx|6 +
 sd/source/ui/annotations/annotationmanager.cxx  |9 +-
 sd/source/ui/app/sdmod1.cxx |5 -
 sd/source/ui/app/tmplctrl.cxx   |3 
 sd/source/ui/dlg/NavigatorChildWindow.cxx   |5 -
 sd/source/ui/dlg/animobjs.cxx   |   13 +--
 sd/source/ui/dlg/navigatr.cxx   |9 +-
 sd/source/ui/docshell/docshell.cxx  |7 +
 sd/source/ui/func/fudraw.cxx|7 +
 sd/source/ui/func/fuoltext.cxx  |   10 +-
 sd/source/ui/func/fupoor.cxx|   10 +-
 sd/source/ui/func/fusel.cxx |   59 
 sd/source/ui/func/futext.cxx|   10 +-
 sd/source/ui/slideshow/slideshowimpl.cxx|   10 +-
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx  |6 +
 sd/source/ui/table/TableDesignPane.cxx  |3 
 sd/source/ui/unoidl/SdUnoDrawView.cxx   |6 +
 sd/source/ui/view/Outliner.cxx  |5 -
 sd/source/ui/view/drviews1.cxx  |4 -
 sd/source/ui/view/drviews2.cxx  |   20 ++---
 sd/source/ui/view/drviews5.cxx  |8 +-
 sd/source/ui/view/drviews9.cxx  |4 -
 sd/source/ui/view/drviewsa.cxx  |4 -
 sd/source/ui/view/drviewsb.cxx  |4 -
 sd/source/ui/view/drviewsd.cxx  |4 -
 sd/source/ui/view/drviewse.cxx  |4 -
 sd/source/ui/view/drviewsi.cxx  |4 -
 sd/source/ui/view/presvish.cxx  |3 
 sd/source/ui/view/viewshel.cxx  |5 -
 sfx2/source/appl/appdde.cxx |5 -
 sfx2/source/appl/appopen.cxx|   10 +-
 sfx2/source/appl/appserv.cxx|8 +-
 sfx2/source/control/dispatch.cxx|   25 ++
 sfx2/source/dialog/basedlgs.cxx |8 +-
 sfx2/source/dialog/dockwin.cxx  

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

2016-03-31 Thread Stephan Bergmann
 sal/inc/internal/signalshared.hxx |5 +
 sal/osl/all/signalshared.cxx  |   12 +---
 sal/osl/unx/signal.cxx|2 ++
 sal/osl/w32/signal.cxx|2 --
 4 files changed, 4 insertions(+), 17 deletions(-)

New commits:
commit 7a2d55a1943e51895d808e87f1766b44761a495a
Author: Stephan Bergmann 
Date:   Thu Mar 31 13:09:10 2016 +0200

Fix Windows part of 97858ca008fd8cf405e52795c8db415ef6c5afb3

"tdf#93548 Refactor sal signal to reduce code duplication"

Change-Id: Ib0a872fb6023b6989c7931f4d57d911ddf76936f

diff --git a/sal/inc/internal/signalshared.hxx 
b/sal/inc/internal/signalshared.hxx
index 07f9976..3eaa32c 100644
--- a/sal/inc/internal/signalshared.hxx
+++ b/sal/inc/internal/signalshared.hxx
@@ -30,18 +30,15 @@ struct oslSignalHandlerImpl
 oslSignalHandlerImpl*   pNext;
 };
 
-typedef void (*ErrorReportingChangedHandler)(bool);
-
 extern bool bErrorReportingEnabled;
 extern bool bInitSignal;
 
-void setErrorReportingChangedHandler(ErrorReportingChangedHandler handler);
-
 oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
 
 // platform-specific functions that need to be implemented
 bool onInitSignal();
 bool onDeInitSignal();
+void onErrorReportingChanged(bool enabled);
 
 #endif
 
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx
index fcafacd..f444f37 100644
--- a/sal/osl/all/signalshared.cxx
+++ b/sal/osl/all/signalshared.cxx
@@ -31,8 +31,6 @@ namespace
 oslSignalHandlerImpl* SignalList;
 oslMutex SignalListMutex;
 
-ErrorReportingChangedHandler errorReportingChangedHandler;
-
 bool initSignal()
 {
 SignalListMutex = osl_createMutex();
@@ -51,11 +49,6 @@ bool deInitSignal()
 
 }
 
-void setErrorReportingChangedHandler(ErrorReportingChangedHandler handler)
-{
-errorReportingChangedHandler = handler;
-}
-
 oslSignalAction callSignalHandler(oslSignalInfo* pInfo)
 {
 oslSignalHandlerImpl* pHandler = SignalList;
@@ -167,10 +160,7 @@ sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
 {
 bool bOld = bErrorReportingEnabled;
 bErrorReportingEnabled = bEnable;
-
-if (errorReportingChangedHandler)
-errorReportingChangedHandler(bEnable);
-
+onErrorReportingChanged(bEnable);
 return bOld;
 }
 
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 7f86456..73bb19d 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -281,6 +281,8 @@ bool onDeInitSignal()
 return false;
 }
 
+void onErrorReportingChanged(SAL_UNUSED_PARAMETER bool) {}
+
 namespace
 {
 void printStack(int sig)
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 3c7c47b..d4a7967 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -42,8 +42,6 @@
 namespace
 {
 long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP);
-
-void onErrorReportingChanged(bool bEnable);
 }
 
 bool onInitSignal()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Stephan Bergmann
 avmedia/source/vlc/vlcmanager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9329618eeec0aaa07b09197bec5e5bf266558d0f
Author: Stephan Bergmann 
Date:   Thu Mar 31 12:59:05 2016 +0200

Spurious closing parenthesis

Change-Id: I0b723b758a4728816587a26d9b9b28cdc06f5dd1

diff --git a/avmedia/source/vlc/vlcmanager.cxx 
b/avmedia/source/vlc/vlcmanager.cxx
index cc9bc84..06ad14d 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -49,7 +49,7 @@ Manager::Manager( const uno::Reference< 
lang::XMultiServiceFactory >& rxMgr )
 m_is_vlc_found = success;
 if (m_is_vlc_found)
 {
-mInstance.reset(new Instance( SAL_N_ELEMENTS(VLC_ARGS) ), VLC_ARGS ));
+mInstance.reset(new Instance( SAL_N_ELEMENTS(VLC_ARGS), VLC_ARGS ));
 //Check VLC version
 std::vector verComponents;
 const std::string str(Common::Version());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Akshay Deep
 sd/uiconfig/simpress/ui/presentationdialog.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 94418a9ede50a35ab19dbbec93e610b9de8c8057
Author: Akshay Deep 
Date:   Mon Mar 28 03:27:53 2016 +0530

Slide Show Settings Dialog: Help should be a secondary action button.

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

diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui 
b/sd/uiconfig/simpress/ui/presentationdialog.ui
index ebb5de5..732683d 100644
--- a/sd/uiconfig/simpress/ui/presentationdialog.ui
+++ b/sd/uiconfig/simpress/ui/presentationdialog.ui
@@ -612,6 +612,7 @@
 False
 True
 2
+True
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


master build fails

2016-03-31 Thread Jean-Baptiste Faure
Hi,

One of the last five commits breaks the master. I get the following
error messages when I do make clean && make build:

> [build CXX] avmedia/source/vlc/vlcmanager.cxx
> [...]/master/avmedia/source/vlc/vlcmanager.cxx: In constructor 
> ‘avmedia::vlc::Manager::Manager(const 
> com::sun::star::uno::Reference&)’:
> [...]/master/avmedia/source/vlc/vlcmanager.cxx:52:64: error: no matching 
> function for call to ‘avmedia::vlc::wrapper::Instance::Instance(long unsigned 
> int)’
>  mInstance.reset(new Instance( SAL_N_ELEMENTS(VLC_ARGS) ), VLC_ARGS 
> ));
> ^
> In file included from 
> [...]/master/avmedia/source/vlc/wrapper/Wrapper.hxx:16:0,
>  from [...]/master/avmedia/source/vlc/vlcmanager.hxx:24,
>  from [...]/master/avmedia/source/vlc/vlcmanager.cxx:14:
> [...]/master/avmedia/source/vlc/wrapper/Instance.hxx:26:9: note: candidate: 
> avmedia::vlc::wrapper::Instance::Instance(const 
> avmedia::vlc::wrapper::Instance&)
>  Instance( const Instance& other );
>  ^
> [...]/master/avmedia/source/vlc/wrapper/Instance.hxx:26:9: note:   no known 
> conversion for argument 1 from ‘long unsigned int’ to ‘const 
> avmedia::vlc::wrapper::Instance&’
> [...]/master/avmedia/source/vlc/wrapper/Instance.hxx:25:9: note: candidate: 
> avmedia::vlc::wrapper::Instance::Instance(int, const char* const*)
>  Instance( int argc, const char * const argv[] );
>  ^
> [...]/master/avmedia/source/vlc/wrapper/Instance.hxx:25:9: note:   candidate 
> expects 2 arguments, 1 provided
> [...]/master/solenv/gbuild/LinkTarget.mk:189: recipe for target 
> '[...]/master/workdir/CxxObject/avmedia/source/vlc/vlcmanager.o' failed
> make[1]: *** [[...]/master/workdir/CxxObject/avmedia/source/vlc/vlcmanager.o] 
> Error 1
> Makefile:246: recipe for target 'build' failed

I guess the problem is in the following commit:
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=6439005484bdf6754b910b1ce025b3fb33b6623f

which is the one that makes changes in avmedia.

Best regards.
JBF
-- 
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.
Disclaimer: my Internet Provider being located in France, each of our
exchanges over Internet will be scanned by French spying services.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 2 commits - sd/source

2016-03-31 Thread Jan Holesovsky
 sd/source/ui/table/tablefunction.cxx |   36 ---
 1 file changed, 33 insertions(+), 3 deletions(-)

New commits:
commit 686dda325635ed55773ac8afdf6ff6984db8256e
Author: Jan Holesovsky 
Date:   Thu Mar 31 12:26:54 2016 +0200

sd lok bccu#1525: Don't rely on the window size in the LOK case.

Otherwise the table is inserted in the top left corner.

Change-Id: Ia5d7099d4bace6f18cd7e8d3409427119240b756

diff --git a/sd/source/ui/table/tablefunction.cxx 
b/sd/source/ui/table/tablefunction.cxx
index f24b0f9..38dd27f 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -151,16 +152,25 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
 Size aSize( 14100, 2000 );
 
 Point aPos;
-Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
+Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel());
 aWinRect = GetActiveWindow()->PixelToLogic(aWinRect);
 
 // make sure that the default size of the table fits on the paper 
and is inside the viewing area.
 // if zoomed in close, don't make the table bigger than the 
viewing window.
 Size aMaxSize = getCurrentPage()->GetSize();
-if( aMaxSize.Height() > aWinRect.getHeight() )
-aMaxSize.setHeight( aWinRect.getHeight() );
-if( aMaxSize.Width() > aWinRect.getWidth() )
-aMaxSize.setWidth( aWinRect.getWidth() );
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+// aWinRect is nonsensical in the LOK case
+aWinRect = Rectangle(aPos, aMaxSize);
+}
+else
+{
+if( aMaxSize.Height() > aWinRect.getHeight() )
+aMaxSize.setHeight( aWinRect.getHeight() );
+if( aMaxSize.Width() > aWinRect.getWidth() )
+aMaxSize.setWidth( aWinRect.getWidth() );
+}
 
 if( aSize.Width() > aMaxSize.getWidth() )
 aSize.setWidth( aMaxSize.getWidth() );
commit e5418bf8983b7811fd3372bb184d950ebe87e217
Author: Justin Luth 
Date:   Wed Jan 6 21:23:47 2016 +0300

set reasonable default size for new draw/impress tables

The width was decent, except that on small paper (A6) it was
wider than the paper size.

The height was terrible - the minimum size possible. It was too small
for even a single line of text. That made it hard to grab the table edge
(instead grabbing a row edge) when trying to resize.

Now the height and width are limited to the page/view size,
and based on the number of rows created.  One possible enhancement
would be to use the border width instead of the page width.

Change-Id: I4e106a7bc34f65886e3c80d308499242c0fdd7d8
Reviewed-on: https://gerrit.libreoffice.org/21171
Reviewed-by: Justin Luth 
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sd/source/ui/table/tablefunction.cxx 
b/sd/source/ui/table/tablefunction.cxx
index c0c4aef..f24b0f9 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -148,12 +148,32 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
 }
 else
 {
-Size aSize( 14100, 200 );
+Size aSize( 14100, 2000 );
 
 Point aPos;
 Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
+aWinRect = GetActiveWindow()->PixelToLogic(aWinRect);
+
+// make sure that the default size of the table fits on the paper 
and is inside the viewing area.
+// if zoomed in close, don't make the table bigger than the 
viewing window.
+Size aMaxSize = getCurrentPage()->GetSize();
+if( aMaxSize.Height() > aWinRect.getHeight() )
+aMaxSize.setHeight( aWinRect.getHeight() );
+if( aMaxSize.Width() > aWinRect.getWidth() )
+aMaxSize.setWidth( aWinRect.getWidth() );
+
+if( aSize.Width() > aMaxSize.getWidth() )
+aSize.setWidth( aMaxSize.getWidth() );
+
+// adjust height based on # of rows.
+if( nRows > 0 )
+{
+aSize.setHeight( aSize.Height() * nRows );
+if( aSize.Height() > aMaxSize.getHeight() )
+aSize.setHeight( aMaxSize.getHeight() );
+}
+
 aPos = aWinRect.Center();
-aPos = GetActiveWindow()->PixelToLogic(aPos);
 aPos.X() -= aSize.Width() / 2;
 aPos.Y() -= aSize.Height() / 2;
 aRect = Rectangle(aPos, aSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libr

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

2016-03-31 Thread Stephan Bergmann
 desktop/source/app/officeipcthread.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit ab48f014167b85bc0871c96b84e3b70201ed353e
Author: Stephan Bergmann 
Date:   Thu Mar 31 11:59:00 2016 +0200

Clean up

Change-Id: I93efe38ee7148c87d2fabd6f3c77d28b85b6e511

diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 63114c6..55f6c64 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -455,8 +455,7 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
 #endif
 
 if (!ipc) {
-rtl::Reference< RequestHandler > pThread(new RequestHandler);
-pGlobal = pThread;
+pGlobal = new RequestHandler;
 return IPC_STATUS_OK;
 }
 
@@ -535,10 +534,9 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
 if ( nPipeMode == PIPEMODE_CREATED )
 {
 // Seems we are the one and only, so start listening thread
-rtl::Reference< RequestHandler > pThread(new RequestHandler);
-pThread->mPipeReaderThread = new PipeReaderThread(*pThread, pipe);
-pGlobal = pThread;
-pThread->mPipeReaderThread->launch();
+pGlobal = new RequestHandler;
+pGlobal->mPipeReaderThread = new PipeReaderThread(*pGlobal, pipe);
+pGlobal->mPipeReaderThread->launch();
 return IPC_STATUS_OK;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Noel Grandin
 sw/source/core/inc/scriptinfo.hxx   |3 
 sw/source/core/inc/swfont.hxx   |  220 
 sw/source/core/text/EnhancedPDFExportHelper.cxx |4 
 sw/source/core/text/atrstck.cxx |   54 ++---
 sw/source/core/text/frmpaint.cxx|   12 -
 sw/source/core/text/guess.cxx   |4 
 sw/source/core/text/inftxt.cxx  |4 
 sw/source/core/text/itratr.hxx  |6 
 sw/source/core/text/itrcrsr.cxx |2 
 sw/source/core/text/itrform2.cxx|   18 -
 sw/source/core/text/itrpaint.cxx|2 
 sw/source/core/text/porfld.cxx  |   26 +-
 sw/source/core/text/porfld.hxx  |4 
 sw/source/core/text/porftn.hxx  |4 
 sw/source/core/text/porlay.cxx  |   12 -
 sw/source/core/text/pormulti.cxx|6 
 sw/source/core/text/pormulti.hxx|4 
 sw/source/core/text/redlnitr.cxx|   14 -
 sw/source/core/text/txtfld.cxx  |   14 -
 sw/source/core/text/txtftn.cxx  |   20 +-
 sw/source/core/txtnode/fntcache.cxx |   72 +++
 sw/source/core/txtnode/swfont.cxx   |  205 +++---
 22 files changed, 357 insertions(+), 353 deletions(-)

New commits:
commit 41bdaa37cc62f656cc164992c4c7d39bec7e57e2
Author: Noel Grandin 
Date:   Wed Mar 30 18:30:47 2016 +0200

tdf#84938 convert SW_* script constants to scoped enum

Change-Id: I09ad92f194a136318ea77edb802ac6601c4e58dc

diff --git a/sw/source/core/inc/scriptinfo.hxx 
b/sw/source/core/inc/scriptinfo.hxx
index 2cc44b2..865bac9 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -30,6 +30,7 @@ class SwTextNode;
 class Point;
 class MultiSelection;
 typedef std::list< sal_Int32 > PositionList;
+enum class SwFontScript;
 
 #define SPACING_PRECISION_FACTOR 100
 
@@ -354,7 +355,7 @@ public:
 static SwScriptInfo* GetScriptInfo( const SwTextNode& rNode,
 bool bAllowInvalid = false );
 
-static sal_uInt8 WhichFont(sal_Int32 nIdx, const OUString* pText, const 
SwScriptInfo* pSI);
+static SwFontScript WhichFont(sal_Int32 nIdx, const OUString* pText, const 
SwScriptInfo* pSI);
 };
 
 #endif
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index e5608e5..8070d1e 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SfxItemSet;
 class SwAttrSet;
@@ -117,16 +118,19 @@ public:
 sal_uInt16 GetPropWidth() const { return m_nProportionalWidth; }
 };
 
-#define SW_LATIN 0
-#define SW_CJK 1
-#define SW_CTL 2
-#define SW_SCRIPTS 3
+enum class SwFontScript
+{
+Latin, CJK, CTL, LAST = CTL
+};
+
+// mostly used as a "unknown script" marker
+#define SW_SCRIPTS (SwFontScript(int(SwFontScript::LAST)+1))
 
 class SW_DLLPUBLIC SwFont
 {
 // CJK == Chinese, Japanese, Korean
 // CTL == Complex text layout ( Hebrew, Arabic )
-SwSubFont   m_aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font
+o3tl::enumarray   m_aSub; // Latin-, CJK- and 
CTL-font
 
 Color*  m_pBackColor; // background color (i.e. at character 
styles)
 Color   m_aHighlightColor;   // highlight color
@@ -154,7 +158,7 @@ class SW_DLLPUBLIC SwFont
 sal_uInt8   m_nMetaCount;   // count META/METAFIELD
 sal_uInt8   m_nInputFieldCount; // count INPUTFIELD
 
-sal_uInt8   m_nActual;// actual font (Latin, CJK or CTL)
+SwFontScript m_nActual;// actual font (Latin, CJK or CTL)
 
 // switch for the font-extensions
 bool m_bNoHyph:1;  // SwTextNoHyphenHere: no separator
@@ -178,29 +182,29 @@ public:
 
 SwFont& operator=( const SwFont &rFont );
 
-inline sal_uInt8 GetActual() const {return m_nActual; }
-inline void SetActual( sal_uInt8 nNew );
+inline SwFontScript GetActual() const {return m_nActual; }
+inline void SetActual( SwFontScript nNew );
 inline const SvxFont& GetActualFont() const { return m_aSub[m_nActual]; }
 
 // gets a MagicNumber via SwFntAccess
-void GoMagic( SwViewShell *pSh, sal_uInt8 nWhich );
+void GoMagic( SwViewShell *pSh, SwFontScript nWhich );
 // set background color
 void SetBackColor( Color* pNewColor );
 inline const Color* GetBackColor() const{ return m_pBackColor; }
 void SetHighlightColor( const Color& aNewColor );
 const Color& GetHighlightColor() const { return m_aHighlightColor; }
 
-inline void ChkMagic( SwViewShell *pSh, sal_uInt8 nWhich )
+inline void ChkMagic( SwViewShell *pSh, SwFontScript nWhich )
 { if( !m_aSub[ nWhich ].m_pMagic ) GoMagic( pSh, nWhich ); }
-inline void GetMagic( const void* &rMagic, sal_uInt16 &rIdx, sal_uInt8 
nWhich )
+inline void GetMagic( const void* &rMagic, sal_uInt16 &r

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

2016-03-31 Thread Stephan Bergmann
 desktop/source/app/officeipcthread.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 385f6862e303030d24a2c9d3459c074fcf15c279
Author: Stephan Bergmann 
Date:   Thu Mar 31 11:55:22 2016 +0200

HAVE_FEATURE_MACOSX_SANDBOX doesn't want to launch the PipeReaderThread

Change-Id: I55ca1b91ed3b52e9b2b0f802692cbe45d50826e1

diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index efb23a5..63114c6 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -450,7 +450,7 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
 if( pGlobal.is() )
 return IPC_STATUS_OK;
 
-#if !HAVE_FEATURE_DESKTOP
+#if !HAVE_FEATURE_DESKTOP || HAVE_FEATURE_MACOSX_SANDBOX
 ipc = false;
 #endif
 
@@ -488,10 +488,6 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
 if ( aUserInstallPathHashCode.isEmpty() )
 return IPC_STATUS_BOOTSTRAP_ERROR; // Something completely broken, we 
cannot create a valid hash code!
 
-#if HAVE_FEATURE_MACOSX_SANDBOX
-nPipeMode = PIPEMODE_CREATED;
-#else
-
 OUString aPipeIdent( "SingleOfficeIPC_" + aUserInstallPathHashCode );
 
 do
@@ -535,7 +531,6 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
 }
 
 } while ( nPipeMode == PIPEMODE_DONTKNOW );
-#endif
 
 if ( nPipeMode == PIPEMODE_CREATED )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Seraphime Kirkovski license statement

2016-03-31 Thread Séraphime Kirkovski
All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-03-31 Thread Noel Grandin
 sw/source/core/text/itrform2.cxx |6 +++---
 sw/source/core/text/pormulti.cxx |   10 +-
 sw/source/core/text/pormulti.hxx |   10 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 8138dae8577b4fcc30bd269516d9213587f6d732
Author: Noel Grandin 
Date:   Wed Mar 30 16:54:15 2016 +0200

tdf#84938 convert SW_MC_* to scoped enum

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

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index dc853e1..f8c1d41 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1246,9 +1246,9 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
 {
 SwMultiPortion* pTmp = nullptr;
 
-if ( SW_MC_BIDI == pCreate->nId )
+if ( SwMultiCreatorId::Bidi == pCreate->nId )
 pTmp = new SwBidiPortion( nEnd, pCreate->nLevel );
-else if ( SW_MC_RUBY == pCreate->nId )
+else if ( SwMultiCreatorId::Ruby == pCreate->nId )
 {
 Seek( rInf.GetIdx() );
 bool bRubyTop = false;
@@ -1269,7 +1269,7 @@ SwLinePortion *SwTextFormatter::NewPortion( 
SwTextFormatInfo &rInf )
   
*GetTextFrame()->GetTextNode()->getIDocumentSettingAccess(),
   nEnd, 0, pRubyPos );
 }
-else if( SW_MC_ROTATE == pCreate->nId )
+else if( SwMultiCreatorId::Rotate == pCreate->nId )
 pTmp = new SwRotatedPortion( *pCreate, nEnd,
  
GetTextFrame()->IsRightToLeft() );
 else
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index d7b7ec9..762e8f8 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -551,7 +551,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& 
rCreate, const SwFont& rFnt,
  : SwMultiPortion( nEnd )
 {
 SetRuby();
-OSL_ENSURE( SW_MC_RUBY == rCreate.nId, "Ruby expected" );
+OSL_ENSURE( SwMultiCreatorId::Ruby == rCreate.nId, "Ruby expected" );
 OSL_ENSURE( RES_TXTATR_CJK_RUBY == rCreate.pAttr->Which(), "Wrong 
attribute" );
 const SwFormatRuby& rRuby = rCreate.pAttr->GetRuby();
 nAdjustment = rRuby.GetAdjustment();
@@ -823,7 +823,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 
&rPos,
 SwMultiCreator *pRet = new SwMultiCreator;
 pRet->pItem = nullptr;
 pRet->pAttr = nullptr;
-pRet->nId = SW_MC_BIDI;
+pRet->nId = SwMultiCreatorId::Bidi;
 pRet->nLevel = nCurrLevel + 1;
 return pRet;
 }
@@ -895,7 +895,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 
&rPos,
 SwMultiCreator *pRet = new SwMultiCreator;
 pRet->pItem = nullptr;
 pRet->pAttr = pRuby;
-pRet->nId = SW_MC_RUBY;
+pRet->nId = SwMultiCreatorId::Ruby;
 pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0;
 return pRet;
 }
@@ -933,7 +933,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 
&rPos,
 pRet->pAttr = nullptr;
 aEnd.push_front( GetText().getLength() );
 }
-pRet->nId = SW_MC_DOUBLE;
+pRet->nId = SwMultiCreatorId::Double;
 pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0;
 
 // n2Lines is the index of the last 2-line-attribute, which contains
@@ -1020,7 +1020,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( 
sal_Int32 &rPos,
 {   // The winner is a rotate-attribute,
 // the end of the multiportion depends on the following attributes...
 SwMultiCreator *pRet = new SwMultiCreator;
-pRet->nId = SW_MC_ROTATE;
+pRet->nId = SwMultiCreatorId::Rotate;
 
 // We note the endpositions of the 2-line attributes in aEnd as stack
 std::deque< sal_Int32 > aEnd;
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 0659db9..8bcf409 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -36,16 +36,16 @@ class SwFont;
 // or a poolitem.
 // The GetMultiCreator-function fills this structure and
 // the Ctor of the SwMultiPortion uses it.
-#define SW_MC_DOUBLE0
-#define SW_MC_RUBY  1
-#define SW_MC_ROTATE2
-#define SW_MC_BIDI  3
+enum class SwMultiCreatorId
+{
+Double, Ruby, Rotate, Bidi
+};
 
 struct SwMultiCreator
 {
 const SwTextAttr* pAttr;
 const SfxPoolItem* pItem;
-sal_uInt8 nId;
+SwMultiCreatorId nId;
 sal_uInt8 nLevel;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedes

[Libreoffice-commits] core.git: avmedia/source connectivity/source cui/source dbaccess/source editeng/source formula/source fpicker/source framework/source hwpfilter/source i18nutil/source linguistic/

2016-03-31 Thread Noel Grandin
 avmedia/source/vlc/vlcframegrabber.cxx|2 
 avmedia/source/vlc/vlcmanager.cxx |2 
 connectivity/source/commontools/dbmetadata.cxx|3 
 connectivity/source/drivers/ado/Awrapado.cxx  |   24 +--
 connectivity/source/drivers/postgresql/pq_statics.cxx |   20 +--
 connectivity/source/parse/sqlnode.cxx |4 
 cui/source/options/optcolor.cxx   |2 
 dbaccess/source/core/api/tablecontainer.cxx   |2 
 dbaccess/source/core/misc/DatabaseDataProvider.cxx|4 
 dbaccess/source/ui/browser/genericcontroller.cxx  |4 
 dbaccess/source/ui/dlg/dbadmin.cxx|2 
 dbaccess/source/ui/querydesign/LimitBox.cxx   |3 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |4 
 editeng/source/editeng/editview.cxx   |2 
 formula/source/core/api/FormulaCompiler.cxx   |8 -
 fpicker/source/office/OfficeControlAccess.cxx |4 
 fpicker/source/win32/filepicker/controlaccess.cxx |5 
 framework/source/fwe/xml/menudocumenthandler.cxx  |6 
 framework/source/fwe/xml/toolboxdocumenthandler.cxx   |6 
 hwpfilter/source/mapping.h|2 
 i18nutil/source/utility/paper.cxx |2 
 linguistic/source/gciterator.cxx  |2 
 linguistic/source/lngopt.cxx  |2 
 linguistic/source/lngprophelp.cxx |6 
 linguistic/source/misc.cxx|2 
 linguistic/workben/sprophelp.cxx  |2 
 onlineupdate/source/update/common/uachelper.cxx   |2 
 onlineupdate/source/update/common/updatehelper.cxx|7 -
 onlineupdate/source/update/common/updatelogging.cxx   |4 
 onlineupdate/source/update/updater/progressui_win.cxx |4 
 onlineupdate/source/update/updater/updater.cxx|   86 +++---
 onlineupdate/source/update/updater/win_dirent.cxx |6 
 reportdesign/source/core/api/FixedLine.cxx|2 
 reportdesign/source/core/api/FixedText.cxx|3 
 reportdesign/source/core/api/FormattedField.cxx   |2 
 reportdesign/source/core/api/ImageControl.cxx |2 
 reportdesign/source/core/api/ReportDefinition.cxx |4 
 reportdesign/source/core/api/Section.cxx  |   12 -
 reportdesign/source/core/api/Shape.cxx|4 
 reportdesign/source/ui/inspection/DefaultInspection.cxx   |4 
 reportdesign/source/ui/misc/UITools.cxx   |2 
 reportdesign/source/ui/report/ReportController.cxx|4 
 reportdesign/source/ui/report/propbrw.cxx |2 
 sc/source/core/data/dpobject.cxx  |2 
 sc/source/core/tool/compiler.cxx  |2 
 sc/source/core/tool/editutil.cxx  |4 
 sc/source/core/tool/interpr2.cxx  |6 
 sc/source/core/tool/odffmap.cxx   |2 
 sc/source/filter/qpro/qproform.cxx|2 
 sc/source/filter/xml/editattributemap.cxx |2 
 sc/source/filter/xml/xmlimprt.cxx |3 
 sc/source/ui/dbgui/dpgroupdlg.cxx |2 
 sc/source/ui/miscdlgs/protectiondlg.cxx   |2 
 sc/source/ui/unoobj/servuno.cxx   |2 
 sc/source/ui/unoobj/tokenuno.cxx  |2 
 sc/source/ui/vba/vbaborders.cxx   |2 
 sc/source/ui/vba/vbadialog.cxx|2 
 sc/source/ui/vba/vbaglobals.cxx   |4 
 sc/source/ui/vba/vbapalette.cxx   |2 
 scripting/source/vbaevents/eventhelper.cxx|2 
 sd/source/ui/annotations/annotationmanager.cxx|6 
 setup_native/source/win32/wintools/makecab/makecab.c  |2 
 setup_native/source/win32/wintools/msidb/msidb.c  |4 
 sfx2/source/dialog/printopt.cxx   |6 
 shell/inc/internal/fileextensions.hxx |4 
 shell/source/win32/shlxthandler/columninfo/columninfo.cxx |6 
 shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx   |4 
 shell/source/win32/shlxthandler/util/fileextensions.cxx   |4 
 shell/source/win32/simplemail/senddoc.cxx |2 
 svx/source/fmcomp/fmgridif.cxx|8 -
 svx/source/form/ParseContext.cxx  |2 
 svx/source/form/fmPropBrw.cxx |2 
 svx/source/form/fmdmod.cxx|2 
 svx/source/form/fmundo.cxx|4 
 svx/source/form/

[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp loolwsd/Util.cpp loolwsd/Util.hpp

2016-03-31 Thread Tor Lillqvist
 loolwsd/IoUtil.cpp |6 +++---
 loolwsd/Util.cpp   |   22 ++
 loolwsd/Util.hpp   |4 
 3 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit 422834ebefcf0d69aa0ff997ce61bb927407e763
Author: Tor Lillqvist 
Date:   Thu Mar 31 11:01:21 2016 +0300

Improve logging

Don't embed newlines in "lines" written to the log. When logging stuff
read from or written to the fifos, translate newlines to " / " for
clarity.

(If we would want complete, exact verbose logging, we should be really
pedantic and log all non-printable bytes in hex anyway, etc, so
displaying newlines as space-separated slashes should be OK. It isn't
as if there would be totally arbitary data passed through the fifos
anyway.)

diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 02ecb09..f47f454 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -210,7 +210,7 @@ ssize_t writeFIFO(int pipe, const char* buffer, ssize_t 
size)
 ssize_t count = 0;
 while(true)
 {
-Log::trace("Writing to pipe. Data: [" + std::string(buffer, size) + 
"].");
+Log::trace("Writing to pipe. Data: [" + 
Util::formatLinesForLog(std::string(buffer, size)) + "].");
 const auto bytes = write(pipe, buffer + count, size - count);
 if (bytes < 0)
 {
@@ -282,7 +282,7 @@ int PipeReader::readLine(std::string& line,
 line += std::string(_data.data(), endOfLine);
 _data.erase(0, endOfLine - _data.data() + 1); // Including the '\n'.
 Log::trace() << "Read existing line from pipe: " << _name << ", line: 
["
- << line << "], data: [" << _data << "]." << Log::end;
+ << line << "], data: [" << Util::formatLinesForLog(_data) 
<< "]." << Log::end;
 return 1;
 }
 
@@ -332,7 +332,7 @@ int PipeReader::readLine(std::string& line,
 line += tail;
 _data = std::string(endOfLine + 1, bytes - tail.size() - 1); 
// Exclude the '\n'.
 Log::trace() << "Read line from pipe: " << _name << ", line: 
[" << line
-<< "], data: [" << _data << "]." << Log::end;
+ << "], data: [" << Util::formatLinesForLog(_data) 
<< "]." << Log::end;
 return 1;
 }
 else
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 44cee5c..5d6485d 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -511,6 +511,28 @@ namespace Util
 
 return nMem;
 }
+
+std::string replace(const std::string& s, const std::string& a, const 
std::string& b)
+{
+std::string result = s;
+std::string::size_type pos;
+while ((pos = result.find(a)) != std::string::npos)
+{
+result = result.replace(pos, a.size(), b);
+}
+return result;
+}
+
+std::string formatLinesForLog(const std::string& s)
+{
+std::string r;
+std::string::size_type n = s.size();
+if (n > 0 && s.back() == '\n')
+r = s.substr(0, n-1);
+else
+r = s;
+return replace(r, "\n", " / ");
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index ae3f938..d02fa10 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -127,6 +127,10 @@ namespace Util
 void requestTermination(const Poco::Process::PID& pid);
 
 unsigned getMemoryUsage(Poco::Process::PID nPid);
+
+std::string replace(const std::string& s, const std::string& a, const 
std::string& b);
+
+std::string formatLinesForLog(const std::string& s);
 };
 
 //TODO: Move to own file.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basctl/source chart2/source connectivity/source dbaccess/source desktop/qa framework/source onlineupdate/source oox/source reportdesign/source sc/source sd/source setup

2016-03-31 Thread Noel Grandin
 basctl/source/basicide/baside2.cxx|2 -
 chart2/source/view/main/OpenGLRender.cxx  |2 -
 connectivity/source/commontools/TDatabaseMetaDataBase.cxx |2 -
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx |2 -
 connectivity/source/drivers/mork/MColumnAlias.cxx |2 -
 dbaccess/source/core/api/RowSet.cxx   |2 -
 dbaccess/source/core/api/columnsettings.cxx   |4 +-
 dbaccess/source/core/api/definitioncolumn.cxx |4 +-
 dbaccess/source/core/dataaccess/documentdefinition.cxx|4 +-
 dbaccess/source/core/misc/dsntypes.cxx|6 +--
 dbaccess/source/core/recovery/dbdocrecovery.cxx   |4 +-
 dbaccess/source/ext/macromigration/migrationengine.cxx|   14 
 dbaccess/source/filter/xml/xmlExport.cxx  |   14 
 dbaccess/source/sdbtools/connection/tablename.cxx |4 +-
 dbaccess/source/ui/app/AppController.cxx  |4 +-
 dbaccess/source/ui/app/AppDetailPageHelper.cxx|4 +-
 dbaccess/source/ui/app/AppIconControl.cxx |4 +-
 dbaccess/source/ui/app/AppTitleWindow.cxx |2 -
 dbaccess/source/ui/browser/dbloader.cxx   |   10 ++---
 dbaccess/source/ui/browser/unodatbr.cxx   |2 -
 dbaccess/source/ui/control/FieldDescControl.cxx   |   18 +-
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx   |2 -
 dbaccess/source/ui/misc/DExport.cxx   |4 +-
 dbaccess/source/ui/misc/UITools.cxx   |2 -
 dbaccess/source/ui/misc/WCopyTable.cxx|2 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |7 ++--
 dbaccess/source/ui/tabledesign/TEditControl.cxx   |2 -
 dbaccess/source/ui/uno/copytablewizard.cxx|2 -
 desktop/qa/deployment_misc/test_dp_version.cxx|2 -
 framework/source/uielement/controlmenucontroller.cxx  |6 +--
 onlineupdate/source/update/updater/loaddlls.cxx   |2 -
 oox/source/drawingml/textbodypropertiescontext.cxx|2 -
 reportdesign/source/filter/xml/xmlExport.cxx  |4 +-
 reportdesign/source/ui/dlg/GroupsSorting.cxx  |   24 +-
 reportdesign/source/ui/inspection/DataProviderHandler.cxx |2 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx |2 -
 reportdesign/source/ui/inspection/metadata.cxx|4 +-
 reportdesign/source/ui/misc/UITools.cxx   |4 +-
 reportdesign/source/ui/report/ReportController.cxx|   22 ++--
 reportdesign/source/ui/report/propbrw.cxx |2 -
 sc/source/ui/unoobj/scdetect.cxx  |2 -
 sd/source/filter/html/htmlex.cxx  |4 +-
 sd/source/ui/slideshow/slideshowimpl.cxx  |6 +--
 setup_native/source/win32/wintools/makecab/parseddf.c |2 -
 sfx2/source/appl/shutdowniconw32.cxx  |2 -
 sfx2/source/view/frmload.cxx  |4 +-
 svx/source/fmcomp/fmgridif.cxx|4 +-
 svx/source/fmcomp/gridcell.cxx|8 ++--
 svx/source/fmcomp/gridctrl.cxx|6 +--
 svx/source/form/fmPropBrw.cxx |2 -
 svx/source/form/fmpage.cxx|2 -
 svx/source/form/fmshimp.cxx   |   14 
 svx/source/form/formcontrolling.cxx   |2 -
 svx/source/tbxctrls/tbcontrl.cxx  |2 -
 svx/source/unodraw/unoprov.cxx|2 -
 sw/source/core/doc/fmtcol.cxx |3 -
 toolkit/source/controls/spinningprogress.cxx  |2 -
 tools/source/inet/inetmime.cxx|5 +-
 vcl/source/fontsubset/ttcr.cxx|4 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |5 +-
 writerfilter/source/dmapper/StyleSheetTable.cxx   |6 +--
 xmloff/source/forms/elementexport.cxx |   10 ++---
 xmlreader/source/xmlreader.cxx|2 -
 63 files changed, 150 insertions(+), 156 deletions(-)

New commits:
commit 1aa4df615fa5599d05e9dd5e925b5852676185fa
Author: Noel Grandin 
Date:   Mon Mar 28 17:12:04 2016 +0200

use SAL_N_ELEMENTS in for loops

for with
  git grep -n 'for.*sizeof'

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index b27605b..046fc92 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basic

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

2016-03-31 Thread Noel Grandin
 sw/inc/postithelper.hxx |   13 +
 sw/inc/redline.hxx  |6 +-
 sw/inc/swtable.hxx  |2 
 sw/inc/txatritr.hxx |5 -
 sw/source/core/doc/tblrwcl.cxx  |4 -
 sw/source/core/docnode/ndtbl.cxx|6 +-
 sw/source/core/docnode/node2lay.cxx |   12 +---
 sw/source/core/fields/postithelper.cxx  |5 -
 sw/source/core/inc/frame.hxx|2 
 sw/source/core/inc/txtfly.hxx   |3 -
 sw/source/core/layout/paintfrm.cxx  |   10 +--
 sw/source/core/text/inftxt.cxx  |7 +-
 sw/source/core/text/inftxt.hxx  |6 +-
 sw/source/core/text/itradj.cxx  |4 -
 sw/source/core/text/itrform2.cxx|   10 +--
 sw/source/core/text/porfly.cxx  |4 -
 sw/source/core/text/porglue.cxx |4 -
 sw/source/core/text/porglue.hxx |6 +-
 sw/source/core/text/txtfly.cxx  |   19 ---
 sw/source/core/text/txtftn.cxx  |2 
 sw/source/core/text/txttab.cxx  |6 +-
 sw/source/core/txtnode/txatritr.cxx |   18 +--
 sw/source/filter/html/htmltab.cxx   |   61 ++--
 sw/source/filter/xml/XMLRedlineImportHelper.cxx |4 -
 sw/source/ui/dbui/addresslistdialog.cxx |4 -
 sw/source/ui/dbui/selectdbtabledialog.cxx   |6 +-
 sw/source/ui/index/cnttab.cxx   |6 +-
 sw/source/uibase/dochdl/swdtflvr.cxx|2 
 sw/source/uibase/docvw/AnchorOverlayObject.cxx  |   13 +
 sw/source/uibase/docvw/AnchorOverlayObject.hxx  |7 --
 sw/source/uibase/docvw/PostItMgr.cxx|3 -
 sw/source/uibase/inc/wrtsh.hxx  |2 
 sw/source/uibase/wrtsh/wrtsh1.cxx   |4 -
 33 files changed, 87 insertions(+), 179 deletions(-)

New commits:
commit 2bd1e7aafeebdfe0e1656ed1ff01762039be5af1
Author: Noel Grandin 
Date:   Wed Mar 30 11:59:33 2016 +0200

loplugin:constantparam in sw

Change-Id: I2d99ff8149f6348a3781e01e9b3079f6c2505d6a

diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 64cc025..e4bf2bf 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -96,10 +96,9 @@ public:
 SwPostItHelper::SwLayoutStatus mLayoutStatus;
 SwLayoutInfo maLayoutInfo;
 
-SwSidebarItem( const bool aShow,
-   const bool aFocus)
+SwSidebarItem( const bool aFocus)
 : pPostIt(nullptr)
-, bShow(aShow)
+, bShow(true)
 , bFocus(aFocus)
 , mLayoutStatus( SwPostItHelper::INVISIBLE )
 , maLayoutInfo()
@@ -116,8 +115,7 @@ public:
 virtual const SfxBroadcaster* GetBroadCaster() const = 0;
 virtual VclPtr GetSidebarWindow( 
SwEditWin& rEditWin,
 WinBits nBits,
-SwPostItMgr& 
aMgr,
-SwPostItBits 
aBits) = 0;
+SwPostItMgr& 
aMgr) = 0;
 };
 
 class SwAnnotationItem: public SwSidebarItem
@@ -126,7 +124,7 @@ public:
 SwAnnotationItem(
 SwFormatField& rFormatField,
 const bool aFocus)
-: SwSidebarItem( true/*aShow*/, aFocus )
+: SwSidebarItem( aFocus )
 , mrFormatField( rFormatField )
 {
 }
@@ -148,8 +146,7 @@ public:
 virtual VclPtr GetSidebarWindow(
 SwEditWin& rEditWin,
 WinBits nBits,
-SwPostItMgr& aMgr,
-SwPostItBits aBits ) override;
+SwPostItMgr& aMgr ) override;
 
 private:
 SwFormatField& mrFormatField;
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 2649010..1033a56 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -197,10 +197,10 @@ public:
 SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam );
 SwRangeRedline( const SwRedlineData& rData, const SwPosition& rPos );
 // For sw3io: pData is taken over!
-SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos, bool bVsbl,
-   bool bDelLP, bool bIsPD) :
+SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos,
+   bool bDelLP) :
 SwPaM( rPos ), pRedlineData( pData ), pContentSect( nullptr ),
-bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
+bDelLastPara( bDelLP ), bIsLastParaDelete( false ), bIsVisible( true )
 {}
 SwRangeRedline( const SwRangeRedline& );
 virtual ~SwRangeRedline();
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 34a31aa..09ad765 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -275,7 +275,7 @@ public:
  const bool bPerformValidCheck = fal

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

2016-03-31 Thread Jan Holesovsky
 source/text/sbasic/shared/03131600.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 721523df6af6ea33f2a7b7bc3d7d6a269c28bb1f
Author: Jan Holesovsky 
Date:   Thu Mar 31 09:31:20 2016 +0200

Fixed a dead link to api.libreoffice.org.

Thanks to Juergen Klatt.

diff --git a/source/text/sbasic/shared/03131600.xhp 
b/source/text/sbasic/shared/03131600.xhp
index 816e879..c974093 100644
--- a/source/text/sbasic/shared/03131600.xhp
+++ b/source/text/sbasic/shared/03131600.xhp
@@ -42,7 +42,7 @@
 
 oService = 
CreateUnoService( Uno service name )
 
-For a list of 
available services, go to: 
http://api.libreoffice.org/docs/common/ref/com/sun/star/module-ix.html
+For a list of 
available services, go to: 
http://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html
 
 Examples:
 oIntrospection 
= CreateUnoService( "com.sun.star.beans.Introspection" )
@@ -67,4 +67,4 @@
 
 
 
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-03-31 Thread Jan Holesovsky
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7a7be32e5265f897174f3880adc061dac0203f1f
Author: Jan Holesovsky 
Date:   Thu Mar 31 09:31:20 2016 +0200

Updated core
Project: help  721523df6af6ea33f2a7b7bc3d7d6a269c28bb1f

Fixed a dead link to api.libreoffice.org.

Thanks to Juergen Klatt.

diff --git a/helpcontent2 b/helpcontent2
index 3b7250f..721523d 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3b7250f9ebada03c3b5f1f8ad983002cdefd7cd1
+Subproject commit 721523df6af6ea33f2a7b7bc3d7d6a269c28bb1f
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 3 commits - loolwsd/AdminModel.cpp loolwsd/AdminModel.hpp loolwsd/Auth.cpp loolwsd/Auth.hpp loolwsd/DocumentBroker.cpp loolwsd/Makefile.am loolwsd/Storage.cpp loolwsd

2016-03-31 Thread Pranav Kant
 loolwsd/AdminModel.cpp |  361 ++
 loolwsd/AdminModel.hpp |  385 +++--
 loolwsd/Auth.cpp   |  211 
 loolwsd/Auth.hpp   |  187 -
 loolwsd/DocumentBroker.cpp |2 
 loolwsd/Makefile.am|   97 ---
 loolwsd/Storage.cpp|  275 
 loolwsd/Storage.hpp|  245 +---
 8 files changed, 972 insertions(+), 791 deletions(-)

New commits:
commit 4ae077200cb1090b109125d4534dfbf5282a9740
Author: Pranav Kant 
Date:   Thu Mar 31 12:55:35 2016 +0530

loolwsd: Separate AdminModel header and implementation

Change-Id: Iddf107aa7985988deba800030e75243a831a7532

diff --git a/loolwsd/AdminModel.cpp b/loolwsd/AdminModel.cpp
new file mode 100644
index 000..644fa9c
--- /dev/null
+++ b/loolwsd/AdminModel.cpp
@@ -0,0 +1,361 @@
+/* -*- 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 "AdminModel.hpp"
+#include "Util.hpp"
+
+using Poco::StringTokenizer;
+
+/
+// Document Impl
+
+void Document::addView(int nSessionId)
+{
+const auto ret = _views.emplace(nSessionId, View(nSessionId));
+if (!ret.second)
+{
+Log::warn() << "View with SessionID [" + std::to_string(nSessionId) + 
"] already exists." << Log::end;
+}
+else
+{
+_nActiveViews++;
+}
+}
+
+void Document::removeView(int nSessionId)
+{
+auto it = _views.find(nSessionId);
+if (it != _views.end())
+{
+it->second.expire();
+_nActiveViews--;
+}
+}
+
+///
+// Subscriber Impl
+//
+bool Subscriber::notify(const std::string& message)
+{
+StringTokenizer tokens(message, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
+
+if (_subscriptions.find(tokens[0]) == _subscriptions.end())
+return true;
+
+auto webSocket = _ws.lock();
+if (webSocket)
+{
+webSocket->sendFrame(message.data(), message.length());
+return true;
+}
+else
+{
+return false;
+}
+}
+
+bool  Subscriber::subscribe(const std::string& command)
+{
+auto ret = _subscriptions.insert(command);
+return ret.second;
+}
+
+void  Subscriber::unsubscribe(const std::string& command)
+{
+_subscriptions.erase(command);
+}
+
+///
+// AdminModel Impl
+//
+
+void AdminModel::update(const std::string& data)
+{
+StringTokenizer tokens(data, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
+
+Log::info("AdminModel Recv: " + data);
+
+if (tokens[0] == "document")
+{
+addDocument(std::stoi(tokens[1]), tokens[2]);
+unsigned mem = Util::getMemoryUsage(std::stoi(tokens[1]));
+std::string response = data + std::to_string(mem);
+notify(response);
+return;
+}
+else if (tokens[0] == "addview")
+{
+auto it = _documents.find(std::stoi(tokens[1]));
+if (it != _documents.end())
+{
+const unsigned nSessionId = Util::decodeId(tokens[2]);
+it->second.addView(nSessionId);
+}
+}
+else if (tokens[0] == "rmview")
+{
+auto it = _documents.find(std::stoi(tokens[1]));
+if (it != _documents.end())
+{
+const unsigned nSessionId = Util::decodeId(tokens[2]);
+it->second.removeView(nSessionId);
+}
+}
+else if (tokens[0] == "rmdoc")
+{
+removeDocument(std::stoi(tokens[1]));
+}
+
+notify(data);
+}
+
+std::string AdminModel::query(const std::string command)
+{
+StringTokenizer tokens(command, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
+
+if (tokens[0] == "documents")
+{
+return getDocuments();
+}
+else if (tokens[0] == "active_users_count")
+{
+return std::to_string(getTotalActiveViews());
+}
+else if (tokens[0] == "active_docs_count")
+{
+return std::to_string(_documents.size());
+}
+else if (tokens[0] == "mem_stats")
+{
+return getMemStats();
+}
+else if (tokens[0] == "mem_stats_size")
+{
+return std::to_string(_memStatsSize);
+}
+else if (tokens[0] == "cpu_stats")
+{
+return getCpuStats();
+}
+else if (tokens[0] == "cpu_stats_size")
+{
+return std::to_string(_cpuStatsSize);
+}
+
+return std::string("");
+}
+
+/// Returns memory consumed by all active loolkit proce

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

2016-03-31 Thread Andras Timar
 0 files changed

New commits:
commit e328d5f590c4e9c49f6ae69bfcdb997f8af4cad7
Author: Andras Timar 
Date:   Thu Mar 31 09:15:54 2016 +0200

loleaflet: remove empty po files

diff --git a/loleaflet/po/styles/az.po b/loleaflet/po/styles/az.po
deleted file mode 100644
index e69de29..000
diff --git a/loleaflet/po/styles/jv.po b/loleaflet/po/styles/jv.po
deleted file mode 100644
index e69de29..000
diff --git a/loleaflet/po/styles/sah.po b/loleaflet/po/styles/sah.po
deleted file mode 100644
index e69de29..000
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits