[Libreoffice-commits] core.git: external/clew include/osl include/svx nlpsolver/ThirdParty reportbuilder/java sc/qa scripting/java svx/inc toolkit/test

2018-01-26 Thread Andrea Gelmini
 external/clew/source/clew.c
   |2 -
 include/osl/socket.h   
   |   10 
 include/svx/sdr/properties/defaultproperties.hxx   
   |2 -
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java   
   |4 +--
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/AbstractReportElementLayoutController.java
  |2 -
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/OfficeDetailLayoutController.java
   |2 -
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/OfficeGroupInstanceSectionLayoutController.java
 |2 -
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/OfficeGroupLayoutController.java
|2 -
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/OfficeReportLayoutController.java
   |2 -
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java
   |2 -
 sc/qa/complex/calcPreview/ViewForwarder.java   
   |   12 +-
 scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java
   |2 -
 svx/inc/sdr/properties/groupproperties.hxx 
   |2 -
 toolkit/test/accessibility/EventQueue.java 
   |4 +--
 14 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 5c0af52feb2a392135489e0c1516cf4566d132cf
Author: Andrea Gelmini 
Date:   Fri Jan 26 11:21:14 2018 +0100

Fix typos

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

diff --git a/external/clew/source/clew.c b/external/clew/source/clew.c
index d82235a8715b..4ed80035d3a5 100644
--- a/external/clew/source/clew.c
+++ b/external/clew/source/clew.c
@@ -160,7 +160,7 @@ int clewInit(const char* path)
 
 if (error)
 {
-//  Failure queing atexit, shutdown with error
+//  Failure queueing atexit, shutdown with error
 CLCC_DYNLIB_CLOSE(module);
 module = NULL;
 
diff --git a/include/osl/socket.h b/include/osl/socket.h
index 36e6b0b35bad..97b0cdf429cf 100644
--- a/include/osl/socket.h
+++ b/include/osl/socket.h
@@ -413,7 +413,7 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_sendToSocket(
 You can specify a timeout-value in seconds/microseconds that denotes
 how long the operation will block if the Socket is not ready.
 
-@param Socket the Socket to perfom the operation on.
+@param Socket the Socket to perform the operation on.
 @param pTimeout if NULL, the operation will block without a timeout.
 
 @retval sal_True if read operations (recv, recvFrom, accept) on the Socket
@@ -428,7 +428,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isReceiveReady(
 You can specify a timeout-value in seconds/microseconds that denotes
 how long the operation will block if the Socket is not ready.
 
-@param Socket the Socket to perfom the operation on.
+@param Socket the Socket to perform the operation on.
 @param pTimeout if NULL, the operation will block without a timeout. 
Otherwise
 the time define by timeout value.
 
@@ -444,7 +444,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isSendReady(
 You can specify a timeout-value in seconds/microseconds that denotes
 how long the operation will block if the Socket has no pending OOB data.
 
-@param Socket the Socket to perfom the operation on.
+@param Socket the Socket to perform the operation on.
 @param pTimeout if NULL, the operation will block without a timeout.
 
 @retval sal_True if OOB-request operations (recv with appropriate flags)
@@ -456,7 +456,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isExceptionPending(
 const TimeValue* pTimeout);
 
 /** Shuts down communication on a connected socket.
-@param[in] Socket the Socket to perfom the operation on.
+@param[in] Socket the Socket to perform the operation on.
 @param[in] Direction
 @parblock
 Direction denotes which end of the socket should be closed:
@@ -799,7 +799,7 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL 
osl_getInetPortOfSocketAddr(
 
 
 /** Sets the Port of Addr.
-@param[in] Addr the SocketAddr to perfom the operation on.
+@param[in] Addr the SocketAddr to perform the operation on.
 @param[in] Port is expected in host byte-order.
 @retval sal_False if Addr is not an inet-addr.
 */
diff --git a/include/svx/sdr/properties/defaultproperties.hx

[Libreoffice-commits] core.git: extensions/qa filter/qa framework/qa jurt/com qadevOOo/tests toolkit/test

2018-01-26 Thread Andrea Gelmini
 extensions/qa/integration/extensions/ServicesHandler.java   |4 
+-
 filter/qa/complex/filter/misc/FinalizedMandatoryTest.java   |2 
-
 framework/qa/complex/framework/autosave/Protocol.java   |2 
-
 jurt/com/sun/star/lib/uno/environments/java/java_environment.java   |2 
-
 qadevOOo/tests/java/ifc/awt/_XScrollBar.java|   14 
+-
 qadevOOo/tests/java/ifc/awt/_XSpinValue.java|   12 

 qadevOOo/tests/java/ifc/datatransfer/clipboard/_XClipboard.java |2 
-
 qadevOOo/tests/java/ifc/datatransfer/clipboard/_XClipboardNotifier.java |2 
-
 qadevOOo/tests/java/mod/_forms/GenericModelTest.java|2 
-
 qadevOOo/tests/java/mod/_sc/ScCellCursorObj.java|2 
-
 qadevOOo/tests/java/mod/_sc/ScCellRangeObj.java |2 
-
 qadevOOo/tests/java/mod/_sc/ScTabViewObj.java   |2 
-
 qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java|2 
-
 qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java  |2 
-
 qadevOOo/tests/java/mod/_sw/SwXTextTable.java   |2 
-
 qadevOOo/tests/java/mod/_sw/SwXTextView.java|2 
-
 toolkit/test/accessibility/ov/ListeningObjectView.java  |2 
-
 17 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 73ded2398e2e99f6604f6b76d4129163fffd462f
Author: Andrea Gelmini 
Date:   Fri Jan 26 11:12:03 2018 +0100

Fix typos

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

diff --git a/extensions/qa/integration/extensions/ServicesHandler.java 
b/extensions/qa/integration/extensions/ServicesHandler.java
index 4382c84f4067..6152a3befa23 100644
--- a/extensions/qa/integration/extensions/ServicesHandler.java
+++ b/extensions/qa/integration/extensions/ServicesHandler.java
@@ -94,12 +94,12 @@ public class ServicesHandler implements XPropertyHandler
 
 public void addEventListener(com.sun.star.lang.XEventListener 
_eventListener)
 {
-// ingnoring this
+// ignoring this
 }
 
 public void 
addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener 
_propertyChangeListener) throws com.sun.star.lang.NullPointerException
 {
-// ingnoring this
+// ignoring this
 }
 
 public Object convertToControlValue(String _propertyName, Object 
_propertyValue, com.sun.star.uno.Type type) throws 
com.sun.star.beans.UnknownPropertyException
diff --git a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java 
b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java
index a0bcdcb9921d..0a2266685995 100644
--- a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java
+++ b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java
@@ -97,7 +97,7 @@ public class FinalizedMandatoryTest
 
 Object oInterface = xMSF.createInstance(serviceName);
 
-assertNotNull("Service wan't created", oInterface);
+assertNotNull("Service wasn't created", oInterface);
 return (XInterface) oInterface;
 }
 
diff --git a/framework/qa/complex/framework/autosave/Protocol.java 
b/framework/qa/complex/framework/autosave/Protocol.java
index 8f329246eec8..1095ef9a035f 100644
--- a/framework/qa/complex/framework/autosave/Protocol.java
+++ b/framework/qa/complex/framework/autosave/Protocol.java
@@ -725,7 +725,7 @@ public class Protocol extends JComponent
 
 
 /**
- * it trys to convert the given any into a suitable string notation .-)
+ * it tries to convert the given any into a suitable string notation .-)
 */
 private synchronized void impl_logAny( /*OUT*/ StringBuffer sOut ,
/*IN */ Object   aAny )
diff --git a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java 
b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java
index 6e6a35a8a905..89e4b10880ca 100644
--- a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java
+++ b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java
@@ -140,7 +140,7 @@ public final class java_environment implements IEnvironment 
{
 // Java side, and recorded in the java_environment.  The same OID is then
 // bridged in over another bridge B.  If there were only one
 // java_environment shared by both bridges, the proxy from bridge A would 
be
-// reused.  If now bridge A is taken down programatically (e.g., because
+// reused.  If now bridge A is taken down programmatically (e.g., because
 // some controlling code somehow deduced that no objects are mapped over
 // that bridge any longer), but the proxy is still used by bridge B, using
 // the proxy would now result in errors.  The explicit API t

[Libreoffice-commits] core.git: chart2/source include/comphelper sfx2/source svx/inc toolkit/source vcl/unx

2018-01-26 Thread Andrea Gelmini
 chart2/source/tools/LifeTime.cxx  |2 +-
 include/comphelper/numberedcollection.hxx |2 +-
 sfx2/source/view/viewfrm.cxx  |4 ++--
 svx/inc/sdr/properties/customshapeproperties.hxx  |2 +-
 svx/inc/sdr/properties/emptyproperties.hxx|2 +-
 toolkit/source/controls/controlmodelcontainerbase.cxx |8 
 vcl/unx/generic/print/common_gfx.cxx  |6 +++---
 7 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 72c68a3d1768ea2e05671aee3b2a0db8d87c9e86
Author: Andrea Gelmini 
Date:   Fri Jan 26 11:37:23 2018 +0100

Fix typos

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

diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 6ffe8849f1da..b16da9df71e1 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -404,7 +404,7 @@ bool CloseableLifeTimeManager::impl_canStartApiCall()
 bool LifeTimeGuard::startApiCall(bool bLongLastingCall)
 {
 //Mutex needs to be acquired exactly ones; will be released inbetween
-//mutex is requiered due to constructor of LifeTimeGuard
+//mutex is required due to constructor of LifeTimeGuard
 
 OSL_ENSURE( !m_bCallRegistered, "this method is only allowed ones" );
 if(m_bCallRegistered)
diff --git a/include/comphelper/numberedcollection.hxx 
b/include/comphelper/numberedcollection.hxx
index 638641568d21..f004e0a31dcf 100644
--- a/include/comphelper/numberedcollection.hxx
+++ b/include/comphelper/numberedcollection.hxx
@@ -126,7 +126,7 @@ class COMPHELPER_DLLPUBLIC NumberedCollection : private 
::cppu::BaseMutex
 private:
 
 
-/** @short  trys to find an unique number not already used within this 
collection.
+/** @short  tries to find an unique number not already used within 
this collection.
 
 @descr  It reuses the smallest number which isn't used by any 
component
 of this collection. (fragmentation!) If collection is full 
(means there
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index dd265c2769a6..7a5a536bb46e 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -827,7 +827,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
 else
 {
 // If any ChildFrame is reloadable, the slot is enabled,
-// so you can perfom CTRL-Reload
+// so you can perform CTRL-Reload
 rSet.Put( SfxBoolItem( nWhich, false));
 }
 
@@ -2062,7 +2062,7 @@ void SfxViewFrame::ExecView_Impl
 return;
 }
 
-// Get ViewData of FrameSets recursivly.
+// Get ViewData of FrameSets recursively.
 GetFrame().GetViewData_Impl();
 SfxMedium* pMed = GetObjectShell()->GetMedium();
 
diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx 
b/svx/inc/sdr/properties/customshapeproperties.hxx
index e056f21a106f..4abe7a50861a 100644
--- a/svx/inc/sdr/properties/customshapeproperties.hxx
+++ b/svx/inc/sdr/properties/customshapeproperties.hxx
@@ -53,7 +53,7 @@ namespace sdr
 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
 
 // clear single item direct, do not do any notifies or things like 
that.
-// Also supports complete deleteion of items when default 
parameter 0 is used.
+// Also supports complete deletion of items when default parameter 
0 is used.
 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) 
override;
 
 public:
diff --git a/svx/inc/sdr/properties/emptyproperties.hxx 
b/svx/inc/sdr/properties/emptyproperties.hxx
index 4da4be720ef3..8163eacfc4f0 100644
--- a/svx/inc/sdr/properties/emptyproperties.hxx
+++ b/svx/inc/sdr/properties/emptyproperties.hxx
@@ -72,7 +72,7 @@ namespace sdr
 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
 
 // clear single item direct, do not do any notifies or things like 
that.
-// Also supports complete deleteion of items when default 
parameter 0 is used.
+// Also supports complete deletion of items when default parameter 
0 is used.
 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) 
override;
 
 // set complete item set
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx 
b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 88012e542899..1135c52c68fe 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -494,7 +494,7 @@ void ControlModelContainerBase::replaceByName( const 
OUString& aName, const Any&
 {
 // remove old control (and c

[Libreoffice-commits] core.git: editeng/source include/animations qadevOOo/tests sd/source UnoControls/source

2018-01-26 Thread Andrea Gelmini
 UnoControls/source/controls/progressmonitor.cxx  |2 +-
 editeng/source/lookuptree/Trie.cxx   |2 +-
 include/animations/animationnodehelper.hxx   |2 +-
 qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java |2 +-
 sd/source/ui/animations/CustomAnimationList.cxx  |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit ba8c04a6fc7d1931b4417af99aa0b45091747d83
Author: Andrea Gelmini 
Date:   Fri Jan 26 12:52:26 2018 +0100

Fix typos

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

diff --git a/UnoControls/source/controls/progressmonitor.cxx 
b/UnoControls/source/controls/progressmonitor.cxx
index 74e43d05dfb2..d7296e871639 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -487,7 +487,7 @@ void SAL_CALL ProgressMonitor::dispose ()
 removeControl ( xRef_Button );
 removeControl ( m_xProgressBar.get() );
 
-// do'nt use "...->clear ()" or "... = XFixedText ()"
+// don't use "...->clear ()" or "... = XFixedText ()"
 // when other hold a reference at this object !!!
 xRef_Topic_Top->dispose ();
 xRef_Text_Top->dispose  ();
diff --git a/editeng/source/lookuptree/Trie.cxx 
b/editeng/source/lookuptree/Trie.cxx
index 0badcd99703c..184330ef4f2f 100644
--- a/editeng/source/lookuptree/Trie.cxx
+++ b/editeng/source/lookuptree/Trie.cxx
@@ -104,7 +104,7 @@ void TrieNode::collectSuggestionsForCurrentNode(TrieNode* 
pCurrent, const OUStri
 {
 rSuggestionList.push_back(aStringPath);
 }
-// recursivly descend tree
+// recursively descend tree
 pCurrent->collectSuggestions(aStringPath, rSuggestionList);
 }
 
diff --git a/include/animations/animationnodehelper.hxx 
b/include/animations/animationnodehelper.hxx
index 364e0ad0847b..a72233a9d3ba 100644
--- a/include/animations/animationnodehelper.hxx
+++ b/include/animations/animationnodehelper.hxx
@@ -36,7 +36,7 @@ namespace anim
 // only a function pointer, and a thin templated wrapper around
 // that which converts member functions into that.
 
-/** pushes the given node to the given vector and recursivly calls itself 
for each child node.
+/** pushes the given node to the given vector and recursively calls itself 
for each child node.
 */
 inline void create_deep_vector( const css::uno::Reference< 
css::animations::XAnimationNode >& xNode,
 std::vector< css::uno::Reference< 
css::animations::XAnimationNode > >& rVector )
diff --git a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java 
b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java
index 1efea375cb35..99dc87240d01 100644
--- a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java
+++ b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java
@@ -159,7 +159,7 @@ public class SdXCustomPresentationAccess extends TestCase {
 tEnv.addObjRelation("INSTANCE" + n, oInstance);
 }
 } catch (com.sun.star.uno.Exception e) {
-log.println("Could't adding INSTANCEn: " + e);
+log.println("Couldn't adding INSTANCEn: " + e);
 }
 
 return tEnv;
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index 58d6d6b475b1..b55f53e54022 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -69,7 +69,7 @@ using ::com::sun::star::beans::XPropertySetInfo;
 
 namespace sd {
 
-// go recursivly through all shapes in the given XShapes collection and return 
true as soon as the
+// go recursively through all shapes in the given XShapes collection and 
return true as soon as the
 // given shape is found. nIndex is incremented for each shape with the same 
shape type as the given
 // shape is found until the given shape is found.
 static bool getShapeIndex(  const Reference< XShapes >& xShapes, const 
Reference< XShape >& xShape, sal_Int32& nIndex )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Jens Carl
 sc/qa/extras/scautoformatobj.cxx |   22 +++---
 1 file changed, 3 insertions(+), 19 deletions(-)

New commits:
commit 05e4ffc1e67656c2c25caf9e51198127cafe363b
Author: Jens Carl 
Date:   Sat Jan 27 01:11:05 2018 +

Remove shared mxComponent in scautoformatobj

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

diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx
index bf5722e7159a..27d96f94f2fe 100644
--- a/sc/qa/extras/scautoformatobj.cxx
+++ b/sc/qa/extras/scautoformatobj.cxx
@@ -25,8 +25,6 @@ using namespace com::sun::star;
 
 namespace sc_apitest
 {
-#define NUMBER_OF_TESTS 1
-
 class ScTableAutoFormatObj : public CalcUnoApiTest, public 
apitest::TableAutoFormat
 {
 public:
@@ -44,13 +42,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference mxComponent;
+uno::Reference mxComponent;
 };
 
-sal_Int32 ScTableAutoFormatObj::nTest = 0;
-uno::Reference ScTableAutoFormatObj::mxComponent;
-
 ScTableAutoFormatObj::ScTableAutoFormatObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -58,10 +52,6 @@ ScTableAutoFormatObj::ScTableAutoFormatObj()
 
 uno::Reference ScTableAutoFormatObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -76,19 +66,13 @@ uno::Reference ScTableAutoFormatObj::init()
 
 void ScTableAutoFormatObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScTableAutoFormatObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Jens Carl
 sc/qa/extras/scarealinkobj.cxx  |   22 +++---
 sc/qa/extras/scarealinksobj.cxx |   22 +++---
 2 files changed, 6 insertions(+), 38 deletions(-)

New commits:
commit 926ce174109c6e140012bf2dca92650f38d7e9ba
Author: Jens Carl 
Date:   Sat Jan 27 01:09:24 2018 +

Remove shared mxComponent in scarealinksobj

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

diff --git a/sc/qa/extras/scarealinksobj.cxx b/sc/qa/extras/scarealinksobj.cxx
index 21a90ee6f6c0..df65526c8d0f 100644
--- a/sc/qa/extras/scarealinksobj.cxx
+++ b/sc/qa/extras/scarealinksobj.cxx
@@ -22,8 +22,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 2
-
 class ScAreaLinksObj : public CalcUnoApiTest, public apitest::XAreaLinks
 {
 public:
@@ -42,14 +40,10 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 
 };
 
-sal_Int32 ScAreaLinksObj::nTest = 0;
-uno::Reference< lang::XComponent > ScAreaLinksObj::mxComponent;
-
 ScAreaLinksObj::ScAreaLinksObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -57,10 +51,6 @@ ScAreaLinksObj::ScAreaLinksObj()
 
 uno::Reference< uno::XInterface > ScAreaLinksObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -72,19 +62,13 @@ uno::Reference< uno::XInterface > ScAreaLinksObj::init()
 
 void ScAreaLinksObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScAreaLinksObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
commit 06d3f998658c677a42934369a72b18d70165552b
Author: Jens Carl 
Date:   Fri Jan 26 23:14:08 2018 +

Remove shared mxComponent in scarealinkobj

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

diff --git a/sc/qa/extras/scarealinkobj.cxx b/sc/qa/extras/scarealinkobj.cxx
index c84d0964dbb9..c0c8c6c9b188 100644
--- a/sc/qa/extras/scarealinkobj.cxx
+++ b/sc/qa/extras/scarealinkobj.cxx
@@ -27,8 +27,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 9
-
 class ScAreaLinkObj : public CalcUnoApiTest, public apitest::CellAreaLink, 
public apitest::XAreaLink
 {
 public:
@@ -56,14 +54,10 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 
 };
 
-sal_Int32 ScAreaLinkObj::nTest = 0;
-uno::Reference< lang::XComponent > ScAreaLinkObj::mxComponent;
-
 ScAreaLinkObj::ScAreaLinkObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -71,10 +65,6 @@ ScAreaLinkObj::ScAreaLinkObj()
 
 uno::Reference< uno::XInterface > ScAreaLinkObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -90,19 +80,13 @@ uno::Reference< uno::XInterface > ScAreaLinkObj::init()
 
 void ScAreaLinkObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScAreaLinkObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Manfred Blume
 sw/source/core/layout/tabfrm.cxx |   57 ---
 1 file changed, 41 insertions(+), 16 deletions(-)

New commits:
commit 68cda6b424723129647108a7f5655fb80c85dad1
Author: Manfred Blume 
Date:   Thu Jan 25 15:46:57 2018 +0100

tdf#114306 fix crash caused by special document

Regression from 18765b9fa739337d2d891513f6e2fb7c3ce23b50

chnage signature of
static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom )
to
static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom )

Reviewed-on: https://gerrit.libreoffice.org/48613
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit e4400f4c4e267f8528df3a7d5a09623c888bd10c)

Conflicts:
sw/source/core/layout/tabfrm.cxx

Change-Id: Ie00435aa4bffa3d2e49896aea6894ae999a5536a

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c38c11d67d69..c25fa113dbe4 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -179,7 +179,7 @@ void SwTabFrame::RegistFlys()
 }
 
 void SwInvalidateAll( SwFrame *pFrame, long nBottom );
-static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom );
+static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
 static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva );
 // #i26945# - add parameter <_bOnlyRowsAndCells> to control
 // that only row and cell frames are formatted.
@@ -303,7 +303,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& 
_rLayoutFrame,
 }
 }
 
-// Local helper function to shrink all lowers of rRow to 0 height
+// Local helper function to shrink all lowers of pRow to 0 height
 static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
 {
 SwCellFrame* pCurrMasterCell = static_cast(rRow.Lower());
@@ -672,7 +672,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, 
SwRowFrame& rFollowLine,
 }
 
 // Do the recalculation
-lcl_RecalcRow( rLastLine, LONG_MAX );
+lcl_RecalcRow( &rLastLine, LONG_MAX );
 // #115759# - force a format of the last line in order to
 // get the correct height.
 rLastLine.InvalidateSize();
@@ -1505,7 +1505,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
 return bRet;
 }
 
-static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom )
+static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom )
 {
 // FME 2007-08-30 #i81146# new loop control
 int nLoopControlRuns_1 = 0;
@@ -1519,7 +1519,7 @@ static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom 
)
 int nLoopControlRuns_2 = 0;
 sal_uInt16 nLoopControlStage_2 = 0;
 
-while( lcl_InnerCalcLayout( &rRow, nBottom ) )
+while( lcl_InnerCalcLayout( pRow, nBottom ) )
 {
 if ( ++nLoopControlRuns_2 > nLoopControlMax )
 {
@@ -1528,7 +1528,7 @@ static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom 
)
 OSL_ENSURE( 1 != nLoopControlStage_2, "LoopControl_2 in 
lcl_RecalcRow: Stage 2!!" );
 OSL_ENSURE( 2 >  nLoopControlStage_2, "LoopControl_2 in 
lcl_RecalcRow: Stage 3!!!" );
 #endif
-rRow.ValidateThisAndAllLowers( nLoopControlStage_2++ );
+pRow->ValidateThisAndAllLowers( nLoopControlStage_2++ );
 nLoopControlRuns_2 = 0;
 if( nLoopControlStage_2 > 2 )
 break;
@@ -1541,14 +1541,39 @@ static void lcl_RecalcRow( SwRowFrame& rRow, long 
nBottom )
 {
 // #115759# - force another format of the
 // lowers, if at least one of it was invalid.
-bCheck = SwContentFrame::CalcLowers( &rRow, rRow.GetUpper(), 
nBottom, true );
+
+// tdf#114306 writer may crash because pRow points to a deleted 
SwRowFrame
+SwRowFrame* pOriginalRow = pRow;
+OSL_ENSURE(pOriginalRow->GetUpper() && 
pOriginalRow->GetUpper()->IsTabFrame(), "No table");
+SwTabFrame* pOriginalTab = 
static_cast(pRow->GetUpper());
+
+bCheck = SwContentFrame::CalcLowers( pRow, pRow->GetUpper(), 
nBottom, true );
+
+bool bRowStillExists = false;
+SwFrame* pTestRow = pOriginalTab->Lower();
+
+while (pTestRow)
+{
+if (pTestRow == pRow)
+{
+bRowStillExists = true;
+break;
+}
+pTestRow = pTestRow->GetNext();
+}
+
+if (!bRowStillExists)
+{
+SAL_WARN("sw.layout", "no row anymore at " << pRow);
+return;
+}
 
 // NEW TABLES
 // First we calculate the cells with row span of < 1, afterwards
 // all cells with row span of > 1:
 for ( int i = 0; i < 2; ++i )
 {
-SwCellFrame* pCellFrame = 
static_cast(rRow.Lower());
+SwCellFrame* pCellFrame = 
static_cas

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

2018-01-26 Thread Olivier Hallot
 source/text/scalc/01/func_webservice.xhp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5be1429f1ad6ac472836097516ab3cd0681ecf38
Author: Olivier Hallot 
Date:   Fri Jan 26 20:57:40 2018 -0200

tdf#92430 Better example for =WEBSERVICE()

And =FILTERXML()

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

diff --git a/source/text/scalc/01/func_webservice.xhp 
b/source/text/scalc/01/func_webservice.xhp
index dec173775..5f3cc5d67 100644
--- a/source/text/scalc/01/func_webservice.xhp
+++ b/source/text/scalc/01/func_webservice.xhp
@@ -25,8 +25,8 @@
  WEBSERVICE(URI)
  URI:  URI text of the web service.
  Example
- =WEBSERVICE("http://api.openweathermap.org/data/2.5/forecast?q=Copenhagen,dk&mode=xml&units=metric";)
 
- Returns 
the web page content of 
"http://api.openweathermap.org/data/2.5/forecast?q=Copenhagen,dk&mode=xml&units=metric";
+ =WEBSERVICE("wiki.documentfoundation.org/api.php?hidebots=1&days=7&limit=50&action=feedrecentchanges&feedformat=rss")
+ Returns 
the web page content of 
"http://wiki.documentfoundation.org/api.php?hidebots=1&days=7&limit=50&action=feedrecentchanges&feedformat=rss";.


   
@@ -40,8 +40,8 @@
  XML 
Document (required): String containing a valid XML stream.
  XPath expression (required): String containing a 
valid XPath expression.
  Example
- =FILTERXML(WEBSERVICE("http://api.openweathermap.org/data/2.5/forecast?q=Copenhagen,dk&mode=xml&units=metric";);"number(/weatherdata/forecast/time[2]/temperature/@value)")
-  Returns 
information on Copenhagen weather temperature.
+ =FILTERXML(WEBSERVICE("wiki.documentfoundation.org/api.php?hidebots=1&days=7&limit=50&action=feedrecentchanges&feedformat=rss");"//lastBuildDate")
+  Returns 
information on the last build date of the wiki.

  
-
\ 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

2018-01-26 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2765189d8bca11a403fe5597f565964a4e6fe019
Author: Olivier Hallot 
Date:   Fri Jan 26 20:57:40 2018 -0200

Updated core
Project: help  5be1429f1ad6ac472836097516ab3cd0681ecf38

tdf#92430 Better example for =WEBSERVICE()

And =FILTERXML()

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

diff --git a/helpcontent2 b/helpcontent2
index 854f87b82b23..5be1429f1ad6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 854f87b82b23d5409b4a3f6cea8628324fb238cc
+Subproject commit 5be1429f1ad6ac472836097516ab3cd0681ecf38
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Eike Rathke
 sc/source/ui/dbgui/asciiopt.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 53a813c3d26932ac11b868c7bc27b50fe45d6f82
Author: Eike Rathke 
Date:   Fri Jan 26 23:50:30 2018 +0100

Add blank lines for readability

Change-Id: I78b12b5d79b31c370154cc4880413cbae6760edc

diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index d699b4ea3675..d8ea57518e93 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -194,7 +194,8 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
 bSaveAsShown = rString.getToken(0, ',', nPos) == "true";
 }
 else
-bSaveAsShown = true;//default value
+bSaveAsShown = true;// default value
+
 // Token 9: used for "Save cell formulas" in export options
 if ( nPos >= 0 )
 {
@@ -202,6 +203,7 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
 }
 else
 bSaveFormulas = false;
+
 // Token 10: Boolean for Trim spaces.
 if (nPos >= 0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Manfred Blume
 sw/qa/extras/uiwriter/data/fdo114306_2.odt |binary
 sw/qa/extras/uiwriter/uiwriter.cxx |   13 ++
 sw/source/core/layout/tabfrm.cxx   |   57 -
 3 files changed, 54 insertions(+), 16 deletions(-)

New commits:
commit e4400f4c4e267f8528df3a7d5a09623c888bd10c
Author: Manfred Blume 
Date:   Thu Jan 25 15:46:57 2018 +0100

tdf#114306 fix crash caused by special document

Regression from 18765b9fa739337d2d891513f6e2fb7c3ce23b50

chnage signature of
static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom )
to
static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom )

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

diff --git a/sw/qa/extras/uiwriter/data/fdo114306_2.odt 
b/sw/qa/extras/uiwriter/data/fdo114306_2.odt
new file mode 100755
index ..b4bebc58add5
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/fdo114306_2.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 6f4903f98d2f..4789d2d39829 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -294,6 +294,7 @@ public:
 void testTdf113790();
 void testTdf108048();
 void testTdf114306();
+void testTdf114306_2();
 void testTdf113481();
 void testTdf115013();
 void testTdf114536();
@@ -471,6 +472,7 @@ public:
 CPPUNIT_TEST(testTdf113790);
 CPPUNIT_TEST(testTdf108048);
 CPPUNIT_TEST(testTdf114306);
+CPPUNIT_TEST(testTdf114306_2);
 CPPUNIT_TEST(testTdf113481);
 CPPUNIT_TEST(testTdf115013);
 CPPUNIT_TEST(testTdf114536);
@@ -5290,6 +5292,17 @@ void SwUiWriterTest::testTdf114306()
 assertXPath(pXmlDoc, "/root/page[2]/body/tab[1]/row[1]/cell[1]/txt", 1);
 }
 
+void SwUiWriterTest::testTdf114306_2()
+{
+// tdf#114306 fix unexpected page break in row-spanned table
+// load regression document without writer crash
+load(DATA_DIRECTORY, "fdo114306_2.odt");
+
+// correct number of pages
+CPPUNIT_ASSERT_EQUAL(4, getPages());
+}
+
+
 // During insert of the document with list inside into the main document 
inside the list
 // we should merge both lists into one, when they have the same list properties
 void SwUiWriterTest::testTdf113877()
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f1e2e2e56fff..d0f2ba26 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -163,7 +163,7 @@ void SwTabFrame::RegistFlys()
 }
 
 void SwInvalidateAll( SwFrame *pFrame, long nBottom );
-static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom );
+static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
 static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva );
 // #i26945# - add parameter <_bOnlyRowsAndCells> to control
 // that only row and cell frames are formatted.
@@ -289,7 +289,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& 
_rLayoutFrame,
 }
 }
 
-// Local helper function to shrink all lowers of rRow to 0 height
+// Local helper function to shrink all lowers of pRow to 0 height
 static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
 {
 SwCellFrame* pCurrMasterCell = static_cast(rRow.Lower());
@@ -681,7 +681,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, 
SwRowFrame& rFollowLine,
 rLastLine.SetInSplit();
 
 // Do the recalculation
-lcl_RecalcRow( rLastLine, LONG_MAX );
+lcl_RecalcRow( &rLastLine, LONG_MAX );
 // #115759# - force a format of the last line in order to
 // get the correct height.
 rLastLine.InvalidateSize();
@@ -1555,7 +1555,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
 return bRet;
 }
 
-static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom )
+static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom )
 {
 // FME 2007-08-30 #i81146# new loop control
 int nLoopControlRuns_1 = 0;
@@ -1569,14 +1569,14 @@ static void lcl_RecalcRow( SwRowFrame& rRow, long 
nBottom )
 int nLoopControlRuns_2 = 0;
 sal_uInt16 nLoopControlStage_2 = 0;
 
-while( lcl_InnerCalcLayout( &rRow, nBottom ) )
+while( lcl_InnerCalcLayout( pRow, nBottom ) )
 {
 if ( ++nLoopControlRuns_2 > nLoopControlMax )
 {
 SAL_WARN_IF(nLoopControlStage_2 == 0, "sw.layout", 
"LoopControl_2 in lcl_RecalcRow: Stage 1!");
 SAL_WARN_IF(nLoopControlStage_2 == 1, "sw.layout", 
"LoopControl_2 in lcl_RecalcRow: Stage 2!!");
 SAL_WARN_IF(nLoopControlStage_2 >= 2, "sw.layout", 
"LoopControl_2 in lcl_RecalcRow: Stage 3!!!");
-rRow.ValidateThisAndAllLowers( nLoopControlStage_2++ );
+pRow->ValidateThisAndAllLowers( nLoopControlStage_2++ );
 nLoopControlRuns_2 = 0;
 if( nLoopControlS

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

2018-01-26 Thread Bjoern Michaelsen
 sw/inc/calbck.hxx   |1 +
 sw/source/core/attr/calbck.cxx  |8 
 sw/source/core/attr/format.cxx  |   17 ++---
 sw/source/core/doc/acmplwrd.cxx |5 +
 sw/source/core/doc/docftn.cxx   |   36 +++-
 sw/source/core/doc/lineinfo.cxx |8 ++--
 sw/source/core/doc/number.cxx   |5 +
 7 files changed, 26 insertions(+), 54 deletions(-)

New commits:
commit ced60a5fa7824caff07846d7dd8abad3c0f31b55
Author: Bjoern Michaelsen 
Date:   Fri Jan 26 02:16:21 2018 +0100

introduce SwClient::StartListeningToSameModifyAs

- ... as it is a common pattern

Change-Id: Ie6a9b803e1e763fb0c01d808fac107df88f79460
Reviewed-on: https://gerrit.libreoffice.org/48647
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 06b6266bd32d..ea4181a190ea 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -133,6 +133,7 @@ public:
 const SwModify* GetRegisteredIn() const { return m_pRegisteredIn; }
 SwModify* GetRegisteredIn() { return m_pRegisteredIn; }
 void EndListeningAll();
+void StartListeningToSameModifyAs(const SwClient&);
 
 
 // get information about attribute
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 400792527a00..98376e649a93 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -68,6 +68,14 @@ void SwClient::SwClientNotify(const SwModify&, const 
SfxHint& rHint)
 }
 };
 
+void SwClient::StartListeningToSameModifyAs(const SwClient& other)
+{
+if(other.m_pRegisteredIn)
+other.m_pRegisteredIn->Add(this);
+else
+EndListeningAll();
+}
+
 void SwClient::EndListeningAll()
 {
 if(m_pRegisteredIn)
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index f526a300cbef..3ef7ada2ffcb 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -125,19 +125,14 @@ SwFormat &SwFormat::operator=(const SwFormat& rFormat)
 ModifyNotification( &aChgOld, &aChgNew ); // send all modified ones
 }
 
-if( GetRegisteredIn() != rFormat.GetRegisteredIn() )
+if(GetRegisteredIn() != rFormat.GetRegisteredIn())
 {
-EndListeningAll();
-if( rFormat.GetRegisteredIn() )
-{
-
const_cast(rFormat).GetRegisteredInNonConst()->Add(this);
-m_aSet.SetParent( &rFormat.m_aSet );
-}
-else
-{
-m_aSet.SetParent( nullptr );
-}
+StartListeningToSameModifyAs(rFormat);
+m_aSet.SetParent( GetRegisteredIn()
+? &rFormat.m_aSet
+: nullptr);
 }
+
 m_bAutoFormat = rFormat.m_bAutoFormat;
 m_bHidden = rFormat.m_bHidden;
 m_bAutoUpdateFormat = rFormat.m_bAutoUpdateFormat;
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 90a2ac2d148c..77a887b21f95 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -133,10 +133,7 @@ SwAutoCompleteClient& 
SwAutoCompleteClient::operator=(const SwAutoCompleteClient
 {
 pAutoCompleteWord = rClient.pAutoCompleteWord;
 pDoc = rClient.pDoc;
-if(rClient.GetRegisteredIn())
-const_cast(rClient.GetRegisteredIn())->Add(this);
-else
-EndListeningAll();
+StartListeningToSameModifyAs(rClient);
 return *this;
 }
 
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 66b2587c5855..3ddfcf96c9ee 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -39,26 +39,10 @@
 
 SwEndNoteInfo& SwEndNoteInfo::operator=(const SwEndNoteInfo& rInfo)
 {
-if( rInfo.GetFootnoteTextColl() )
-rInfo.GetFootnoteTextColl()->Add(this);
-else
-EndListeningAll();
-
-if ( rInfo.aPageDescDep.GetRegisteredIn() )
-const_cast(rInfo.aPageDescDep.GetRegisteredIn())->Add( 
&aPageDescDep );
-else
-aPageDescDep.EndListeningAll();
-
-if ( rInfo.aCharFormatDep.GetRegisteredIn() )
-const_cast(rInfo.aCharFormatDep.GetRegisteredIn())->Add( 
&aCharFormatDep );
-else
-aCharFormatDep.EndListeningAll();
-
-if ( rInfo.aAnchorCharFormatDep.GetRegisteredIn() )
-
const_cast(rInfo.aAnchorCharFormatDep.GetRegisteredIn())->Add(
-&aAnchorCharFormatDep );
-else
-aAnchorCharFormatDep.EndListeningAll();
+StartListeningToSameModifyAs(rInfo);
+aPageDescDep.StartListeningToSameModifyAs(rInfo.aPageDescDep);
+aCharFormatDep.StartListeningToSameModifyAs(rInfo.aCharFormatDep);
+
aAnchorCharFormatDep.StartListeningToSameModifyAs(rInfo.aAnchorCharFormatDep);
 
 aFormat = rInfo.aFormat;
 nFootnoteOffset = rInfo.nFootnoteOffset;
@@ -95,15 +79,9 @@ SwEndNoteInfo::SwEndNoteInfo(const SwEndNoteInfo& rInfo) :
 aFormat( rInfo.aFormat ),
 nFootnoteOffset( rInfo.nFootnoteOffset )
 {
-if( rInf

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

2018-01-26 Thread Caolán McNamara
 svl/source/numbers/zforscan.cxx  |6 --
 sw/qa/core/data/html/pass/ofz5535-1.html |1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 732f8662365035226677921e98a327bad8620e58
Author: Caolán McNamara 
Date:   Sun Jan 21 15:24:13 2018 +

ofz#5535 max decimal places for rtl_math_round is 20

Change-Id: I636e086c51ceb70bdac72acfbabe99ad29003cdb
Reviewed-on: https://gerrit.libreoffice.org/48268
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/48299
Reviewed-by: Eike Rathke 

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index d29ecddb1d16..3687ebc4756b 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -39,6 +39,8 @@ using namespace svt;
 const sal_Unicode cNoBreakSpace = 0xA0;
 const sal_Unicode cNarrowNoBreakSpace = 0x202F;
 
+const int MaxCntPost = 20; //max dec places allow by rtl_math_round
+
 const ::std::vector ImpSvNumberformatScan::sEnglishKeyword =
 { // Syntax keywords in English (USA)
 //! All keywords MUST be UPPERCASE! In same order as NfKeywordTable
@@ -2735,7 +2737,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 switch( sStrArray[i][0] )
 {
 case '0':
-if ( bTimePart && Is100SecZero( i, bDecSep ) )
+if (bTimePart && Is100SecZero(i, bDecSep) && nCounter 
< MaxCntPost)
 {
 bDecSep = true;
 nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
@@ -2743,7 +2745,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 nCounter++;
 i++;
 while (i < nStringsCnt &&
-   sStrArray[i][0] == '0')
+   sStrArray[i][0] == '0' && nCounter < 
MaxCntPost)
 {
 rStr += sStrArray[i];
 nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
diff --git a/sw/qa/core/data/html/pass/ofz5535-1.html 
b/sw/qa/core/data/html/pass/ofz5535-1.html
new file mode 100644
index ..5439e009b392
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz5535-1.html
@@ -0,0 +1 @@
+
\ 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: sc/source

2018-01-26 Thread Eike Rathke
 sc/source/core/data/drwlayer.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 3edf52796ef62c1734f51011fd32d8dc269fbf2d
Author: Eike Rathke 
Date:   Fri Jan 26 22:54:50 2018 +0100

Move declaration to where it is used

Change-Id: Ibf650c3d38ff21cb03b5361f953423fd0d2195e6

diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 4be458e21500..6ad031b952d7 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2028,12 +2028,11 @@ bool ScDrawLayer::HasObjectsAnchoredInRange(ScRange& 
rRange)
 
 SdrObjListIter aIter( *pPage, SdrIterMode::Flat );
 SdrObject* pObject = aIter.Next();
-ScDrawObjData* pObjData;
 while (pObject)
 {
 if (!dynamic_cast(pObject)) // Caption objects are 
handled differently
 {
-pObjData = GetObjData(pObject);
+ScDrawObjData* pObjData = GetObjData(pObject);
 if (pObjData && rRange.In(pObjData->maStart)) // Object is in 
given range
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 oox/source/export/chartexport.cxx |   26 --
 1 file changed, 16 insertions(+), 10 deletions(-)

New commits:
commit 0d55bd08f77c01fa6e34becc1505268dda7851b8
Author: Caolán McNamara 
Date:   Thu Jan 18 17:36:31 2018 +

crashtesting: multiple export failures

since...

commit 84392651d2731cce91c3b2e144bed4ac07e4ddf1
Date:   Wed Jan 3 23:27:16 2018 +0100

tdf#114173 Preserve size of chart legend during xlsx export

Change-Id: Iebc936a0f490d6b707dfee0343732753f56728e7
Reviewed-on: https://gerrit.libreoffice.org/48147
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit fa68bed11c180ebb0d45fb7779d538098b2921ff)
Reviewed-on: https://gerrit.libreoffice.org/48153
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index cf00594d23c1..128a166c6c4a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -862,13 +862,9 @@ void ChartExport::exportLegend( const Reference< 
css::chart::XChartDocument >& x
 XML_val, "edge",
 FSEND);
 chart2::RelativePosition aPos = 
aRelativePos.get();
-uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize");
-chart2::RelativeSize aSize = 
aRelativeSize.get();
 
 const double x = aPos.Primary;
 const double y = aPos.Secondary;
-const double w = aSize.Primary;
-const double h = aSize.Secondary;
 
 pFS->singleElement(FSNS(XML_c, XML_x),
 XML_val, IS(x),
@@ -877,13 +873,23 @@ void ChartExport::exportLegend( const Reference< 
css::chart::XChartDocument >& x
 XML_val, IS(y),
 FSEND);
 
-pFS->singleElement(FSNS(XML_c, XML_w),
-XML_val, IS(w),
-FSEND);
+uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize");
+if (aRelativeSize.hasValue())
+{
+chart2::RelativeSize aSize = 
aRelativeSize.get();
+
+const double w = aSize.Primary;
+const double h = aSize.Secondary;
+
+pFS->singleElement(FSNS(XML_c, XML_w),
+XML_val, IS(w),
+FSEND);
+
+pFS->singleElement(FSNS(XML_c, XML_h),
+XML_val, IS(h),
+FSEND);
+}
 
-pFS->singleElement(FSNS(XML_c, XML_h),
-XML_val, IS(h),
-FSEND);
 SAL_WARN_IF(aPos.Anchor != css::drawing::Alignment_TOP_LEFT, 
"oox", "unsupported anchor position");
 
 pFS->endElement(FSNS(XML_c, XML_manualLayout));
___
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

2018-01-26 Thread Samuel Mehrbrodt
 sc/inc/drwlayer.hxx  |1 +
 sc/source/core/data/column.cxx   |9 ++---
 sc/source/core/data/drwlayer.cxx |   25 +
 3 files changed, 28 insertions(+), 7 deletions(-)

New commits:
commit 401d4516234994d317a7c899358e8c2eef447fdc
Author: Samuel Mehrbrodt 
Date:   Tue Jan 23 11:22:27 2018 +0100

Improve performance when searching for blocks w/o draw objects

... by returning when the first object in the lookup range has been found

Follow-up for 3a2a430ae8e2c1647c18d8904477949f6e2e7941

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

diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 56c820d465d3..d9155d0d90f0 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -183,6 +183,7 @@ public:
 static void UpdateCellAnchorFromPositionEnd( const SdrObject 
&rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool 
bUseLogicRect = true );
 static ScAnchorType GetAnchorType( const SdrObject& );
 std::vector GetObjectsAnchoredToCell(const ScAddress& rPos);
+boolHasObjectsAnchoredInRange(ScRange& rRange);
 void MoveObject(SdrObject* pObj, ScAddress& rNewPosition);
 
 // positions for detektive lines
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index e8d773f6923f..71c9da711428 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1927,13 +1927,8 @@ bool ScColumn::IsDrawObjectsEmptyBlock(SCROW nStartRow, 
SCROW nEndRow) const
 if (!pDrawLayer)
 return true;
 
-for (SCROW nCurrentRow = nStartRow; nCurrentRow <= nEndRow; nCurrentRow++)
-{
-ScAddress aCell(nCol, nCurrentRow, nTab);
-if (!pDrawLayer->GetObjectsAnchoredToCell(aCell).empty())
-return false;
-}
-return true;
+ScRange aRange(nCol, nStartRow, nTab, nCol, nEndRow, nTab);
+return !pDrawLayer->HasObjectsAnchoredInRange(aRange);
 }
 
 void ScColumn::SwapCol(ScColumn& rCol)
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 7f2124d98755..4be458e21500 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2017,6 +2017,31 @@ std::vector 
ScDrawLayer::GetObjectsAnchoredToCell(const ScAddress& r
 return pObjects;
 }
 
+bool ScDrawLayer::HasObjectsAnchoredInRange(ScRange& rRange)
+{
+// This only works for one table at a time
+assert(rRange.aStart.Tab() == rRange.aEnd.Tab());
+
+SdrPage* pPage = GetPage(static_cast(rRange.aStart.Tab()));
+if (!pPage || pPage->GetObjCount() < 1)
+return false;
+
+SdrObjListIter aIter( *pPage, SdrIterMode::Flat );
+SdrObject* pObject = aIter.Next();
+ScDrawObjData* pObjData;
+while (pObject)
+{
+if (!dynamic_cast(pObject)) // Caption objects are 
handled differently
+{
+pObjData = GetObjData(pObject);
+if (pObjData && rRange.In(pObjData->maStart)) // Object is in 
given range
+return true;
+}
+pObject = aIter.Next();
+}
+return false;
+}
+
 void ScDrawLayer::MoveObject(SdrObject* pObject, ScAddress& rNewPosition)
 {
 // Get anchor data
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 lotuswordpro/source/filter/lwppagelayout.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0254e17978e96678538199dff65d00677093c1ec
Author: Caolán McNamara 
Date:   Fri Jan 26 20:35:06 2018 +

ofz: null deref

Change-Id: I3304656aa057df47ec9afeddb4caa297be88e137

diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx 
b/lotuswordpro/source/filter/lwppagelayout.cxx
index 8ee43071bb95..e63691d7b59b 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -476,7 +476,7 @@ void 
LwpPageLayout::ConvertFillerPageText(XFContentContainer* pCont)
 //get fillerpage story from division info
 LwpDocument* pDoc = m_pFoundry->GetDocument();
 LwpDivInfo* pDivInfo = 
dynamic_cast(pDoc->GetDivInfoID().obj().get());
-LwpStory* pStory = 
dynamic_cast(pDivInfo->GetFillerPageTextID().obj().get());
+LwpStory* pStory = pDivInfo ? 
dynamic_cast(pDivInfo->GetFillerPageTextID().obj().get()) : nullptr;
 
 //parse fillerpage story
 if(pStory)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 hwpfilter/source/hiodev.cxx |   24 +++-
 hwpfilter/source/hiodev.h   |6 +++---
 2 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit 12eb35fb90876df0392bf86c19521623ab574766
Author: Caolán McNamara 
Date:   Fri Jan 26 11:51:43 2018 +

ofz#5717 check state in readblock

and change state to a bool and reuse it more

Change-Id: Iaa46004b144836431dd386a68a8ab688fd1477f2
Reviewed-on: https://gerrit.libreoffice.org/48686
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index bed8b37ce783..fcdc98b24109 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -124,13 +124,11 @@ void HStreamIODev::flush()
 gz_flush(_gzfp, Z_FINISH);
 }
 
-
-int HStreamIODev::state() const
+bool HStreamIODev::state() const
 {
-return 0;
+return false;
 }
 
-
 /* zlib 관련 부분 */
 bool HStreamIODev::setCompressed(bool flag)
 {
@@ -270,16 +268,14 @@ void HMemIODev::flush()
 {
 }
 
-
-int HMemIODev::state() const
+bool HMemIODev::state() const
 {
 if (pos <= length)
-return 0;
+return false;
 else
-return -1;
+return true;
 }
 
-
 bool HMemIODev::setCompressed(bool )
 {
 return false;
@@ -288,7 +284,7 @@ bool HMemIODev::setCompressed(bool )
 bool HMemIODev::read1b(unsigned char &out)
 {
 ++pos;
-if (pos <= length)
+if (!state())
 {
 out = ptr[pos - 1];
 return true;
@@ -308,7 +304,7 @@ bool HMemIODev::read1b(char &out)
 bool HMemIODev::read2b(unsigned short &out)
 {
 pos += 2;
-if (pos <= length)
+if (!state())
 {
  out = ptr[pos - 1] << 8 | ptr[pos - 2];
  return true;
@@ -319,7 +315,7 @@ bool HMemIODev::read2b(unsigned short &out)
 bool HMemIODev::read4b(unsigned int &out)
 {
 pos += 4;
-if (pos <= length)
+if (!state())
 {
 out = static_cast(ptr[pos - 1] << 24 | ptr[pos - 2] << 
16 |
 ptr[pos - 3] << 8 | ptr[pos - 4]);
@@ -339,6 +335,8 @@ bool HMemIODev::read4b(int &out)
 
 size_t HMemIODev::readBlock(void *p, size_t size)
 {
+if (state())
+return 0;
 if (length < pos + size)
 size = length - pos;
 memcpy(p, ptr + pos, size);
@@ -348,7 +346,7 @@ size_t HMemIODev::readBlock(void *p, size_t size)
 
 size_t HMemIODev::skipBlock(size_t size)
 {
-if (length < pos + size)
+if (state() || length < pos + size)
 return 0;
 pos += size;
 return size;
diff --git a/hwpfilter/source/hiodev.h b/hwpfilter/source/hiodev.h
index 3e307153fdc5..5f12454da99e 100644
--- a/hwpfilter/source/hiodev.h
+++ b/hwpfilter/source/hiodev.h
@@ -47,7 +47,7 @@ class DLLEXPORT HIODev
 
 virtual bool open() = 0;
 virtual void flush() = 0;
-virtual int  state() const = 0;
+virtual bool state() const = 0;
 /* gzip routine wrapper */
 virtual bool setCompressed( bool ) = 0;
 
@@ -91,7 +91,7 @@ class HStreamIODev final: public HIODev
 /**
  * Not implemented.
  */
-virtual int  state() const override;
+virtual bool state() const override;
 /**
  * Set whether the stream is compressed or not
  */
@@ -142,7 +142,7 @@ class HMemIODev final: public HIODev
 
 virtual bool open() override;
 virtual void flush() override;
-virtual int  state() const override;
+virtual bool state() const override;
 /* gzip routine wrapper */
 virtual bool setCompressed( bool ) override;
 virtual bool read1b(unsigned char &out) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 sw/inc/dbmgr.hxx|2 +-
 sw/inc/doc.hxx  |4 ++--
 sw/source/uibase/dbui/dbmgr.cxx |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 86e9d28c58ee7fa9a7f803ff443f86d55961d451
Author: Caolán McNamara 
Date:   Fri Jan 26 12:12:39 2018 +

coverity#1401307 Uncaught exception

and

coverity#1401308 Uncaught exception

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

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 555d4dc9079f..77fa9437150c 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -291,7 +291,7 @@ class SW_DLLPUBLIC SwDBManager
 
 public:
 SwDBManager(SwDoc* pDoc);
-~SwDBManager() COVERITY_NOEXCEPT_FALSE;
+~SwDBManager();
 
 /// MailMergeEvent source
 const SwXMailMerge *GetMailMergeEvtSrc() const  { return pMergeEvtSrc; 
}
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index aa7ee77406cf..49cc1bd41551 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -21,6 +21,7 @@
 
 // SwDoc interfaces
 #include 
+#include 
 #include 
 #include "swdllapi.h"
 #include "swtypes.hxx"
@@ -41,7 +42,6 @@
 #include "docary.hxx"
 #include "pagedesc.hxx"
 #include "tblenum.hxx"
-
 #include 
 #include 
 #include 
@@ -283,7 +283,7 @@ class SW_DLLPUBLIC SwDoc final
 SwTOXTypes  *mpTOXTypes;   //< Tables/indices
 SwDefTOXBase_Impl * mpDefTOXBases; //< defaults of SwTOXBase's
 
-std::unique_ptr m_pOwnDBManager; //< own DBManager
+std::unique_ptr> 
m_pOwnDBManager; //< own DBManager
 SwDBManager * m_pDBManager; //< DBManager for evaluation of DB-fields.
 
 SwNumRule   *mpOutlineRule;
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 5d9ccaf0fa13..a9308ee063bc 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -801,7 +801,7 @@ SwDBManager::SwDBManager(SwDoc* pDoc)
 {
 }
 
-SwDBManager::~SwDBManager() COVERITY_NOEXCEPT_FALSE
+SwDBManager::~SwDBManager()
 {
 RevokeLastRegistrations();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Samuel Mehrbrodt
 sc/inc/drwlayer.hxx  |1 
 sc/qa/unit/ucalc.hxx |2 +
 sc/qa/unit/ucalc_sort.cxx|   62 +++
 sc/source/core/data/column.cxx   |   21 +
 sc/source/core/data/drwlayer.cxx |   24 +++
 5 files changed, 91 insertions(+), 19 deletions(-)

New commits:
commit 9f329c08e6b7e87879545c1bd78a4d3435fc44e4
Author: Samuel Mehrbrodt 
Date:   Mon Jan 22 12:46:11 2018 +0100

tdf#98931 Test for sorting images

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

diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 8f33dbebf721..56c820d465d3 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -183,6 +183,7 @@ public:
 static void UpdateCellAnchorFromPositionEnd( const SdrObject 
&rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool 
bUseLogicRect = true );
 static ScAnchorType GetAnchorType( const SdrObject& );
 std::vector GetObjectsAnchoredToCell(const ScAddress& rPos);
+void MoveObject(SdrObject* pObj, ScAddress& rNewPosition);
 
 // positions for detektive lines
 static ScDrawObjData* GetObjData( SdrObject* pObj, bool bCreate=false );
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 74729debe9ea..81d100254f93 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -462,6 +462,7 @@ public:
 void testSortBroadcastBroadcaster();
 void testSortOutOfPlaceResult();
 void testSortPartialFormulaGroup();
+void testSortImages();
 
 void testNoteBasic();
 void testNoteDeleteRow();
@@ -764,6 +765,7 @@ public:
 CPPUNIT_TEST(testSortBroadcastBroadcaster);
 CPPUNIT_TEST(testSortOutOfPlaceResult);
 CPPUNIT_TEST(testSortPartialFormulaGroup);
+CPPUNIT_TEST(testSortImages);
 CPPUNIT_TEST(testShiftCells);
 CPPUNIT_TEST(testNoteBasic);
 CPPUNIT_TEST(testNoteDeleteRow);
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index 922856bcae96..eb7d1b79039e 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -21,10 +21,13 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 void Test::testSort()
@@ -1884,4 +1887,63 @@ void Test::testSortPartialFormulaGroup()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testSortImages()
+{
+m_pDoc->InsertTab(0, "testSortImages");
+
+// We need a drawing layer in order to create caption objects.
+m_pDoc->InitDrawLayer(&getDocShell());
+ScDrawLayer* pDrawLayer = m_pDoc->GetDrawLayer();
+CPPUNIT_ASSERT(pDrawLayer);
+
+ScRange aDataRange;
+ScAddress aPos(0,0,0);
+{
+const char* aData[][1] = {
+{ "2" },
+{ "1" },
+};
+
+clearRange(m_pDoc, ScRange(0, 0, 0, 1, SAL_N_ELEMENTS(aData), 0));
+aDataRange = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aDataRange.aStart);
+}
+
+// Insert graphic in cell B2.
+const tools::Rectangle aOrigRect = tools::Rectangle(1000, 1000, 1200, 
1200);
+SdrCircObj* pObj = new SdrCircObj(OBJ_CIRC, aOrigRect);
+SdrPage* pPage = pDrawLayer->GetPage(0);
+CPPUNIT_ASSERT(pPage);
+pPage->InsertObject(pObj);
+// Anchor to cell
+ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
+// Move to cell B2
+ScAddress aCellPos(1, 1, 0);
+pDrawLayer->MoveObject(pObj, aCellPos);
+
+std::vector pObjects = 
pDrawLayer->GetObjectsAnchoredToCell(aCellPos);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pObjects.size());
+
+ScSortParam aSortData;
+aSortData.nCol1 = 0;
+aSortData.nCol2 = 1;
+aSortData.nRow1 = 0;
+aSortData.nRow2 = 1;
+aSortData.maKeyState[0].bDoSort = true;
+aSortData.maKeyState[0].nField = 0;
+aSortData.maKeyState[0].bAscending = true;
+
+m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr);
+
+double nVal = m_pDoc->GetValue(0,0,0);
+ASSERT_DOUBLES_EQUAL(nVal, 1.0);
+
+// check that note is also moved after sorting
+aCellPos = ScAddress(1, 0, 0);
+pObjects = pDrawLayer->GetObjectsAnchoredToCell(aCellPos);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pObjects.size());
+
+m_pDoc->DeleteTab(0);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 24d825901483..e8d773f6923f 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1912,29 +1912,12 @@ void ScColumn::UpdateDrawObjectsForRow( 
std::vector& pObjects, SCCOL
 {
 for (auto &pObject : pObjects)
 {
-// Get anchor data
-ScDrawObjData* pObjData = ScDrawLayer::GetObjData(pObject, false);
-if (!pObjData)
-continue;
-   

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

2018-01-26 Thread Jens Carl
 sc/qa/extras/scannotationshapeobj.cxx |   22 --
 1 file changed, 4 insertions(+), 18 deletions(-)

New commits:
commit 876164d2ebb654b525e4dcb49c61cf477d494ef5
Author: Jens Carl 
Date:   Fri Jan 26 01:21:43 2018 +

Remove shared mxComponent in scannotationshapeobj

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

diff --git a/sc/qa/extras/scannotationshapeobj.cxx 
b/sc/qa/extras/scannotationshapeobj.cxx
index 361c26a90525..dbcc32903920 100644
--- a/sc/qa/extras/scannotationshapeobj.cxx
+++ b/sc/qa/extras/scannotationshapeobj.cxx
@@ -17,8 +17,6 @@
 #include 
 #include 
 
-#define NUMBER_OF_TESTS 1
-
 using namespace css;
 using namespace css::uno;
 
@@ -42,13 +40,10 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference mxComponent;
+uno::Reference mxComponent;
 static uno::Reference mxField;
 };
 
-sal_Int32 ScAnnotationShapeObj::nTest = 0;
-uno::Reference ScAnnotationShapeObj::mxComponent;
 uno::Reference ScAnnotationShapeObj::mxField;
 
 ScAnnotationShapeObj::ScAnnotationShapeObj()
@@ -58,29 +53,20 @@ ScAnnotationShapeObj::ScAnnotationShapeObj()
 
 void ScAnnotationShapeObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScAnnotationShapeObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-mxField.clear();
-closeDocument(mxComponent);
-mxComponent.clear();
-}
+mxField.clear();
+closeDocument(mxComponent);
 
 CalcUnoApiTest::tearDown();
 }
 
 uno::Reference ScAnnotationShapeObj::init()
 {
-if (!mxComponent.is())
-// Load an empty document.
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Jens Carl
 sc/qa/extras/scannotationsobj.cxx |   35 ++-
 1 file changed, 14 insertions(+), 21 deletions(-)

New commits:
commit 5236b8d72dba28cc23aad05e18741abe92f72f72
Author: Jens Carl 
Date:   Fri Jan 26 01:29:52 2018 +

Remove shared mxComponent in scannotationsobj

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

diff --git a/sc/qa/extras/scannotationsobj.cxx 
b/sc/qa/extras/scannotationsobj.cxx
index f4cb9c853fd7..b9f230316b71 100644
--- a/sc/qa/extras/scannotationsobj.cxx
+++ b/sc/qa/extras/scannotationsobj.cxx
@@ -20,8 +20,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 4
-
 class ScAnnontationsObj : public CalcUnoApiTest, public 
apitest::XSheetAnnotations
 {
 public:
@@ -34,19 +32,20 @@ public:
 virtual uno::Reference< sheet::XSheetAnnotations > getAnnotations(long 
nIndex) override;
 
 CPPUNIT_TEST_SUITE(ScAnnontationsObj);
+
+// XSheetAnnotations
 CPPUNIT_TEST(testInsertNew);
 CPPUNIT_TEST(testRemoveByIndex);
 CPPUNIT_TEST(testCount);
 CPPUNIT_TEST(testGetByIndex);
+
 CPPUNIT_TEST_SUITE_END();
+
 private:
 
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 };
 
-sal_Int32 ScAnnontationsObj::nTest = 0;
-uno::Reference< lang::XComponent > ScAnnontationsObj::mxComponent;
 
 ScAnnontationsObj::ScAnnontationsObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
@@ -57,6 +56,8 @@ uno::Reference< sheet::XSheetAnnotations> 
ScAnnontationsObj::getAnnotations(long
 {
 // get the sheet
 uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, 
UNO_QUERY_THROW);
+CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
+
 uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), 
UNO_QUERY_THROW);
 uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex(nIndex), 
UNO_QUERY_THROW);
 
@@ -71,30 +72,22 @@ uno::Reference< sheet::XSheetAnnotations> 
ScAnnontationsObj::getAnnotations(long
 
 uno::Reference< uno::XInterface > ScAnnontationsObj::init()
 {
-// get the test file
-OUString aFileURL;
-createFileURL("ScAnnotationObj.ods", aFileURL);
-if(!mxComponent.is())
-mxComponent = loadFromDesktop(aFileURL);
-CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is());
-
 return getAnnotations(0);
 }
+
 void ScAnnontationsObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+
+// get the test file
+OUString aFileURL;
+createFileURL("ScAnnotationObj.ods", aFileURL);
+mxComponent = loadFromDesktop(aFileURL);
 }
 
 void ScAnnontationsObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Samuel Mehrbrodt
 sc/inc/sc.hrc   |1 
 sc/inc/sortparam.hxx|1 
 sc/sdi/scalc.sdi|2 -
 sc/source/core/data/sortparam.cxx   |   11 ++--
 sc/source/ui/dbgui/tpsort.cxx   |4 +++
 sc/source/ui/docshell/dbdocfun.cxx  |2 -
 sc/source/ui/inc/tpsort.hxx |1 
 sc/source/ui/view/cellsh2.cxx   |5 
 sc/source/ui/view/gridwin.cxx   |1 
 sc/uiconfig/scalc/ui/sortoptionspage.ui |   40 
 10 files changed, 53 insertions(+), 15 deletions(-)

New commits:
commit b5f8b046008a27f1da58b934dbe61c0decf36612
Author: Samuel Mehrbrodt 
Date:   Mon Jan 22 17:47:04 2018 +0100

tdf#98931 Add option to sort boundary image-only columns

A similiar option exists for comments-only columns.
If enabled, image-only columns are considered when sorting (and selected).

This is the default behavior, but can now be disabled.

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

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index e4823e58ff44..71be34add605 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -625,6 +625,7 @@
 #define SID_SORT_USERDEF(SC_PARAM_START+4)
 #define SID_SORT_NATURALSORT(SC_PARAM_START+5)
 #define SID_SORT_INCCOMMENTS(SC_PARAM_START+6)
+#define SID_SORT_INCIMAGES  (SC_PARAM_START+7)
 
 // Sidebar -
 
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx
index d0cd0204d518..6eba07e64487 100644
--- a/sc/inc/sortparam.hxx
+++ b/sc/inc/sortparam.hxx
@@ -50,6 +50,7 @@ struct SC_DLLPUBLIC ScSortParam
 boolbCaseSens;
 boolbNaturalSort;
 boolbIncludeComments;
+boolbIncludeGraphicObjects;
 boolbUserDef;
 boolbIncludePattern;
 boolbInplace;
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index f238b4633721..216aeebc7bc9 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1094,7 +1094,7 @@ SfxVoidItem DataSelect SID_DATA_SELECT
 
 
 SfxVoidItem DataSort SID_SORT
-(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader 
SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem 
NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs 
SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 
FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 
FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 
FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6,SfxBoolItem IncludeComments 
SID_SORT_INCCOMMENTS)
+(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader 
SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem 
NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs 
SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 
FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 
FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 
FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6,SfxBoolItem IncludeComments 
SID_SORT_INCCOMMENTS, SfxBoolItem IncludeImages SID_SORT_INCIMAGES)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/core/data/sortparam.cxx 
b/sc/source/core/data/sortparam.cxx
index 98033816ece5..cd98dd07a982 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -35,7 +35,8 @@ ScSortParam::ScSortParam()
 ScSortParam::ScSortParam( const ScSortParam& r ) :
 
nCol1(r.nCol1),nRow1(r.nRow1),nCol2(r.nCol2),nRow2(r.nRow2),nUserIndex(r.nUserIndex),
 bHasHeader(r.bHasHeader),bByRow(r.bByRow),bCaseSens(r.bCaseSens),
-
bNaturalSort(r.bNaturalSort),bIncludeComments(r.bIncludeComments),bUserDef(r.bUserDef),
+bNaturalSort(r.bNaturalSort),bIncludeComments(r.bIncludeComments),
+bIncludeGraphicObjects(r.bIncludeGraphicObjects),bUserDef(r.bUserDef),
 bIncludePattern(r.bIncludePattern),bInplace(r.bInplace),
 nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow),
 maKeyState( r.maKeyState ),
@@ -57,6 +58,7 @@ void ScSortParam::Clear()
 nUserIndex = 0;
 bHasHeader=bCaseSens=bUserDef=bNaturalSort = false;
 bIncludeComments = false;
+bIncludeGraphicObjects = true;
 bByRow=bIncludePattern=bInplace = true;
 aCollatorLocale = css::lang::Locale();
 aCollatorAlgorithm.clear();
@@ -81,6 +83,7 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
 bCaseSens   = r.bCaseSens;
 bNaturalSort= r.bNaturalSort;
 bIncludeComments= r.bIncludeComments;
+bIncludeGraphicObjects = r.bIncludeGraphicObjects;
 bUserDef= r.bUserDef;
 bIncludePattern = r.bIncludePattern;
 bInplace= r.bInplace;
@@ -125,6 +128,7 @@ bool ScSortParam::operator==( const ScSortParam& rOther ) 
const

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

2018-01-26 Thread Jan Holesovsky
 loolwsd.xml.in  |2 ++
 wsd/LOOLWSD.cpp |6 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit ba7825e63b7520a4d2eab37ad67f1bd9da7dee6c
Author: Jan Holesovsky 
Date:   Fri Jan 26 20:57:54 2018 +0100

wsd: Support for configuration of the allowed languages.

Change-Id: I233619b89ac61aeaab4ba96f1f52773802cfd7ae

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 31ab1a07..724a3d67 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -3,6 +3,8 @@
 
 
 
+de_DE en_GB en_US 
es_ES fr_FR it pt_BR pt_PT ru
+
 
 
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 13ae0298..f96005ef 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -637,7 +637,8 @@ void LOOLWSD::initialize(Application& self)
 
 // Add default values of new entries here.
 static const std::map DefAppConfig
-= { { "tile_cache_path", LOOLWSD_CACHEDIR },
+= { { "allowed_languages", "de_DE en_GB en_US es_ES fr_FR it pt_BR 
pt_PT ru" },
+{ "tile_cache_path", LOOLWSD_CACHEDIR },
 { "tile_cache_persistent", "true" },
 { "sys_template_path", "systemplate" },
 { "lo_template_path", LO_PATH },
@@ -804,6 +805,9 @@ void LOOLWSD::initialize(Application& self)
 LOOLWSD::SSLTermination.set(false);
 #endif
 
+std::string allowedLanguages(config().getString("allowed_languages"));
+setenv("LOK_WHITELIST_LANGUAGES", allowedLanguages.c_str(), 1);
+
 Cache = getPathFromConfig("tile_cache_path");
 SysTemplate = getPathFromConfig("sys_template_path");
 LoTemplate = getPathFromConfig("lo_template_path");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Jens Carl
 sc/qa/extras/scannotationobj.cxx |   29 +++--
 1 file changed, 7 insertions(+), 22 deletions(-)

New commits:
commit c48dd8ee185b24322ce497ee74896c7288db008e
Author: Jens Carl 
Date:   Fri Jan 26 01:09:43 2018 +

Remove shared mxComponent in scannotationobj

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

diff --git a/sc/qa/extras/scannotationobj.cxx b/sc/qa/extras/scannotationobj.cxx
index fd2bcfd4430d..18beb9dabb48 100644
--- a/sc/qa/extras/scannotationobj.cxx
+++ b/sc/qa/extras/scannotationobj.cxx
@@ -26,8 +26,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 6
-
 class ScAnnontationObj : public CalcUnoApiTest, public 
apitest::XSheetAnnotation, public apitest::XSheetAnnotationShapeSupplier
 {
 public:
@@ -54,12 +52,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 private:
 
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 };
 
-sal_Int32 ScAnnontationObj::nTest = 0;
-uno::Reference< lang::XComponent > ScAnnontationObj::mxComponent;
 
 ScAnnontationObj::ScAnnontationObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
@@ -87,14 +82,6 @@ uno::Reference< sheet::XSheetAnnotation> 
ScAnnontationObj::getAnnotation(table::
 
 uno::Reference< uno::XInterface > ScAnnontationObj::init()
 {
-
-// get the test file
-OUString aFileURL;
-createFileURL("ScAnnotationObj.ods", aFileURL);
-if(!mxComponent.is())
-mxComponent = loadFromDesktop(aFileURL);
-CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is());
-
 // tested annotation is in sheet 0 cell C2
 table::CellAddress aCellAddress;
 aCellAddress.Sheet = 0;
@@ -106,19 +93,17 @@ uno::Reference< uno::XInterface > ScAnnontationObj::init()
 
 void ScAnnontationObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+
+// get the test file
+OUString aFileURL;
+createFileURL("ScAnnotationObj.ods", aFileURL);
+mxComponent = loadFromDesktop(aFileURL);
 }
 
 void ScAnnontationObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Winfried Donkers
 i18nutil/source/utility/widthfolding_data.h  |1 +
 sc/qa/unit/data/functions/text/fods/jis.fods |   15 +--
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 8c01c25ac4f85266719dc04e9809da2f3eb5b10e
Author: Winfried Donkers 
Date:   Wed Jan 24 17:21:19 2018 +0100

tdf#103550 fix issue with HYPHEN-MINUS in Calc function JIS.

Change-Id: Ie1e25ea7a0d6f23dfe21f53ed47430be6b357984
Reviewed-on: https://gerrit.libreoffice.org/48523
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 484d0ea842da586a4cf51b6d11683b04f234474c)
Reviewed-on: https://gerrit.libreoffice.org/48664

diff --git a/i18nutil/source/utility/widthfolding_data.h 
b/i18nutil/source/utility/widthfolding_data.h
index b2bdd369c6cf..999ca82734b1 100644
--- a/i18nutil/source/utility/widthfolding_data.h
+++ b/i18nutil/source/utility/widthfolding_data.h
@@ -718,6 +718,7 @@ UnicodePairWithFlag half2full[] = {
 { 0x002A, 0xFF0A, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // 
ASTERISK --> FULLWIDTH ASTERISK
 { 0x002B, 0xFF0B, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // PLUS 
SIGN --> FULLWIDTH PLUS SIGN
 { 0x002C, 0xFF0C, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // COMMA 
--> FULLWIDTH COMMA
+{ 0x002D, 0xFF0D, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // MINUS 
HYPHEN --> FULLWIDTH MINUS HYPHEN
 { 0x002E, 0xFF0E, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // FULL 
STOP --> FULLWIDTH FULL STOP
 { 0x002F, 0xFF0F, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // SOLIDUS 
--> FULLWIDTH SOLIDUS
 { 0x0030, 0xFF10, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // DIGIT 
ZERO --> FULLWIDTH DIGIT ZERO
diff --git a/sc/qa/unit/data/functions/text/fods/jis.fods 
b/sc/qa/unit/data/functions/text/fods/jis.fods
index 50584f6b8820..2c55690735fb 100644
--- a/sc/qa/unit/data/functions/text/fods/jis.fods
+++ b/sc/qa/unit/data/functions/text/fods/jis.fods
@@ -1057,19 +1057,22 @@
  
 
 
- 
-  0123456789
+ 
+  !”#$%&’()*+,-./
  
  
-  0123456789
+  !”#$%&’()*+,-./
  
  
   TRUE
  
- 
+ 
   =JIS(I2)
  
- 
+ 
+  Tdf103550, AOO#78727
+ 
+ 
  
   !"#$%&'()*+,-./
  
@@ -1802,4 +1805,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: sc/source

2018-01-26 Thread Eike Rathke
 sc/source/filter/excel/xicontent.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f8bcf01803f9a14ea326b6853eccd37eb3d7cfb9
Author: Eike Rathke 
Date:   Fri Jan 26 20:44:07 2018 +0100

Consistent naming

Change-Id: I4fdf47abe54895909f6a28655bda67700f30d392

diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index 4fa17cdf3633..5c01b7e82c8c 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -668,7 +668,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
 }
 }
 
-::std::unique_ptr< ScTokenArray > pTokArr2;
+::std::unique_ptr< ScTokenArray > xTokArr2;
 if( nFmlaSize2 > 0 )
 {
 const ScTokenArray* pTokArr = nullptr;
@@ -677,8 +677,8 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
 // formula converter owns pTokArr -> create a copy of the token array
 if( pTokArr )
 {
-pTokArr2.reset( pTokArr->Clone() );
-GetDocRef().CheckLinkFormulaNeedingCheck( *pTokArr2);
+xTokArr2.reset( pTokArr->Clone() );
+GetDocRef().CheckLinkFormulaNeedingCheck( *xTokArr2);
 }
 }
 
@@ -694,7 +694,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
 mxScCondFmt->SetRange(maRanges);
 }
 
-ScCondFormatEntry* pEntry = new ScCondFormatEntry(eMode, xTokArr1.get(), 
pTokArr2.get(), &GetDocRef(), aPos, aStyleName);
+ScCondFormatEntry* pEntry = new ScCondFormatEntry(eMode, xTokArr1.get(), 
xTokArr2.get(), &GetDocRef(), aPos, aStyleName);
 mxScCondFmt->AddEntry( pEntry );
 ++mnCondIndex;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Jan Holesovsky
 Makefile.am |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 0039f3c041b0d687c0495741d53eca800ee8f894
Author: Jan Holesovsky 
Date:   Fri Jan 26 20:27:51 2018 +0100

Add run-strace target for easy stracing.

Change-Id: I554cfa3965784803430a4cc2c12e61002e2445cd

diff --git a/Makefile.am b/Makefile.am
index d0e2ae2d..2fce7fdd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -279,6 +279,21 @@ run-callgrind: all @JAILS_PATH@ 
@SYSTEMPLATE_PATH@/system_stamp
  
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
  --o:admin_console.username=admin 
--o:admin_console.password=admin \
  --o:logging.file[@enable]=false 
--o:logging.level=error
+
+run-strace: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
+   @echo "Launching loolwsd under strace"
+   @fc-cache "@LO_PATH@"/share/fonts/truetype
+   @cp $(abs_top_srcdir)/test/data/hello.odt 
$(abs_top_srcdir)/test/data/hello-world.odt
+   strace -o strace.log -f -tt -s 256 \
+   ./loolwsd --nocaps \
+ --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+ --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
+ 
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
+ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" 
\
+ 
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
+ --o:admin_console.username=admin 
--o:admin_console.password=admin \
+ --o:logging.file[@enable]=false 
--o:logging.level=error
+
 else
 
 SYSTEM_STAMP =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Henry Castro
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   27 +
 sw/source/core/doc/docredln.cxx|   12 ++-
 2 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 3482a706cb9cfb1505590a5a27345594a2b95571
Author: Henry Castro 
Date:   Wed Jan 24 15:11:00 2018 -0400

sw lok: include the field name in the description of the redline

In tiled rendering case, when the text node is a field,
the description shows incorrect characters

Change-Id: I1e3a456b6e2a19a7629b58a8a6ae77e2090a06a1
Reviewed-on: https://gerrit.libreoffice.org/48538
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 3bf2d07a595f..ab470e7436e9 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static char const DATA_DIRECTORY[] = "/sw/qa/extras/tiledrendering/data/";
 
@@ -100,6 +101,7 @@ public:
 void testPageHeader();
 void testPageFooter();
 void testTdf115088();
+void testRedlineField();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -150,6 +152,7 @@ public:
 CPPUNIT_TEST(testPageHeader);
 CPPUNIT_TEST(testPageFooter);
 CPPUNIT_TEST(testTdf115088);
+CPPUNIT_TEST(testRedlineField);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2061,6 +2064,30 @@ void SwTiledRenderingTest::testTdf115088()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SwTiledRenderingTest::testRedlineField()
+{
+// Load a document.
+comphelper::LibreOfficeKit::setActive();
+SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
+SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+
+// Turn on track changes and type "x".
+uno::Reference xPropertySet(mxComponent, 
uno::UNO_QUERY);
+xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true));
+
+SwDateTimeField 
aDate(static_cast(pWrtShell->GetFieldType(0, 
SwFieldIds::DateTime)));
+//aDate->SetDateTime(::DateTime(::DateTime::SYSTEM));
+pWrtShell->Insert(aDate);
+
+// Get the redline just created
+const SwRedlineTable& rTable = 
pWrtShell->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
rTable.size());
+SwRangeRedline* pRedline = rTable[0];
+CPPUNIT_ASSERT(pRedline->GetDescr().indexOf(aDate.GetFieldName())!= -1);
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index c8e1caa04e6b..f91a1cde76b4 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -1789,9 +1790,18 @@ OUString SwRangeRedline::GetDescr()
 bDeletePaM = true;
 }
 
+OUString sDescr = pPaM->GetText();
+if (const SwTextNode *pTextNode = pPaM->GetNode().GetTextNode())
+{
+if (const SwTextAttr* pTextAttr = 
pTextNode->GetFieldTextAttrAt(pPaM->GetPoint()->nContent.GetIndex() - 1, true ))
+{
+sDescr = pTextAttr->GetFormatField().GetField()->GetFieldName();
+}
+}
+
 // replace $1 in description by description of the redlines text
 const OUString aTmpStr = SwResId(STR_START_QUOTE)
-+ ShortenString(pPaM->GetText(), nUndoStringLength, SwResId(STR_LDOTS))
++ ShortenString(sDescr, nUndoStringLength, SwResId(STR_LDOTS))
 + SwResId(STR_END_QUOTE);
 
 SwRewriter aRewriter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Stephan Bergmann
 vcl/unx/generic/window/salframe.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 63d4ab4bd709b66724c8cb78668fed71f8977098
Author: Stephan Bergmann 
Date:   Fri Jan 26 15:25:40 2018 +0100

Remove redundant(?) initialization of frame geometry

The memset of maGeometry was added with 
79e2c2577527578629d7bb719a88396645a4cc49
"INTEGRATION: CWS vclplug" in 2003, before
f7be39169fef0823e04f556cc9c9fdcda34d8685 "INTEGRATION: CWS presenterview" in
2008 introduced a user-provided _SalFrameGeometry default ctor, which sets 
all
members except nWidth and nHeight to 0, and sets nWidth and nHeight to 1.

So the memset effectively set nWidth and nHeight to back 0 (whether or not 
that
was by design or by accident after the latter commit), but that seems to be
unnecessary after all, seeing that a SAL_USE_VCLPLUGIN=gen soffice appears 
to
stll work well after removing the memset.

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

diff --git a/vcl/unx/generic/window/salframe.cxx 
b/vcl/unx/generic/window/salframe.cxx
index 5833463f354a..89ea99b6a7f9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -822,9 +822,6 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, 
SalFrameStyleFlags nSalFrameStyle,
 {
 GenericUnixSalData *pData = GetGenericUnixSalData();
 
-// initialize frame geometry
-memset( &maGeometry, 0, sizeof(maGeometry) );
-
 mpParent= static_cast< X11SalFrame* >( pParent );
 
 mbTransientForRoot  = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - 2 commits - desktop/source svx/source vcl/win

2018-01-26 Thread Mike Kaganski
 desktop/source/app/app.cxx |   34 ++---
 desktop/source/app/officeipcthread.cxx |   19 +---
 svx/source/inc/docrecovery.hxx |1 
 svx/source/unodraw/recoveryui.cxx  |   38 +
 vcl/win/app/salinst.cxx|3 +-
 5 files changed, 87 insertions(+), 8 deletions(-)

New commits:
commit 5ef05e2b54983a3937c0ecae09ef5808117596b1
Author: Mike Kaganski 
Date:   Sun Jan 21 22:10:09 2018 +0300

tdf#38915: set cProcessed condition on any process outcome

When application is initializing, initially request handler is not
processing requests (its state is Starting). Requests processing is
enabled in Desktop::OpenClients() after recovery had been processed.

If another soffice process is started, it communicates over already
established pipe, and sends a request to the first process. In
IpcThread::process(), it is decided if the request needs to be checked
for completion (e.g., if a file or specific module was requested to be
open). After that, the prepared request is posted for processing. In
case when the completion should be checked, PipeIpcThread::execute()
then waits for Processed condition indefinitely.

Request is processed in RequestHandler::ExecuteCmdLineRequests, which
first checks that handler's state is RequestsEnabled, and if it isn't,
then returns. Otherwise, after processing, Processed condition is set.

The problem is, thus, in case when the request comes before requests
processing is enabled (e.g., when recovery dialog is open): request
handler thread waits indefinitely, but the processed condition will
not be set. This will not allow to close the pipe to second process,
and it will hang indefinitely. The IPC thread will be hung even after
user closes recovery dialog, and continues working with program. So,
subsequent attempts to open files from file manager (launching new
process) will fail, and new zombie soffice processes will wait the
first indefinitely. Also, when first process will be closed by user,
the deinit sequence will attempt to wait for the IPC thread to finish
(in RequestHandler::Disable(), after all visible windows had been
closed), which will leave the first process hung, preventing all
subsequent attempts to open LibreOffice.

This patch ensures that the Processed condition is set at any outcome
in RequestHandler::ExecuteCmdLineRequests. Also, it brings (possibly
hidden) recovery dialog to front, making the reason why following
attempts to open files fail apparent to user.

Change-Id: Ibddf7483e5b1d6167ac7f307ea2442119f446129
Reviewed-on: https://gerrit.libreoffice.org/48280
Tested-by: Jenkins 
Reviewed-by: Aron Budea 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/48292
Tested-by: Aron Budea 
(cherry picked from commit 88a37944f55949c122fb4d5b7e504e40f25ed3a8)

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7c70eca66101..10fadb86626b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1134,6 +1134,15 @@ void impl_checkRecoveryState(bool& bCrashed   ,
 bSessionDataExists = elements && session;
 }
 
+Reference< css::frame::XSynchronousDispatch > g_xRecoveryUI;
+
+template 
+struct RefClearGuard
+{
+Ref& m_Ref;
+RefClearGuard(Ref& ref) : m_Ref(ref) {}
+~RefClearGuard() { m_Ref.clear(); }
+};
 
 /*  @short  start the recovery wizard.
 
@@ -1148,12 +1157,13 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
 
 css::uno::Reference< css::uno::XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
 
-Reference< css::frame::XSynchronousDispatch > xRecoveryUI(
+g_xRecoveryUI.set(
 
xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI",
 xContext),
 css::uno::UNO_QUERY_THROW);
+RefClearGuard> 
refClearGuard(g_xRecoveryUI);
 
 Reference< css::util::XURLTransformer > xURLParser =
-
css::util::URLTransformer::create(::comphelper::getProcessComponentContext());
+css::util::URLTransformer::create(xContext);
 
 css::util::URL aURL;
 if (bEmergencySave)
@@ -1165,6 +1175,24 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
 
 xURLParser->parseStrict(aURL);
 
+css::uno::Any aRet = g_xRecoveryUI->dispatchWithReturnValue(aURL, 
css::uno::Sequence< css::beans::PropertyValue >());
+bool bRet = false;
+aRet >>= bRet;
+return bRet;
+}
+
+bool impl_bringToFrontRecoveryUI()
+{
+Reference< css::frame::XSynchronousDispatch > xRecoveryUI(g_xRecoveryUI);
+if (!xRecoveryUI.is())
+return false;
+
+css::util::URL aURL;
+aURL.Complete = "vnd.sun.star.autorecovery:/doBringToFront";
+Reference< css::util::XURLTransformer > xURLParser =
+
css::util::URLTransform

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

2018-01-26 Thread Eike Rathke
 sc/source/filter/excel/xicontent.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit af2a2a0c72db312902e466c36697b5c198041e82
Author: Eike Rathke 
Date:   Fri Jan 26 19:37:03 2018 +0100

CheckLinkFormulaNeedingCheck() for .xls conditional format expressions

Change-Id: Iafa112cc591b411d80ead48bf726788d361f6eb3

diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index 626963c3a2a2..4fa17cdf3633 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -662,7 +662,10 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
 rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize1, false, FT_CondFormat );
 // formula converter owns pTokArr -> create a copy of the token array
 if( pTokArr )
+{
 xTokArr1.reset( pTokArr->Clone() );
+GetDocRef().CheckLinkFormulaNeedingCheck( *xTokArr1);
+}
 }
 
 ::std::unique_ptr< ScTokenArray > pTokArr2;
@@ -673,7 +676,10 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
 rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize2, false, FT_CondFormat );
 // formula converter owns pTokArr -> create a copy of the token array
 if( pTokArr )
+{
 pTokArr2.reset( pTokArr->Clone() );
+GetDocRef().CheckLinkFormulaNeedingCheck( *pTokArr2);
+}
 }
 
 // *** create the Calc conditional formatting ***
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Mike Kaganski
 include/svtools/javainteractionhandler.hxx |7 ---
 svtools/source/java/javainteractionhandler.cxx |   52 +++--
 2 files changed, 32 insertions(+), 27 deletions(-)

New commits:
commit 1710f23e2152ec53a9d90c9bff850c9f4f026053
Author: Mike Kaganski 
Date:   Fri Jan 26 11:37:58 2018 +0100

Make handled flags for Java interaction handler static

In commit 5785e4f4ab9c0e30d709e6150bc7230098ed550b, initial work to only
show Java error dialogs once had been done. Still, in some cases, multiple
such dialogs can still be shown.

JavaInteractionHandler instances can be created in at least two contexts:
in JavaContext::getValueByName, and in DesktopContext::getValueByName.
Additionally, in the latter, it is not kept for subsequent reuse, but re-
created anew each time. So, it is possible that "Java Missing" (and friends)
dialogs will be shown multiple times per session. E.g., specific installed
extensions (not using Java, but rather Python) can trigger said behavior
in Desktop::doShutdown inside BackupFileHelper::tryPushExtensionInfo.

This patch makes the "already handled" flags static, thus sharing the
status among different handler instances.

Also, unchanged-after-const-initializing m_bShowErrorsOnce is removed.

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

diff --git a/include/svtools/javainteractionhandler.hxx 
b/include/svtools/javainteractionhandler.hxx
index 34fa14a935c4..80529d36f424 100644
--- a/include/svtools/javainteractionhandler.hxx
+++ b/include/svtools/javainteractionhandler.hxx
@@ -56,13 +56,6 @@ private:
 JavaInteractionHandler(JavaInteractionHandler const&) = delete;
 JavaInteractionHandler& operator = (JavaInteractionHandler const &) = 
delete;
 SVT_DLLPRIVATE virtual ~JavaInteractionHandler();
-bool m_bShowErrorsOnce;
-bool m_bJavaDisabled_Handled;
-bool m_bInvalidSettings_Handled;
-bool m_bJavaNotFound_Handled;
-bool m_bVMCreationFailure_Handled;
-bool m_bRestartRequired_Handled;
-sal_uInt16 m_nResult_JavaDisabled;
 };
 }
 
diff --git a/svtools/source/java/javainteractionhandler.cxx 
b/svtools/source/java/javainteractionhandler.cxx
index 6eb906a23005..311bbcb23d24 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -39,18 +39,30 @@
 using namespace com::sun::star::uno;
 using namespace com::sun::star::task;
 
+namespace
+{
+static struct JavaEvents {
+bool bDisabledHandled : 1;
+bool bInvalidSettingsHandled : 1;
+bool bNotFoundHandled : 1;
+bool bVMCreationFailureHandled : 1;
+bool bRestartRequiredHandled : 1;
+sal_uInt16 nResult_JavaDisabled = RET_NO;
+JavaEvents()
+: bDisabledHandled(false)
+, bInvalidSettingsHandled(false)
+, bNotFoundHandled(false)
+, bVMCreationFailureHandled(false)
+, bRestartRequiredHandled(false)
+{}
+} g_JavaEvents;
+}
+
 namespace svt
 {
 
 JavaInteractionHandler::JavaInteractionHandler() :
-m_aRefCount(0),
-m_bShowErrorsOnce(true),
-m_bJavaDisabled_Handled(false),
-m_bInvalidSettings_Handled(false),
-m_bJavaNotFound_Handled(false),
-m_bVMCreationFailure_Handled(false),
-m_bRestartRequired_Handled(false),
-m_nResult_JavaDisabled(RET_NO)
+m_aRefCount(0)
 {
 }
 
@@ -113,11 +125,11 @@ void SAL_CALL JavaInteractionHandler::handle( const 
Reference< XInteractionReque
 
 if ( anyExc >>= e1 )
 {
-if( ! (m_bShowErrorsOnce && m_bJavaNotFound_Handled))
+if( !g_JavaEvents.bNotFoundHandled )
 {
// No suitable JRE found
 SolarMutexGuard aSolarGuard;
-m_bJavaNotFound_Handled = true;
+g_JavaEvents.bNotFoundHandled = true;
 #if defined( MACOSX )
 ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, 
SvtResId(STR_WARNING_JAVANOTFOUND_MAC), VclMessageType::Warning);
 #elif defined( _WIN32 )
@@ -141,11 +153,11 @@ void SAL_CALL JavaInteractionHandler::handle( const 
Reference< XInteractionReque
 }
 else if ( anyExc >>= e2 )
 {
-if( !(m_bShowErrorsOnce && m_bInvalidSettings_Handled))
+if( !g_JavaEvents.bInvalidSettingsHandled )
 {
// javavendors.xml was updated and Java has not been configured yet
 SolarMutexGuard aSolarGuard;
-m_bInvalidSettings_Handled = true;
+g_JavaEvents.bInvalidSettingsHandled = true;
 #ifdef MACOSX
 ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, 
SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VclMessageType::Warning);
 #else
@@ -161,10 +173,10 @@ void SAL_CALL JavaInteractionHandler::handle( const 
Reference< XInteractionReque
 }
 else if ( anyExc >>= e3 )
 {
-if( !(m_bShowErrorsO

[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 16 commits - config_host/config_gtk3_kde5.h.in config_host/config_kde5.h.in config_host/config_qt5.h.in config_host/con

2018-01-26 Thread Thorsten Behrens
Rebased ref, commits from common ancestor:
commit 84cc1137b18ca845bf91ad72939cf83b53bad867
Author: Thorsten Behrens 
Date:   Fri Jan 26 16:13:23 2018 +0100

tdf#115090 keep internal BaseModel alive long enough

There's reams of code already preventing a close during save
(SfxSaveGuard), but this looks equally effective. Avoids
SfxBaseModel::dispose() pulling the rug under us, when
SfxBaseModel::postEvent_Impl() wants to access parts of the
interface containers during notification.

Conflicts:
include/sfx2/sfxbasemodel.hxx
sfx2/source/doc/sfxbasemodel.cxx

Change-Id: Iace1f9922c47a97ab2e798b577c6aec8a729da48

diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 8e678caf59e0..7bf694ac8787 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -869,7 +869,7 @@ private:
 
 private:
 
-IMPL_SfxBaseModel_DataContainer*m_pData ;
+std::shared_ptr m_pData;
 // cannot be held in m_pData, since it needs to be accessed in 
non-threadsafe context
 const bool  m_bSupportEmbeddedScripts;
 const bool  m_bSupportDocRecovery;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 6be889c2b9dd..0de1a2ca4f92 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -509,10 +509,6 @@ SfxBaseModel::SfxBaseModel( SfxObjectShell *pObjectShell )
 //  destructor
 SfxBaseModel::~SfxBaseModel()
 {
-//In SvxDrawingLayerImport when !xTargetDocument the fallback 
SvxUnoDrawingModel created there
-//never gets disposed called on it, so m_pData leaks.
-delete m_pData;
-m_pData = nullptr;
 }
 
 //  XInterface
@@ -775,9 +771,7 @@ void SAL_CALL SfxBaseModel::dispose() 
throw(RuntimeException, std::exception)
 // m_pData member must be set to zero before 0delete is called to
 // force disposed exception whenever someone tries to access our
 // instance while in the dtor.
-IMPL_SfxBaseModel_DataContainer* pData = m_pData;
-m_pData = nullptr;
-delete pData;
+m_pData.reset();
 }
 
 
@@ -1497,7 +1491,7 @@ void SAL_CALL SfxBaseModel::storeSelf( constSequence< 
beans::PropertyValue >
 if ( m_pData->m_pObjectShell.Is() )
 {
 m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeSelf" );
-SfxSaveGuard aSaveGuard(this, m_pData);
+SfxSaveGuard aSaveGuard(this, m_pData.get());
 
 bool bCheckIn = false;
 for ( sal_Int32 nInd = 0; nInd < aSeqArgs.getLength(); nInd++ )
@@ -1626,7 +1620,7 @@ void SAL_CALL SfxBaseModel::storeAsURL( const   OUString& 
  rURL
 if ( m_pData->m_pObjectShell.Is() )
 {
 m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeAsURL" );
-SfxSaveGuard aSaveGuard(this, m_pData);
+SfxSaveGuard aSaveGuard(this, m_pData.get());
 
 impl_store( rURL, rArgs, false );
 
@@ -1667,7 +1661,7 @@ void SAL_CALL SfxBaseModel::storeToURL( const   OUString& 
  rURL
 if ( m_pData->m_pObjectShell.Is() )
 {
 m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeToURL" );
-SfxSaveGuard aSaveGuard(this, m_pData);
+SfxSaveGuard aSaveGuard(this, m_pData.get());
 try {
 impl_store(rURL, rArgs, true);
 }
@@ -1692,7 +1686,7 @@ void SAL_CALL SfxBaseModel::storeToRecoveryFile( const 
OUString& i_TargetLocatio
 SfxModelGuard aGuard( *this );
 
 // delegate
-SfxSaveGuard aSaveGuard( this, m_pData );
+SfxSaveGuard aSaveGuard( this, m_pData.get() );
 impl_store( i_TargetLocation, i_MediaDescriptor, true );
 
 // no need for subsequent calls to storeToRecoveryFile, unless we're 
modified, again
@@ -3146,6 +3140,9 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, 
const Reference< frame
 if ( impl_isDisposed() )
 return;
 
+// keep m_pData alive, if notified target would close the document
+std::shared_ptr pData(m_pData);
+
 DBG_ASSERT( !aName.isEmpty(), "Empty event name!" );
 if (aName.isEmpty())
 return;
@@ -3863,7 +3860,7 @@ bool SfxBaseModel::impl_getPrintHelper()
 aValues[0] <<= Reference < frame::XModel > (static_cast< frame::XModel* 
>(this), UNO_QUERY );
 xInit->initialize( aValues );
 Reference < view::XPrintJobBroadcaster > xBrd( m_pData->m_xPrintable, 
UNO_QUERY );
-xBrd->addPrintJobListener( new SfxPrintHelperListener_Impl( m_pData ) );
+xBrd->addPrintJobListener( new SfxPrintHelperListener_Impl( m_pData.get() 
) );
 return true;
 }
 
commit 64b3be08126a0a9f51b4547a3203716348035774
Author: Thorsten Behrens 
Date:   Fri Jan 26 18:55:13 2018 +0100

gtk3_kde5: gcc WaE fixes

Change-Id: I50c4c18df6dc47efb8a356f253c8a06bd3b3b40a

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index d039dce03c5f..b2cfabe94ce1 100644
--- 

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

2018-01-26 Thread Mike Kaganski
 desktop/source/app/app.cxx |   34 ++---
 desktop/source/app/officeipcthread.cxx |   19 +---
 svx/source/inc/docrecovery.hxx |1 
 svx/source/unodraw/recoveryui.cxx  |   38 +
 4 files changed, 85 insertions(+), 7 deletions(-)

New commits:
commit 88a37944f55949c122fb4d5b7e504e40f25ed3a8
Author: Mike Kaganski 
Date:   Sun Jan 21 22:10:09 2018 +0300

tdf#38915: set cProcessed condition on any process outcome

When application is initializing, initially request handler is not
processing requests (its state is Starting). Requests processing is
enabled in Desktop::OpenClients() after recovery had been processed.

If another soffice process is started, it communicates over already
established pipe, and sends a request to the first process. In
IpcThread::process(), it is decided if the request needs to be checked
for completion (e.g., if a file or specific module was requested to be
open). After that, the prepared request is posted for processing. In
case when the completion should be checked, PipeIpcThread::execute()
then waits for Processed condition indefinitely.

Request is processed in RequestHandler::ExecuteCmdLineRequests, which
first checks that handler's state is RequestsEnabled, and if it isn't,
then returns. Otherwise, after processing, Processed condition is set.

The problem is, thus, in case when the request comes before requests
processing is enabled (e.g., when recovery dialog is open): request
handler thread waits indefinitely, but the processed condition will
not be set. This will not allow to close the pipe to second process,
and it will hang indefinitely. The IPC thread will be hung even after
user closes recovery dialog, and continues working with program. So,
subsequent attempts to open files from file manager (launching new
process) will fail, and new zombie soffice processes will wait the
first indefinitely. Also, when first process will be closed by user,
the deinit sequence will attempt to wait for the IPC thread to finish
(in RequestHandler::Disable(), after all visible windows had been
closed), which will leave the first process hung, preventing all
subsequent attempts to open LibreOffice.

This patch ensures that the Processed condition is set at any outcome
in RequestHandler::ExecuteCmdLineRequests. Also, it brings (possibly
hidden) recovery dialog to front, making the reason why following
attempts to open files fail apparent to user.

Change-Id: Ibddf7483e5b1d6167ac7f307ea2442119f446129
Reviewed-on: https://gerrit.libreoffice.org/48280
Tested-by: Jenkins 
Reviewed-by: Aron Budea 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/48292
Tested-by: Aron Budea 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e4570545295c..53934e47a050 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1137,6 +1137,15 @@ void impl_checkRecoveryState(bool& bCrashed   ,
 bSessionDataExists = elements && session;
 }
 
+Reference< css::frame::XSynchronousDispatch > g_xRecoveryUI;
+
+template 
+struct RefClearGuard
+{
+Ref& m_Ref;
+RefClearGuard(Ref& ref) : m_Ref(ref) {}
+~RefClearGuard() { m_Ref.clear(); }
+};
 
 /*  @short  start the recovery wizard.
 
@@ -1151,12 +1160,13 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
 
 css::uno::Reference< css::uno::XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
 
-Reference< css::frame::XSynchronousDispatch > xRecoveryUI(
+g_xRecoveryUI.set(
 
xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI",
 xContext),
 css::uno::UNO_QUERY_THROW);
+RefClearGuard> 
refClearGuard(g_xRecoveryUI);
 
 Reference< css::util::XURLTransformer > xURLParser =
-
css::util::URLTransformer::create(::comphelper::getProcessComponentContext());
+css::util::URLTransformer::create(xContext);
 
 css::util::URL aURL;
 if (bEmergencySave)
@@ -1168,6 +1178,24 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
 
 xURLParser->parseStrict(aURL);
 
+css::uno::Any aRet = g_xRecoveryUI->dispatchWithReturnValue(aURL, 
css::uno::Sequence< css::beans::PropertyValue >());
+bool bRet = false;
+aRet >>= bRet;
+return bRet;
+}
+
+bool impl_bringToFrontRecoveryUI()
+{
+Reference< css::frame::XSynchronousDispatch > xRecoveryUI(g_xRecoveryUI);
+if (!xRecoveryUI.is())
+return false;
+
+css::util::URL aURL;
+aURL.Complete = "vnd.sun.star.autorecovery:/doBringToFront";
+Reference< css::util::XURLTransformer > xURLParser =
+
css::util::URLTransformer::create(::comphelper::getProcessComponentContext());
+xURLParser->parseStrict(aURL);
+
 css::uno::Any aRet = xRe

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - vcl/win

2018-01-26 Thread Mike Kaganski
 vcl/win/app/salinst.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1952332148ff351c21a198945fa76154d7e1f209
Author: Mike Kaganski 
Date:   Sat Jul 15 11:37:22 2017 +0200

tdf#38915: don't wait on message queue if application already has quit.

Despite precautions in Application::Execute() and ImplYield(),
in my testing I sometimes see that soffice is waiting in
ImplSalYield()'s GetMessageW() when ImplGetSVData()->maAppData.mbAppQuit
is true, so that soffice.bin hangs in the background. I suspect
that this is related to the bug. Some obscure code path seems to
be able to get here after the flag is already set.

So, test also in ImplSalYield() right before GetMessageW() to
make sure. Another possibility is that we get here when the flag
is not set yet, and gets set while already waiting, but that would
mean this happens in a different thread.

Change-Id: Idb19eabcca8b5c24eac0ca76950edc1bf1e5bccb
Reviewed-on: https://gerrit.libreoffice.org/39996
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit f054b9187155bc32b7d06808aea87127cb0a3a4f)
Reviewed-on: https://gerrit.libreoffice.org/48219
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index da67ca44582f..293ce2c2cc0b 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -598,7 +598,8 @@ ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
 bOneEvent = false;
 } while( --nMaxEvents && bOneEvent );
 
-if ( bWait && ! bWasMsg )
+// Also check that we don't wait when application already has quit
+if ( bWait && !bWasMsg && !ImplGetSVData()->maAppData.mbAppQuit )
 {
 if ( GetMessageW( &aMsg, nullptr, 0, 0 ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Pranav Kant
 vcl/source/window/paint.cxx   |1 +
 vcl/source/window/winproc.cxx |4 
 2 files changed, 5 insertions(+)

New commits:
commit 3dcf50fb383ebd8c38b1b931e41e3985adcc9bed
Author: Pranav Kant 
Date:   Fri Jan 26 22:25:43 2018 +0530

lokdialog: Don't leak tooltip text window through tunnelling f/w

Change-Id: I0491c86fdb1511ee4841aa670428c78aba24b8d0

diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 66233e765941..efe671705472 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -22,6 +22,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -157,6 +158,9 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, 
const Point& rMousePo
 
 static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& 
rMousePos )
 {
+if (comphelper::LibreOfficeKit::isActive())
+return;
+
 ImplSVData* pSVData = ImplGetSVData();
 if ( !pSVData->maHelpData.mpHelpWin ||
  !( pSVData->maHelpData.mpHelpWin->IsWindowOrChild( pChild ) ||
commit a39cefd99c40f121b60c882dba6000894b6996d9
Author: Pranav Kant 
Date:   Fri Jan 26 15:53:32 2018 +0530

lokdialog: Call LOK invalidate explicitly here

In some cases, Window::Update is called directly by the child classes.
This is not good for LOK clients because they rely on 'invalidate'
callbacks for painting the window.

Change-Id: I05402d7597841c96a25b7f5ac4cc60dda6ec5a16

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 5179f5648f0f..17e6db733711 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1299,6 +1299,7 @@ void Window::Update()
  }
 
 pUpdateWindow->ImplCallPaint(nullptr, 
pUpdateWindow->mpWindowImpl->mnPaintFlags);
+pUpdateWindow->LogicInvalidate(nullptr);
 
 if (xWindow->IsDisposed())
return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 11 commits - config_host/config_gtk3_kde5.h.in config_host/config_kde5.h.in config_host/config_qt5.h.in config_host/con

2018-01-26 Thread Milian Wolff
 Repository.mk  |7 
 RepositoryExternal.mk  |   64 ++
 config_host.mk.in  |   14 
 config_host/config_gtk3_kde5.h.in  |   10 
 config_host/config_kde5.h.in   |   10 
 config_host/config_qt5.h.in|   11 
 config_host/config_vclplug.h.in|1 
 configure.ac   |  237 +
 postprocess/Rdb_services.mk|3 
 scp2/InstallScript_setup_osl.mk|2 
 scp2/Module_scp2.mk|2 
 shell/Library_kde5be.mk|   32 +
 shell/Module_shell.mk  |6 
 shell/source/backends/desktopbe/desktopbackend.cxx |4 
 shell/source/backends/kde5be/kde5access.cxx|  316 
 shell/source/backends/kde5be/kde5access.hxx|   48 +
 shell/source/backends/kde5be/kde5backend.cxx   |  252 +
 shell/source/backends/kde5be/kde5be1.component |   25 
 vcl/CustomTarget_gtk3_kde5_moc.mk  |   22 
 vcl/Executable_lo_kde5filepicker.mk|   98 +++
 vcl/Library_vclplug_gtk3_kde5.mk   |  127 
 vcl/Module_vcl.mk  |7 
 vcl/unx/generic/plugadapt/salplug.cxx  |5 
 vcl/unx/gtk3_kde5/FPServiceInfo.hxx|   28 +
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkaction.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkbridge.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkcomponent.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkeditabletext.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkfactory.cxx|   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkhypertext.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkimage.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atklistener.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkregistry.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkselection.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktable.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktext.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktextattributes.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkutil.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkvalue.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwindow.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwrapper.cxx|   12 
 vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx  |  161 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_a11y.cxx   |   38 +
 vcl/unx/gtk3_kde5/gtk3_kde5_cairo.cxx  |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |  432 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx |  136 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |  259 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |  113 
 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx   |   88 +++
 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx   |   61 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_gloactiongroup.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_glomenu.cxx|   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkdata.cxx|   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkframe.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx|   55 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkobject.cxx  |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtksalmenu.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtksys.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_hudawareness.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_printwrapper.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_salnativewidgets-gtk.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_salprn-gtk.cxx |   22 
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx  |  245 +
 vcl/unx/gtk3_kde5/kde5_filepicker.hxx  |  110 
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx  |  246 +
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx  |   45 +
 vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx  |   54 ++
 67 files changed, 3839 insertions(+), 3 deletions(-)

New commits:
commit 93a0865bcd6260d36450c37afdf509d8b6e7d253
Author: Milian Wolff 
Date:   Thu Jan 25 14:08:28 2018 +0100

lo_kde5filepicker: cleanup main and add version and help options

This way users can figure out what this tool is about. Most notably,
you can run it now with `-h, --help` as one would expect.

Change-Id: If8dd3142bdcc96d2962a2647b2187d75666b9394
(cherry picked from commit 63d9c1f8bf94ea16f08e78a5f2667d5e4d96c22e)

diff --git a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx 
b/vcl/unx/g

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

2018-01-26 Thread Fyodor Yemelyanenko
 sw/source/core/undo/untblk.cxx |   73 +++--
 1 file changed, 56 insertions(+), 17 deletions(-)

New commits:
commit b9d14fbad622a05320eb90211ae2ba89edfb8148
Author: Fyodor Yemelyanenko 
Date:   Thu Nov 16 17:06:28 2017 +1000

tdf#94225 - Writer crashes on Undo N times
when document contains flys anchored to paragraph.

Change-Id: I628ef10b1e7817b554afee5e3c8733c1a128b201
Reviewed-on: https://gerrit.libreoffice.org/44800
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit 70483089425d5bb22e036867290e06a6fc8d99fb)
Reviewed-on: https://gerrit.libreoffice.org/48697
Tested-by: Jenkins 

diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 9b44e00522ea..d00210353875 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -49,22 +49,24 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const 
SwPaM& rPam )
 if( pTextNd->HasSwAttrSet() )
 pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), nSttNode );
 
-if( !nSttContent )// than take the Flys along
+// We may have some flys anchored to paragraph where we inserting.
+// These flys will be saved in pFrameFormats array (only flys which 
exist BEFORE insertion!)
+// Then in SwUndoInserts::SetInsertRange the flys saved in 
pFrameFormats will NOT create Undos.
+// m_FlyUndos will only be filled with newly inserted flys.
+
+const size_t nArrLen = pDoc->GetSpzFrameFormats()->size();
+for( size_t n = 0; n < nArrLen; ++n )
 {
-const size_t nArrLen = pDoc->GetSpzFrameFormats()->size();
-for( size_t n = 0; n < nArrLen; ++n )
+SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
+SwFormatAnchor const*const  pAnchor = &pFormat->GetAnchor();
+const SwPosition* pAPos = pAnchor->GetContentAnchor();
+if (pAPos &&
+(pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
+ nSttNode == pAPos->nNode.GetIndex() )
 {
-SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
-SwFormatAnchor const*const  pAnchor = &pFormat->GetAnchor();
-const SwPosition* pAPos = pAnchor->GetContentAnchor();
-if (pAPos &&
-(pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
- nSttNode == pAPos->nNode.GetIndex() )
-{
-if( !pFrameFormats )
-pFrameFormats = new std::vector;
-pFrameFormats->push_back( pFormat );
-}
+if( !pFrameFormats )
+pFrameFormats = new std::vector;
+pFrameFormats->push_back( pFormat );
 }
 }
 }
@@ -76,7 +78,18 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& 
rPam )
 }
 }
 
-// set destination after reading input
+// This method does two things:
+// 1. Adjusts SwUndoRng members, required for Undo.
+//  Members are:
+//  SwUndoRng::nSttNode - all nodes starting from this node will be deleted 
during Undo (in SwUndoInserts::UndoImpl)
+//  SwUndoRng::nSttContent - corresponding content index in SwUndoRng::nSttNode
+//  SwUndoRng::nEndNode - end node for deletion
+//  SwUndoRng::nEndContent - end content index
+// All these members are filled in during construction of SwUndoInserts 
instance, and can be adjusted using this method
+//
+// 2. Fills in m_FlyUndos array with flys anchored ONLY to first and last 
paragraphs (first == rPam.Start(), last == rPam.End())
+//  Flys, anchored to any paragraph, but not first and last, are handled by 
DelContentIndex (see SwUndoInserts::UndoImpl) and are not stored in m_FlyUndos.
+
 void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
 bool bSttIsTextNd )
 {
@@ -100,7 +113,9 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool 
bScanFlys,
 }
 }
 
-if( bScanFlys && !nSttContent )
+// Fill m_FlyUndos with flys anchored to first and last paragraphs
+
+if( bScanFlys)
 {
 // than collect all new Flys
 SwDoc* pDoc = rPam.GetDoc();
@@ -112,7 +127,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool 
bScanFlys,
 SwPosition const*const pAPos = pAnchor->GetContentAnchor();
 if (pAPos &&
 (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
-nSttNode == pAPos->nNode.GetIndex() )
+(nSttNode == pAPos->nNode.GetIndex() || nEndNode == 
pAPos->nNode.GetIndex()))
 {
 std::vector::iterator it;
 if( !pFrameFormats ||
@@ -145,6 +160,27 @@ SwUndoInserts::~SwUndoInserts()
 delete pRedlData;
 }
 
+// Undo Insert operation
+//  It's important to note that Undo stores absolute node i

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

2018-01-26 Thread Caolán McNamara
 filter/source/msfilter/mscodec.cxx  |   25 +++--
 include/filter/msfilter/mscodec.hxx |8 ++--
 2 files changed, 25 insertions(+), 8 deletions(-)

New commits:
commit 2372003d94d3c58d90f6af524e916a2aa761cee2
Author: Caolán McNamara 
Date:   Fri Jan 26 10:47:24 2018 +

Resolves: tdf#114221 generate both std97 and cryptoapi keys from password..

when we open a cryptoapi encrypted binary msoffice document. That way when 
we
save as the same format, and try to reuse the generated keys for 
encryption, we
have matching std97 encryption keys available because we always export using
that scheme.

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

diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index c4c0a4c83c85..975c9078dd1d 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -245,8 +245,9 @@ void MSCodec_Xor95::Skip( std::size_t nBytes )
 mnOffset = (mnOffset + nBytes) & 0x0F;
 }
 
-MSCodec97::MSCodec97(size_t nHashLen)
-: m_nHashLen(nHashLen)
+MSCodec97::MSCodec97(size_t nHashLen, const OUString& rEncKeyName)
+: m_sEncKeyName(rEncKeyName)
+, m_nHashLen(nHashLen)
 , m_hCipher(rtl_cipher_create(rtl_Cipher_AlgorithmARCFOUR, 
rtl_Cipher_ModeStream))
 , m_aDocId(16, 0)
 , m_aDigestValue(nHashLen, 0)
@@ -255,14 +256,14 @@ MSCodec97::MSCodec97(size_t nHashLen)
 }
 
 MSCodec_Std97::MSCodec_Std97()
-: MSCodec97(RTL_DIGEST_LENGTH_MD5)
+: MSCodec97(RTL_DIGEST_LENGTH_MD5, "STD97EncryptionKey")
 {
 m_hDigest = rtl_digest_create(rtl_Digest_AlgorithmMD5);
 assert(m_hDigest != nullptr);
 }
 
 MSCodec_CryptoAPI::MSCodec_CryptoAPI()
-: MSCodec97(RTL_DIGEST_LENGTH_SHA1)
+: MSCodec97(RTL_DIGEST_LENGTH_SHA1, "CryptoAPIEncryptionKey")
 {
 }
 
@@ -300,7 +301,7 @@ bool MSCodec97::InitCodec( const uno::Sequence< 
beans::NamedValue >& aData )
 bool bResult = false;
 
 ::comphelper::SequenceAsHashMap aHashData( aData );
-uno::Sequence< sal_Int8 > aKey = 
aHashData.getUnpackedValueOrDefault("STD97EncryptionKey", uno::Sequence< 
sal_Int8 >() );
+uno::Sequence aKey = 
aHashData.getUnpackedValueOrDefault(m_sEncKeyName, uno::Sequence());
 const size_t nKeyLen = aKey.getLength();
 if (nKeyLen == m_nHashLen)
 {
@@ -328,7 +329,7 @@ uno::Sequence< beans::NamedValue > 
MSCodec97::GetEncryptionData()
 {
 ::comphelper::SequenceAsHashMap aHashData;
 assert(m_aDigestValue.size() == m_nHashLen);
-aHashData[ OUString( "STD97EncryptionKey" ) ] <<= uno::Sequence< sal_Int8 
>( reinterpret_cast(m_aDigestValue.data()), m_nHashLen );
+aHashData[m_sEncKeyName] <<= 
uno::Sequence(reinterpret_cast(m_aDigestValue.data()), 
m_nHashLen);
 aHashData[ OUString( "STD97UniqueID" ) ] <<= uno::Sequence< sal_Int8 >( 
reinterpret_cast(m_aDocId.data()), m_aDocId.size() );
 
 return aHashData.getAsConstNamedValueList();
@@ -384,6 +385,9 @@ void MSCodec_CryptoAPI::InitKey (
 (void)memcpy(m_aDocId.data(), pDocId, 16);
 
 lcl_PrintDigest(m_aDocId.data(), "DocId value");
+
+//generate the old format key while we have the required data
+m_aStd97Key = ::comphelper::DocPasswordHelper::GenerateStd97Key(pPassData, 
pDocId);
 }
 
 bool MSCodec97::VerifyKey(const sal_uInt8* pSaltData, const sal_uInt8* 
pSaltDigest)
@@ -483,6 +487,15 @@ bool MSCodec_CryptoAPI::InitCipher(sal_uInt32 nCounter)
 return (result == rtl_Cipher_E_None);
 }
 
+uno::Sequence MSCodec_CryptoAPI::GetEncryptionData()
+{
+::comphelper::SequenceAsHashMap aHashData(MSCodec97::GetEncryptionData());
+//add in the old encryption key as well as our new key so saving using the
+//old crypto scheme can be done without reprompt for the password
+aHashData[OUString("STD97EncryptionKey")] <<= m_aStd97Key;
+return aHashData.getAsConstNamedValueList();
+}
+
 void MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 
nSaltDigest[16] )
 {
 #if DEBUG_MSO_ENCRYPTION_STD97
diff --git a/include/filter/msfilter/mscodec.hxx 
b/include/filter/msfilter/mscodec.hxx
index b0ab818449ae..aa38f6e9fc00 100644
--- a/include/filter/msfilter/mscodec.hxx
+++ b/include/filter/msfilter/mscodec.hxx
@@ -178,7 +178,7 @@ public:
 class MSFILTER_DLLPUBLIC MSCodec97
 {
 public:
-MSCodec97(size_t nHashLen);
+MSCodec97(size_t nHashLen, const OUString& rEncKeyName);
 virtual ~MSCodec97();
 
 /** Initializes the algorithm with the encryption data.
@@ -195,7 +195,7 @@ public:
 The sequence contains the necessary data to initialize
 the codec.
  */
-css::uno::Sequence< css::beans::NamedValue > GetEncryptionData();
+virtual css::uno::Sequence GetEncryptionData();
 
 /** Initializes the algorithm with the specified password and document ID.
 
@@ -317,6 +317,7 @@ p

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

2018-01-26 Thread Pranav Kant
 kit/Kit.cpp |   24 
 1 file changed, 24 insertions(+)

New commits:
commit 1d22f7bc548dc48c95390c6f23b67f1972825617
Author: Pranav Kant 
Date:   Fri Jan 26 21:04:49 2018 +0530

kit: start spamming the logs when linking/copying is slowww

This is sometimes the case in docker when the link operation 'copies up'
things from lower layers to the working docker container's layer. In
such cases, let the admin know.

Change-Id: Ib72b67304a292c3832838379cc76bcb4a7268cb3
Reviewed-on: https://gerrit.libreoffice.org/48710
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index f38af663..c853b3ed 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -120,6 +120,9 @@ namespace
 LinkOrCopyType linkOrCopyType;
 std::string sourceForLinkOrCopy;
 Path destinationForLinkOrCopy;
+std::chrono::time_point linkOrCopyStartTime;
+bool linkOrCopyVerboseLogging = false;
+unsigned slowLinkOrCopyLimitInSecs = 10; // after this much seconds, start 
spamming the logs
 
 bool shouldCopyDir(const char *path)
 {
@@ -151,6 +154,18 @@ namespace
 if (strcmp(fpath, sourceForLinkOrCopy.c_str()) == 0)
 return 0;
 
+if (!linkOrCopyVerboseLogging)
+{
+const auto durationInSecs = 
std::chrono::duration_cast(
+std::chrono::steady_clock::now() - linkOrCopyStartTime);
+if (durationInSecs.count() > slowLinkOrCopyLimitInSecs)
+{
+LOG_WRN("Linking/copying files from " << sourceForLinkOrCopy 
<< " to " << destinationForLinkOrCopy.toString() <<
+" is taking too much time. Enabling verbose link/copy 
logging at information level.");
+linkOrCopyVerboseLogging = true;
+}
+}
+
 assert(fpath[strlen(sourceForLinkOrCopy.c_str())] == '/');
 const char *relativeOldPath = fpath + 
strlen(sourceForLinkOrCopy.c_str()) + 1;
 Path newPath(destinationForLinkOrCopy, Path(relativeOldPath));
@@ -160,6 +175,9 @@ namespace
 case FTW_F:
 case FTW_SLN:
 File(newPath.parent()).createDirectories();
+
+if (linkOrCopyVerboseLogging)
+LOG_INF("Linking file \"" << fpath << "\" to \"" << 
newPath.toString() << "\"");
 if (link(fpath, newPath.toString().c_str()) == -1)
 {
 LOG_SYS("link(\"" << fpath << "\", \"" <<
@@ -223,10 +241,16 @@ namespace
 if (sourceForLinkOrCopy.back() == '/')
 sourceForLinkOrCopy.pop_back();
 destinationForLinkOrCopy = destination;
+linkOrCopyStartTime = std::chrono::steady_clock::now();
 if (nftw(source.c_str(), linkOrCopyFunction, 10, FTW_ACTIONRETVAL) == 
-1)
 {
 LOG_ERR("linkOrCopy: nftw() failed for '" << source << "'");
 }
+if (linkOrCopyVerboseLogging)
+{
+LOG_INF("Linking/Copying of files to " << 
destinationForLinkOrCopy.toString() << " finished.");
+linkOrCopyVerboseLogging = false;
+}
 }
 
 void dropCapability(cap_value_t capability)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Julien Nabet
 forms/source/component/Time.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b34ddf572bd5dab6173bf7daf6341d3f0f74535a
Author: Julien Nabet 
Date:   Fri Jan 26 11:19:36 2018 +0100

tdf#108473: don't let empty date in datetime in forms

If only an hour is given (so no date part), copy behavior for table and 
query
and put 30/12/99 by default

Change-Id: Ifb371758538d2d11bd02b101a347d34816b6fddf
Reviewed-on: https://gerrit.libreoffice.org/48665
Reviewed-by: Julien Nabet 
(cherry picked from commit a30652295be09afdbba707ce13d0a03e22c4e7a3)
Reviewed-on: https://gerrit.libreoffice.org/48692
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins 

diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index f54e160c038c..5ba0c808a981 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace dbtools;
 
@@ -235,6 +236,8 @@ bool OTimeModel::commitControlValueToDbColumn( bool 
/*_bPostReset*/ )
 else
 {
 util::DateTime aDateTime = m_xColumn->getTimestamp();
+if (aDateTime.Year == 0 && aDateTime.Month == 0 && 
aDateTime.Day == 0)
+aDateTime = 
::com::sun::star::util::DateTime(0,0,0,0,30,12,1899, false);
 aDateTime.NanoSeconds = aTime.NanoSeconds;
 aDateTime.Seconds = aTime.Seconds;
 aDateTime.Minutes = aTime.Minutes;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ios/LibreOfficeLight

2018-01-26 Thread jan Iversen
 ios/LibreOfficeLight/LibreOfficeLight/Info.plist |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit 2cbcaa58b9fdbe78119b43a2a4404bebbb3fcebd
Author: jan Iversen 
Date:   Fri Jan 26 15:46:20 2018 +0100

iOS, add support for PDF

Updated Document Types and import types.

Change-Id: Id7e5aef91cdf52783a83672becfd7bbb78f986ad

diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Info.plist 
b/ios/LibreOfficeLight/LibreOfficeLight/Info.plist
index 8e26191c6a76..c50ff60567f3 100755
--- a/ios/LibreOfficeLight/LibreOfficeLight/Info.plist
+++ b/ios/LibreOfficeLight/LibreOfficeLight/Info.plist
@@ -349,6 +349,7 @@
org.libreoffice.cdr-document
org.libreoffice.visio-document
org.libreoffice.mspub-document
+   com.adobe.pdf



@@ -1784,6 +1785,28 @@ file, You can obtain one at 
http://mozilla.org/MPL/2.0/.



+   
+   UTTypeConformsTo
+   
+   public.data
+   public.composite-​content
+   
+   UTTypeDescription
+Apple PDF pasteboard type PDF data
+   UTTypeIdentifier
+   com.adobe.pdf
+   UTTypeTagSpecification
+   
+   public.filename-extension
+
+pdf
+
+public.mime-type
+
+application/pdf
+
+   
+   

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


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

2018-01-26 Thread Pranav Kant
 wsd/LOOLWSD.cpp |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9ea81e792109b394713e71a5b72aa7f21a17755d
Author: Pranav Kant 
Date:   Fri Jan 26 20:10:36 2018 +0530

wsd: Update client port number if default is unavailable

And print that on the console so that user knows what port the current
wsd instance is using.

Change-Id: I68fb7d23f46df4ad56ba444735b2888c410f7bd5

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index ca0ca6a5..13ae0298 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2587,6 +2587,7 @@ private:
 _exit(Application::EXIT_SOFTWARE);
 }
 
+MasterPortNumber = port;
 LOG_INF("Listening to prisoner connections on port " << port);
 return socket;
 }
@@ -2613,6 +2614,7 @@ private:
 ServerSocket::Type::Public, port, WebServerPoll, factory);
 }
 
+ClientPortNumber = port;
 LOG_INF("Listening to client connections on port " << port);
 return socket;
 }
@@ -2751,7 +2753,7 @@ int LOOLWSD::innerMain()
 /// The main-poll does next to nothing:
 SocketPoll mainWait("main");
 #if ENABLE_DEBUG
-std::cerr << "Ready to accept connections.\n" << std::endl;
+std::cerr << "Ready to accept connections on port " << ClientPortNumber << 
 ".\n" << std::endl;
 #endif
 
 const auto startStamp = std::chrono::steady_clock::now();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Pranav Kant
 common/Util.cpp |   26 ++
 common/Util.hpp |3 +++
 kit/Kit.cpp |6 +++---
 3 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit c16d1985604940c2f35e49ac27a63d973a2a65ea
Author: Pranav Kant 
Date:   Fri Jan 26 20:02:09 2018 +0530

Print humanized bytes in the logs

Change-Id: I2ebdea0c3a360be1573ae13fa9cbe6f432436f29

diff --git a/common/Util.cpp b/common/Util.cpp
index 72c150a4..f8c493b9 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -170,6 +170,32 @@ namespace Util
 return nullptr;
 }
 
+std::string getHumanizedBytes(unsigned long nBytes)
+{
+constexpr unsigned factor = 1024;
+short count = 0;
+float val = nBytes;
+while (val >= factor && count < 4) {
+val /= factor;
+count++;
+}
+std::string unit;
+switch (count)
+{
+case 0: unit = ""; break;
+case 1: unit = "ki"; break;
+case 2: unit = "Mi"; break;
+case 3: unit = "Gi"; break;
+case 4: unit = "Ti"; break;
+default: assert(false);
+}
+
+unit += "B";
+std::stringstream ss;
+ss << std::fixed << std::setprecision(1) << val << ' ' << unit;
+return ss.str();
+}
+
 size_t getTotalSystemMemoryKb()
 {
 size_t totalMemKb = 0;
diff --git a/common/Util.hpp b/common/Util.hpp
index b4eb3504..5118efb6 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -97,6 +97,9 @@ namespace Util
 #endif
 }
 
+/// Print given number of bytes in human-understandable form (KB,MB, etc.)
+std::string getHumanizedBytes(unsigned long nBytes);
+
 /// Returns the total physical memory (in kB) available in the system
 size_t getTotalSystemMemoryKb();
 
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 4d054427..f38af663 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -2103,17 +2103,17 @@ void lokit_main(const std::string& childRoot,
 
 rlimit rlim = { 0, 0 };
 if (getrlimit(RLIMIT_AS, &rlim) == 0)
-LOG_INF("RLIMIT_AS is " << rlim.rlim_max << " bytes.");
+LOG_INF("RLIMIT_AS is " << Util::getHumanizedBytes(rlim.rlim_max) 
<< " (" << rlim.rlim_max << " bytes)");
 else
 LOG_SYS("Failed to get RLIMIT_AS.");
 
 if (getrlimit(RLIMIT_STACK, &rlim) == 0)
-LOG_INF("RLIMIT_STACK is " << rlim.rlim_max << " bytes.");
+LOG_INF("RLIMIT_STACK is " << 
Util::getHumanizedBytes(rlim.rlim_max) << " (" << rlim.rlim_max << " bytes)");
 else
 LOG_SYS("Failed to get RLIMIT_STACK.");
 
 if (getrlimit(RLIMIT_FSIZE, &rlim) == 0)
-LOG_INF("RLIMIT_FSIZE is " << rlim.rlim_max << " bytes.");
+LOG_INF("RLIMIT_FSIZE is " << 
Util::getHumanizedBytes(rlim.rlim_max) << " (" << rlim.rlim_max << " bytes)");
 else
 LOG_SYS("Failed to get RLIMIT_FSIZE.");
 
___
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 xmloff/source

2018-01-26 Thread Michael Stahl
 sw/source/core/undo/undobj.cxx  |3 +--
 xmloff/source/text/txtparae.cxx |4 
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 17d7f2971061a9e0b68da6d433835c64b946169a
Author: Michael Stahl 
Date:   Fri Jan 26 14:56:37 2018 +0100

sw: remove misleading comment from SwUndoSaveContent::DelContentIndex()

"Directories" weren't handled in the initial CVS import already.

Change-Id: Ic96921d8e3e8aa5a5e65e07391236f0a7747c867

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 449479da46e9..bb6e1c50af90 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -837,7 +837,6 @@ void SwUndoSaveContent::MovePtForward( SwPaM& rPam, bool 
bMvBkwrd )
 //  - Footnotes
 //  - Flys
 //  - Bookmarks
-//  - Directories
 
 // #i81002# - extending method
 // delete certain (not all) cross-reference bookmarks at text node of 
@@ -1210,7 +1209,7 @@ void SwUndoSaveSection::SaveSection(
 {
 SwPaM aPam( rRange.aStart, rRange.aEnd );
 
-// delete all footnotes, fly frames, bookmarks and indexes
+// delete all footnotes, fly frames, bookmarks
 DelContentIndex( *aPam.GetMark(), *aPam.GetPoint() );
 {
 // move certain indexes out of deleted range
commit 55650f65de478bcee65fe1e1cf19f106e407f999
Author: Michael Stahl 
Date:   Fri Jan 26 14:24:02 2018 +0100

xmloff: ODF export: don't write LO_EXT attribute unless ODF expended

The loext namespace is not defined when exporting standard ODF
versions, which triggers an assert() in SvXMLNamespaceMap.

(regression from 4469b29faeb8dbf7793a5d81d9c5ddebacf3015f)

Change-Id: Ic93fb0ea8fe092463d3fd18a0fbf4429d8652642

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 656c33a6cbb2..c5baccfe79fc 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3141,7 +3141,11 @@ void XMLTextParagraphExport::_exportTextGraphic(
 const OString aExt( OUStringToOString( aSourceMimeType, 
RTL_TEXTENCODING_ASCII_US ) );
 aSourceMimeType = 
comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension( aExt );
 }
+
+if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+{
 GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", 
aSourceMimeType);
+}
 
 {
 SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_DRAW,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Fyodor Yemelyanenko
 sw/source/core/undo/untblk.cxx |   73 +++--
 1 file changed, 56 insertions(+), 17 deletions(-)

New commits:
commit 70483089425d5bb22e036867290e06a6fc8d99fb
Author: Fyodor Yemelyanenko 
Date:   Thu Nov 16 17:06:28 2017 +1000

tdf#94225 - Writer crashes on Undo N times
when document contains flys anchored to paragraph.

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

diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 9b44e00522ea..d00210353875 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -49,22 +49,24 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const 
SwPaM& rPam )
 if( pTextNd->HasSwAttrSet() )
 pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), nSttNode );
 
-if( !nSttContent )// than take the Flys along
+// We may have some flys anchored to paragraph where we inserting.
+// These flys will be saved in pFrameFormats array (only flys which 
exist BEFORE insertion!)
+// Then in SwUndoInserts::SetInsertRange the flys saved in 
pFrameFormats will NOT create Undos.
+// m_FlyUndos will only be filled with newly inserted flys.
+
+const size_t nArrLen = pDoc->GetSpzFrameFormats()->size();
+for( size_t n = 0; n < nArrLen; ++n )
 {
-const size_t nArrLen = pDoc->GetSpzFrameFormats()->size();
-for( size_t n = 0; n < nArrLen; ++n )
+SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
+SwFormatAnchor const*const  pAnchor = &pFormat->GetAnchor();
+const SwPosition* pAPos = pAnchor->GetContentAnchor();
+if (pAPos &&
+(pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
+ nSttNode == pAPos->nNode.GetIndex() )
 {
-SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
-SwFormatAnchor const*const  pAnchor = &pFormat->GetAnchor();
-const SwPosition* pAPos = pAnchor->GetContentAnchor();
-if (pAPos &&
-(pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
- nSttNode == pAPos->nNode.GetIndex() )
-{
-if( !pFrameFormats )
-pFrameFormats = new std::vector;
-pFrameFormats->push_back( pFormat );
-}
+if( !pFrameFormats )
+pFrameFormats = new std::vector;
+pFrameFormats->push_back( pFormat );
 }
 }
 }
@@ -76,7 +78,18 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& 
rPam )
 }
 }
 
-// set destination after reading input
+// This method does two things:
+// 1. Adjusts SwUndoRng members, required for Undo.
+//  Members are:
+//  SwUndoRng::nSttNode - all nodes starting from this node will be deleted 
during Undo (in SwUndoInserts::UndoImpl)
+//  SwUndoRng::nSttContent - corresponding content index in SwUndoRng::nSttNode
+//  SwUndoRng::nEndNode - end node for deletion
+//  SwUndoRng::nEndContent - end content index
+// All these members are filled in during construction of SwUndoInserts 
instance, and can be adjusted using this method
+//
+// 2. Fills in m_FlyUndos array with flys anchored ONLY to first and last 
paragraphs (first == rPam.Start(), last == rPam.End())
+//  Flys, anchored to any paragraph, but not first and last, are handled by 
DelContentIndex (see SwUndoInserts::UndoImpl) and are not stored in m_FlyUndos.
+
 void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
 bool bSttIsTextNd )
 {
@@ -100,7 +113,9 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool 
bScanFlys,
 }
 }
 
-if( bScanFlys && !nSttContent )
+// Fill m_FlyUndos with flys anchored to first and last paragraphs
+
+if( bScanFlys)
 {
 // than collect all new Flys
 SwDoc* pDoc = rPam.GetDoc();
@@ -112,7 +127,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool 
bScanFlys,
 SwPosition const*const pAPos = pAnchor->GetContentAnchor();
 if (pAPos &&
 (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
-nSttNode == pAPos->nNode.GetIndex() )
+(nSttNode == pAPos->nNode.GetIndex() || nEndNode == 
pAPos->nNode.GetIndex()))
 {
 std::vector::iterator it;
 if( !pFrameFormats ||
@@ -145,6 +160,27 @@ SwUndoInserts::~SwUndoInserts()
 delete pRedlData;
 }
 
+// Undo Insert operation
+//  It's important to note that Undo stores absolute node indexes. I.e. if 
during insertion, you insert nodes 31 to 33,
+//  during Undo nodes with indices from 31 to 33 will be deleted. Undo doesn't 
check th

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

2018-01-26 Thread Aron Budea
 sw/qa/extras/uiwriter/uiwriter.cxx |7 ++-
 sw/source/uibase/dbui/dbmgr.cxx|   21 ++---
 2 files changed, 20 insertions(+), 8 deletions(-)

New commits:
commit e3adde7b2dfa85c011640ea9689fa9258d0d61cc
Author: Aron Budea 
Date:   Mon Jan 22 03:00:28 2018 +0100

tdf115103: find data source if sDataSource/sCommand are empty

In several functions data source was only found if sDataSource and
sCommand corresponded to what was set in fields.
In imported DOC(X) files these aren't set.

Now use the data source even if field's sDataSource/sCommand are
empty (similarly to SwDBManager::IsDataSourceOpen(...)).

Reviewed-on: https://gerrit.libreoffice.org/48285
Tested-by: Jenkins 
Reviewed-by: Aron Budea 
(cherry picked from commit 6feeb77552c38e3d9819611e9678470a44c00c84)

Change-Id: I9563cb56e700e7fd033100cb200f41f074669020
Reviewed-on: https://gerrit.libreoffice.org/48614
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 
(cherry picked from commit b4cef1fb91c7b5024c4e370b0c57a1d4c463a476)

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 2c116217ba5d..a60ea06861eb 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1711,7 +1711,8 @@ sal_uLong SwDBManager::GetColumnFormat( const OUString& 
rDBName,
 uno::Reference< sdbcx::XColumnsSupplier> xColsSupp;
 bool bDisposeConnection = false;
 if(pImpl->pMergeData &&
-pImpl->pMergeData->sDataSource.equals(rDBName) && 
pImpl->pMergeData->sCommand.equals(rTableName))
+((pImpl->pMergeData->sDataSource == rDBName && 
pImpl->pMergeData->sCommand == rTableName) ||
+(rDBName.isEmpty() && rTableName.isEmpty(
 {
 xConnection = pImpl->pMergeData->xConnection;
 xSource = SwDBManager::getDataSourceAsParent(xConnection,rDBName);
@@ -2419,11 +2420,15 @@ sal_uInt32  SwDBManager::GetSelectedRecordId(
 {
 sal_uInt32 nRet = 0x;
 //check for merge data source first
-if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource &&
-rTableOrQuery == pImpl->pMergeData->sCommand &&
-(nCommandType == -1 || nCommandType == 
pImpl->pMergeData->nCommandType) &&
-pImpl->pMergeData->xResultSet.is())
+if(pImpl->pMergeData &&
+((rDataSource == pImpl->pMergeData->sDataSource &&
+rTableOrQuery == pImpl->pMergeData->sCommand) ||
+(rDataSource.isEmpty() && rTableOrQuery.isEmpty())) &&
+(nCommandType == -1 || nCommandType == 
pImpl->pMergeData->nCommandType) &&
+pImpl->pMergeData->xResultSet.is())
+{
 nRet = GetSelectedRecordId();
+}
 else
 {
 SwDBData aData;
@@ -2479,8 +2484,10 @@ voidSwDBManager::CloseAll(bool bIncludingMerge)
 SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
 {
 //prefer merge data if available
-if(pImpl->pMergeData && rData.sDataSource == 
pImpl->pMergeData->sDataSource &&
-rData.sCommand == pImpl->pMergeData->sCommand &&
+if(pImpl->pMergeData &&
+((rData.sDataSource == pImpl->pMergeData->sDataSource &&
+rData.sCommand == pImpl->pMergeData->sCommand) ||
+(rData.sDataSource.isEmpty() && rData.sCommand.isEmpty())) &&
 (rData.nCommandType == -1 || rData.nCommandType == 
pImpl->pMergeData->nCommandType ||
 (bCreate && pImpl->pMergeData->nCommandType == -1)))
 {
commit 2c9ff74995a58fae60ac7fe830db8bf07fb0b16b
Author: Mike Kaganski 
Date:   Fri Jan 19 10:14:07 2018 +0100

Don't create database files in $HOME

Regression from commit 46b3202bf883618f1585850191c19776861013ed

Change-Id: If8e0b309274ea14e996e0dde2d1ee9b49ff0f737
Reviewed-on: https://gerrit.libreoffice.org/48173
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/48477
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 
(cherry picked from commit 61651849676ef1377f2e51675379bb4b7444557b)

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 5c96aacf7a1e..95206bf7944d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4649,13 +4649,16 @@ void SwUiWriterTest::testTdf115013()
 {
const OUString sColumnName("Name with spaces, \"quotes\" and 
\\backslashes");
 
+   utl::TempFile aTempDir(nullptr, true);
+   const OUString aWorkDir = aTempDir.GetURL();
+
//create new writer document
 SwDoc* pDoc = createDoc();
 
 {
 // Load and register data source
 const OUString 
aDataSourceURI(m_directories.getURLFromSrc(DATA_DIRECTORY) + "datasource.ods");
-OUString sDataSource = 
SwDBManager::LoadAndRegisterDataSource(aDataSourceURI, nullptr, nullptr, 
nullptr);
+OUString sDataSource = 
SwDBManager::LoadAndRegisterDataSource(a

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

2018-01-26 Thread Julien Nabet
 forms/source/component/Time.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a30652295be09afdbba707ce13d0a03e22c4e7a3
Author: Julien Nabet 
Date:   Fri Jan 26 11:19:36 2018 +0100

tdf#108473: don't let empty date in datetime in forms

If only an hour is given (so no date part), copy behavior for table and 
query
and put 30/12/99 by default

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

diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 3e580c8451c2..ed87e9aa6224 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace dbtools;
 
@@ -235,6 +236,8 @@ bool OTimeModel::commitControlValueToDbColumn( bool 
/*_bPostReset*/ )
 else
 {
 util::DateTime aDateTime = m_xColumn->getTimestamp();
+if (aDateTime.Year == 0 && aDateTime.Month == 0 && 
aDateTime.Day == 0)
+aDateTime = 
::com::sun::star::util::DateTime(0,0,0,0,30,12,1899, false);
 aDateTime.NanoSeconds = aTime.NanoSeconds;
 aDateTime.Seconds = aTime.Seconds;
 aDateTime.Minutes = aTime.Minutes;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source

2018-01-26 Thread Caolán McNamara
 vcl/source/window/seleng.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ea5384c177dcaf96a951019ab6a026b884832592
Author: Caolán McNamara 
Date:   Wed Jan 24 17:18:35 2018 +

gtk3: single click with selection set doesn't unselect

this is a safe backportable fix, the unconditional

nFlags |= SelectionEngineFlags::CMDEVT

looks the real dubious thing to me, but only the gtk3 backend has swipe 
support
so just returning immediately on a swipe definitely ok

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

diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 3b06d3d11623..286fa10275d6 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -343,7 +343,7 @@ void SelectionEngine::Reset()
 void SelectionEngine::Command( const CommandEvent& rCEvt )
 {
 // Timer aWTimer is active during enlarging a selection
-if ( !pFunctionSet || !pWin || aWTimer.IsActive() )
+if ( !pFunctionSet || !pWin || aWTimer.IsActive() || rCEvt.GetCommand() == 
CommandEventId::Swipe )
 return;
 aWTimer.Stop();
 nFlags |= SelectionEngineFlags::CMDEVT;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Olivier Hallot
 source/text/swriter/01/watermark.xhp |   20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 854f87b82b23d5409b4a3f6cea8628324fb238cc
Author: Olivier Hallot 
Date:   Fri Jan 26 10:56:19 2018 -0200

tdf#112356 Watermark help page, better bookmarking

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

diff --git a/source/text/swriter/01/watermark.xhp 
b/source/text/swriter/01/watermark.xhp
index 41fee8839..dd714e55b 100644
--- a/source/text/swriter/01/watermark.xhp
+++ b/source/text/swriter/01/watermark.xhp
@@ -17,16 +17,17 @@
 
 
 
-
-
-
-watermark;text documents
-watermark;page background
-page background;watermark
-
+
 
 Page Watermark
 Insert a watermark text 
in the current page style background.
+
+
+
+watermark;text documents
+watermark;page background
+page background;watermark
+
 
 
 Choose Format - Watermark  

@@ -36,15 +37,20 @@
 Fill the dialog settings below.
 The 
values entered applies to the actual page style.
  
+
 Text
 Enter the watermark text to be displayed as image in the page 
brackground.
+
 Font
 Select the font from the list.
 You 
cannot choose font size or font style for the watermark text. The text size 
will be scaled to fit in one line in the page brackground.
+
 Angle
 Select the slant angle for the watermark. A positive angle 
displays tha watermark from bottom to top. A negative value displays the 
watermark text from top to bottom.
+
 Transparency
 Select the transparency index for the watermark. A 0% value 
produce an opaque watermark and a value of 100% is totally transparent 
(invisible).
+
 Color
 Select color from the drop-down box.
 To change a watermark contents or setting.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-01-26 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d4fecf0e6a1b98d251d6c17abb52b5417af810c8
Author: Olivier Hallot 
Date:   Fri Jan 26 10:56:19 2018 -0200

Updated core
Project: help  854f87b82b23d5409b4a3f6cea8628324fb238cc

tdf#112356 Watermark help page, better bookmarking

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

diff --git a/helpcontent2 b/helpcontent2
index f15eac158a47..854f87b82b23 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f15eac158a47aac87d5dc40004899871ebc5739e
+Subproject commit 854f87b82b23d5409b4a3f6cea8628324fb238cc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Pranav Kant
 tools/Config.cpp |  234 +++
 1 file changed, 136 insertions(+), 98 deletions(-)

New commits:
commit f942e5a29ecb7aecdc0b085f8bafa7ac6a5d6f86
Author: Pranav Kant 
Date:   Fri Jan 26 18:29:12 2018 +0530

loolconfig: Allow changing loolwsd.xml

eg: `loolconfig set-raw-config admin_console.password admin`

And while at it, stop processing all the arguments given to the command.
Regard the first argument (without any "--") as command and let the
specific-command handling routine handle the remaining arguments the way
it wants.

Change-Id: I6cc406c56701dba2b99e0a3c4a98c505df70ee60

diff --git a/tools/Config.cpp b/tools/Config.cpp
index e12bbf4e..79f4398b 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -72,7 +72,14 @@ protected:
 int main(const std::vector&) override;
 };
 
-std::string Config::ConfigFile = LOOLWSD_CONFIGDIR "/loolwsd.xml";
+std::string Config::ConfigFile =
+#if ENABLE_DEBUG
+DEBUG_ABSSRCDIR
+#else
+LOOLWSD_CONFIGDIR
+#endif
+"/loolwsd.xml";
+
 std::string Config::SupportKeyString;
 bool Config::SupportKeyStringProvided = false;
 
@@ -80,17 +87,22 @@ void Config::displayHelp()
 {
 HelpFormatter helpFormatter(options());
 helpFormatter.setCommand(commandName());
-
-std::string usage = "set-admin-password";
-#if ENABLE_SUPPORT_KEY
-usage = "(set-admin-password|set-support-key)";
-#endif
-
-helpFormatter.setUsage(usage + " OPTIONS");
+helpFormatter.setUsage("COMMAND [OPTIONS]");
 helpFormatter.setHeader("loolconfig - Configuration tool for LibreOffice 
Online.\n"
 "\n"
-"Some options make sense only with a concrete 
command, in that case the command name is specified in brackets.");
+"Some options make sense only with a specific 
command.\n\n"
+"Options:");
+
 helpFormatter.format(std::cout);
+
+// Command list
+std::cout << std::endl
+  << "Commands: " << std::endl
+  << "set-admin-password\n"
+#if ENABLE_SUPPORT_KEY
+  << "set-support-key\n"
+#endif
+  << "set-raw-config  " << std::endl;
 }
 
 void Config::defineOptions(OptionSet& optionSet)
@@ -187,109 +199,135 @@ int Config::main(const std::vector& args)
 bool changed = false;
 _loolConfig.load(ConfigFile);
 
-for (unsigned long i = 0; i < args.size(); i++)
+if (args[0] == "set-admin-password")
 {
-if (args[i] == "set-admin-password")
-{
 #if HAVE_PKCS5_PBKDF2_HMAC
-unsigned char pwdhash[_adminConfig.pwdHashLength];
-unsigned char salt[_adminConfig.pwdSaltLength];
-RAND_bytes(salt, _adminConfig.pwdSaltLength);
-std::stringstream stream;
-
-// Ask for user password
-termios oldTermios;
-tcgetattr(STDIN_FILENO, &oldTermios);
-termios newTermios = oldTermios;
-// Disable user input mirroring on console for password input
-newTermios.c_lflag &= ~ECHO;
-tcsetattr(STDIN_FILENO, TCSANOW, &newTermios);
-std::string adminPwd;
-std::cout << "Enter admin password: ";
-std::getline(std::cin, adminPwd);
-std::string reAdminPwd;
-std::cout << std::endl << "Confirm admin password: ";
-std::getline(std::cin, reAdminPwd);
-std::cout << std::endl;
-// Set the termios to old state
-tcsetattr(STDIN_FILENO, TCSANOW, &oldTermios);
-if (adminPwd != reAdminPwd)
-{
-std::cout << "Password mismatch." << std::endl;
-return Application::EXIT_DATAERR;
-}
+unsigned char pwdhash[_adminConfig.pwdHashLength];
+unsigned char salt[_adminConfig.pwdSaltLength];
+RAND_bytes(salt, _adminConfig.pwdSaltLength);
+std::stringstream stream;
+
+// Ask for user password
+termios oldTermios;
+tcgetattr(STDIN_FILENO, &oldTermios);
+termios newTermios = oldTermios;
+// Disable user input mirroring on console for password input
+newTermios.c_lflag &= ~ECHO;
+tcsetattr(STDIN_FILENO, TCSANOW, &newTermios);
+std::string adminPwd;
+std::cout << "Enter admin password: ";
+std::getline(std::cin, adminPwd);
+std::string reAdminPwd;
+std::cout << std::endl << "Confirm admin password: ";
+std::getline(std::cin, reAdminPwd);
+std::cout << std::endl;
+// Set the termios to old state
+tcsetattr(STDIN_FILENO, TCSANOW, &oldTermios);
+if (adminPwd != reAdminPwd)
+{
+std::cout << "Password mismatch." << std::endl;
+return Application::EXIT_DATAERR;
+}
 
-// Do the magic !
-PKCS5_PBKDF2_HMAC(adminPwd.c_str(), -1,
-

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

2018-01-26 Thread Eike Rathke
 sc/source/ui/unoobj/cellsuno.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 09b81a42c2689b7249c8c39899c0b5b36c050306
Author: Eike Rathke 
Date:   Fri Jan 26 14:01:12 2018 +0100

coverity#1428611 check for nullptr

Change-Id: I4d0bd765e4c1677448dcd3a74f26f36394c4a358

diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 2731e69cfc79..8cee317d4f8b 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6418,7 +6418,11 @@ sal_Int32 ScCellObj::GetResultType_Impl()
 if (pDocSh->GetDocument().GetCellType(aCellPos) == CELLTYPE_FORMULA)
 {
 ScFormulaCell* pFCell = 
pDocSh->GetDocument().GetFormulaCell(aCellPos);
-if (pFCell->GetErrCode() != FormulaError::NONE )
+if (!pFCell)
+{
+// should throw instead of default string?
+}
+else if (pFCell->GetErrCode() != FormulaError::NONE )
 {
 eRet = sheet::FormulaResult::ERROR;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 codemaker/source/cppumaker/cpputype.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e5cb9fdbac5c7afef599648737bdcfe37af6ccf
Author: Caolán McNamara 
Date:   Fri Jan 26 13:01:10 2018 +

coverity#1019311 silence Unchecked return value

Change-Id: Ife2bfed0eecff5fe247d0fef6ee7d77626d9f0be

diff --git a/codemaker/source/cppumaker/cpputype.cxx 
b/codemaker/source/cppumaker/cpputype.cxx
index 15e1f116d638..c8b52857c648 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -449,7 +449,7 @@ void CppuType::dumpFile(
 throw;
 }
 out.close();
-makeValidTypeFile(
+(void)makeValidTypeFile(
u2b(fileUri), u2b(tmpUri), exists && options.isValid("-Gc"));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Eike Rathke
 sc/source/core/data/documen3.cxx |   14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 707e0f4e6b6e36432c0f04f22719428a7e1a50ee
Author: Eike Rathke 
Date:   Fri Jan 26 13:41:09 2018 +0100

coverity#1428613 check IsValidReference() return value, tdf#108989 follow-up

Also remove the unnecessary continue;break; construct and just
return if found.

Change-Id: Ib32ff214a1a24ef3ad3c6f7f659a8b7fde6b2d4a

diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index f7f8687ca4b2..e5262cd23d89 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -212,7 +212,6 @@ bool ScDocument::IsAddressInRangeName( RangeNameScope 
eScope, ScAddress& rAddres
 {
 ScRangeName* pRangeNames;
 ScRange aNameRange;
-bool bRet = false;
 
 if (eScope == RangeNameScope::GLOBAL)
 pRangeNames= GetRangeName();
@@ -223,15 +222,14 @@ bool ScDocument::IsAddressInRangeName( RangeNameScope 
eScope, ScAddress& rAddres
 
 for (ScRangeName::iterator itr = itrBegin; itr != itrEnd; ++itr)
 {
-itr->second->IsValidReference(aNameRange);
-bRet = aNameRange.In(rAddress);
-if (!bRet)
-continue;
-else
-break;
+if (itr->second->IsValidReference(aNameRange))
+{
+if (aNameRange.In(rAddress))
+return true;
+}
 }
 
-return bRet;
+return false;
 }
 
 bool ScDocument::InsertNewRangeName( const OUString& rName, const ScAddress& 
rPos, const OUString& rExpr )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Mike Kaganski
 sc/source/ui/inc/tabview.hxx   |2 +-
 sc/source/ui/view/tabview2.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fa3dc99fe354040aecfb64c4f5af49e313edfeef
Author: Mike Kaganski 
Date:   Fri Jan 26 08:38:31 2018 +0100

nMovX is SCCOL

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

diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 885b207cbab3..e50d488c1d12 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -243,7 +243,7 @@ private:
 voidGetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, 
ScFollowMode eMode,
SCCOL& rAreaX, SCROW& rAreaY, 
ScFollowMode& rMode);
 
-voidSkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL 
nOldX, SCROW nMovX);
+voidSkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL 
nOldX, SCCOL nMovX);
 voidSkipCursorVertical(SCCOL& rCurX, SCROW& rCurY, SCROW 
nOldY, SCROW nMovY);
 
 /**
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index da36ab8dff66..9653872b00cd 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -731,7 +731,7 @@ void ScTabView::GetAreaMoveEndPosition(SCCOL nMovX, SCROW 
nMovY, ScFollowMode eM
 rMode = eMode;
 }
 
-void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, 
SCROW nMovX)
+void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, 
SCCOL nMovX)
 {
 ScDocument* pDoc = aViewData.GetDocument();
 SCTAB nTab = aViewData.GetTabNo();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 xmloff/source/draw/ximpshap.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 013a4f951c016c7e266392a91e37a123c6d49a25
Author: Caolán McNamara 
Date:   Thu Jan 25 17:16:44 2018 +

ofz#5621 Integer-overflow

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

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 5b6523a6ea5a..616dec4d1ba2 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1091,8 +1091,8 @@ void SdXMLLineShapeContext::StartElement(const 
uno::Reference< xml::sax::XAttrib
 }
 
 // set sizes for transformation
-maSize.Width = aBottomRight.X - aTopLeft.X;
-maSize.Height = aBottomRight.Y - aTopLeft.Y;
+maSize.Width = o3tl::saturating_add(aBottomRight.X, -aTopLeft.X);
+maSize.Height = o3tl::saturating_add(aBottomRight.Y, -aTopLeft.Y);
 maPosition.X = aTopLeft.X;
 maPosition.Y = aTopLeft.Y;
 
@@ -1100,7 +1100,6 @@ void SdXMLLineShapeContext::StartElement(const 
uno::Reference< xml::sax::XAttrib
 SetTransformation();
 
 SdXMLShapeContext::StartElement(xAttrList);
-
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - debian/loolwsd.service loolwsd.service

2018-01-26 Thread Andras Timar
 debian/loolwsd.service |2 +-
 loolwsd.service|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b0344acb473038418ff1a5f91c475b0e8f6d4d3b
Author: Andras Timar 
Date:   Mon Jan 22 23:08:49 2018 +0100

correct file server root for LibreOffice Online 6.0

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

diff --git a/debian/loolwsd.service b/debian/loolwsd.service
index d43d5907..a2ae6e64 100644
--- a/debian/loolwsd.service
+++ b/debian/loolwsd.service
@@ -4,7 +4,7 @@ After=network.target
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/loolwsd
-ExecStart=/usr/bin/loolwsd --version 
--o:sys_template_path=/opt/lool/systemplate 
--o:child_root_path=/opt/lool/child-roots 
--o:file_server_root_path=/usr/share/loolwsd
+ExecStart=/usr/bin/loolwsd --version 
--o:sys_template_path=/opt/lool/systemplate 
--o:child_root_path=/opt/lool/child-roots 
--o:file_server_root_path=/usr/share/libreoffice-online
 User=lool
 KillMode=control-group
 Restart=always
diff --git a/loolwsd.service b/loolwsd.service
index d43d5907..a2ae6e64 100644
--- a/loolwsd.service
+++ b/loolwsd.service
@@ -4,7 +4,7 @@ After=network.target
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/loolwsd
-ExecStart=/usr/bin/loolwsd --version 
--o:sys_template_path=/opt/lool/systemplate 
--o:child_root_path=/opt/lool/child-roots 
--o:file_server_root_path=/usr/share/loolwsd
+ExecStart=/usr/bin/loolwsd --version 
--o:sys_template_path=/opt/lool/systemplate 
--o:child_root_path=/opt/lool/child-roots 
--o:file_server_root_path=/usr/share/libreoffice-online
 User=lool
 KillMode=control-group
 Restart=always
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d79c1e3c6eed70c221db8a82d061261d4835f618
Author: Caolán McNamara 
Date:   Fri Jan 26 12:05:10 2018 +

coverity#1428612 silence reasonable 'Unchecked return value' warning

Change-Id: If22f31471e0d15b6523355a44938c864b074ac93

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index dfff8646fef6..deba56c3eafc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3682,7 +3682,7 @@ static void preloadData()
 std::cerr << "Preload languages\n";
 // force load language singleton
 SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
-LanguageTag::isValidBcp47("foo", nullptr);
+(void)LanguageTag::isValidBcp47("foo", nullptr);
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - loleaflet/dist

2018-01-26 Thread Andras Timar
 loleaflet/dist/toolbar/toolbar.js |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 791fb5670b802cb4f3ad09973344d14fce18f620
Author: Andras Timar 
Date:   Wed Dec 27 22:17:22 2017 +0100

localize StateTableCell status bar string (Sum, Average, Count, etc.)

Change-Id: Ie4d6197115f8f8290f1d6f8608acf2e3e3642c79
Reviewed-on: https://gerrit.libreoffice.org/47107
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit 84bd0d7e5ebe1814eaecc973dedd9f66ee2881d8)
Reviewed-on: https://gerrit.libreoffice.org/47296
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index cb0b51a7..953917c2 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -712,6 +712,20 @@ var userJoinedPopupMessage = '' + _('%user has 
joined') + '';
 var userLeftPopupMessage = '' + _('%user has left') + '';
 var userPopupTimeout = null;
 
+function localizeStateTableCell (text) {
+   var stateArray = text.split(';');
+   var stateArrayLength = stateArray.length;
+   var localizedText = '';
+   for (var i = 0; i < stateArrayLength; i++) {
+   var labelValuePair = stateArray[i].split(':');
+   localizedText += _(labelValuePair[0].trim()) + ':' + 
labelValuePair[1];
+   if (stateArrayLength > 1 && i < stateArrayLength - 1) {
+   localizedText += '; ';
+   }
+   }
+   return localizedText;
+}
+
 function toLocalePattern (pattern, regex, text, sub1, sub2) {
var matches = new RegExp(regex, 'g').exec(text);
if (matches) {
@@ -1279,7 +1293,7 @@ map.on('commandstatechanged', function (e) {
updateToolbarItem(statusbar, 'StatusSelectionMode', 
$('#StatusSelectionMode').html(state ? 
L.Styles.selectionMode[state].toLocaleString() : 
' ').parent().html());
}
else if (commandName == '.uno:StateTableCell') {
-   updateToolbarItem(statusbar, 'StateTableCell', 
$('#StateTableCell').html(state ? state : 
' ').parent().html());
+   updateToolbarItem(statusbar, 'StateTableCell', 
$('#StateTableCell').html(state ? localizeStateTableCell(state) : 
' ').parent().html());
}
else if (commandName === '.uno:StatusBarFunc') {
if (state) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 vcl/source/filter/igif/gifread.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7ed8b9e3a9685eb3b07c65b7f2912612c5c9e810
Author: Caolán McNamara 
Date:   Fri Jan 26 12:01:04 2018 +

coverity#1428609 Unintended sign extension

and

coverity#1428610 Unintended sign extension

Change-Id: Ia6de85c7c438e610983a30204bda364367750d98

diff --git a/vcl/source/filter/igif/gifread.cxx 
b/vcl/source/filter/igif/gifread.cxx
index 78ed3036e67f..30cb0c674813 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -662,7 +662,7 @@ void GIFReader::CreateNewBitmaps()
 aAnimBmp.eDisposal = Disposal::Not;
 
 nAnimationByteSize += aAnimBmp.aBmpEx.GetSizeBytes();
-nAnimationMinFileData += nImageWidth * nImageHeight / 2560;
+nAnimationMinFileData += static_cast(nImageWidth) * 
nImageHeight / 2560;
 aAnimation.Insert( aAnimBmp );
 
 if( aAnimation.Count() == 1 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Olivier Hallot
 AllLangHelp_swriter.mk 
 |1 
 
source/media/screenshots/modules/swriter/ui/watermarkdialog/WatermarkDialog.png 
|binary
 source/text/swriter/01/watermark.xhp   
 |   57 ++
 source/text/swriter/guide/pagebackground.xhp   
 |3 
 4 files changed, 60 insertions(+), 1 deletion(-)

New commits:
commit f15eac158a47aac87d5dc40004899871ebc5739e
Author: Olivier Hallot 
Date:   Thu Jan 25 17:47:31 2018 -0200

tdf#112356 Help page for watermark dialog

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

diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk
index adf416fa5..188d41449 100644
--- a/AllLangHelp_swriter.mk
+++ b/AllLangHelp_swriter.mk
@@ -196,6 +196,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\
 helpcontent2/source/text/swriter/01/mm_seltab \
 helpcontent2/source/text/swriter/01/selection_mode \
 helpcontent2/source/text/swriter/01/title_page \
+helpcontent2/source/text/swriter/01/watermark \
 helpcontent2/source/text/swriter/02/0211 \
 helpcontent2/source/text/swriter/02/0321 \
 helpcontent2/source/text/swriter/02/0322 \
diff --git 
a/source/media/screenshots/modules/swriter/ui/watermarkdialog/WatermarkDialog.png
 
b/source/media/screenshots/modules/swriter/ui/watermarkdialog/WatermarkDialog.png
new file mode 100644
index 0..2f3ff381a
Binary files /dev/null and 
b/source/media/screenshots/modules/swriter/ui/watermarkdialog/WatermarkDialog.png
 differ
diff --git a/source/text/swriter/01/watermark.xhp 
b/source/text/swriter/01/watermark.xhp
new file mode 100644
index 0..41fee8839
--- /dev/null
+++ b/source/text/swriter/01/watermark.xhp
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+Page Watermark
+/text/swriter/01/watermark.xhp
+
+
+
+
+
+
+
+watermark;text documents
+watermark;page background
+page background;watermark
+
+
+Page Watermark
+Insert a watermark text 
in the current page style background.
+
+
+Choose Format - Watermark  

+
+A 
watermark is an identifying image or pattern in paper that appears as various 
shades of brightness when viewed by transmitted light. Watermarks were 
originally created directy during paper manufacturing to discourage 
counterfeiting of documents, currency bills, stamps and more.
+Use watermarks in %PRODUCTNAME Writer to simulate a paper 
watermark on the document pages.
+Fill the dialog settings below.
+The 
values entered applies to the actual page style.
+ 
+Text
+Enter the watermark text to be displayed as image in the page 
brackground.
+Font
+Select the font from the list.
+You 
cannot choose font size or font style for the watermark text. The text size 
will be scaled to fit in one line in the page brackground.
+Angle
+Select the slant angle for the watermark. A positive angle 
displays tha watermark from bottom to top. A negative value displays the 
watermark text from top to bottom.
+Transparency
+Select the transparency index for the watermark. A 0% value 
produce an opaque watermark and a value of 100% is totally transparent 
(invisible).
+Color
+Select color from the drop-down box.
+To change a watermark contents or setting.
+If 
the watermark in use is a text inserted by the Format - 
Watermark  menu command or by the document 
classification settings, you can edit the contents and settings on 
opening the watermark dialog.
+
+Document classification 
watermarks
+Page background
+
+
+
diff --git a/source/text/swriter/guide/pagebackground.xhp 
b/source/text/swriter/guide/pagebackground.xhp
index 44baea9b8..8bd4af4d0 100644
--- a/source/text/swriter/guide/pagebackground.xhp
+++ b/source/text/swriter/guide/pagebackground.xhp
@@ -128,6 +128,7 @@
 Click 
OK.
   
 
+
 
 
 
@@ -135,4 +136,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

2018-01-26 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 375b2f351dbc4b39274776aa06fbb1997dc579b7
Author: Olivier Hallot 
Date:   Thu Jan 25 17:47:31 2018 -0200

Updated core
Project: help  f15eac158a47aac87d5dc40004899871ebc5739e

tdf#112356 Help page for watermark dialog

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

diff --git a/helpcontent2 b/helpcontent2
index 482fb2a966c3..f15eac158a47 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 482fb2a966c3cfde24d94d7f43768b8edf63ceca
+Subproject commit f15eac158a47aac87d5dc40004899871ebc5739e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/xhp2html.sh

2018-01-26 Thread Olivier Hallot
 help3xsl/xhp2html.sh |   14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 482fb2a966c3cfde24d94d7f43768b8edf63ceca
Author: Olivier Hallot 
Date:   Fri Jan 26 09:46:22 2018 -0200

Adjust online builder xhp2html.sh to new bookmarks

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

diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh
index d196625f2..919aa63f2 100755
--- a/help3xsl/xhp2html.sh
+++ b/help3xsl/xhp2html.sh
@@ -35,6 +35,8 @@ rm -f $bookmarkFile
 touch $bookmarkFile
 
 stub2=\'
+stub1='document.getElementById("Bookmarks").getElementsByClassName( "list" 
)[0].innerHTML='\'\\
+echo $stub1 >> $bookmarkFile
 
 xslfile=get_bookmark.xsl
 
@@ -42,43 +44,35 @@ param1=' --stringparam Language '$lang' --stringparam 
productversion '$productve
 
 # bookmarks for modules
 
-for i in CALC CHART WRITER DRAW IMPRESS MATH BASIC
+for i in WRITER CALC DRAW IMPRESS CHART MATH BASIC
 do
-stub1='document.getElementById("bookmark'$i'").innerHTML='\'\\
 sfind=$sourceDir'/'$(echo 'text/s'$i | tr '[:upper:]' '[:lower:]')
 param=$param1' --stringparam app '$i
 tempFile=$(mktemp)
 find $sfind -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> 
$tempFile
-echo $stub1 >> $bookmarkFile
 sort -k3b -t\> -s -o $tempFile $tempFile
 awk 'NF' $tempFile >> $bookmarkFile
-echo $stub2 >> $bookmarkFile
 rm -f $tempFile
 done
 
 # Case of SHARED
 
-stub1='document.getElementById("bookmarkSHARED").innerHTML='\'\\
 tempFile=$(mktemp)
 param=$param1' --stringparam app SHARED'
 find $sourceDir'/text/shared' -type f -name "*.xhp" -exec xsltproc $param 
$xslfile {} + >> $tempFile
-echo $stub1 >> $bookmarkFile
 sort -k3b -t\> -s -o $tempFile $tempFile
 awk 'NF' $tempFile >> $bookmarkFile
-echo $stub2 >> $bookmarkFile
 rm -f $tempFile
 
 # Case of Explorer (BASE)
 
-stub1='document.getElementById("bookmarkBASE").innerHTML='\'\\
 tempFile=$(mktemp)
 param=$param1' --stringparam app BASE'
 find $sourceDir'/text/shared/explorer/database' -type f -name "*.xhp" -exec 
xsltproc $param $xslfile {} + >> $tempFile
-echo $stub1 >> $bookmarkFile
 sort -k3b -t\> -s -o $tempFile $tempFile
 awk 'NF' $tempFile >> $bookmarkFile
-echo $stub2 >> $bookmarkFile
 rm -f $tempFile
+echo $stub2 >> $bookmarkFile
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-01-26 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0774af9889887fdd98ae65987f590c626def8d63
Author: Olivier Hallot 
Date:   Fri Jan 26 09:46:22 2018 -0200

Updated core
Project: help  482fb2a966c3cfde24d94d7f43768b8edf63ceca

Adjust online builder xhp2html.sh to new bookmarks

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

diff --git a/helpcontent2 b/helpcontent2
index 67a993c05d19..482fb2a966c3 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 67a993c05d19976f5ed347b16584d29d6866a870
+Subproject commit 482fb2a966c3cfde24d94d7f43768b8edf63ceca
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Justin Luth
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|8 ++
 writerfilter/source/dmapper/DomainMapper.cxx  |   75 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   77 ++
 3 files changed, 85 insertions(+), 75 deletions(-)

New commits:
commit cc1c9c7484d97167021301f32c3397124c4d79f5
Author: Justin Luth 
Date:   Tue Jan 23 21:56:00 2018 +0300

tdf#95377 ooxmlimport: treat default style like named styles

The default style was missing out on all of the fixes made
by LN_CT_PPrBase_pStyle. That included right margins, and
numbering styles.

Essentially, this change is just copy and paste from one function
to another. I tried to make all of the logic changes
separately in previous commits. So the adjustments here are simply
to accommodate different variable/function names. So if this
causes any regressions, it ought to just be related to either
applying later on (at finishparagraph instead of
LN_CT_PPrBase_pStyle or because it includes the default style.

One important note regards the preparatory
commit 254c80037a3939c110d5c66fef6c28caf47625e5.
If this commit is reverted, make sure to check that commit
to add a conditional wrappers around GetCurrentNumberingRules().

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 9128303db319..4451e06148f1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -921,6 +921,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95377, "tdf95377.docx")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(-250), getProperty(xParagraph, 
"ParaFirstLineIndent"));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(250), getProperty(xParagraph, 
"ParaLeftMargin"));
 CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, 
xParagraph->getPropertyState("ParaFirstLineIndent"));
+
+//default style has numbering enabled.  Styles inherit numbering unless 
specifically disabled
+xmlDocPtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//body/txt/Special", 3);  //first three paragraphs 
have numbering
+assertXPath(pXmlDoc, "//body/txt[1]/Special", "rText", "a.");
+assertXPath(pXmlDoc, "//body/txt[2]/Special", "rText", "b.");
+assertXPath(pXmlDoc, "//body/txt[3]/Special", "rText", "c.");
+assertXPath(pXmlDoc, "/root/page/body/txt[4]/Special", 0); //last 
paragraph style disables numbering
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf95376, "tdf95376.docx")
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 9acb00fb86ae..a573275a338b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1194,30 +1194,6 @@ static bool ExchangeLeftRight(const PropertyMapPtr& 
rContext, DomainMapper_Impl&
 return bExchangeLeftRight;
 }
 
-/// Check if the style or its parent has a list id, recursively.
-static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const 
StyleSheetTablePtr& rStyleTable)
-{
-const StyleSheetPropertyMap* pEntryProperties = dynamic_cast(rEntry->pProperties.get());
-if (!pEntryProperties)
-return -1;
-
-sal_Int32 nListId = pEntryProperties->GetListId();
-// The style itself has a list id.
-if (nListId >= 0)
-return nListId;
-
-// The style has no parent.
-if (rEntry->sBaseStyleIdentifier.isEmpty())
-return -1;
-
-const StyleSheetEntryPtr pParent = 
rStyleTable->FindStyleSheetByISTD(rEntry->sBaseStyleIdentifier);
-// No such parent style or loop in the style hierarchy.
-if (!pParent || pParent == rEntry)
-return -1;
-
-return lcl_getListId(pParent, rStyleTable);
-}
-
 void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
 {
 // These SPRM's are not specific to any section, so it's expected that 
there is no context yet.
@@ -2121,57 +2097,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 const OUString sConvertedStyleName = pStyleTable->ConvertStyleName( 
sStringValue, true );
 if (m_pImpl->GetTopContext() && m_pImpl->GetTopContextType() != 
CONTEXT_SECTION)
 m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, 
uno::makeAny( sConvertedStyleName ));
-//apply numbering to paragraph if it was set at the style, but only if 
the paragraph itself
-//does not specify the numbering
-if( !rContext->isSet(PROP_NUMBERING_RULES) ) // !contains
-{
-const StyleSheetEntryPtr pEntry = 
pStyleTable->FindStyleSheetByISTD(sStringValue);
-OSL_ENSURE( pEntry.get(), "no style sheet found" );
-const StyleSheetPropertyMap* pStyleSheetP

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

2018-01-26 Thread Tamás Zolnai
 include/oox/drawingml/shapepropertymap.hxx |3 
 oox/source/drawingml/fillproperties.cxx|9 +-
 oox/source/drawingml/shapepropertymap.cxx  |3 
 oox/source/token/properties.txt|1 
 sd/qa/unit/data/pptx/tdf107608.pptx|binary
 sd/qa/unit/data/xml/n820786_0.xml  |  102 ++---
 sd/qa/unit/export-tests-ooxml2.cxx |   26 +++
 7 files changed, 89 insertions(+), 55 deletions(-)

New commits:
commit 232251e11aecf051bc0e2a915e5af6c0d3650469
Author: Tamás Zolnai 
Date:   Thu Jan 25 18:32:53 2018 +0100

tdf#107608: PPTX: Import pattern fill background color

Change-Id: Ic7e9dc314c961605fc8467eebd465fa286993e17
Reviewed-on: https://gerrit.libreoffice.org/48633
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/include/oox/drawingml/shapepropertymap.hxx 
b/include/oox/drawingml/shapepropertymap.hxx
index 2ff40651ec33..86dbd569ebc7 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -73,7 +73,8 @@ enum class ShapeProperty
 FillHatch,
 ShadowXDistance,
 FillBitmapNameFromUrl,
-LAST = FillBitmapNameFromUrl
+FillBackground,
+LAST = FillBackground
 };
 
 typedef o3tl::enumarray ShapePropertyIds;
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 3d81ec94c71c..d2d2775a3e3d 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -673,10 +673,15 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
 Color aColor( maPatternProps.maPattFgColor );
 if( aColor.isUsed() && maPatternProps.moPattPreset.has() )
 {
-// we do not support hatches that have background
-// color too, so all this is some best-effort approach
 eFillStyle = FillStyle_HATCH;
 rPropMap.setProperty( ShapeProperty::FillHatch, 
createHatch( maPatternProps.moPattPreset.get(), aColor.getColor( 
rGraphicHelper, nPhClr ) ) );
+
+// Set background color for hatch
+if(maPatternProps.maPattBgColor.isUsed())
+{
+rPropMap.setProperty( 
ShapeProperty::FillBackground, true );
+rPropMap.setProperty( ShapeProperty::FillColor, 
maPatternProps.maPattBgColor.getColor( rGraphicHelper, nPhClr ) );
+}
 }
 else if ( maPatternProps.maPattBgColor.isUsed() )
 {
diff --git a/oox/source/drawingml/shapepropertymap.cxx 
b/oox/source/drawingml/shapepropertymap.cxx
index 6f71873df362..b1cf0239237e 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -45,7 +45,8 @@ static const ShapePropertyIds spnDefaultShapeIds =
 PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, 
PROP_FillBitmapRectanglePoint,
 PROP_FillHatch,
 PROP_ShadowXDistance,
-PROP_FillBitmapName
+PROP_FillBitmapName,
+PROP_FillBackground
 };
 
 } // namespace
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index e6bc79ff3d08..caab75eae4d4 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -158,6 +158,7 @@ ExternalLinks
 ExtrapolateBackward
 ExtrapolateForward
 FileFormat
+FillBackground
 FillBitmapMode
 FillBitmapName
 FillBitmapPositionOffsetX
diff --git a/sd/qa/unit/data/pptx/tdf107608.pptx 
b/sd/qa/unit/data/pptx/tdf107608.pptx
new file mode 100755
index ..52973c8ed5aa
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf107608.pptx differ
diff --git a/sd/qa/unit/data/xml/n820786_0.xml 
b/sd/qa/unit/data/xml/n820786_0.xml
index 53a8ee93610d..a1a7b775faba 100644
--- a/sd/qa/unit/data/xml/n820786_0.xml
+++ b/sd/qa/unit/data/xml/n820786_0.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
@@ -65,7 +65,7 @@
  
  
   
-   
+   
 
 
 
@@ -148,7 +148,7 @@
  
 

-   
+   
 
 
 
@@ -238,7 +238,7 @@

   
  
- 
+ 
   
   
   
@@ -301,7 +301,7 @@

   
  
- 
+ 
   
   
   
@@ -364,7 +364,7 @@

   
  
- 
+ 
   
   
   
@@ -427,7 +427,7 @@

   
  
- 
+ 
   
   
   
@@ -490,7 +490,7 @@

   
  
- 
+ 
   
   
   
@@ -553,7 +553,7 @@

   
  
- 
+ 
   
   
   
@@ -616,7 +616,7 @@

   
  
- 
+ 
   
   
   
@@ -679,7 +679,7 @@

   
  
- 
+ 
   
   
   
@@ -742,7 +742,7 @@

   
  
- 
+ 
   
   
   
@@ -805,7 +805,7 @@

   
  
- 
+ 
   
   
   
@@ -868,7 +868,7 @@

   
  
- 
+ 
   
   
   
@@ -931,7 +931,7 @@

   
  
- 
+ 
   
   
   
@@ -994,7 +994,7 @@

   
  
- 
+ 
   
   
   
@@ -1057,7 +1057,7 @@

   
  
- 
+ 
   
   
   
@@ -1120,7 +1120,7 @@

   
  
- 
+ 
   
   
   
@@ -1183,7 +1183,7 @@

   
  
- 
+ 
   
   
   
@@ -1246,7 +1246,

[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - loleaflet/admin.strings.js loleaflet/dist loleaflet/Makefile.am loleaflet/src

2018-01-26 Thread Andras Timar
 loleaflet/Makefile.am   |1 +
 loleaflet/admin.strings.js  |3 +++
 loleaflet/dist/admin/adminHistory.html  |6 +++---
 loleaflet/src/admin/AdminSocketAnalytics.js |4 ++--
 4 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 5e6388f9212fe823d49f8eccb1c7fb0c430a15d0
Author: Andras Timar 
Date:   Tue Jan 2 23:55:04 2018 +0100

l10n: admin console fixes

Change-Id: I047e90c4977bcca2a8968d1af5422742b4ae43db
Reviewed-on: https://gerrit.libreoffice.org/47288
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit 6aa893badf1c1bc1669fac304a824663b5432868)
Reviewed-on: https://gerrit.libreoffice.org/47294
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 07209238..46fa1dcc 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -50,6 +50,7 @@ pot:
unocommands.js \
dist/errormessages.js \
dist/toolbar/toolbar.js \
+   src/admin/AdminSocketAnalytics.js \
src/admin/AdminSocketBase.js \
src/admin/AdminSocketOverview.js \
src/admin/AdminSocketHistory.js \
diff --git a/loleaflet/admin.strings.js b/loleaflet/admin.strings.js
index 06812103..d4851649 100644
--- a/loleaflet/admin.strings.js
+++ b/loleaflet/admin.strings.js
@@ -35,6 +35,9 @@ l10nstrings.strCpuStatsInterval = _('Time interval of CPU 
statistics (in ms)');
 l10nstrings.strLimitVirtMemMb = _('Maximum Document process virtual memory (in 
MB) - reduce only');
 l10nstrings.strLimitStackMemKb = _('Maximum Document process stack memory (in 
KB) - reduce only');
 l10nstrings.strLimitFileSizeMb = _('Maximum file size allowed to write to disk 
(in MB) - reduce only');
+l10nstrings.strDocuments = _('Documents:');
+l10nstrings.strExpired = _('Expired:');
+l10nstrings.strRefresh = _('Refresh');
 
 if (module) {
module.exports = l10nstrings;
diff --git a/loleaflet/dist/admin/adminHistory.html 
b/loleaflet/dist/admin/adminHistory.html
index ba71ca0e..76dec2c9 100644
--- a/loleaflet/dist/admin/adminHistory.html
+++ b/loleaflet/dist/admin/adminHistory.html
@@ -64,10 +64,10 @@
 
 
   document.write(l10nstrings.strHistory)
-  refresh
+  document.write(l10nstrings.strRefresh)
   
-Documents:
-Expired:
+document.write(l10nstrings.strDocuments)
+document.write(l10nstrings.strExpired)
 
   
 
diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js 
b/loleaflet/src/admin/AdminSocketAnalytics.js
index 7652d4b6..29473cac 100644
--- a/loleaflet/src/admin/AdminSocketAnalytics.js
+++ b/loleaflet/src/admin/AdminSocketAnalytics.js
@@ -214,11 +214,11 @@ var AdminSocketAnalytics = AdminSocketBase.extend({
 
var legendData = [
{
-   text: 'Recieved',
+   text: _('Received'),
color: 'red'
},
{
-   text: 'Sent',
+   text: _('Sent'),
color: 'green'
}
];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread manujvashist
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   21 +
 sc/source/ui/dbgui/asciiopt.cxx  |   59 +++
 sc/source/ui/dbgui/csvgrid.cxx   |4 -
 sc/source/ui/dbgui/csvtablebox.cxx   |4 -
 sc/source/ui/dbgui/imoptdlg.cxx  |7 +
 sc/source/ui/dbgui/scuiasciiopt.cxx  |   32 ++--
 sc/source/ui/docshell/impex.cxx  |   24 +-
 sc/source/ui/inc/asciiopt.hxx|5 +
 sc/source/ui/inc/csvgrid.hxx |2 
 sc/source/ui/inc/csvtablebox.hxx |2 
 sc/source/ui/inc/imoptdlg.hxx|2 
 sc/source/ui/inc/impex.hxx   |2 
 sc/source/ui/inc/scuiasciiopt.hxx|1 
 sc/uiconfig/scalc/ui/textimportcsv.ui|   18 
 14 files changed, 148 insertions(+), 35 deletions(-)

New commits:
commit d999b55e28d0445df870f69b3a269964e3635def
Author: manujvashist 
Date:   Sun Dec 10 10:56:38 2017 +0530

tdf#114200  : added 'Trim space' feature in 'Text Import'

made a checkbox to Trim extra white spaces from both ends
while using seperators in 'Text Imort'

Change-Id: Ib05d9b17525e3ebec380ec8b7eebfa35fff78f01
Reviewed-on: https://gerrit.libreoffice.org/46177
Tested-by: Jenkins 
Reviewed-by: Manuj Vashist 
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 2d5e7a8696e0..7951d4bf91cc 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1088,6 +1088,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1163,6 +1170,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1245,6 +1259,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 List of Separators - as a String
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3032106518f4..d699b4ea3675 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -29,9 +29,12 @@ ScAsciiOptions::ScAsciiOptions() :
 bFixedLen   ( false ),
 aFieldSeps  ( OUString(';') ),
 bMergeFieldSeps ( false ),
+bRemoveSpace( false ),
 bQuotedFieldAsText(false),
 bDetectSpecialNumber(false),
 bSkipEmptyCells(false),
+bSaveAsShown(true),
+bSaveFormulas(false),
 cTextSep( cDefaultTextSep ),
 eCharSet( osl_getThreadTextEncoding() ),
 eLang   ( LANGUAGE_SYSTEM ),
@@ -74,7 +77,12 @@ ScAsciiOptions& ScAsciiOptions::operator=( const 
ScAsciiOptions& rCpy )
 bFixedLen   = rCpy.bFixedLen;
 aFieldSeps  = rCpy.aFieldSeps;
 bMergeFieldSeps = rCpy.bMergeFieldSeps;
+bRemoveSpace= rCpy.bRemoveSpace;
 bQuotedFieldAsText = rCpy.bQuotedFieldAsText;
+bDetectSpecialNumber = rCpy.bDetectSpecialNumber;
+bSkipEmptyCells = rCpy.bSkipEmptyCells;
+bSaveAsShown= rCpy.bSaveAsShown;
+bSaveFormulas   = rCpy.bSaveFormulas;
 cTextSep= rCpy.cTextSep;
 eCharSet= rCpy.eCharSet;
 bCharSetSystem  = rCpy.bCharSetSystem;
@@ -180,15 +188,34 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
 else
 bDetectSpecialNumber = true;// default of versions that didn't add 
the parameter
 
-// 9th token is used for "Save as shown" in export options
-// 10th token is used for "Save cell formulas" in export options
+// Token 8: used for "Save as shown" in export options
+if ( nPos >= 0 )
+{
+bSaveAsShown = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bSaveAsShown = true;//default value
+// Token 9: used for "Save cell formulas" in export options
+if ( nPos >= 0 )
+{
+bSaveFormulas = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bSaveFormulas = false;
+// Token 10: Boolean for Trim spaces.
+if (nPos >= 0)
+{
+bRemoveSpace = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bRemoveS

[Libreoffice-commits] core.git: cui/source dbaccess/source filter/source odk/examples ridljar/com sc/source sd/qa svtools/source sw/source test/source udkapi/com vcl/unx

2018-01-26 Thread Andrea Gelmini
 cui/source/dialogs/hltpbase.cxx
  |4 ++--
 dbaccess/source/core/api/RowSet.cxx
  |2 +-
 filter/source/xslt/export/spreadsheetml/table.xsl  
  |2 +-
 filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl  
  |2 +-
 
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
 |2 +-
 ridljar/com/sun/star/lib/util/DisposeNotifier.java 
  |2 +-
 sc/source/ui/vba/vbavalidation.cxx 
  |2 +-
 sd/qa/unit/dialogs-test.cxx
  |2 +-
 svtools/source/misc/embedtransfer.cxx  
  |2 +-
 sw/source/core/layout/wsfrm.cxx
  |2 +-
 sw/source/filter/ww8/docxexport.cxx
  |2 +-
 test/source/screenshot_test.cxx
  |2 +-
 udkapi/com/sun/star/beans/XMultiPropertyStates.idl 
  |4 ++--
 vcl/unx/generic/print/psheader.ps  
  |4 ++--
 14 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 32b2a1831d819f73def1485d1589522cd19f9f6c
Author: Andrea Gelmini 
Date:   Fri Jan 26 10:52:43 2018 +0100

Fix typos

Change-Id: I334f0bd5636940ea8105dcf93b95b3af28894aad
Reviewed-on: https://gerrit.libreoffice.org/48546
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 933f3c394512..27cdd55e75a2 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -280,7 +280,7 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( const 
SvxHyperlinkItem* pH
 // Any action to do after apply-button is pressed
 void SvxHyperlinkTabPageBase::DoApply ()
 {
-// default-implemtation : do nothing
+// default-implementation : do nothing
 }
 
 // Ask page whether an insert is possible
@@ -293,7 +293,7 @@ bool SvxHyperlinkTabPageBase::AskApply ()
 // This method would be called from bookmark-window to set new mark-string
 void SvxHyperlinkTabPageBase::SetMarkStr ( const OUString& /*aStrMark*/ )
 {
-// default-implemtation : do nothing
+// default-implementation : do nothing
 }
 
 // Set initial focus
diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index e83c9e896abf..1633376d7653 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -526,7 +526,7 @@ void SAL_CALL ORowSet::disposing()
 xComponent->removeEventListener(xEvt);
 }
 
-m_aActiveConnection = Any(); // the any conatains a reference too
+m_aActiveConnection = Any(); // the any contains a reference too
 if(m_bOwnConnection)
 ::comphelper::disposeComponent(m_xActiveConnection);
 m_xActiveConnection = nullptr;
diff --git a/filter/source/xslt/export/spreadsheetml/table.xsl 
b/filter/source/xslt/export/spreadsheetml/table.xsl
index a1dca71ec087..6a8c8bddb76e 100644
--- a/filter/source/xslt/export/spreadsheetml/table.xsl
+++ b/filter/source/xslt/export/spreadsheetml/table.xsl
@@ -834,7 +834,7 @@
 000
 
 
-
+
 
 T
 
diff --git 
a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl 
b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
index be331280ed72..f66c3d79fcf8 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
@@ -630,7 +630,7 @@
 
 
 
 
 
diff --git 
a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
 
b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
index c9323efb940f..8d9e75e0b848 100644
--- 
a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
+++ 
b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
@@ -113,7 +113,7 @@ OUString SAL_CALL FilterDetect::detect(Sequence< 
PropertyValue >& aArguments )
 }
 
 // flatxml starts with an office:document element. this element
-// conatains a class="..." attribute by which we can deduct t

New Defects reported by Coverity Scan for LibreOffice

2018-01-26 Thread scan-admin

Hi,

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

7 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 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 7 of 7 defect(s)


** CID 1428613:  Error handling issues  (CHECKED_RETURN)
/sc/source/core/data/documen3.cxx: 226 in 
ScDocument::IsAddressInRangeName(RangeNameScope, ScAddress &)()



*** CID 1428613:  Error handling issues  (CHECKED_RETURN)
/sc/source/core/data/documen3.cxx: 226 in 
ScDocument::IsAddressInRangeName(RangeNameScope, ScAddress &)()
220 pRangeNames= GetRangeName(rAddress.Tab());
221 
222 ScRangeName::iterator itrBegin = pRangeNames->begin(), itrEnd = 
pRangeNames->end();
223 
224 for (ScRangeName::iterator itr = itrBegin; itr != itrEnd; ++itr)
225 {
>>> CID 1428613:  Error handling issues  (CHECKED_RETURN)
>>> Calling "IsValidReference" without checking return value (as is done 
>>> elsewhere 14 out of 15 times).
226 itr->second->IsValidReference(aNameRange);
227 bRet = aNameRange.In(rAddress);
228 if (!bRet)
229 continue;
230 else
231 break;

** CID 1428612:  Error handling issues  (CHECKED_RETURN)
/desktop/source/lib/init.cxx: 3685 in preloadData()()



*** CID 1428612:  Error handling issues  (CHECKED_RETURN)
/desktop/source/lib/init.cxx: 3685 in preloadData()()
3679 ImageTree &images = ImageTree::get();
3680 images.getImageUrl("forcefed.png", "style", "FO_oo");
3681 
3682 std::cerr << "Preload languages\n";
3683 // force load language singleton
3684 SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
>>> CID 1428612:  Error handling issues  (CHECKED_RETURN)
>>> Calling "isValidBcp47" without checking return value (as is done 
>>> elsewhere 6 out of 7 times).
3685 LanguageTag::isValidBcp47("foo", nullptr);
3686 }
3687 
3688 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, 
const char* pUserProfileUrl)
3689 {
3690 enum {

** CID 1428611:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/unoobj/cellsuno.cxx: 6420 in ScCellObj::GetResultType_Impl()()



*** CID 1428611:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/unoobj/cellsuno.cxx: 6420 in ScCellObj::GetResultType_Impl()()
6414 sal_Int32 eRet = sheet::FormulaResult::STRING;
6415 ScDocShell* pDocSh = GetDocShell();
6416 if (pDocSh)
6417 {
6418 if (pDocSh->GetDocument().GetCellType(aCellPos) == 
CELLTYPE_FORMULA)
6419 {
>>> CID 1428611:  Null pointer dereferences  (NULL_RETURNS)
>>> Assigning: "pFCell" = null return value from "GetFormulaCell".
6420 ScFormulaCell* pFCell = 
pDocSh->GetDocument().GetFormulaCell(aCellPos);
6421 if (pFCell->GetErrCode() != FormulaError::NONE )
6422 {
6423 eRet = sheet::FormulaResult::ERROR;
6424 }
6425 else if (pFCell->IsValue())

** CID 1428610:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/igif/gifread.cxx: 665 in GIFReader::CreateNewBitmaps()()



*** CID 1428610:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/igif/gifread.cxx: 665 in GIFReader::CreateNewBitmaps()()
659 else if( nGCDisposalMethod == 3 )
660 aAnimBmp.eDisposal = Disposal::Previous;
661 else
662 aAnimBmp.eDisposal = Disposal::Not;
663 
664 nAnimationByteSize += aAnimBmp.aBmpEx.GetSizeBytes();
>>> CID 1428610:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "this->nImageWidth" with type 
>>> "sal_uInt16" (16 bits, unsigned) is promoted in "this->nImageWidth * 
>>> this->nImageHeight / 2560" to type "int" (32 bits, signed), then 
>>> sign-extended to type "unsigned long" (64 bits, unsigned).  If 
>>> "this->nImageWidth * this->nImageHeight / 2560" is greater than 0x7FFF, 
>>> the upper bits of the result will all be 1.
665 nAnimationMinFileData += nImageWidth * nImageHeight / 2560;
666 aAnimation.Insert( aAnimBmp );
667 
668 if( aAnimation.Count() == 1 )
669 {
670 aAnimation.SetDisplaySizePixel( Size( nGlobalWidth, 
nGlobalHeight ) );

** CID 1428609:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/igif

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

2018-01-26 Thread Winfried Donkers
 i18nutil/source/utility/widthfolding_data.h  |1 +
 sc/qa/unit/data/functions/text/fods/jis.fods |   15 +--
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 484d0ea842da586a4cf51b6d11683b04f234474c
Author: Winfried Donkers 
Date:   Wed Jan 24 17:21:19 2018 +0100

tdf#103550 fix issue with HYPHEN-MINUS in Calc function JIS.

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

diff --git a/i18nutil/source/utility/widthfolding_data.h 
b/i18nutil/source/utility/widthfolding_data.h
index b2bdd369c6cf..999ca82734b1 100644
--- a/i18nutil/source/utility/widthfolding_data.h
+++ b/i18nutil/source/utility/widthfolding_data.h
@@ -718,6 +718,7 @@ UnicodePairWithFlag half2full[] = {
 { 0x002A, 0xFF0A, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // 
ASTERISK --> FULLWIDTH ASTERISK
 { 0x002B, 0xFF0B, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // PLUS 
SIGN --> FULLWIDTH PLUS SIGN
 { 0x002C, 0xFF0C, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // COMMA 
--> FULLWIDTH COMMA
+{ 0x002D, 0xFF0D, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // MINUS 
HYPHEN --> FULLWIDTH MINUS HYPHEN
 { 0x002E, 0xFF0E, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // FULL 
STOP --> FULLWIDTH FULL STOP
 { 0x002F, 0xFF0F, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // SOLIDUS 
--> FULLWIDTH SOLIDUS
 { 0x0030, 0xFF10, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION },  // DIGIT 
ZERO --> FULLWIDTH DIGIT ZERO
diff --git a/sc/qa/unit/data/functions/text/fods/jis.fods 
b/sc/qa/unit/data/functions/text/fods/jis.fods
index 50584f6b8820..2c55690735fb 100644
--- a/sc/qa/unit/data/functions/text/fods/jis.fods
+++ b/sc/qa/unit/data/functions/text/fods/jis.fods
@@ -1057,19 +1057,22 @@
  
 
 
- 
-  0123456789
+ 
+  !”#$%&’()*+,-./
  
  
-  0123456789
+  !”#$%&’()*+,-./
  
  
   TRUE
  
- 
+ 
   =JIS(I2)
  
- 
+ 
+  Tdf103550, AOO#78727
+ 
+ 
  
   !"#$%&'()*+,-./
  
@@ -1802,4 +1805,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: officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig

2018-01-26 Thread Gulsah Kose
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   14 ++
 sc/inc/sc.hrc |   30 ++---
 sc/sdi/cellsh.sdi |   54 
+-
 sc/sdi/scalc.sdi  |   35 ++
 sc/source/ui/view/cellsh.cxx  |   18 +++
 sc/source/ui/view/cellsh1.cxx |4 
 sc/uiconfig/scalc/popupmenu/cell.xml  |2 
 7 files changed, 116 insertions(+), 41 deletions(-)

New commits:
commit 1a8aac875ffb0a8c7b4161ff62807c1fb3e3e4a4
Author: Gulsah Kose 
Date:   Tue Jan 23 16:49:14 2018 +0300

[Pardus] tdf#87357 Add contextual Conditional Format command.

This patch is sponsored by ULAKBIM/Pardus project.

Change-Id: Id6148d39f68ac39067cc3a09b314c4f4de773384
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/48417
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 979f4a176698..453969395614 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -503,7 +503,14 @@
 
   Condition...
 
-
+
+  1
+
+  
+  
+
+  Conditional Formatting...
+
 
   1
 
@@ -557,6 +564,11 @@
   Manage...
 
   
+  
+
+  Manage Conditional Formatting...
+
+  
   
 
   Undo Selection
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 5c75ae6c8c45..e4823e58ff44 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -205,20 +205,22 @@
 #define SID_AUTO_SUM(SC_MESSAGE_START + 39)
 
 // messages for opening dialogs:
-#define SID_OPENDLG_CONSOLIDATE (SC_MESSAGE_START + 50)
-#define SID_OPENDLG_PIVOTTABLE  (SC_MESSAGE_START + 51)
-#define SID_OPENDLG_FUNCTION(SC_MESSAGE_START + 52)
-#define SID_OPENDLG_SOLVE   (SC_MESSAGE_START + 53)
-#define SID_OPENDLG_TABOP   (SC_MESSAGE_START + 54)
-#define SID_OPENDLG_CONDFRMT(SC_MESSAGE_START + 59)
-#define SID_OPENDLG_OPTSOLVER   (SC_MESSAGE_START + 60)
-#define SID_VALIDITY_REFERENCE  (SC_MESSAGE_START + 61)
-#define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62)
-#define SID_POPUP_CONDFRMT  (SC_MESSAGE_START + 63)
-#define SID_OPENDLG_COLORSCALE  (SC_MESSAGE_START + 66)
-#define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67)
-#define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68)
-#define SID_OPENDLG_CONDDATE(SC_MESSAGE_START + 69)
+#define SID_OPENDLG_CONSOLIDATE (SC_MESSAGE_START + 50)
+#define SID_OPENDLG_PIVOTTABLE  (SC_MESSAGE_START + 51)
+#define SID_OPENDLG_FUNCTION(SC_MESSAGE_START + 52)
+#define SID_OPENDLG_SOLVE   (SC_MESSAGE_START + 53)
+#define SID_OPENDLG_TABOP   (SC_MESSAGE_START + 54)
+#define SID_OPENDLG_CURRENTCONDFRMT (SC_MESSAGE_START + 58)
+#define SID_OPENDLG_CONDFRMT(SC_MESSAGE_START + 59)
+#define SID_OPENDLG_OPTSOLVER   (SC_MESSAGE_START + 60)
+#define SID_VALIDITY_REFERENCE  (SC_MESSAGE_START + 61)
+#define SID_OPENDLG_CONDFRMT_MANAGER(SC_MESSAGE_START + 62)
+#define SID_POPUP_CONDFRMT  (SC_MESSAGE_START + 63)
+#define SID_OPENDLG_CURRENTCONDFRMT_MANAGER (SC_MESSAGE_START + 64)
+#define SID_OPENDLG_COLORSCALE  (SC_MESSAGE_START + 66)
+#define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67)
+#define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68)
+#define SID_OPENDLG_CONDDATE(SC_MESSAGE_START + 69)
 
 #define SID_RANDOM_NUMBER_GENERATOR_DIALOG  (SC_MESSAGE_START + 70)
 #define SID_SAMPLING_DIALOG (SC_MESSAGE_START + 71)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 4fc0a44f1da0..f7610a9f854d 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -201,32 +201,34 @@ interface CellSelection
 ToolBoxConfig, MenuConfig , AccelConfig;
 ]
 
-SID_TABOP   [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
-SID_CONSOLIDATE [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
-FID_INSERT_NAME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-FID_USE_NAME[ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-SID_CANCEL  [ ExecMethod = Execute; ]
-SID_TOGGLE_REL  [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-SID_POPUP_CONDFRMT []
-SID_COLUMN_OPERATIONS   [ ExecMethod = ExecuteEdit; StateMethod = 
GetBlockState; ]
-SID_ROW_OPERATIONS  [ ExecMethod = ExecuteEd

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

2018-01-26 Thread Winfried Donkers
 i18npool/source/localedata/data/la_VA.xml  |   20 ++--
 i18npool/source/localedata/data/lld_IT.xml |   20 ++--
 i18npool/source/localedata/data/vec_IT.xml |   20 ++--
 3 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit e18cb8bebf47f95bd036822490f12daba35d6cec
Author: Winfried Donkers 
Date:   Thu Jan 25 16:52:30 2018 +0100

Change TimeSeparator for locale la_VA, lld_IT and vec_IT.

Change-Id: I0afc3a08a31216efdbddc389dc23f0b04bc92b37
Reviewed-on: https://gerrit.libreoffice.org/48619
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 80ac1dc53ba2aac97bce067495f7f60c6acabadd)
Reviewed-on: https://gerrit.libreoffice.org/48640

diff --git a/i18npool/source/localedata/data/la_VA.xml 
b/i18npool/source/localedata/data/la_VA.xml
index e951225f1933..ee71bf2666e3 100644
--- a/i18npool/source/localedata/data/la_VA.xml
+++ b/i18npool/source/localedata/data/la_VA.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;

@@ -169,31 +169,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  DD/MM/YY HH.MM
+  DD/MM/YY HH:MM
 
 
-  DD/MM/ HH.MM.SS
+  DD/MM/ HH:MM:SS
 
   
   
diff --git a/i18npool/source/localedata/data/lld_IT.xml 
b/i18npool/source/localedata/data/lld_IT.xml
index 8f99a86ae1df..5fa8c1120ddd 100644
--- a/i18npool/source/localedata/data/lld_IT.xml
+++ b/i18npool/source/localedata/data/lld_IT.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;
   , 
@@ -170,31 +170,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  DD/MM/YY HH.MM
+  DD/MM/YY HH:MM
 
 
-  DD/MM/ HH.MM.SS AM/PM
+  DD/MM/ HH:MM:SS AM/PM
 
   
   
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
index aa79dd8b519e..086d59857db5 100644
--- a/i18npool/source/localedata/data/vec_IT.xml
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;

@@ -169,31 +169,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  DD/MM/YY HH.MM
+  DD/MM/YY HH:MM
 
 
-  DD/MM/ HH.MM.SS
+  DD/MM/ HH:MM:SS
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Winfried Donkers
 i18npool/source/localedata/data/it_CH.xml  |4 ++--
 i18npool/source/localedata/data/it_IT.xml  |   20 ++--
 i18npool/source/localedata/data/vec_IT.xml |4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit c531008ab30620ec7e2264d708b8c11e977b7c9a
Author: Winfried Donkers 
Date:   Thu Jan 25 16:26:46 2018 +0100

Fix incorrect AM/PM symbols in locale it_CH and vec_IT.

Follow up of tdf#105226.

Change-Id: I31816a36e427338034a30492f2a7ac7f2d0fddd2
Reviewed-on: https://gerrit.libreoffice.org/48616
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 8ff3d8821ef68069c1bdcf1a123b0c929d745566)
Reviewed-on: https://gerrit.libreoffice.org/48638

diff --git a/i18npool/source/localedata/data/it_CH.xml 
b/i18npool/source/localedata/data/it_CH.xml
index 1514c671a367..aa19b9e2339d 100644
--- a/i18npool/source/localedata/data/it_CH.xml
+++ b/i18npool/source/localedata/data/it_CH.xml
@@ -47,8 +47,8 @@
   “
   ”
 
-m.
-p.
+a.m.
+p.m.
 metric
   
   
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
index 705e1aafca4e..aa79dd8b519e 100644
--- a/i18npool/source/localedata/data/vec_IT.xml
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -47,8 +47,8 @@
   “
   ”
 
-m.
-p.
+a.m.
+p.m.
 metric
   
   
commit ac709f527bbe0e871bafef9b8f0993f4b865bbc4
Author: Winfried Donkers 
Date:   Thu Jan 25 16:22:24 2018 +0100

tdf#105226 follow up: change time separator for locale it_IT.

Change-Id: If994f615b4a9b976086546a80357b75e93952528
Reviewed-on: https://gerrit.libreoffice.org/48615
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit c97d67631724c29fa665c5f0aaad0a0fd9a061ee)
Reviewed-on: https://gerrit.libreoffice.org/48639
Tested-by: Jenkins 

diff --git a/i18npool/source/localedata/data/it_IT.xml 
b/i18npool/source/localedata/data/it_IT.xml
index 94ebb32f8f61..8a047c4aa882 100644
--- a/i18npool/source/localedata/data/it_IT.xml
+++ b/i18npool/source/localedata/data/it_IT.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;

@@ -169,31 +169,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  GG/MM/AA HH.MM
+  GG/MM/AA HH:MM
 
 
-  GG/MM/ HH.MM.SS
+  GG/MM/ HH:MM:SS
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Caolán McNamara
 hwpfilter/source/hinfo.cxx   |   61 --
 hwpfilter/source/hiodev.cxx  |   18 --
 hwpfilter/source/hiodev.h|3 -
 hwpfilter/source/hpara.cxx   |   10 ++---
 hwpfilter/source/htags.cxx   |   13 +++
 hwpfilter/source/hwpfile.cxx |   12 +++---
 hwpfilter/source/hwpfile.h   |5 --
 hwpfilter/source/hwpread.cxx |   76 +--
 8 files changed, 88 insertions(+), 110 deletions(-)

New commits:
commit 90948976a557c49ec5e971b8ba6d8e62c58b6c7e
Author: Caolán McNamara 
Date:   Thu Jan 25 14:08:19 2018 +

drop the slow path

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

diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx
index d6b30ee6b815..9cf5907e9950 100644
--- a/hwpfilter/source/hinfo.cxx
+++ b/hwpfilter/source/hinfo.cxx
@@ -78,8 +78,8 @@ void HWPInfo::Read(HWPFile & hwpf)
 hwpf.Read2b(&cur_col, 1); /* When a document is 
saving, the paragraph number where the coursor is */
 hwpf.Read2b(&cur_row, 1); /* Paragraphs rows */
 
-hwpf.Read1b(&paper.paper_kind, 1);/* Paper Type */
-hwpf.Read1b(&paper.paper_direction, 1);   /* Paper orientation */
+hwpf.Read1b(paper.paper_kind);/* Paper Type */
+hwpf.Read1b(paper.paper_direction);   /* Paper orientation */
 
 // paper geometry information
 unsigned short tmp16;
@@ -111,15 +111,14 @@ void HWPInfo::Read(HWPFile & hwpf)
 return;
 paper.gutter_length = tmp16;  /* The binding margin */
 hwpf.Read2b(&readonly, 1);/* Reserve */
-hwpf.Read1b(reserved1, 4);/* Reserve */
-hwpf.Read1b(&chain_info.chain_page_no, 1);/* Connect page number: 
1-Connect, 0-newly started (used in connection printing) */
-hwpf.Read1b(&chain_info.chain_footnote_no, 1);/* Connect footnote number: 
1-connect, 0-newly started*/
+hwpf.ReadBlock(reserved1, 4); /* Reserve */
+hwpf.Read1b(chain_info.chain_page_no);/* Connect page number: 
1-Connect, 0-newly started (used in connection printing) */
+hwpf.Read1b(chain_info.chain_footnote_no);/* Connect footnote number: 
1-connect, 0-newly started*/
   /* the file name to be 
printed with connection */
-hwpf.Read1b(chain_info.chain_filename, CHAIN_MAX_PATH);
+hwpf.ReadBlock(chain_info.chain_filename, CHAIN_MAX_PATH);
 
-hwpf.Read1b(annotation, ANNOTATION_LEN);  /* Annotation (additional 
information when a file is saving.) */
+hwpf.ReadBlock(annotation, ANNOTATION_LEN);   /* Annotation (additional 
information when a file is saving.) */
 hwpf.Read2b(&encrypted, 1);   /* encrypt: 0-normal 
file(without password), 1-protected by password */
-//hwpf.Read1b(reserved2, 6);  /* it turned into below 
three values. */
 hwpf.Read2b(&beginpagenum,1); /* Page starting number */
 
 // footnote
@@ -135,8 +134,8 @@ void HWPInfo::Read(HWPFile & hwpf)
 if (!hwpf.Read2b(tmp16))
 return;
 spfnfn = tmp16;
-hwpf.Read1b(&fnchar, 1);
-hwpf.Read1b(&fnlinetype, 1);
+hwpf.Read1b(fnchar);
+hwpf.Read1b(fnlinetype);
 // border layout
 for (int & ii : bordermargin)
 {
@@ -146,11 +145,11 @@ void HWPInfo::Read(HWPFile & hwpf)
 }
 hwpf.Read2b(&borderline, 1);
 
-hwpf.Read1b(&empty_line_hide, 1);
-hwpf.Read1b(&table_move, 1);
-hwpf.Read1b(&compressed, 1);
+hwpf.Read1b(empty_line_hide);
+hwpf.Read1b(table_move);
+hwpf.Read1b(compressed);
 
-hwpf.Read1b(&reserved3, 1);
+hwpf.Read1b(reserved3);
 
 hwpf.Read2b(&info_block_len, 1);
 if (hwpf.State())
@@ -231,18 +230,18 @@ void ParaShape::Read(HWPFile & hwpf)
 return;
 pspacing_next = tmp16;
 
-hwpf.Read1b(&condense, 1);
-hwpf.Read1b(&arrange_type, 1);
+hwpf.Read1b(condense);
+hwpf.Read1b(arrange_type);
 for (TabSet & tab : tabs)
 {
-hwpf.Read1b(&tab.type, 1);
-hwpf.Read1b(&tab.dot_continue, 1);
+hwpf.Read1b(tab.type);
+hwpf.Read1b(tab.dot_continue);
 if (!hwpf.Read2b(tmp16))
 return;
 tab.position = tmp16;
 }
-hwpf.Read1b(&coldef.ncols, 1);
-hwpf.Read1b(&coldef.separator, 1);
+hwpf.Read1b(coldef.ncols);
+hwpf.Read1b(coldef.separator);
 if (!hwpf.Read2b(tmp16))
 return;
 coldef.spacing = tmp16;
@@ -252,14 +251,14 @@ void ParaShape::Read(HWPFile & hwpf)
 if (!hwpf.Read2b(tmp16))
 return;
 coldef.columnlen0 = tmp16;
-hwpf.Read1b(&shade, 1);
-hwpf.Read1b(&outline, 1);
-hwpf.Read1b(&outline_continue, 1);
+hwpf.Read1b(shade);
+hwpf.Read1b(outline);
+hwpf.Read1b(outline_continue)

[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - .gitreview

2018-01-26 Thread Samuel Mehrbrodt
 .gitreview |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3dd4d2149196b3a27ca8b05dc34239d32bb01259
Author: Samuel Mehrbrodt 
Date:   Fri Jan 26 09:21:09 2018 +0100

Update default target for .gitreview

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

diff --git a/.gitreview b/.gitreview
index fc87636e..15b3887b 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=online
 defaultremote=logerrit
-defaultbranch=master
+defaultbranch=libreoffice-5-4
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - common/UnitHTTP.hpp

2018-01-26 Thread Rene Engelhard
 common/UnitHTTP.hpp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ee1797e630916b8e392f67b8f64d3d08c4390e71
Author: Rene Engelhard 
Date:   Mon Nov 13 20:20:00 2017 +0100

fix build with poco 1.8.0(.1)

(cherry picked from commit 623b45a533198acc3ef7a393382f23ebb0f6ebab)

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

diff --git a/common/UnitHTTP.hpp b/common/UnitHTTP.hpp
index 0343036f..a6a107d9 100644
--- a/common/UnitHTTP.hpp
+++ b/common/UnitHTTP.hpp
@@ -82,13 +82,13 @@ public:
 {
 return _dummyStream;
 }
-#if POCO_VERSION < 0x0200
+#if POCO_VERSION < 0x0108
 virtual bool expectContinue() const override
 {
 return false;
 }
 #endif
-#if POCO_VERSION >= 0x0200
+#if POCO_VERSION >= 0x0108
 virtual bool secure() const override
 {
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Miklos Vajna
 sw/source/filter/ww8/ww8par.cxx |   31 ---
 sw/source/ui/index/cnttab.cxx   |   14 --
 2 files changed, 45 deletions(-)

New commits:
commit 853e3fb639a540b2a452ee7116ae61e7b581f8fd
Author: Miklos Vajna 
Date:   Thu Jan 25 22:24:55 2018 +0100

sw: remove remaining not-compiling debug code to fix dbglevel=2 build

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

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 3195a498f74c..e658111d03fd 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -392,9 +392,6 @@ public:
 Sttb();
 
 bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
-virtual void Print( FILE* fp ) override;
-#endif
 OUString getStringAtIndex( sal_uInt32 );
 };
 
@@ -427,28 +424,6 @@ bool Sttb::Read( SvStream& rS )
 return true;
 }
 
-#if OSL_DEBUG_LEVEL > 1
-void Sttb::Print( FILE* fp )
-{
-fprintf( fp, "[ 0x%" SAL_PRIxUINT32 " ] Sttb - dump\n", nOffSet);
-fprintf( fp, " fExtend 0x%x [expected 0x ]\n", fExtend );
-fprintf( fp, " cData no. or string data items %d (0x%x)\n", cData, cData );
-
-if ( cData )
-{
-for (sal_uInt16 index = 0; index < cData; ++index)
-{
-if (index >= dataItems.size())
-{
-fprintf(fp, "   Sttb truncated at entry %d(0x%x)\n", 
static_cast< int >( index ), static_cast< unsigned int >( index ));
-break;
-}
-fprintf(fp,"   string dataItem[ %d(0x%x) ] has name %s\n", 
static_cast< int >( index ), static_cast< unsigned int >( index ), 
OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr() );
-}
-}
-}
-#endif
-
 OUString
 Sttb::getStringAtIndex( sal_uInt32 index )
 {
@@ -4756,9 +4731,6 @@ void SwWW8ImplReader::ReadDocInfo()
 if (!checkSeek(*m_pTableStream, m_xWwFib->m_fcSttbfAssoc) || 
!aSttb.Read(*m_pTableStream))
 SAL_WARN("sw.ww8", "** Read of SttbAssoc data failed 
");
 m_pTableStream->Seek( nCur ); // return to previous position, 
is that necessary?
-#if OSL_DEBUG_LEVEL > 1
-aSttb.Print( stderr );
-#endif
 OUString sPath = aSttb.getStringAtIndex( 0x1 );
 OUString aURL;
 // attempt to convert to url (won't work for obvious reasons 
on linux)
@@ -4840,9 +4812,6 @@ void WW8Customizations::Import( SwDocShell* pShell )
 SAL_WARN("sw.ww8", "** Read of Customization data failed ");
 return;
 }
-#if OSL_DEBUG_LEVEL > 1
-aTCG.Print( stderr );
-#endif
 aTCG.ImportCustomToolBar( *pShell );
 }
 catch(...)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index bd4e812f8680..70b4a46ec031 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -,20 +,6 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, Button*, pBtn, void )
 return;
 
 const long nSpace = m_pCtrlParentWin->GetSizePixel().Width();
-#if OSL_DEBUG_LEVEL > 1
-//find all start/end positions and print it
-OUString sMessage("Space: " + OUString::number(nSpace) + " | ");
-
-for (VclPtr const & pDebugCtrl : aControlList)
-{
-long nDebugXPos = pDebugCtrl->GetPosPixel().X();
-long nDebugWidth = pDebugCtrl->GetSizePixel().Width();
-
-sMessage += OUString::number(nDebugXPos) + " "
-  + OUString::number(nDebugXPos + nDebugWidth) + " | ";
-}
-
-#endif
 
 long nMove = 0;
 if(pBtn == m_pLeftScrollWin)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread Julien Nabet
 connectivity/source/commontools/TConnection.cxx |4 
 connectivity/source/commontools/TSortIndex.cxx  |   14 +--
 connectivity/source/commontools/parameters.cxx  |   67 +---
 connectivity/source/cpool/ZConnectionPool.cxx   |4 
 connectivity/source/drivers/dbase/DTable.cxx|4 
 connectivity/source/drivers/file/FDriver.cxx|8 -
 connectivity/source/drivers/file/FNoException.cxx   |   11 +-
 connectivity/source/drivers/file/FPreparedStatement.cxx |5 -
 connectivity/source/drivers/file/FResultSet.cxx |   11 +-
 connectivity/source/drivers/file/fanalyzer.cxx  |   39 +
 connectivity/source/drivers/file/fcomp.cxx  |   18 +---
 connectivity/source/drivers/firebird/Connection.cxx |4 
 connectivity/source/drivers/firebird/Driver.cxx |4 
 connectivity/source/drivers/flat/ETable.cxx |4 
 14 files changed, 88 insertions(+), 109 deletions(-)

New commits:
commit 199b307be547405fc32ed29e23e6aa9bb81ce398
Author: Julien Nabet 
Date:   Thu Jan 25 19:05:11 2018 +0100

Modernize a bit connectivity (part1)

by using for range loops
+ use returned iterator by erase call in ZConnectionPool

Change-Id: I97b14b24ebddefea909bc17cb3463f840fde38a0
Reviewed-on: https://gerrit.libreoffice.org/48634
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/connectivity/source/commontools/TConnection.cxx 
b/connectivity/source/commontools/TConnection.cxx
index 3a7705bd75fb..779ea853520f 100644
--- a/connectivity/source/commontools/TConnection.cxx
+++ b/connectivity/source/commontools/TConnection.cxx
@@ -41,11 +41,11 @@ void OMetaConnection::disposing()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 m_xMetaData = WeakReference< XDatabaseMetaData>();
-for (OWeakRefArray::iterator i = m_aStatements.begin(); 
m_aStatements.end() != i; ++i)
+for (auto const& statement : m_aStatements)
 {
 try
 {
-Reference< XInterface > xStatement( i->get() );
+Reference< XInterface > xStatement( statement.get() );
 ::comphelper::disposeComponent( xStatement );
 }
 catch (const DisposedException&)
diff --git a/connectivity/source/commontools/TSortIndex.cxx 
b/connectivity/source/commontools/TSortIndex.cxx
index 748350121c66..63e5037a7279 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -36,14 +36,14 @@ struct TKeyValueFunc
 bool operator()(const OSortIndex::TIntValuePairVector::value_type& 
lhs,const OSortIndex::TIntValuePairVector::value_type& rhs)   const
 {
 const std::vector& aKeyType = pIndex->getKeyType();
-std::vector::const_iterator aIter = aKeyType.begin();
-for (std::vector::size_type i=0;aIter != aKeyType.end(); 
++aIter,++i)
+size_t i = 0;
+for (auto const& elem : aKeyType)
 {
 const bool bGreater = pIndex->getAscending(i) != 
TAscendingOrder::ASC;
 const bool bLess = !bGreater;
 
 // compare depending for type
-switch (*aIter)
+switch (elem)
 {
 case OKeyType::String:
 {
@@ -68,6 +68,7 @@ struct TKeyValueFunc
 case OKeyType::NONE:
 break;
 }
+++i;
 }
 
 // know we know that the values are equal
@@ -122,11 +123,10 @@ void OSortIndex::Freeze()
 // we will sort ourself when the first keyType say so
 std::sort(m_aKeyValues.begin(),m_aKeyValues.end(),TKeyValueFunc(this));
 
-TIntValuePairVector::iterator aIter = m_aKeyValues.begin();
-for(;aIter != m_aKeyValues.end();++aIter)
+for (auto & keyValue : m_aKeyValues)
 {
-delete aIter->second;
-aIter->second = nullptr;
+delete keyValue.second;
+keyValue.second = nullptr;
 }
 
 m_bFrozen = true;
diff --git a/connectivity/source/commontools/parameters.cxx 
b/connectivity/source/commontools/parameters.cxx
index 10d445d0e8c5..4fc69a8018d3 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -163,12 +163,9 @@ namespace dbtools
 // strip previous index information
 if ( _bSecondRun )
 {
-for ( ParameterInformation::iterator aParamInfo = 
m_aParameterInformation.begin();
-  aParamInfo != m_aParameterInformation.end();
-  ++aParamInfo
-)
+for (auto & paramInfo : m_aParameterInformation)
 {
-aParamInfo->second.aInnerIndexes.clear();
+paramInfo.second.aInnerIndexes.clear();
 }
 }
 
@@ -394,16 +391,13 @@ namespace dbtools
 {
 // build a conjunction of all the filter components
 OUStringBuffer sAdditionalF

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - cui/source

2018-01-26 Thread Caolán McNamara
 cui/source/tabpages/chardlg.cxx |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit e83ef8c5d1f6999bc0479b7bbbecca64f5d8ab05
Author: Caolán McNamara 
Date:   Mon Feb 20 12:32:12 2017 +

Related: tdf#106099 avoid casting LISTBOX_ENTRY_NOTFOUND to FontEmphasisMark

Change-Id: I7119e47c71f96af27351665ee08ea42b0ae0a622
(cherry picked from commit 609670933a80f670d5f6adc4bcdd71781c43c9fa)
Reviewed-on: https://gerrit.libreoffice.org/48655
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 5d879817f9a1..6ade2368f0fb 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1500,12 +1500,16 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
 rCTLFont.SetStrikeout( eStrikeout );
 
 nPos = m_pPositionLB->GetSelectEntryPos();
-bool bUnder = ( CHRDLG_POSITION_UNDER == 
reinterpret_cast(m_pPositionLB->GetEntryData( nPos )) );
-FontEmphasisMark eMark = 
(FontEmphasisMark)m_pEmphasisLB->GetSelectEntryPos();
-eMark |= bUnder ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove;
-rFont.SetEmphasisMark( eMark );
-rCJKFont.SetEmphasisMark( eMark );
-rCTLFont.SetEmphasisMark( eMark );
+sal_Int32 nEmphasis = m_pEmphasisLB->GetSelectEntryPos();
+if (nEmphasis != LISTBOX_ENTRY_NOTFOUND)
+{
+bool bUnder = ( CHRDLG_POSITION_UNDER == 
reinterpret_cast(m_pPositionLB->GetEntryData( nPos )) );
+FontEmphasisMark eMark = (FontEmphasisMark)nEmphasis;
+eMark |= bUnder ? FontEmphasisMark::PosBelow : 
FontEmphasisMark::PosAbove;
+rFont.SetEmphasisMark( eMark );
+rCJKFont.SetEmphasisMark( eMark );
+rCTLFont.SetEmphasisMark( eMark );
+}
 
 sal_Int32 nRelief = m_pReliefLB->GetSelectEntryPos();
 if (LISTBOX_ENTRY_NOTFOUND != nRelief)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits