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

2017-10-06 Thread Stephan Bergmann
 include/o3tl/safeint.hxx  |   34 ++
 sw/source/core/layout/sectfrm.cxx |6 +-
 2 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit 97dcb242f5cc41216fd16503604ca2f29f147a2a
Author: Stephan Bergmann 
Date:   Fri Oct 6 09:29:03 2017 +0200

Fix -fsanitize=signed-integer-overflow

during CppunitTest_sw_uiwriter (see below).  vmiklos suggested making that 
addition
saturating, so I introduced o3tl::saturating_add for that.

:
> /sw/source/core/layout/sectfrm.cxx:1964:23: runtime error: signed integer 
overflow: 6203 + 9223372036854774315 cannot be represented in type 'long'
> #0 0x2b65623b9a65 in SwSectionFrame::Grow_(long, bool) 
/sw/source/core/layout/sectfrm.cxx:1964:23
> #1 0x2b65625d6f51 in SwFrame::Grow(long, bool, bool) 
/sw/source/core/layout/wsfrm.cxx:1172:20
> #2 0x2b6562385999 in SwSectionFrame::MakeAll(OutputDevice*) 
/sw/source/core/layout/sectfrm.cxx:749:12
> #3 0x2b6561b6c728 in SwFrame::PrepareMake(OutputDevice*) 
/sw/source/core/layout/calcmove.cxx:346:5
> #4 0x2b656257f355 in SwFrame::Calc(OutputDevice*) const 
/sw/source/core/layout/trvlfrm.cxx:1769:9
> #5 0x2b656247d232 in lcl_InnerCalcLayout(SwFrame*, long, bool) 
/sw/source/core/layout/tabfrm.cxx:1522:13
> #6 0x2b656247d635 in lcl_InnerCalcLayout(SwFrame*, long, bool) 
/sw/source/core/layout/tabfrm.cxx:1524:25
> #7 0x2b656247d635 in lcl_InnerCalcLayout(SwFrame*, long, bool) 
/sw/source/core/layout/tabfrm.cxx:1524:25
> #8 0x2b65624b9b2e in lcl_RecalcRow(SwRowFrame&, long) 
/sw/source/core/layout/tabfrm.cxx:1559:16
> #9 0x2b65624b0a9f in SwTabFrame::MakeAll(OutputDevice*) 
/sw/source/core/layout/tabfrm.cxx:2454:29
> #10 0x2b6561b6c728 in SwFrame::PrepareMake(OutputDevice*) 
/sw/source/core/layout/calcmove.cxx:346:5
> #11 0x2b656257f355 in SwFrame::Calc(OutputDevice*) const 
/sw/source/core/layout/trvlfrm.cxx:1769:9
> #12 0x2b6561b68bf1 in SwFrame::PrepareMake(OutputDevice*) 
/sw/source/core/layout/calcmove.cxx:249:13
> #13 0x2b656257f355 in SwFrame::Calc(OutputDevice*) const 
/sw/source/core/layout/trvlfrm.cxx:1769:9
> #14 0x2b6561b68bf1 in SwFrame::PrepareMake(OutputDevice*) 
/sw/source/core/layout/calcmove.cxx:249:13
> #15 0x2b656257f355 in SwFrame::Calc(OutputDevice*) const 
/sw/source/core/layout/trvlfrm.cxx:1769:9
> #16 0x2b6561b6e7de in SwFrame::OptPrepareMake() 
/sw/source/core/layout/calcmove.cxx:357:13
> #17 0x2b6561fa557d in SwFrame::OptCalc() const 
/sw/source/core/inc/frame.hxx:889:9
> #18 0x2b6561f6f40c in SwLayAction::FormatLayout(OutputDevice*, 
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1368:13
> #19 0x2b6561f6f04a in SwLayAction::FormatLayout(OutputDevice*, 
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1363:29
> #20 0x2b6561f8737e in SwLayAction::FormatLayoutTab(SwTabFrame*, bool) 
/sw/source/core/layout/layact.cxx:1576:25
> #21 0x2b6561f6eb14 in SwLayAction::FormatLayout(OutputDevice*, 
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1360:32
> #22 0x2b6561f6f04a in SwLayAction::FormatLayout(OutputDevice*, 
SwLayoutFrame*, bool) /sw/source/core/layout/layact.cxx:1363:29
> #23 0x2b6561f50723 in SwLayAction::InternalAction(OutputDevice*) 
/sw/source/core/layout/layact.cxx:550:25
> #24 0x2b6561f47023 in SwLayAction::Action(OutputDevice*) 
/sw/source/core/layout/layact.cxx:341:5
> #25 0x2b6564f03b8f in SwViewShell::ImplEndAction(bool) 
/sw/source/core/view/viewsh.cxx:280:9
> #26 0x2b655ee80f89 in SwViewShell::EndAction(bool) 
/sw/inc/viewsh.hxx:605:9
> #27 0x2b655edcccbe in SwCursorShell::EndAction(bool, bool) 
/sw/source/core/crsr/crsrsh.cxx:258:5
> #28 0x2b6567ac5b5b in SwView::OuterResizePixel(Point const&, Size 
const&) /sw/source/uibase/uiview/viewport.cxx:1116:9
> #29 0x2b65421f88c1 in 
SfxViewFrame::DoAdjustPosSizePixel(SfxViewShell*, Point const&, Size const&, 
bool) /sfx2/source/view/viewfrm.cxx:1490:13
> #30 0x2b6542228d89 in SfxViewFrame::Resize(bool) 
/sfx2/source/view/viewfrm.cxx:2275:17
> #31 0x2b654226038f in SfxFrameViewWindow_Impl::Resize() 
/sfx2/source/view/viewfrm2.cxx:73:9
> #32 0x2b650ff227aa in vcl::Window::ImplCallResize() 
/vcl/source/window/event.cxx:522:5
> #33 0x2b6510a8d5f6 in vcl::Window::Show(bool, ShowFlags) 
/vcl/source/window/window.cxx:2276:13
> #34 0x2b6542132a1e in 
SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame) 
/sfx2/source/view/sfxbasecontroller.cxx:1250:13
> #35 0x2b654212c985 in 
SfxBaseController::attachFrame(com::sun::star::uno::Reference
 const&) /sfx2/source/view/sfxbasecontroller.cxx:550:13
> #36 0x2b6542084861 in (anonymous 
namespace)::SfxFrameLoader_Impl::impl_createDocumentView(com::su

[Libreoffice-commits] core.git: 2 commits - bin/lo-all-static-libs configure.ac external/libxslt ios/CustomTarget_iOS.mk ios/LibreOfficeKit solenv/gbuild

2017-10-06 Thread jan Iversen
 bin/lo-all-static-libs  |   16 +
 configure.ac|2 -
 external/libxslt/UnpackedTarball_libxslt.mk |1 
 external/libxslt/iOS.patch.0|   20 
 ios/CustomTarget_iOS.mk |2 -
 ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj |2 -
 solenv/gbuild/config.sub|4 +-
 7 files changed, 34 insertions(+), 13 deletions(-)

New commits:
commit eed96773b4adf7fdec74502ee89bca63b9018a80
Author: jan Iversen 
Date:   Fri Oct 6 09:20:22 2017 +0200

iOS, fixes for release build

removed coinmp (needed to update lo-all-static-libs)
convert CPUNAME to lowercase (needed by xcodebuild)

Change-Id: I13ccfbd6a6fd139db2745c1536192710afe094bb

diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs
index 310c432fc0a6..97c5508c741d 100755
--- a/bin/lo-all-static-libs
+++ b/bin/lo-all-static-libs
@@ -46,6 +46,15 @@ ANDROID)
 # Only liblo-bootstrap.a ends up here:
 oslibs="$oslibs $WORKDIR/LinkTarget/Library/lib*.a"
 oslibs="$oslibs $WORKDIR/UnpackedTarball/openssl/*.a"
+
+# coinmp not used for iOS
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/Cbc/src/.libs/*.a"
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/Cgl/src/.libs/*.a"
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/Clp/src/.libs/*.a"
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/Clp/src/OsiClp/.libs/*.a"
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/CoinMP/src/.libs/*.a"
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/CoinUtils/src/.libs/*.a"
+oslibs = "$oslibs $WORKDIR/UnpackedTarball/coinmp/Osi/src/Osi/.libs/*.a"
 ;;
 IOS)
 oslibs="$WORKDIR/UnpackedTarball/icu/source/stubdata/*.a"
@@ -59,13 +68,6 @@ echo $INSTDIR/$LIBO_LIB_FOLDER/lib*.a \
  $foolibs \
  $WORKDIR/LinkTarget/StaticLibrary/lib*.a \
  $oslibs \
- $WORKDIR/UnpackedTarball/coinmp/Cbc/src/.libs/*.a \
- $WORKDIR/UnpackedTarball/coinmp/Cgl/src/.libs/*.a \
- $WORKDIR/UnpackedTarball/coinmp/Clp/src/.libs/*.a \
- $WORKDIR/UnpackedTarball/coinmp/Clp/src/OsiClp/.libs/*.a \
- $WORKDIR/UnpackedTarball/coinmp/CoinMP/src/.libs/*.a \
- $WORKDIR/UnpackedTarball/coinmp/CoinUtils/src/.libs/*.a \
- $WORKDIR/UnpackedTarball/coinmp/Osi/src/Osi/.libs/*.a \
  $WORKDIR/UnpackedTarball/icu/source/lib/*.a \
  $WORKDIR/UnpackedTarball/libjpeg-turbo/.libs/*.a \
  $WORKDIR/UnpackedTarball/liblangtag/liblangtag/.libs/*.a \
diff --git a/ios/CustomTarget_iOS.mk b/ios/CustomTarget_iOS.mk
index 55375687ff0e..f3e834f5084f 100644
--- a/ios/CustomTarget_iOS.mk
+++ b/ios/CustomTarget_iOS.mk
@@ -116,7 +116,7 @@ $(IOSGEN)/$(IOSKIT): $(IOSKITPRJ)/project.pbxproj 
$(IOSKITXC) $(IOSAPPXC)
-project $(IOSKITPRJ) \
-target LibreOfficeKit \
-sdk $(IOS_SDK) \
-   -arch $(CPU_NAME) \
+   -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'`\
-configuration $(if $(ENABLE_DEBUG),Debug,Release) \
build \
, $(WORKDIR)/ios/build.log \
diff --git a/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj 
b/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj
index 407b57cb37d5..ca9a90549414 100644
--- a/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj
+++ b/ios/LibreOfficeKit/LibreOfficeKit.xcodeproj/project.pbxproj
@@ -25,7 +25,6 @@
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
-   3908315E1F8395EB003F2A29 /* loKit.xcconfig */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = 
loKit.xcconfig; path = 
../../../../../../../Users/jani/lo_ios/workdir/ios/loKit.xcconfig; sourceTree = 
""; };
39B5D2151F78130F008FB162 /* libLibreOfficeKit.a */ = {isa = 
PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = 
libLibreOfficeKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
39B5D2181F78130F008FB162 /* LibreOfficeKit.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LibreOfficeKit.h; 
sourceTree = ""; };
39B5D2191F78130F008FB162 /* LibreOfficeKit.mm */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = 
LibreOfficeKit.mm; sourceTree = ""; };
@@ -69,7 +68,6 @@
39B5D2171F78130F008FB162 /* LibreOfficeKit */ = {
isa = PBXGroup;
children = (
-   3908315E1F8395EB003F2A29 /* loKit.xcconfig */,
39B5D2181F78130F008FB162 /* LibreOfficeKit.h */,
39B5D2191F78130F008FB162 /* LibreOfficeKit.mm 
*/,
);
commit 60e7480535147bbfb1b000528510e66303c032fb
Author: jan Iversen 
Date:   T

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

2017-10-06 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkframe.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 192a0152ff56890b406fbacfe365c452caba7fc7
Author: Caolán McNamara 
Date:   Thu Oct 5 17:24:11 2017 +0100

gtk3+hidpi: ScreenSize is in real pixels, scale it down

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

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index eacd1d716ef3..4b17e9e3ef89 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1399,7 +1399,13 @@ void GtkSalFrame::Center()
 
 Size GtkSalFrame::calcDefaultSize()
 {
-return 
bestmaxFrameSizeForScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen()));
+Size aScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen()));
+#if GTK_CHECK_VERSION(3,10,0)
+int scale = gtk_widget_get_scale_factor(m_pWindow);
+aScreenSize.Width() /= scale;
+aScreenSize.Height() /= scale;
+#endif
+return bestmaxFrameSizeForScreenSize(aScreenSize);
 }
 
 void GtkSalFrame::SetDefaultSize()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang solenv/CompilerTest_compilerplugins_clang.mk sw/source vcl/source

2017-10-06 Thread Stephan Bergmann
 compilerplugins/clang/commaoperator.cxx  |   71 +--
 compilerplugins/clang/test/commaoperator.cxx |   27 ++
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 sw/source/core/doc/number.cxx|   20 ++-
 vcl/source/gdi/svmconverter.cxx  |5 +
 5 files changed, 95 insertions(+), 29 deletions(-)

New commits:
commit 4fc52078f6afa4368b2f4de3cd700e474b7a417f
Author: Stephan Bergmann 
Date:   Fri Oct 6 08:55:26 2017 +0200

Improve performance of loplugin:commaoperator

...by avoiding calls to parentStmt, thereby also improving the precision of
exactly which comma operators to ignore (which turned up a handful more 
finds).
Also added tests.

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

diff --git a/compilerplugins/clang/commaoperator.cxx 
b/compilerplugins/clang/commaoperator.cxx
index c4a61e772281..c9efc09092de 100644
--- a/compilerplugins/clang/commaoperator.cxx
+++ b/compilerplugins/clang/commaoperator.cxx
@@ -20,6 +20,13 @@ the comma operator is best used sparingly
 
 namespace {
 
+Stmt const * lookThroughExprWithCleanups(Stmt const * stmt) {
+if (auto const e = dyn_cast_or_null(stmt)) {
+return e->getSubExpr();
+}
+return stmt;
+}
+
 class CommaOperator:
 public RecursiveASTVisitor, public loplugin::Plugin
 {
@@ -31,11 +38,49 @@ public:
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
 
-bool VisitBinaryOperator(const BinaryOperator* );
+bool TraverseForStmt(ForStmt * stmt) {
+auto const saved1 = ignore1_;
+ignore1_ = lookThroughExprWithCleanups(stmt->getInit());
+auto const saved2 = ignore2_;
+ignore2_ = lookThroughExprWithCleanups(stmt->getInc());
+auto const ret = RecursiveASTVisitor::TraverseForStmt(stmt);
+ignore1_ = saved1;
+ignore2_ = saved2;
+return ret;
+}
+
+bool TraverseParenExpr(ParenExpr * expr) {
+auto const saved1 = ignore1_;
+ignore1_ = expr->getSubExpr();
+auto const ret = RecursiveASTVisitor::TraverseParenExpr(expr);
+ignore1_ = saved1;
+return ret;
+}
+
+bool TraverseBinComma(BinaryOperator * expr) {
+if (!WalkUpFromBinComma(expr)) {
+return false;
+}
+auto const saved1 = ignore1_;
+ignore1_ = expr->getLHS();
+auto const ret = TraverseStmt(expr->getLHS())
+&& TraverseStmt(expr->getRHS());
+ignore1_ = saved1;
+return ret;
+}
+
+bool VisitBinComma(const BinaryOperator* );
+
+private:
+Stmt const * ignore1_ = nullptr;
+Stmt const * ignore2_ = nullptr;
 };
 
-bool CommaOperator::VisitBinaryOperator(const BinaryOperator* binaryOp)
+bool CommaOperator::VisitBinComma(const BinaryOperator* binaryOp)
 {
+if (binaryOp == ignore1_ || binaryOp == ignore2_) {
+return true;
+}
 if (ignoreLocation(binaryOp)) {
 return true;
 }
@@ -54,28 +99,6 @@ bool CommaOperator::VisitBinaryOperator(const 
BinaryOperator* binaryOp)
 {
 return true;
 }
-if (binaryOp->getOpcode() != BO_Comma) {
-return true;
-}
-const Stmt* parent = parentStmt(binaryOp);
-if (parent != nullptr) {
-if (isa(parent)) {
-return true;
-}
-if (isa(parent)) {
-return true;
-}
-if (isa(parent)) {
-return true;
-}
-if (isa(parent)) {
-const Stmt* parent2 = parentStmt(parent);
-if (isa(parent2)) {
-return true;
-}
-}
-}
-//parent->dump();
 report(
 DiagnosticsEngine::Warning, "comma operator hides code",
 binaryOp->getOperatorLoc())
diff --git a/compilerplugins/clang/test/commaoperator.cxx 
b/compilerplugins/clang/test/commaoperator.cxx
new file mode 100644
index ..199dcf41c243
--- /dev/null
+++ b/compilerplugins/clang/test/commaoperator.cxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+bool f();
+
+struct S { ~S(); };
+
+int main() {
+f(), f(), f(); // expected-error {{comma operator hides code 
[loplugin:commaoperator]}}
+(f(), f());
+for (
+f(), f();
+f(), f(); // expected-error {{comma operator hides code 
[loplugin:commaoperator]}}
+f(), f())
+f(), f(); // expected-error {{comma operator hides code 
[loplugin:commaoperator]}}
+S s;
+(s = S(), s = S(), s = S());
+for (s = S(), f(); f(); s = S(), f()

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

2017-10-06 Thread Noel Grandin
 mysqlc/source/mysqlc_connection.cxx|6 +--
 mysqlc/source/mysqlc_connection.hxx|5 +--
 mysqlc/source/mysqlc_preparedstatement.cxx |   45 ++---
 mysqlc/source/mysqlc_statement.cxx |   34 +
 mysqlc/source/mysqlc_statement.hxx |5 +--
 5 files changed, 45 insertions(+), 50 deletions(-)

New commits:
commit 7af521827e62aec9a695dce944d350fae7625b19
Author: Noel Grandin 
Date:   Fri Oct 6 09:31:05 2017 +0200

use rtl::Reference in mysqlc

instead of manual ref-counting

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

diff --git a/mysqlc/source/mysqlc_connection.cxx 
b/mysqlc/source/mysqlc_connection.cxx
index 1618bdcd85da..f44fca89e205 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -65,10 +65,9 @@ OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver 
* _cppDriver)
 :OMetaConnection_BASE(m_aMutex)
 ,OSubComponent(static_cast(&_rDriver), this)
 ,m_xMetaData(nullptr)
-,m_rDriver(_rDriver)
+,m_xDriver(&_rDriver)
 ,cppDriver(_cppDriver)
 {
-m_rDriver.acquire();
 }
 
 OConnection::~OConnection()
@@ -76,7 +75,6 @@ OConnection::~OConnection()
 if (!isClosed()) {
 close();
 }
-m_rDriver.release();
 }
 
 void SAL_CALL OConnection::release()
@@ -536,7 +534,7 @@ rtl::OUString OConnection::transFormPreparedStatement(const 
rtl::OUString& _sSQL
 Reference< XConnection> xCon = this;
 aArgs[0] <<= NamedValue(rtl::OUString("ActiveConnection"), 
makeAny(xCon));
 
-
m_xParameterSubstitution.set(m_rDriver.getFactory()->createInstanceWithArguments("org.openoffice.comp.helper.ParameterSubstitution",aArgs),UNO_QUERY);
+
m_xParameterSubstitution.set(m_xDriver->getFactory()->createInstanceWithArguments("org.openoffice.comp.helper.ParameterSubstitution",aArgs),UNO_QUERY);
 } catch(const Exception&) {}
 }
 if ( m_xParameterSubstitution.is() ) {
diff --git a/mysqlc/source/mysqlc_connection.hxx 
b/mysqlc/source/mysqlc_connection.hxx
index 5e62eff048d0..4ef6bb044a45 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -104,7 +105,7 @@ namespace connectivity
 // of all the Statement objects
 // for this Connection
 
-MysqlCDriver&   m_rDriver;  // Pointer to the owning driver 
object
+rtl::Reference m_xDriver; // Pointer to the owning 
driver object
 sql::Driver*cppDriver;
 
 public:
@@ -185,7 +186,7 @@ namespace connectivity
 const ConnectionSettings& getConnectionSettings() const { return 
m_settings; }
 rtl::OUString transFormPreparedStatement(const rtl::OUString& 
_sSQL);
 
-const MysqlCDriver&  getDriver() const { return m_rDriver;}
+const MysqlCDriver&  getDriver() const { return 
*m_xDriver.get();}
 
 }; /* OConnection */
 // TODO: Not used.
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 84d353ef5873..ec5b6f68bdb0 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -75,13 +75,12 @@ sal_Bool OPreparedStatement::supportsService(rtl::OUString 
const & ServiceName)
 OPreparedStatement::OPreparedStatement(OConnection* _pConnection, 
sql::PreparedStatement * _cppPrepStmt)
 :OCommonStatement(_pConnection, _cppPrepStmt)
 {
-m_pConnection = _pConnection;
-m_pConnection->acquire();
+m_xConnection = _pConnection;
 
 try {
 m_paramCount = static_cast(cppStatement)->getParameterMetaData()->getParameterCount();
 } catch (const sql::SQLException &e) {
-mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection->getConnectionEncoding());
+mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_xConnection->getConnectionEncoding());
 }
 }
 
@@ -130,7 +129,7 @@ Reference< XResultSetMetaData > SAL_CALL 
OPreparedStatement::getMetaData()
 } catch (const sql::MethodNotImplementedException &) {
 
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedStatement::getMetaData",
 *this);
 } catch (const sql::SQLException &e) {
-mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_pConnection->getConnectionEncoding());
+mysqlc_sdbc_driver::translateAndThrow(e, *this, 
m_xConnection->getConnectionEncoding());
 }
 return m_xMetaData;
 }
@@ -161,7 +160,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
 try {
 success = static_cast(cppStatement)->execute();
 } catch (const sql::SQLException &e) {
-mysqlc_sdbc_driv

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

2017-10-06 Thread Caolán McNamara
 vcl/source/control/ctrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 061321bbb54adf9b0df102cdfd7f956f97dcb6b9
Author: Caolán McNamara 
Date:   Fri Oct 6 09:19:16 2017 +0100

coverity#1418966 static_cast should be sufficient

Change-Id: Ieae8695cb36b1779f1b8437bddb887cd24d621e8

diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 38509814f5b0..736722387122 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -427,7 +427,7 @@ void Control::LogicInvalidate(const tools::Rectangle* 
/*pRectangle*/)
 {
 if (pWindow->ImplIsFloatingWindow())
 {
-
dynamic_cast(pWindow)->LogicInvalidate(nullptr);
+
static_cast(pWindow)->LogicInvalidate(nullptr);
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-10-06 Thread Andras Timar
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b94eb50b2e28604b1b9b363dc5f0b1c04490addf
Author: Andras Timar 
Date:   Fri Oct 6 10:41:25 2017 +0200

Updated core
Project: help  0f0c9fd543e5ceb5ae6d0a823997bd009b549753

remove empty strings (helpex warned)

Change-Id: I96a78fe8bf7f98b9728ddeeb4fa8b2ec622ab276

diff --git a/helpcontent2 b/helpcontent2
index 62a89b1d32a3..0f0c9fd543e5 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 62a89b1d32a3b230f3094075002cf2162934e4f4
+Subproject commit 0f0c9fd543e5ceb5ae6d0a823997bd009b549753
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Andras Timar
 source/text/scalc/01/data_form.xhp|1 -
 source/text/scalc/01/data_provider.xhp|1 -
 source/text/scalc/01/live_data_stream.xhp |1 -
 source/text/scalc/01/xml_source.xhp   |1 -
 4 files changed, 4 deletions(-)

New commits:
commit 0f0c9fd543e5ceb5ae6d0a823997bd009b549753
Author: Andras Timar 
Date:   Fri Oct 6 10:41:25 2017 +0200

remove empty strings (helpex warned)

Change-Id: I96a78fe8bf7f98b9728ddeeb4fa8b2ec622ab276

diff --git a/source/text/scalc/01/data_form.xhp 
b/source/text/scalc/01/data_form.xhp
index edf69ed9e..8b5f6aa05 100644
--- a/source/text/scalc/01/data_form.xhp
+++ b/source/text/scalc/01/data_form.xhp
@@ -41,7 +41,6 @@
 Data Forms for 
Spreasheets
 Data Forms for Spreasheets
 
-
 
 
 Menu Data – Form...
diff --git a/source/text/scalc/01/data_provider.xhp 
b/source/text/scalc/01/data_provider.xhp
index 60922c45d..be88acb11 100644
--- a/source/text/scalc/01/data_provider.xhp
+++ b/source/text/scalc/01/data_provider.xhp
@@ -38,7 +38,6 @@
 Data Provider for 
Spreadsheets
 Data Provider for 
Spreadsheets
 
-
 
 
 Menu Data – Data 
Provider...
diff --git a/source/text/scalc/01/live_data_stream.xhp 
b/source/text/scalc/01/live_data_stream.xhp
index 949c3c42e..3377755d5 100644
--- a/source/text/scalc/01/live_data_stream.xhp
+++ b/source/text/scalc/01/live_data_stream.xhp
@@ -38,7 +38,6 @@
 Live Data 
Stream
 Live data stream for 
spreadsheets
 
-
 
 
 Menu Data – 
Streams...
diff --git a/source/text/scalc/01/xml_source.xhp 
b/source/text/scalc/01/xml_source.xhp
index e3ee4eb33..665dc92cf 100644
--- a/source/text/scalc/01/xml_source.xhp
+++ b/source/text/scalc/01/xml_source.xhp
@@ -38,7 +38,6 @@
 XML 
Source
 Live data stream for 
spreadsheets
 
-
 
 
 Menu Data – XML 
Source...
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Andras Timar
 loleaflet/dist/toolbar/toolbar.js|2 +-
 loleaflet/src/control/Control.Menubar.js |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f844604a92c3da744c4b08c08d7662fc8146fcc6
Author: Andras Timar 
Date:   Wed Oct 4 13:29:20 2017 +0200

loleaflet: enable l10n of language names

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

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 33867ca9..5faa4fa6 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1176,7 +1176,7 @@ map.on('commandstatechanged', function (e) {
}
}
else if (commandName === '.uno:LanguageStatus') {
-   $('#LanguageStatus').html(state);
+   $('#LanguageStatus').html(_(state));
}
else if (commandName === '.uno:ModifiedStatus') {
var modifiedStatus = e.state === 'true';
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 1ab60a1d..9705b85f 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -363,9 +363,9 @@ L.Control.Menubar = L.Control.extend({
$menuParagraph = $('#menu-resetparagraph').parent();
$menuDefault = $('#menu-resetlanguage').parent();
for (var lang in e.commandValues) {
-   
$menuSelection.append(this._createLangMenuItem(e.commandValues[lang], 
encodeURIComponent('Current_' + e.commandValues[lang])));
-   
$menuParagraph.append(this._createLangMenuItem(e.commandValues[lang], 
encodeURIComponent('Paragraph_' + e.commandValues[lang])));
-   
$menuDefault.append(this._createLangMenuItem(e.commandValues[lang], 
encodeURIComponent('Default_' + e.commandValues[lang])));
+   
$menuSelection.append(this._createLangMenuItem(_(e.commandValues[lang]), 
encodeURIComponent('Current_' + e.commandValues[lang])));
+   
$menuParagraph.append(this._createLangMenuItem(_(e.commandValues[lang]), 
encodeURIComponent('Paragraph_' + e.commandValues[lang])));
+   
$menuDefault.append(this._createLangMenuItem(_(e.commandValues[lang]), 
encodeURIComponent('Default_' + e.commandValues[lang])));
}
}
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loolwsd.xml.in

2017-10-06 Thread Andras Timar
 loolwsd.xml.in |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c4906b74bd7ac4e7bb2468651d22a2769401dfbe
Author: Andras Timar 
Date:   Thu Sep 28 13:06:37 2017 +0200

typo: documen->document

Change-Id: I5d51dada113e3f1b3db5104d6d1f3b70a9fe99e6
(cherry picked from commit 7224a062e9d38ef00a4050fff0da89e4aa08123b)
Signed-off-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/43169
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index b2656f11..abec21ca 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -22,8 +22,8 @@
 0
 0
 8000
-0
-0
+0
+0
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Miklos Vajna
 xmlsecurity/inc/xsecctl.hxx  |5 +
 xmlsecurity/source/helper/xsecctl.cxx|   16 
 xmlsecurity/source/helper/xsecverify.cxx |2 +-
 3 files changed, 6 insertions(+), 17 deletions(-)

New commits:
commit f1ad49892d983e67244b9d65033dcecda6c28e19
Author: Miklos Vajna 
Date:   Fri Oct 6 09:19:04 2017 +0200

xmlsecurity: last 2 params of setSAXChainConnector() is always nullptr

So remove them.

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

diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index 5e8cdb6ccfe7..3abd31d9d75d 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -339,10 +339,7 @@ public:
 const css::uno::Reference<
 css::xml::crypto::XXMLSecurityContext >& xSecurityContext );
 
-void setSAXChainConnector(
-const css::uno::Reference< css::lang::XInitialization >& 
xInitialization,
-const css::uno::Reference< css::xml::sax::XDocumentHandler >& 
xDocumentHandler,
-const css::uno::Reference< css::xml::crypto::sax::XElementStackKeeper 
>& xElementStackKeeper);
+void setSAXChainConnector(const css::uno::Reference< 
css::lang::XInitialization >& xInitialization);
 
 void clearSAXChainConnector();
 void endMission();
diff --git a/xmlsecurity/source/helper/xsecctl.cxx 
b/xmlsecurity/source/helper/xsecctl.cxx
index 616ffcfb2ae4..767c55fe1e87 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -474,10 +474,7 @@ void XSecController::startMission(
 m_bVerifyCurrentSignature = false;
 }
 
-void XSecController::setSAXChainConnector(
-const cssu::Reference< cssl::XInitialization >& xInitialization,
-const cssu::Reference< cssxs::XDocumentHandler >& xDocumentHandler,
-const cssu::Reference< cssxc::sax::XElementStackKeeper >& 
xElementStackKeeper)
+void XSecController::setSAXChainConnector(const cssu::Reference< 
cssl::XInitialization >& xInitialization)
 /** XSecController/setSAXChainConnector ***
  *
  *   NAME
@@ -485,21 +482,16 @@ void XSecController::setSAXChainConnector(
  *  collaborate with the SAXEventKeeper on the SAX chain.
  *
  *   SYNOPSIS
- *  setSAXChainConnector( xInitialization,
- *xDocumentHandler,
- *xElementStackKeeper );
+ *  setSAXChainConnector(xInitialization);
  *
  *   INPUTS
  *  xInitialization - the previous node on the SAX chain
- *  xDocumentHandler- the next node on the SAX chain
- *  xElementStackKeeper - the ElementStackKeeper component which reserves
- *missed key SAX events for the SAXEventKeeper
  
**/
 {
 m_bIsPreviousNodeInitializable = true;
 m_xPreviousNodeOnSAXChain = xInitialization;
-m_xNextNodeOnSAXChain = xDocumentHandler;
-m_xElementStackKeeper = xElementStackKeeper;
+m_xNextNodeOnSAXChain.clear();
+m_xElementStackKeeper.clear();
 
 initializeSAXChain( );
 }
diff --git a/xmlsecurity/source/helper/xsecverify.cxx 
b/xmlsecurity/source/helper/xsecverify.cxx
index 3ec123bc4029..b4f8158b7c6c 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -466,7 +466,7 @@ cssu::Reference< cssxs::XDocumentHandler > const & 
XSecController::createSignatu
 m_xSecParser = new XSecParser(rXMLSignatureHelper, this);
 cssu::Reference< cssl::XInitialization > xInitialization(m_xSecParser, 
uno::UNO_QUERY);
 
-setSAXChainConnector(xInitialization, nullptr, nullptr);
+setSAXChainConnector(xInitialization);
 
 return m_xSecParser;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/po

2017-10-06 Thread Andras Timar
 loleaflet/po/styles/af.po  |  796 +++
 loleaflet/po/styles/am.po  |   28 
 loleaflet/po/styles/ar.po  | 1408 ++
 loleaflet/po/styles/as.po  | 1416 +++
 loleaflet/po/styles/ast.po | 1008 
 loleaflet/po/styles/be.po  |  752 ++
 loleaflet/po/styles/bg.po  | 1492 
 loleaflet/po/styles/bn-IN.po   | 1428 +++
 loleaflet/po/styles/bn.po  | 1088 ++
 loleaflet/po/styles/bo.po  |  932 +++
 loleaflet/po/styles/br.po  | 1256 +++
 loleaflet/po/styles/brx.po |  100 ++
 loleaflet/po/styles/bs.po  | 1188 +
 loleaflet/po/styles/ca-valencia.po | 1472 
 loleaflet/po/styles/ca.po  | 1496 +
 loleaflet/po/styles/cs.po  | 1340 +
 loleaflet/po/styles/cy.po  |  884 +
 loleaflet/po/styles/da.po  |  984 
 loleaflet/po/styles/de.po  | 1116 +++
 loleaflet/po/styles/dgo.po | 1084 ++
 loleaflet/po/styles/dz.po  |  280 ++
 loleaflet/po/styles/el.po  | 1464 
 loleaflet/po/styles/eo.po  | 1440 +++
 loleaflet/po/styles/es.po  | 1200 +
 loleaflet/po/styles/et.po  | 1284 +++
 loleaflet/po/styles/eu.po  | 1340 +
 loleaflet/po/styles/fa.po  |  612 +++
 loleaflet/po/styles/fi.po  | 1480 
 loleaflet/po/styles/fr.po  | 1084 ++
 loleaflet/po/styles/ga.po  | 1188 +
 loleaflet/po/styles/gd.po  | 1116 +++
 loleaflet/po/styles/gl.po  | 1108 +++
 loleaflet/po/styles/gu.po  | 1400 ++
 loleaflet/po/styles/gug.po | 1140 
 loleaflet/po/styles/he.po  | 1392 ++
 loleaflet/po/styles/hi.po  | 1240 ++
 loleaflet/po/styles/hr.po  | 1172 
 loleaflet/po/styles/hu.po  | 1200 +
 loleaflet/po/styles/id.po  |  916 ++
 loleaflet/po/styles/is.po  | 1160 
 loleaflet/po/styles/it.po  | 1052 ++
 loleaflet/po/styles/ja.po  | 1464 
 loleaflet/po/styles/ka.po  |  156 +++
 loleaflet/po/styles/kk.po  | 1492 
 loleaflet/po/styles/km.po  | 1256 +++
 loleaflet/po/styles/kmr-Latn.po|  912 ++
 loleaflet/po/styles/kn.po  | 1428 +++
 loleaflet/po/styles/ko.po  | 1164 
 loleaflet/po/styles/kok.po | 1060 ++
 loleaflet/po/styles/ks.po  |   96 ++
 loleaflet/po/styles/lb.po  |  252 ++
 loleaflet/po/styles/lo.po  |   96 ++
 loleaflet/po/styles/lt.po  | 1188 +
 loleaflet/po/styles/lv.po  | 1376 ++
 loleaflet/po/styles/mai.po |  308 +++
 loleaflet/po/styles/mk.po  |  936 +++
 loleaflet/po/styles/ml.po  | 1260 +++
 loleaflet/po/styles/mn.po  |  888 +
 loleaflet/po/styles/mni.po |   96 ++
 loleaflet/po/styles/mr.po  | 1256 +++
 loleaflet/po/styles/my.po  |  992 
 loleaflet/po/styles/nb.po  | 1052 ++
 loleaflet/po/styles/ne.po  | 1052 ++
 loleaflet/po/styles/nl.po  | 1112 +++
 loleaflet/po/styles/nn.po  | 1056 ++
 loleaflet/po/styles/nr.po  |  552 +
 loleaflet/po/styles/nso.po |  956 +++
 loleaflet/po/styles/oc.po  |  956 +++
 loleaflet/po/styles/om.po  |  968 +++
 loleaflet/po/styles/or.po  | 1292 +++
 loleaflet/po/styles/pa-IN.po   | 1132 +++
 loleaflet/po/styles/pl.po  | 1180 +
 loleaflet/po/styles/pt

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

2017-10-06 Thread Andras Timar
 loleaflet/po/styles/es.po |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6bd9ea1659900fb5042567a088beeda791422729
Author: Andras Timar 
Date:   Fri Oct 6 11:12:45 2017 +0200

loleaflet: es l10n correction: Djibouti->Yibuti

Change-Id: I90ca414e0e0104dc54a56abc6e812d637677d686

diff --git a/loleaflet/po/styles/es.po b/loleaflet/po/styles/es.po
index ca6f1502..fe2a7f78 100644
--- a/loleaflet/po/styles/es.po
+++ b/loleaflet/po/styles/es.po
@@ -2953,7 +2953,7 @@ msgstr "Árabe (Comoros)"
 
 #: langtab.src
 msgid "Arabic (Djibouti)"
-msgstr "Árabe (Djibouti)"
+msgstr "Árabe (Yibuti)"
 
 #: langtab.src
 msgid "Arabic (Egypt)"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Andras Timar
 loleaflet/po/help-ab.po|  178 +++---
 loleaflet/po/help-af.po|4 
 loleaflet/po/help-am.po|8 
 loleaflet/po/help-an.po|4 
 loleaflet/po/help-ar.po|  181 +++---
 loleaflet/po/help-as.po|4 
 loleaflet/po/help-ast.po   |4 
 loleaflet/po/help-az.po|  827 
 loleaflet/po/help-be.po|   99 ++-
 loleaflet/po/help-bg.po|  219 ++-
 loleaflet/po/help-bn.po|4 
 loleaflet/po/help-bn_IN.po |4 
 loleaflet/po/help-bo.po|4 
 loleaflet/po/help-br.po|4 
 loleaflet/po/help-brx.po   |4 
 loleaflet/po/help-bs.po|4 
 loleaflet/po/help-ca.po|4 
 loleaflet/po/help-cs.po|4 
 loleaflet/po/help-cy.po|4 
 loleaflet/po/help-da.po|4 
 loleaflet/po/help-de.po|   12 
 loleaflet/po/help-dgo.po   |4 
 loleaflet/po/help-dsb.po   |4 
 loleaflet/po/help-dz.po|4 
 loleaflet/po/help-el.po|4 
 loleaflet/po/help-en_GB.po |4 
 loleaflet/po/help-en_ZA.po |4 
 loleaflet/po/help-eo.po|4 
 loleaflet/po/help-es.po|   12 
 loleaflet/po/help-et.po|4 
 loleaflet/po/help-eu.po|4 
 loleaflet/po/help-fa.po|4 
 loleaflet/po/help-fi.po|4 
 loleaflet/po/help-fr.po|4 
 loleaflet/po/help-ga.po|4 
 loleaflet/po/help-gd.po|4 
 loleaflet/po/help-gl.po|4 
 loleaflet/po/help-gu.po|4 
 loleaflet/po/help-gug.po   |4 
 loleaflet/po/help-he.po|   15 
 loleaflet/po/help-hi.po|4 
 loleaflet/po/help-hr.po|4 
 loleaflet/po/help-hsb.po   |4 
 loleaflet/po/help-hu.po|4 
 loleaflet/po/help-id.po|9 
 loleaflet/po/help-is.po|4 
 loleaflet/po/help-it.po|4 
 loleaflet/po/help-ja.po|4 
 loleaflet/po/help-jv.po|  172 +++--
 loleaflet/po/help-ka.po|4 
 loleaflet/po/help-kk.po|8 
 loleaflet/po/help-kl.po|4 
 loleaflet/po/help-km.po|4 
 loleaflet/po/help-kn.po|  159 +++--
 loleaflet/po/help-ko.po|4 
 loleaflet/po/help-kok.po   |4 
 loleaflet/po/help-ks.po|4 
 loleaflet/po/help-ky.po|4 
 loleaflet/po/help-lb.po|4 
 loleaflet/po/help-lo.po|4 
 loleaflet/po/help-lt.po|4 
 loleaflet/po/help-lv.po|4 
 loleaflet/po/help-mai.po   |4 
 loleaflet/po/help-mk.po|4 
 loleaflet/po/help-ml.po|4 
 loleaflet/po/help-mn.po|4 
 loleaflet/po/help-mni.po   |4 
 loleaflet/po/help-mr.po|4 
 loleaflet/po/help-my.po|4 
 loleaflet/po/help-nb.po|4 
 loleaflet/po/help-ne.po|4 
 loleaflet/po/help-nl.po|4 
 loleaflet/po/help-nn.po|  615 -
 loleaflet/po/help-nr.po|4 
 loleaflet/po/help-nso.po   |4 
 loleaflet/po/help-oc.po|   18 
 loleaflet/po/help-om.po|4 
 loleaflet/po/help-or.po|4 
 loleaflet/po/help-pa_IN.po |  105 ++-
 loleaflet/po/help-pl.po|  104 ++-
 loleaflet/po/help-pt.po|4 
 loleaflet/po/help-pt_BR.po |4 
 loleaflet/po/help-ro.po|4 
 loleaflet/po/help-ru.po|4 
 loleaflet/po/help-rw.po|4 
 loleaflet/po/help-sa_IN.po |4 
 loleaflet/po/help-sah.po   |4 
 loleaflet/po/help-sat.po   |4 
 loleaflet/po/help-sd.po|4 
 loleaflet/po/help-si.po|4 
 loleaflet/po/help-sid.po   |4 
 loleaflet/po/help-sk.po|4 
 loleaflet/po/help-sq.po|4 
 loleaflet/po/help-ss.po|   56 -
 loleaflet/po/help-st.po|4 
 loleaflet/po/help-sv.po|4 
 loleaflet/po/help-sw_TZ.po |4 
 loleaflet/po/help-ta.po|4 
 loleaflet/po/help-te.po|4 
 loleaflet/po/help-tg.po|4 
 loleaflet/po/help-th.po|4 
 loleaflet/po/help-ti.po|4 
 loleaflet/po/help-tn.po|4 
 loleaflet/po/help-tr.po|4 
 loleaflet/po/help-ts.po|4 
 loleaflet/po/help-tt.po|4 
 loleaflet/po/help-ug.po|4 
 loleaflet/po/help-uk.po|4 
 loleaflet/po/help-ur.po|4 
 loleaflet/po/help-uz.po|   17 
 loleaflet/po/help-ve.po|4 
 loleaflet/po/help-vi.po|4 
 loleaflet/po/help-xh.po|4 
 loleaflet/po/help-zh_CN.po |4 
 loleaflet/po/help-zh_TW.po |   16 
 loleaflet/po/help-zu.po|4 
 loleaflet/po/ui-ab.po  |  289 +++--
 loleaflet/po/ui-af.po  |  212 +--
 loleaflet/po/ui-am.po  |  948 ++--
 loleaflet/po/ui-an.po  |  212 +--
 loleaflet/po/ui-ar.po  | 1275 ---
 loleaflet/po/ui-as.po  |  212 +--
 loleaflet/po/ui-ast.po |  212 +--
 loleaflet/po/ui-az.po  |  212 +--
 loleaflet/po/ui-be.po  |  228 ++-
 loleaflet/po/ui-bg.po  | 1305 +
 loleaflet/po/ui-bn.po  |  212 +--
 loleaflet/po/ui-bn_IN.po   |  212 +--
 loleaflet/po/ui-bo.po  |  212 +--
 loleaflet/po/ui-br.po  |  212 +--
 loleaflet/po/ui-brx.po |  2

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 2 commits - loleaflet/po

2017-10-06 Thread Andras Timar
 loleaflet/po/help-ab.po  |  782 ++--
 loleaflet/po/help-af.po  |  610 -
 loleaflet/po/help-am.po  |  610 -
 loleaflet/po/help-an.po  |  610 -
 loleaflet/po/help-anp.po | 1172 +--
 loleaflet/po/help-ar.po  |  610 -
 loleaflet/po/help-as.po  |  610 -
 loleaflet/po/help-ast.po |  610 -
 loleaflet/po/help-az.po  |  610 -
 loleaflet/po/help-bar.po | 1172 +--
 loleaflet/po/help-be.po  |  703 +--
 loleaflet/po/help-bg.po  |  823 +
 loleaflet/po/help-bm.po  | 1172 +--
 loleaflet/po/help-bn.po  |  610 -
 loleaflet/po/help-bn_IN.po   |  610 -
 loleaflet/po/help-bo.po  |  610 -
 loleaflet/po/help-br.po  |  610 -
 loleaflet/po/help-brx.po |  610 -
 loleaflet/po/help-bs.po  |  610 -
 loleaflet/po/help-ca-valencia.po | 1172 +--
 loleaflet/po/help-ca.po  |  610 -
 loleaflet/po/help-ce.po  | 1172 +--
 loleaflet/po/help-cs.po  |  610 -
 loleaflet/po/help-cy.po  |  610 -
 loleaflet/po/help-da.po  |  610 -
 loleaflet/po/help-de.po  |  610 -
 loleaflet/po/help-dgo.po |  610 -
 loleaflet/po/help-dz.po  |  610 -
 loleaflet/po/help-el.po  |  610 -
 loleaflet/po/help-en_AU.po   | 1172 +--
 loleaflet/po/help-en_GB.po   |  610 -
 loleaflet/po/help-en_ZA.po   |  610 -
 loleaflet/po/help-eo.po  |  610 -
 loleaflet/po/help-es.po  |  616 +-
 loleaflet/po/help-et.po  |  610 -
 loleaflet/po/help-eu.po  |  610 -
 loleaflet/po/help-fa.po  |  610 -
 loleaflet/po/help-fi.po  |  610 -
 loleaflet/po/help-fr.po  |  610 -
 loleaflet/po/help-fur.po | 1172 +--
 loleaflet/po/help-fy.po  | 1172 +--
 loleaflet/po/help-ga.po  |  610 -
 loleaflet/po/help-gbm.po | 1172 +--
 loleaflet/po/help-gd.po  |  610 -
 loleaflet/po/help-gl.po  |  610 -
 loleaflet/po/help-gu.po  |  610 -
 loleaflet/po/help-gug.po |  610 -
 loleaflet/po/help-he.po  |  616 +-
 loleaflet/po/help-hi.po  |  610 -
 loleaflet/po/help-hr.po  |  610 -
 loleaflet/po/help-hu.po  |  610 -
 loleaflet/po/help-hy.po  | 1172 +--
 loleaflet/po/help-id.po  |  613 +-
 loleaflet/po/help-is.po  |  610 -
 loleaflet/po/help-it.po  |  610 -
 loleaflet/po/help-ja.po  |  610 -
 loleaflet/po/help-jv.po  |  776 ++--
 loleaflet/po/help-ka.po  |  610 -
 loleaflet/po/help-kab.po | 1282 +---
 loleaflet/po/help-kk.po  |  610 -
 loleaflet/po/help-kl.po  |  610 -
 loleaflet/po/help-km.po  |  610 -
 loleaflet/po/help-kmr-Latn.po| 1172 +--
 loleaflet/po/help-kn.po  |  763 ++--
 loleaflet/po/help-ko.po  |  610 -
 loleaflet/po/help-kok.po |  610 -
 loleaflet/po/help-ks.po  |  610 -
 loleaflet/po/help-ky.po  |  610 -
 loleaflet/po/help-lb.po  |  610 -
 loleaflet/po/help-lo.po  |  610 -
 loleaflet/po/help-lt.po  |  610 -
 loleaflet/po/help-lv.po  |  610 -
 loleaflet/po/help-mai.po |  610 -
 loleaflet/po/help-mk.po  |  610 -
 loleaflet/po/help-ml.po  |  610 -
 loleaflet/po/help-mn.po  |  610 -
 loleaflet/po/help-mni.po |  610 -
 loleaflet/po/help-mr.po  |  610 -
 loleaflet/po/help-mt.po  | 1175 +--
 loleaflet/po/help-my.po  |  610 -
 loleaflet/po/help-nah.po | 1172 +--
 loleaflet/po/help-nb.po  |  610 -
 loleaflet/po/help-ne.po  |  610 -
 loleaflet/po/help-nl.po  |  610 -
 loleaflet/po/help-nn.po  | 1058 -
 loleaflet/po/help-nqo.po | 1172 +--
 loleaflet/po/help-nr.po  |  610 -
 loleaflet/po/help-nso.po |  610 -
 loleaflet/po/help-oc.po  |  616 +-
 loleaflet/po/help-om.po  |  610 -
 loleaflet/po/help-or.po  |  610 -
 loleaflet/po/help-pa_IN.po   |  616 +-
 loleaflet/po/help-pap_CW.po  | 1172 +--
 loleaflet/po/help-pl.po  |  708 +--
 loleaflet/po/

[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 2 commits - sw/inc sw/source vcl/inc vcl/source vcl/unx

2017-10-06 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit 8f52f12771f2ef1a9395737975fcda26df8b1866
Author: Jan-Marek Glogowski 
Date:   Thu Oct 5 18:19:32 2017 +0200

KDE update system loop integration

This updates the system loop integration to be on par with the
other backends. This includes:

1. Process LO user events before other LO events
2. Correctly handle elapsed QTimer events

Change-Id: Ia17be032ae39dc4c7bfa44cadd22d85a1b9c4fbd

diff --git a/vcl/inc/unx/gendisp.hxx b/vcl/inc/unx/gendisp.hxx
index 5c8f5113c300..2d5bc12fcadf 100644
--- a/vcl/inc/unx/gendisp.hxx
+++ b/vcl/inc/unx/gendisp.hxx
@@ -47,7 +47,7 @@ public:
 
 void SendInternalEvent( SalFrame* pFrame, void* pData, SalEvent nEvent = 
SalEvent::UserEvent );
 void CancelInternalEvent( SalFrame* pFrame, void* pData, SalEvent nEvent );
-bool DispatchInternalEvent();
+bool DispatchInternalEvent( bool bHandleAllCurrentEvent = false );
 
 bool MouseCaptured( const SalFrame *pFrameData ) const
 { return m_pCapture == pFrameData; }
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 8f96e03630b0..54799149e25c 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -179,7 +179,7 @@ public:
 virtual voidStartTimer( sal_uLong nMS );
 virtual voidStopTimer();
 
-boolCheckTimeout( bool bExecuteTimers = true );
+virtual boolCheckTimeout( bool bExecuteTimers = true );
 
 SalI18N_InputMethod* GetInputMethod() const { return m_pInputMethod; }
 Display* GetDisplay() const { return m_pDisplay; }
diff --git a/vcl/source/app/salusereventlist.cxx 
b/vcl/source/app/salusereventlist.cxx
index 6384d8805be4..8f9d76ed313f 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -51,6 +51,7 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 
 {
 osl::MutexGuard aGuard( m_aUserEventsMutex );
+assert( m_aProcessingUserEvents.empty() );
 if( ! m_aUserEvents.empty() )
 {
 if( bHandleAllCurrentEvents )
diff --git a/vcl/unx/generic/app/gendisp.cxx b/vcl/unx/generic/app/gendisp.cxx
index 1be8606602e0..c83283a7b0e0 100644
--- a/vcl/unx/generic/app/gendisp.cxx
+++ b/vcl/unx/generic/app/gendisp.cxx
@@ -47,9 +47,9 @@ void SalGenericDisplay::emitDisplayChanged()
 pAnyFrame->CallCallback( SalEvent::DisplayChanged, nullptr );
 }
 
-bool SalGenericDisplay::DispatchInternalEvent()
+bool SalGenericDisplay::DispatchInternalEvent( bool bHandleAllCurrentEvent )
 {
-return DispatchUserEvents( false );
+return DispatchUserEvents( bHandleAllCurrentEvent );
 }
 
 void SalGenericDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, 
SalEvent nEvent )
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index abd29a78c077..0d30e1d17a99 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -147,7 +147,8 @@ bool X11SalInstance::AnyInput(VclInputFlags nType)
 
 if( (nType & VclInputFlags::TIMER) && (mpXLib && 
mpXLib->CheckTimeout(false)) )
 bRet = true;
-else if (XPending(pDisplay) )
+
+if( !bRet && XPending(pDisplay) )
 {
 PredicateReturn aInput;
 XEvent  aEvent;
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 8a2422a3918d..14a753e1c0a1 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -47,9 +47,6 @@ SalKDEDisplay::~SalKDEDisplay()
 
 void SalKDEDisplay::Yield()
 {
-if( DispatchInternalEvent() )
-return;
-
 // Prevent blocking from Drag'n'Drop events, which may have already have 
processed the event
 if (XEventsQueued( pDisp_, QueuedAfterReading ) == 0)
 return;
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index f047ed9fce65..43e055a2c0bb 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -53,6 +53,7 @@ KDEXLib::KDEXLib() :
 m_nFakeCmdLineArgs( 0 ),
 m_isGlibEventLoopType(false), m_allowKdeDialogs(false),
 m_timerEventId( -1 ), m_postUserEventId( -1 )
+, m_bTimedOut( false )
 {
 m_timerEventId = QEvent::registerEventType();
 m_postUserEventId = QEvent::registerEventType();
@@ -269,22 +270,24 @@ void KDEXLib::socketNotifierActivated( int fd )
 
 bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
 {
+bool bWasEvent = false;
 if( !m_isGlibEventLoopType )
 {
-bool wasEvent = false;
 if( qApp->thread() == QThread::currentThread())
 {
 // even if we use the LO event loop, still process Qt's events,
 // otherwise they can remain unhandled for quite a long while
-wasEvent = processYield( false, bHandleAllCurrentEvents );
+bWasEvent = processYield( false, bHandleAllCurrentEvents );
 }
-return SalXLib::Yield(bWait, bHandleAllCurrentEve

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - common/Crypto.cpp configure.ac .gitignore

2017-10-06 Thread Jan Holesovsky
 .gitignore|1 +
 common/Crypto.cpp |   21 ++---
 configure.ac  |   21 +
 3 files changed, 16 insertions(+), 27 deletions(-)

New commits:
commit 08bc292066c29bf271592e974c449628e08490e8
Author: Jan Holesovsky 
Date:   Fri Oct 6 10:54:11 2017 +0200

Compile the support key in (when configured to use one).

Change-Id: I0b95b245b91d9732a774a6026a3cec2b
Reviewed-on: https://gerrit.libreoffice.org/43185
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/.gitignore b/.gitignore
index 1fe9d685..da612170 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ missing
 stamp-h1
 m4
 debian/loolwsd.postinst
+common/support-public-key.hpp
 
 # Test stuff
 systemplate
diff --git a/common/Crypto.cpp b/common/Crypto.cpp
index a8e84c2d..2c125a2f 100644
--- a/common/Crypto.cpp
+++ b/common/Crypto.cpp
@@ -22,6 +22,7 @@
 
 #include "Log.hpp"
 #include "Crypto.hpp"
+#include "support-public-key.hpp"
 
 using namespace Poco;
 using namespace Poco::Crypto;
@@ -82,27 +83,9 @@ bool SupportKey::verify()
 return false;
 }
 
-std::ifstream pubStream;
-std::string supportKeyFilename =
-#if ENABLE_DEBUG
-SUPPORT_KEY_FILE
-#else
-LOOLWSD_CONFIGDIR "/" SUPPORT_KEY_FILE
-#endif
-;
+std::istringstream pubStream(SUPPORT_PUBLIC_KEY);
 
 try {
-pubStream.open(supportKeyFilename, std::ifstream::in);
-if (pubStream.fail())
-{
-LOG_ERR("Failed to open support public key '" << 
supportKeyFilename << "'.");
-return false;
-}
-} catch (...) {
-LOG_ERR("Exception opening public key '" << supportKeyFilename << 
"'.");
-return false;
-}
-try {
 RSAKey keyPub(&pubStream);
 RSADigestEngine rsaEngine(keyPub, 
RSADigestEngine::DigestType::DIGEST_SHA1);
 rsaEngine.update(_impl->_data);
diff --git a/configure.ac b/configure.ac
index 19348d73..3b082a53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,8 +96,8 @@ AC_ARG_ENABLE([ssl],
 AS_HELP_STRING([--disable-ssl],
[Compile without SSL support]))
 
-AC_ARG_WITH([support-key],
-AS_HELP_STRING([--with-support-key=],
+AC_ARG_WITH([support-public-key],
+AS_HELP_STRING([--with-support-public-key=],
 [Implements signed key with expiration required for support. 
Almost certainly you don not want to use this.]))
 
 AC_ARG_WITH([max-connections],
@@ -294,13 +294,18 @@ fi
 
 AC_SUBST(ENABLE_SSL)
 
-SUPPORT_KEY_FILE=
-AS_IF([test "x$with_support_key" != "x"],
-  [AC_DEFINE([ENABLE_SUPPORT_KEY],1,[Whether to enable support key])
-   
AC_DEFINE_UNQUOTED([SUPPORT_KEY_FILE],[["$with_support_key"]],[LibreOffice 
Online WebSocket server version])],
-  [AC_DEFINE([ENABLE_SUPPORT_KEY],0,[Whether to enable support key])])
+if test "x$with_support_public_key" != "x"; then
+AC_DEFINE([ENABLE_SUPPORT_KEY],1,[Whether to enable support key])
+
+# generate the public key include
+echo -e "#ifndef INCLUDED_SUPPORT_PUBLIC_KEY_HPP\n#define 
INCLUDED_SUPPORT_PUBLIC_KEY_HPP\n#include \nconst static std::string 
SUPPORT_PUBLIC_KEY(" > "${srcdir}/common/support-public-key.hpp"
+sed 's/\(.*\)/"\1\\n"/' "$with_support_public_key" >> 
"${srcdir}/common/support-public-key.hpp"
+echo -e ");\n#endif" >> "${srcdir}/common/support-public-key.hpp"
+else
+AC_DEFINE([ENABLE_SUPPORT_KEY],0,[Whether to enable support key])
+rm -f "${srcdir}/common/support-public-key.hpp"
+fi
 AC_SUBST(ENABLE_SUPPORT_KEY)
-AC_SUBST(SUPPORT_KEY_FILE)
 
 LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} 
-lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} 
-lPocoXML${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} 
-lPocoCrypto${POCO_DEBUG_SUFFIX}"
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - debian/changelog loolwsd.spec.in

2017-10-06 Thread Andras Timar
 debian/changelog |6 ++
 loolwsd.spec.in  |2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b1a0c9b6e0644d949b3a0ae23379e4ddf022ced7
Author: Andras Timar 
Date:   Fri Oct 6 11:32:00 2017 +0200

Bump version for packages 2.1.4-3

Change-Id: Idf4311bfc1eb6d3f751002ff0c5ede7ea6e9d3a7

diff --git a/debian/changelog b/debian/changelog
index 415cec80..5cf9d05c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (2.1.4-3) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool21
+
+ -- Andras Timar   Fri, 06 Oct 2017 11:30:00 +0200
+
 loolwsd (2.1.4-2) unstable; urgency=medium
 
   * see the git log: http://col.la/cool21
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index b3c09737..f5ce40ed 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:2%{?dist}
+Release:3%{?dist}
 %if 0%{?suse_version} == 1110
 Group:  Productivity/Office/Suite
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/2.1.4-3'

2017-10-06 Thread Andras Timar
Tag '2.1.4-3' created by Andras Timar  at 
2017-10-06 09:32 +

2.1.4-3

Changes since 2.1.4-rc2-9:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/source framework/source include/sfx2 reportdesign/source sfx2/sdi sfx2/source

2017-10-06 Thread Maxim Monastirsky
 dbaccess/source/ui/tabledesign/TableController.cxx |1 
 framework/source/fwe/classes/addonmenu.cxx |   17 +-
 include/sfx2/sfxsids.hrc   |6 +-
 reportdesign/source/ui/report/ReportController.cxx |1 
 sfx2/sdi/appslots.sdi  |9 ---
 sfx2/sdi/sfx.sdi   |   54 -
 sfx2/source/appl/sfxpicklist.cxx   |6 --
 sfx2/source/doc/objserv.cxx|6 --
 8 files changed, 9 insertions(+), 91 deletions(-)

New commits:
commit ecc3d43d2feb4ec09a3f797a4eb6d2eb25e5ee7f
Author: Maxim Monastirsky 
Date:   Fri Oct 6 00:28:08 2017 +0300

Related: tdf#107569 Remove useless slots

With the current implementation of MenuBarManager, there is
no need to have sdi slots for menu items with submenus, and
moreover they have no effect at all.

Note that SID_PICKLIST was also (mis)used as an argument
to avoid adding a document to the recent list (which isn't
related to its mapping to .uno:PickList). But there seem to
be only read attempts, nothing actually sets it, so I think
this usage can be removed too. (For information, at least in
OOo 1.0.3 sources, there were 2 places where it was used as
an argument for SID_SAVEASDOC, although it was not present
there in the SID_SAVEASDOC def. in sfx.sdi.)

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

diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx 
b/dbaccess/source/ui/tabledesign/TableController.cxx
index bfb16297c65c..c0d9ccbc4187 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -606,7 +606,6 @@ void OTableController::describeSupportedFeatures()
 implDescribeSupportedFeature( ".uno:Redo",  ID_BROWSER_REDO,   
 CommandGroup::EDIT );
 implDescribeSupportedFeature( ".uno:Save",  ID_BROWSER_SAVEDOC,
 CommandGroup::EDIT );
 implDescribeSupportedFeature( ".uno:Undo",  ID_BROWSER_UNDO,   
 CommandGroup::EDIT );
-implDescribeSupportedFeature( ".uno:HelpMenu",  SID_HELPMENU,  
 CommandGroup::APPLICATION );
 implDescribeSupportedFeature( ".uno:NewDoc",SID_NEWDOC,
 CommandGroup::DOCUMENT );
 implDescribeSupportedFeature( ".uno:SaveAs",ID_BROWSER_SAVEASDOC,  
 CommandGroup::DOCUMENT );
 implDescribeSupportedFeature( ".uno:DBIndexDesign", SID_INDEXDESIGN,   
 CommandGroup::APPLICATION );
diff --git a/framework/source/fwe/classes/addonmenu.cxx 
b/framework/source/fwe/classes/addonmenu.cxx
index 90914fe2a44c..a044870378a8 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -38,10 +38,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 
-// Please look at sfx2/inc/sfxsids.hrc the values are defined there. Due to 
build dependencies
-// we cannot include the header file.
-const sal_uInt16 SID_HELPMENU= (SID_SFX_START + 410);
-
 namespace framework
 {
 
@@ -101,13 +97,10 @@ void AddonMenuManager::MergeAddonHelpMenu( const 
Reference< XFrame >& rFrame,
 {
 if ( pMergeMenuBar )
 {
-PopupMenu* pHelpMenu = pMergeMenuBar->GetPopupMenu( SID_HELPMENU );
-if ( !pHelpMenu )
-{
-sal_uInt16 nId = FindMenuId(pMergeMenuBar, ".uno:HelpMenu");
-if ( nId != USHRT_MAX )
-pHelpMenu = pMergeMenuBar->GetPopupMenu( nId );
-}
+PopupMenu* pHelpMenu(nullptr);
+sal_uInt16 nId = FindMenuId(pMergeMenuBar, ".uno:HelpMenu");
+if ( nId != USHRT_MAX )
+pHelpMenu = pMergeMenuBar->GetPopupMenu( nId );
 
 if ( pHelpMenu )
 {
@@ -118,7 +111,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< 
XFrame >& rFrame,
 AddonsOptions aOptions;
 
 // try to detect the about menu item with the command URL
-sal_uInt16 nId = FindMenuId(pHelpMenu, ".uno:About");
+nId = FindMenuId(pHelpMenu, ".uno:About");
 sal_uInt16 nInsPos = pHelpMenu->GetItemPos( nId );
 
 const Sequence< Sequence< PropertyValue > >& rAddonHelpMenuEntries 
= aOptions.GetAddonsHelpMenu();
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 91baa6c56606..aa63549deaca 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -81,7 +81,7 @@
 #define SID_HELPTIPS(SID_SFX_START + 404)
 #define SID_EMOJI_CONTROL   (SID_SFX_START + 405)
 #define SID_CHARMAP_CONTROL (SID_SFX_START + 406)
-#define SID_HELPMENU(SID_SFX_START + 410)
+// free (SID_SFX_ST

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

2017-10-06 Thread jan Iversen
 external/libxslt/UnpackedTarball_libxslt.mk |1 -
 external/libxslt/iOS.patch.0|   20 
 2 files changed, 21 deletions(-)

New commits:
commit 01e14d9d0bfabad8a75217712b430cf678de01a9
Author: jan Iversen 
Date:   Fri Oct 6 12:21:35 2017 +0200

iOS, undo patch for libxslt

there is a new macro so that the patch is no longer needed

Change-Id: I6a2c63566052def1d1d1ea2eb7cc8005453b01d1

diff --git a/external/libxslt/UnpackedTarball_libxslt.mk 
b/external/libxslt/UnpackedTarball_libxslt.mk
index 27be0ca3dccb..eae318ef74b9 100644
--- a/external/libxslt/UnpackedTarball_libxslt.mk
+++ b/external/libxslt/UnpackedTarball_libxslt.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxslt,\
external/libxslt/libxslt-msvc.patch.2 \
external/libxslt/libxslt-1.1.26-memdump.patch \
external/libxslt/rpath.patch.0 \
-   external/libxslt/iOS.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxslt/iOS.patch.0 b/external/libxslt/iOS.patch.0
deleted file mode 100644
index ffd4a39a815a..
--- a/external/libxslt/iOS.patch.0
+++ /dev/null
@@ -1,20 +0,0 @@
 config.sub
-+++ config.sub
-@@ -253,7 +253,7 @@
-   | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | 
alpha64pca5[67] \
-   | am33_2.0 \
-   | arc | arceb \
--  | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
-+  | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] | 
arm64 \
-   | avr | avr32 \
-   | be32 | be64 \
-   | bfin \
-@@ -374,7 +374,7 @@
-   | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-   | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-   | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
--  | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-+  | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | arm64-* \
-   | avr-* | avr32-* \
-   | be32-* | be64-* \
-   | bfin-* | bs2000-* \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Caolán McNamara
 sc/source/ui/view/tabview.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit b86722d7470d00290ec4b3d5e0e8c65861570268
Author: Caolán McNamara 
Date:   Fri Oct 6 09:36:48 2017 +0100

coverity#1418965 Uninitialized scalar field

and

coverity#1418963 Uninitialized scalar field

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

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index d6160853b2c1..e8f11d4b0c9b 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2343,6 +2343,10 @@ public:
 BoundsProvider(ScDocument* pD, SCTAB nT)
 : pDoc(pD)
 , nTab(nT)
+, nFirstIndex(-1)
+, nSecondIndex(-1)
+, nFirstPositionPx(-1)
+, nSecondPositionPx(-1)
 {}
 
 void GetStartIndexAndPosition(index_type& nIndex, long& nPosition) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Noel Grandin
 compilerplugins/clang/flatten.cxx  |   55 -
 compilerplugins/clang/test/flatten.cxx |   29 -
 2 files changed, 56 insertions(+), 28 deletions(-)

New commits:
commit 38ccea5588f3c72ab0d76ef13e1371a414207700
Author: Noel Grandin 
Date:   Fri Oct 6 10:44:29 2017 +0200

Improve performance of loplugin:flatten

...by avoiding calls to parentStmt.

Change-Id: I4f3d66a0529e9c3abf5c963bcf70db7a2afa1bf9

diff --git a/compilerplugins/clang/flatten.cxx 
b/compilerplugins/clang/flatten.cxx
index 7fa408ea1731..ce16bc2384ee 100644
--- a/compilerplugins/clang/flatten.cxx
+++ b/compilerplugins/clang/flatten.cxx
@@ -7,12 +7,13 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "plugin.hxx"
 #include 
 #include 
 #include 
 #include 
 #include 
-#include "plugin.hxx"
+#include 
 
 /**
   Look for places where we can flatten the control flow in a method by 
returning early.
@@ -30,7 +31,9 @@ public:
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
 
+bool TraverseIfStmt(IfStmt *);
 bool TraverseCXXCatchStmt(CXXCatchStmt * );
+bool TraverseCompoundStmt(CompoundStmt *);
 bool VisitIfStmt(IfStmt const * );
 private:
 bool rewrite1(IfStmt const * );
@@ -40,8 +43,8 @@ private:
 std::string getSourceAsString(SourceRange range);
 std::string invertCondition(Expr const * condExpr, SourceRange 
conditionRange);
 bool checkOverlap(SourceRange);
-bool lastStmtInParent(Stmt const * stmt);
 
+std::stack mLastStmtInParentStack;
 std::vector> mvModifiedRanges;
 };
 
@@ -72,23 +75,30 @@ static bool containsVarDecl(Stmt const * stmt)
 return declStmt && isa(*declStmt->decl_begin());
 }
 
-bool Flatten::lastStmtInParent(Stmt const * stmt)
+bool Flatten::TraverseCXXCatchStmt(CXXCatchStmt* )
 {
-auto parent = parentStmt(stmt);
-if (!parent) {
-return true;
-}
-auto parentCompound = dyn_cast(parent);
-if (!parentCompound) {
+// ignore stuff inside catch statements, where doing a "if...else..throw" 
is more natural
+return true;
+}
+
+bool Flatten::TraverseIfStmt(IfStmt * ifStmt)
+{
+// ignore if we are part of an if/then/else/if chain
+if (ifStmt->getElse() && isa(ifStmt->getElse()))
 return true;
-}
-return parentCompound->body_back() == stmt;
+return RecursiveASTVisitor::TraverseIfStmt(ifStmt);
 }
 
-bool Flatten::TraverseCXXCatchStmt(CXXCatchStmt* )
+bool Flatten::TraverseCompoundStmt(CompoundStmt * compoundStmt)
 {
-// ignore stuff inside catch statements, where doing a "if...else..throw" 
is more natural
-return true;
+// if the "if" statement is not the last statement in its block, and it 
contains
+// var decls in its then block, we cannot de-indent the then block without
+// extending the lifetime of some variables, which may be problematic
+// ignore if we are part of an if/then/else/if chain
+mLastStmtInParentStack.push(compoundStmt->size() > 0 && 
isa(*compoundStmt->body_back()));
+bool rv = RecursiveASTVisitor::TraverseCompoundStmt(compoundStmt);
+mLastStmtInParentStack.pop();
+return rv;
 }
 
 bool Flatten::VisitIfStmt(IfStmt const * ifStmt)
@@ -99,15 +109,6 @@ bool Flatten::VisitIfStmt(IfStmt const * ifStmt)
 if (!ifStmt->getElse())
 return true;
 
-// ignore if/then/else/if chains for now
-if (isa(ifStmt->getElse()))
-return true;
-
-// ignore if we are part of an if/then/else/if chain
-auto parentIfStmt = dyn_cast(parentStmt(ifStmt));
-if (parentIfStmt && parentIfStmt->getElse() == ifStmt)
-return true;
-
 if (containsPreprocessingConditionalInclusion(ifStmt->getSourceRange())) {
 return true;
 }
@@ -118,10 +119,10 @@ bool Flatten::VisitIfStmt(IfStmt const * ifStmt)
 // if both the "if" and the "else" contain throws, no improvement
 if (containsSingleThrowExpr(ifStmt->getThen()))
 return true;
-// if the "if" statement is not the last statement in it's block, and 
it contains
-// var decls in it's then block, we cannot de-indent the then block 
without
+// if the "if" statement is not the last statement in its block, and 
it contains
+// var decls in its then block, we cannot de-indent the then block 
without
 // extending the lifetime of some variables, which may be problematic
-if (!lastStmtInParent(ifStmt) && containsVarDecl(ifStmt->getThen()))
+if (!mLastStmtInParentStack.top() || 
containsVarDecl(ifStmt->getThen()))
 return true;
 
 if (!rewrite1(ifStmt))
@@ -147,7 +148,7 @@ bool Flatten::VisitIfStmt(IfStmt const * ifStmt)
 // if the "if" statement is not the last statement in it's block, and 
it contains
 // var decls in it's else block, we cannot de-indent the else block 
without
 // extending the lifetime of some variables, which may be problematic
- 

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

2017-10-06 Thread Noel Grandin
 compilerplugins/clang/constparams.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05400958b0a06812fb38cf7644f30eebe2ab3768
Author: Noel Grandin 
Date:   Fri Oct 6 12:52:05 2017 +0200

disable constparams loplugin

increases compile time too much, I will run this by hand periodically

Change-Id: I118567ef294847ff609d4de771d998ce3b57161b

diff --git a/compilerplugins/clang/constparams.cxx 
b/compilerplugins/clang/constparams.cxx
index 5ce9df2e5e2c..87a00ec488c3 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -571,7 +571,7 @@ bool ConstParams::isPointerOrReferenceToConst(const 
QualType& qt) {
 return false;
 }
 
-loplugin::Plugin::Registration< ConstParams > X("constparams", true);
+loplugin::Plugin::Registration< ConstParams > X("constparams", false);
 
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Noel Grandin
 include/unotools/pathoptions.hxx|3 +++
 sfx2/source/appl/appcfg.cxx |9 +
 svtools/source/misc/templatefoldercache.cxx |   14 +++---
 unotools/source/config/pathoptions.cxx  |   18 +-
 4 files changed, 36 insertions(+), 8 deletions(-)

New commits:
commit aacf28c8ab48ca969308a2fb1bdff32e159228db
Author: Noel Grandin 
Date:   Fri Oct 6 12:04:39 2017 +0200

Revert "remove handing of deprecated Storage path option"

This reverts commit b71fdc67ed1efd421b9b1c747708958e8e09f73c.

since Jochen indicates that there is a bug in it

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

diff --git a/include/unotools/pathoptions.hxx b/include/unotools/pathoptions.hxx
index 99791e5cc0fc..37e172632298 100644
--- a/include/unotools/pathoptions.hxx
+++ b/include/unotools/pathoptions.hxx
@@ -56,6 +56,7 @@ public:
 PATH_MODULE,
 PATH_PALETTE,
 PATH_PLUGIN,
+PATH_STORAGE,
 PATH_TEMP,
 PATH_TEMPLATE,
 PATH_USERCONFIG,
@@ -87,6 +88,7 @@ public:
 const OUString& GetModulePath() const;
 const OUString& GetPalettePath() const;
 const OUString& GetPluginPath() const;
+const OUString& GetStoragePath() const;
 const OUString& GetTempPath() const;
 const OUString& GetTemplatePath() const;
 const OUString& GetUserConfigPath() const;
@@ -112,6 +114,7 @@ public:
 voidSetModulePath( const OUString& rPath );
 voidSetPalettePath( const OUString& rPath );
 voidSetPluginPath( const OUString& rPath );
+voidSetStoragePath( const OUString& rPath );
 voidSetTempPath( const OUString& rPath );
 voidSetTemplatePath( const OUString& rPath );
 voidSetUserConfigPath( const OUString& rPath );
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 27ec3ad2f1df..7153cf17b4d1 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -433,6 +433,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
 case SvtPathOptions::PATH_MODULE:   
osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetModulePath(), aValue ); 
break;
 case SvtPathOptions::PATH_PALETTE:  aValue = 
aPathCfg.GetPalettePath(); break;
 case SvtPathOptions::PATH_PLUGIN:   
osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetPluginPath(), aValue ); 
break;
+case SvtPathOptions::PATH_STORAGE:  
osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetStoragePath(), aValue ); 
break;
 case SvtPathOptions::PATH_TEMP: aValue = 
aPathCfg.GetTempPath(); break;
 case SvtPathOptions::PATH_TEMPLATE: aValue = 
aPathCfg.GetTemplatePath(); break;
 case SvtPathOptions::PATH_USERCONFIG:   aValue = 
aPathCfg.GetUserConfigPath(); break;
@@ -790,6 +791,14 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
 break;
 }
 
+case SvtPathOptions::PATH_STORAGE:
+{
+OUString aTmp;
+if( osl::FileBase::getSystemPathFromFileURL( sValue, 
aTmp ) == osl::FileBase::E_None )
+aPathOptions.SetStoragePath( aTmp );
+break;
+}
+
 case SvtPathOptions::PATH_TEMP: 
aPathOptions.SetTempPath( sValue );break;
 case SvtPathOptions::PATH_TEMPLATE: 
aPathOptions.SetTemplatePath( sValue );break;
 case SvtPathOptions::PATH_USERCONFIG:   
aPathOptions.SetUserConfigPath( sValue );break;
diff --git a/svtools/source/misc/templatefoldercache.cxx 
b/svtools/source/misc/templatefoldercache.cxx
index ab3db5afa563..f83e11dcdf0a 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -691,20 +691,20 @@ namespace svt
 // close any old stream instance
 closeCacheStream( );
 
-// get the temp directory
-OUString sTempURL = implParseSmart( SvtPathOptions().GetTempPath() );
-INetURLObject aTempURL( sTempURL );
-if ( INetProtocol::NotValid == aTempURL.GetProtocol() )
+// get the storage directory
+OUString sStorageURL = implParseSmart( 
SvtPathOptions().GetStoragePath() );
+INetURLObject aStorageURL( sStorageURL );
+if ( INetProtocol::NotValid == aStorageURL.GetProtocol() )
 {
-OSL_FAIL( "TemplateFolderCacheImpl::openCacheStream: invalid temp 
path!" );
+OSL_FAIL( "TemplateFolderCacheImpl::openCacheStream: invalid 
storage path!" );
 return fals

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

2017-10-06 Thread Caolán McNamara
 sc/source/ui/view/tabview.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 62fc21675ccbfa5dcadbb2407729b804aac75ae2
Author: Caolán McNamara 
Date:   Fri Oct 6 09:32:23 2017 +0100

coverity#1418961 Uninitialized scalar field

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

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index e8f11d4b0c9b..0f227b18ef5f 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -230,6 +230,8 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& 
rDocSh, ScTabViewShell*
 mfPendingTabBarWidth( -1.0 ),
 mnLOKStartHeaderRow( std::numeric_limits::min() ),
 mnLOKEndHeaderRow( std::numeric_limits::min() ),
+mnLOKStartHeaderCol( std::numeric_limits::min() ),
+mnLOKEndHeaderCol( std::numeric_limits::min() ),
 bMinimized( false ),
 bInUpdateHeader( false ),
 bInActivatePart( false ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 45 commits - avmedia/source basic/qa basic/source bin/lo-all-static-libs canvas/source chart2/qa comphelper/source compilerplugi

2017-10-06 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit e729d5350fad2c3255be6efecafbd82db4fe9d4d
Author: Jan-Marek Glogowski 
Date:   Fri Oct 6 12:53:05 2017 +0200

Process all pending events during Cppunit setUp

Larger unit tests collect a lot of events, which are just processed
on shutdown. But since the Scheduler is just an unsorted linked
list, processing these in order is O(n2) for lookup, which really
adds up, e.g. sw_ooxmlexport8 has 35047 tasks on shutdown.

So this just processes all pending events before running each unit
test.

Change-Id: Icf12146015afc17a1f52f79c18f248b72650ad46

diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 415292bd2a26..a195db529d71 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -104,6 +105,10 @@ void test::BootstrapFixture::setUp()
 test::BootstrapFixtureBase::setUp();
 
 test_init_impl(m_bAssertOnDialog, m_bNeedUCB, m_xSFactory.get());
+
+#if OSL_DEBUG_LEVEL > 0
+Scheduler::ProcessEventsToIdle();
+#endif
 }
 
 test::BootstrapFixture::~BootstrapFixture()
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 92db1e23563a..7e908e6e1f06 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -96,7 +96,6 @@ void Scheduler::ImplDeInitScheduler()
 
 SchedulerGuard aSchedulerGuard;
 
-#if OSL_DEBUG_LEVEL > 0
 {
 ImplSchedulerData* pSchedulerData = rSchedCtx.mpFirstSchedulerData;
 sal_uInt32 nTasks = 0;
@@ -105,9 +104,11 @@ void Scheduler::ImplDeInitScheduler()
 ++nTasks;
 pSchedulerData = pSchedulerData->mpNext;
 }
-SAL_INFO( "vcl.schedule.deinit", "DeInit the scheduler - tasks: " << 
nTasks );
+SAL_WARN_IF( 0 != nTasks, "vcl.schedule.deinit",
+ "DeInit the scheduler - pending tasks: " << nTasks );
 }
 
+#if OSL_DEBUG_LEVEL > 0
 // clean up all the sfx::SfxItemDisruptor_Impl Idles
 ProcessEventsToIdle();
 #endif
commit a31c05e52bdb04d7b56a18e1638080b8e73f63e7
Author: Jan-Marek Glogowski 
Date:   Thu Oct 5 18:19:32 2017 +0200

KDE update system loop integration

This updates the system loop integration to be on par with the
other backends. This includes:

1. Process LO user events before other LO events
2. Correctly handle elapsed QTimer events
3. Don't wait-yield in the main thread from a non-main thread

Change-Id: Ia17be032ae39dc4c7bfa44cadd22d85a1b9c4fbd

diff --git a/vcl/inc/unx/gendisp.hxx b/vcl/inc/unx/gendisp.hxx
index 5c8f5113c300..2d5bc12fcadf 100644
--- a/vcl/inc/unx/gendisp.hxx
+++ b/vcl/inc/unx/gendisp.hxx
@@ -47,7 +47,7 @@ public:
 
 void SendInternalEvent( SalFrame* pFrame, void* pData, SalEvent nEvent = 
SalEvent::UserEvent );
 void CancelInternalEvent( SalFrame* pFrame, void* pData, SalEvent nEvent );
-bool DispatchInternalEvent();
+bool DispatchInternalEvent( bool bHandleAllCurrentEvent = false );
 
 bool MouseCaptured( const SalFrame *pFrameData ) const
 { return m_pCapture == pFrameData; }
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 8f96e03630b0..54799149e25c 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -179,7 +179,7 @@ public:
 virtual voidStartTimer( sal_uLong nMS );
 virtual voidStopTimer();
 
-boolCheckTimeout( bool bExecuteTimers = true );
+virtual boolCheckTimeout( bool bExecuteTimers = true );
 
 SalI18N_InputMethod* GetInputMethod() const { return m_pInputMethod; }
 Display* GetDisplay() const { return m_pDisplay; }
diff --git a/vcl/source/app/salusereventlist.cxx 
b/vcl/source/app/salusereventlist.cxx
index 6384d8805be4..8f9d76ed313f 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -51,6 +51,7 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 
 {
 osl::MutexGuard aGuard( m_aUserEventsMutex );
+assert( m_aProcessingUserEvents.empty() );
 if( ! m_aUserEvents.empty() )
 {
 if( bHandleAllCurrentEvents )
diff --git a/vcl/unx/generic/app/gendisp.cxx b/vcl/unx/generic/app/gendisp.cxx
index 1be8606602e0..c83283a7b0e0 100644
--- a/vcl/unx/generic/app/gendisp.cxx
+++ b/vcl/unx/generic/app/gendisp.cxx
@@ -47,9 +47,9 @@ void SalGenericDisplay::emitDisplayChanged()
 pAnyFrame->CallCallback( SalEvent::DisplayChanged, nullptr );
 }
 
-bool SalGenericDisplay::DispatchInternalEvent()
+bool SalGenericDisplay::DispatchInternalEvent( bool bHandleAllCurrentEvent )
 {
-return DispatchUserEvents( false );
+return DispatchUserEvents( bHandleAllCurrentEvent );
 }
 
 void SalGenericDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, 
SalEvent nEvent )
diff --git a/vcl/unx/generic/app/sal

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

2017-10-06 Thread Stephan Bergmann
 sw/source/core/layout/newfrm.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 63d845dc88690b9c5c8194e1512a8e4390c7ee24
Author: Stephan Bergmann 
Date:   Fri Oct 6 11:46:25 2017 +0200

Fix -fsanitize=signed-integer-overflow

during CppunitTest_sw_uiwriter (see below), using o3tl::saturating_add 
similar
to 97dcb242f5cc41216fd16503604ca2f29f147a2a "Fix -fsanitize=signed-integer-
overflow".

It replaces exactly the one use of SwIncrement that caused problems now.
Probably other uses of those FirstMinusSecond, SecondMinusFirst, 
SwIncrement,
and SwDecrement should be adapted, too.

> sw/source/core/layout/newfrm.cxx:53:17: runtime error: signed integer 
overflow: 23547 + 9223372036854755850 cannot be represented in type 'long'
> #0 0x7f00fe99e438 in SwIncrement(long, long) 
sw/source/core/layout/newfrm.cxx:53:17
> #1 0x7f00feb272bc in SwTabFrame::MakeAll(OutputDevice*) 
sw/source/core/layout/tabfrm.cxx:2311:44
> #2 0x7f00fe79d883 in SwFrame::PrepareMake(OutputDevice*) 
sw/source/core/layout/calcmove.cxx:312:29
> #3 0x7f00feb1cbff in SwContentFrame::CalcLowers(SwLayoutFrame*, 
SwLayoutFrame const*, long, bool) sw/source/core/layout/tabfrm.cxx:1454:19
> #4 0x7f00feb2eded in lcl_RecalcRow(SwRowFrame&, long) 
sw/source/core/layout/tabfrm.cxx:1581:22
> #5 0x7f00feb186d5 in lcl_RecalcSplitLine(SwRowFrame&, SwRowFrame&, 
long, long) sw/source/core/layout/tabfrm.cxx:682:5
> #6 0x7f00feb13900 in SwTabFrame::Split(long, bool, bool) 
sw/source/core/layout/tabfrm.cxx:1268:16
> #7 0x7f00feb20ed9 in SwTabFrame::MakeAll(OutputDevice*) 
sw/source/core/layout/tabfrm.cxx:2387:47
> #8 0x7f00fe79df2b in SwFrame::PrepareMake(OutputDevice*) 
sw/source/core/layout/calcmove.cxx:346:5
> #9 0x7f00fe945f70 in SwLayAction::FormatLayoutTab(SwTabFrame*, bool) 
sw/source/core/layout/layact.cxx:1467:15
> #10 0x7f00fe93e6ca in SwLayAction::FormatLayout(OutputDevice*, 
SwLayoutFrame*, bool) sw/source/core/layout/layact.cxx:1360:32
> #11 0x7f00fe93e95b in SwLayAction::FormatLayout(OutputDevice*, 
SwLayoutFrame*, bool) sw/source/core/layout/layact.cxx:1363:29
> #12 0x7f00fe9329c9 in SwLayAction::InternalAction(OutputDevice*) 
sw/source/core/layout/layact.cxx:550:25
> #13 0x7f00fe92f71a in SwLayAction::Action(OutputDevice*) 
sw/source/core/layout/layact.cxx:341:5
> #14 0x7f00ffa7bcfd in SwViewShell::ImplEndAction(bool) 
sw/source/core/view/viewsh.cxx:280:17
> #15 0x7f00fd6e5671 in SwViewShell::EndAction(bool) 
sw/inc/viewsh.hxx:605:9
> #16 0x7f00fd696865 in SwCursorShell::EndAction(bool, bool) 
sw/source/core/crsr/crsrsh.cxx:258:18
> #17 0x7f0100a66752 in SwView::OuterResizePixel(Point const&, Size 
const&) sw/source/uibase/uiview/viewport.cxx:1116:22
> #18 0x7f01177ff562 in 
SfxViewFrame::DoAdjustPosSizePixel(SfxViewShell*, Point const&, Size const&, 
bool) sfx2/source/view/viewfrm.cxx:1490:18
> #19 0x7f0117812660 in SfxViewFrame::Resize(bool) 
sfx2/source/view/viewfrm.cxx:2275:17
> #20 0x7f01178262e9 in SfxFrameViewWindow_Impl::Resize() 
sfx2/source/view/viewfrm2.cxx:73:17
> #21 0x7f01397ce063 in vcl::Window::ImplCallResize() 
vcl/source/window/event.cxx:522:5
> #22 0x7f0139c1458e in vcl::Window::Show(bool, ShowFlags) 
vcl/source/window/window.cxx:2274:13
> #23 0x7f01177b8313 in 
SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame) 
sfx2/source/view/sfxbasecontroller.cxx:1250:24
> #24 0x7f01177b6773 in 
SfxBaseController::attachFrame(com::sun::star::uno::Reference
 const&) sfx2/source/view/sfxbasecontroller.cxx:550:13
> #25 0x7f01177708ca in (anonymous 
namespace)::SfxFrameLoader_Impl::impl_createDocumentView(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference const&, 
comphelper::NamedValueCollection const&, rtl::OUString const&) 
sfx2/source/view/frmload.cxx:599:18
> #26 0x7f011776c4dc in (anonymous 
namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence
 const&, com::sun::star::uno::Reference const&) 
sfx2/source/view/frmload.cxx:716:13
> #27 0x7f00cd09827c in framework::LoadEnv::impl_loadContent() 
framework/source/loadenv/loadenv.cxx:1087:37
> #28 0x7f00cd0914f3 in framework::LoadEnv::startLoading() 
framework/source/loadenv/loadenv.cxx:372:20
> #29 0x7f00cd08f794 in 
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
framework/source/loadenv/loadenv.cxx:158:14
> #30 0x7f00cd146748 in 
framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString 
const&, int, 
com::sun::star::uno::Sequence const&) 
framework/source/services/desktop.cxx:618:12
> #31 0x7f00cd14690c in non-virtual thun

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

2017-10-06 Thread Noel Grandin
 sfx2/source/control/bindings.cxx |   13 +--
 sfx2/source/control/statcach.cxx |   40 +++
 sfx2/source/inc/statcach.hxx |9 ---
 svl/source/numbers/numfmuno.cxx  |   44 ---
 svl/source/numbers/numfmuno.hxx  |   12 ++
 5 files changed, 50 insertions(+), 68 deletions(-)

New commits:
commit a5dbe5a8a9e98f2d79f2c535182fc557b561ed0f
Author: Noel Grandin 
Date:   Fri Oct 6 12:17:55 2017 +0200

use rtl::Reference in svl,sfx2

instead of manual ref-counting

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

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index a8d3124e9e1c..cc3990ba70f6 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1567,16 +1567,15 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, 
std::unique_ptracquire();
-xDisp->addStatusListener( pBind, aURL );
-if ( !pBind->GetStatus().IsEnabled )
+rtl::Reference xBind(new BindDispatch_Impl( 
xDisp, aURL, pCache, pSlot ));
+xDisp->addStatusListener( xBind.get(), aURL );
+if ( !xBind->GetStatus().IsEnabled )
 {
 eState = SfxItemState::DISABLED;
 }
 else
 {
-css::uno::Any aAny = pBind->GetStatus().State;
+css::uno::Any aAny = xBind->GetStatus().State;
 css::uno::Type aType = aAny.getValueType();
 
 if ( aType == cppu::UnoType::get() )
@@ -1607,8 +1606,8 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, 
std::unique_ptrremoveStatusListener( pBind, aURL );
-pBind->Release();
+xDisp->removeStatusListener( xBind.get(), aURL );
+xBind.clear();
 if ( bDeleteCache )
 DELETEZ( pCache );
 return eState;
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 1d0d794c428b..a8654ba26f77 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -145,16 +145,13 @@ void SAL_CALL  BindDispatch_Impl::statusChanged( const 
css::frame::FeatureStateE
 }
 }
 
-void BindDispatch_Impl::Release()
+BindDispatch_Impl::~BindDispatch_Impl()
 {
 if ( xDisp.is() )
 {
 xDisp->removeStatusListener( 
static_cast(this), aURL );
 xDisp.clear();
 }
-
-pCache = nullptr;
-release();
 }
 
 
@@ -180,7 +177,6 @@ sal_Int16 BindDispatch_Impl::Dispatch( const 
css::uno::Sequence < css::beans::Pr
 // This constructor for an invalid cache that is updated in the first request.
 
 SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
-pDispatch( nullptr ),
 nId(nFuncId),
 pInternalController(nullptr),
 pController(nullptr),
@@ -201,11 +197,6 @@ SfxStateCache::~SfxStateCache()
 DBG_ASSERT( pController == nullptr && pInternalController == nullptr, 
"there are still Controllers registered" );
 if ( !IsInvalidItem(pLastItem) )
 delete pLastItem;
-if ( pDispatch )
-{
-pDispatch->Release();
-pDispatch = nullptr;
-}
 }
 
 
@@ -217,11 +208,7 @@ void SfxStateCache::Invalidate( bool bWithMsg )
 {
 bSlotDirty = true;
 aSlotServ.SetSlot( nullptr );
-if ( pDispatch )
-{
-pDispatch->Release();
-pDispatch = nullptr;
-}
+mxDispatch.clear();
 }
 }
 
@@ -236,7 +223,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( 
SfxDispatcher &rDispat , cons
 // get the SlotServer; we need it for internal controllers anyway, but 
also in most cases
 rDispat.FindServer_( nId, aSlotServ, false );
 
-DBG_ASSERT( !pDispatch, "Old Dispatch not removed!" );
+DBG_ASSERT( !mxDispatch.is(), "Old Dispatch not removed!" );
 
 // we don't need to check the dispatch provider if we only have an 
internal controller
 if ( xProv.is() )
@@ -291,13 +278,12 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( 
SfxDispatcher &rDispat , cons
 }
 
 // so the dispatch object isn't a SfxDispatcher wrapper or it 
is one, but it uses another dispatcher, but not rDispat
-pDispatch = new BindDispatch_Impl( xDisp, aURL, this, pSlot );
-pDispatch->acquire();
+mxDispatch = new BindDispatch_Impl( xDisp, aURL, this, pSlot );
 
 // flags must be set before adding StatusListener because the 
dispatch object will set the state
 bSlotDirty = false;
 bCtrlDirty = true;
-xDisp->addStatusListener( pDispatch, aURL );
+xDisp->addStatusListener( mxDispatch.get(), aURL );
  

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

2017-10-06 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par.cxx  |   25 +++--
 sw/source/filter/ww8/ww8par.hxx  |6 +++---
 sw/source/filter/ww8/ww8par3.cxx |   17 -
 sw/source/filter/ww8/ww8par6.cxx |   18 +-
 4 files changed, 35 insertions(+), 31 deletions(-)

New commits:
commit a0f5b389df14129dfe89269fbf3c6cbeefb92c2e
Author: Caolán McNamara 
Date:   Fri Oct 6 11:20:18 2017 +0100

ofz#3564 Direct-leak

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

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d84440531c43..ad8c23f0312f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3972,7 +3972,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP 
nTextLen, ManTypes nType)
 
 m_bWasParaEnd = false;
 m_nAktColl=  0;
-m_pAktItemSet =  nullptr;
+m_xAktItemSet.reset();
 m_nCharFormat= -1;
 m_bSpec = false;
 m_bPgSecBreak = false;
@@ -4093,22 +4093,21 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP 
nTextLen, ManTypes nType)
 
 const SwFormatCharFormat *pSwFormatCharFormat = nullptr;
 
-if(m_pAktItemSet)
-pSwFormatCharFormat = 
&(ItemGet(*m_pAktItemSet, RES_TXTATR_CHARFMT));
+if (m_xAktItemSet)
+pSwFormatCharFormat = 
&(ItemGet(*m_xAktItemSet, RES_TXTATR_CHARFMT));
 
-if(pSwFormatCharFormat)
+if (pSwFormatCharFormat)
 pFormat = pSwFormatCharFormat->GetCharFormat();
 
-if(m_pAktItemSet && !pFormat)
+if (m_xAktItemSet && !pFormat)
 {
 OUString sPrefix = "WW8Dropcap" + 
OUString::number(m_nDropCap++);
 pNewSwCharFormat = m_rDoc.MakeCharFormat(sPrefix, 
m_rDoc.GetDfltCharFormat());
- m_pAktItemSet->ClearItem(RES_CHRATR_ESCAPEMENT);
-pNewSwCharFormat->SetFormatAttr( *m_pAktItemSet );
+m_xAktItemSet->ClearItem(RES_CHRATR_ESCAPEMENT);
+pNewSwCharFormat->SetFormatAttr(*m_xAktItemSet);
 }
 
-delete m_pAktItemSet;
-m_pAktItemSet = nullptr;
+m_xAktItemSet.reset();
 m_bDropCap=false;
 }
 
@@ -4189,7 +4188,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SotStorage* pStorage,
 , m_aTextNodesHavingFirstLineOfstSet()
 , m_aTextNodesHavingLeftIndentSet()
 , m_pAktColl(nullptr)
-, m_pAktItemSet(nullptr)
 , m_pDfltTextFormatColl(nullptr)
 , m_pStandardFormatColl(nullptr)
 , m_pTableDesc(nullptr)
@@ -6557,4 +6555,11 @@ SdrObjUserData* SwMacroInfo::Clone( SdrObject* /*pObj*/ 
) const
return new SwMacroInfo( *this );
 }
 
+std::unique_ptr SwWW8ImplReader::SetAktItemSet(SfxItemSet* 
pItemSet)
+{
+std::unique_ptr xRet(std::move(m_xAktItemSet));
+m_xAktItemSet.reset(pItemSet);
+return xRet;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index cfb3ed81ad89..ba333b218dfe 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1221,7 +1221,7 @@ private:
 std::unique_ptr m_xStyles; // pointer to the style reading 
class
 SwFormat* m_pAktColl;// collection to be created now
 // ( always 0 outside of a Style-Def )
-SfxItemSet* m_pAktItemSet;// character attributes to be read in now
+std::unique_ptr m_xAktItemSet;// character attributes to be 
read in now
 // (always 0 outside of the WW8ListManager Ctor)
 std::vector m_vColl;
 const SwTextFormatColl* m_pDfltTextFormatColl;// Default
@@ -1481,7 +1481,7 @@ private:
 SwFrameFormat const *pFlyFormat, WW8_FSPA const *pF);
 
 bool IsDropCap();
-bool IsListOrDropcap() { return (!m_pAktItemSet  || m_bDropCap); };
+bool IsListOrDropcap() { return (!m_xAktItemSet  || m_bDropCap); };
 
 //Apo == Absolutely Positioned Object, MSWord's old-style frames
 WW8FlyPara *ConstructApo(const ApoTestResults &rApo,
@@ -1873,7 +1873,7 @@ public: // really private, but can only be done public
 SwDoc& GetDoc() const   { return m_rDoc; }
 sal_uInt16 GetNAktColl()  const { return m_nAktColl; }
 void SetNAktColl( sal_uInt16 nColl ) { m_nAktColl = nColl;}
-void SetAktItemSet( SfxItemSet* pItemSet ) { m_pAktItemSet = pItemSet; }
+std::unique_ptr SetAktItemSet(SfxItemSet* pItemSet);
 sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ;
 const SwFormat* GetStyleWithOrgWWName( OUString const & rName ) const ;
 
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 8e51cb748ae5..0cb10ddecc7a 100644
--- a/sw/source/filter/ww8/ww8par3.cx

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

2017-10-06 Thread Caolán McNamara
 sc/source/ui/view/viewdata.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 798c18881d4db1930e71c471324b9048715439b5
Author: Caolán McNamara 
Date:   Fri Oct 6 09:28:01 2017 +0100

coverity#1418967 Uninitialized scalar variable

and

coverity#1418960 Uninitialized scalar variable

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

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index bb8389d8a203..9f56c5c4a4f1 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -482,6 +482,8 @@ void ScViewDataTable::ReadUserDataSequence(const 
uno::Sequence ___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Michael Stahl
 solenv/gbuild/CompilerTest.mk  |   36 +--
 solenv/gbuild/CppunitTest.mk   |  110 -
 solenv/gbuild/Executable.mk|  116 +--
 solenv/gbuild/Library.mk   |  134 -
 solenv/gbuild/StaticLibrary.mk |  104 +++
 5 files changed, 251 insertions(+), 249 deletions(-)

New commits:
commit ee75810ecb8f656c87363b8b952033c8ddb61de7
Author: Michael Stahl 
Date:   Fri Oct 6 12:45:45 2017 +0200

gbuild: more verbose forwarding of LinkTarget functions

The forwarding of LinkTarget subclass functions to LinkTarget functions
is currently done in a very elegant way that only requires listing the
bare function names once, but the downside is that the subclass
functions aren't defined in a way that "git grep" or "ctags" can find,
so replace that with more verbose copy-paste definitions.

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

diff --git a/solenv/gbuild/CompilerTest.mk b/solenv/gbuild/CompilerTest.mk
index e7f798ba0eae..f4dae61bd2f2 100644
--- a/solenv/gbuild/CompilerTest.mk
+++ b/solenv/gbuild/CompilerTest.mk
@@ -25,27 +25,27 @@ $(call 
gb_Helper_make_userfriendly_targets,$(1),CompilerTest)
 
 endef
 
+# forward the call to the gb_LinkTarget implementation
+# (note: because the function name is in $(1), the other args are shifted by 1)
 define gb_CompilerTest__forward_to_Linktarget
-gb_CompilerTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call 
gb_CompilerTest_get_linktarget,$$(1)),$$(2),$$(3),CompilerTest_$$(1))
+$(call gb_LinkTarget_$(1),$(call 
gb_CompilerTest_get_linktarget,$(2)),$(3),$(4),CompilerTest_$(2))
 
 endef
 
-$(eval $(foreach method, \
-add_cobject \
-add_cobjects \
-add_cxxobject \
-add_cxxobjects \
-add_exception_objects \
-add_objcobject \
-add_objcobjects \
-add_objcxxobject \
-add_objcxxobjects \
-add_cxxclrobject \
-add_cxxclrobjects \
-use_externals \
-use_udk_api \
-, \
-$(call gb_CompilerTest__forward_to_Linktarget,$(method)) \
-))
+# copy pasta for forwarding: this could be (and was) done more elegantly, but
+# these here can be found by both git grep and ctags
+gb_CompilerTest_add_cobject = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cobjects = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxobject = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxobjects = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_exception_objects = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcobject = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcobjects = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcxxobject = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcxxobjects = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxclrobject = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxclrobjects = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_use_externals = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_use_udk_api = $(call 
gb_CompilerTest__forward_to_Linktarget,$(subst 
gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 0bd2e95b4efb..d0410466f846 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -412,61 +412,61 @@ $(foreach uiconfig,$(2),$(call 
gb_CppunitTest_use_uiconfig,$(1),$(uiconfig)))
 
 endef
 
+# forward the call to the gb_LinkTarget implementation
+# (note: because the function name is in $(1), the other args are shifted by 1)
 define gb_CppunitTest__forward_to_Linktarget
-gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call 
gb_CppunitTest_get_linktarget,$$(1)),$$(2),$$(3),CppunitTest_$$(1))
-
-endef
-
-$(eval $(foreach method,\
-   add_cobject \
-   add_cobjects \
-   add_cxxobject \
-   add_cxxobjects \
-   add_exception_objects \
-   use_executable_objects \
-   use_library_objects \
-   use_libraries \
-   use_static_libraries \
-   add_objcobject \
-

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

2017-10-06 Thread jan Iversen
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 02ab7371e10172bdf3474551f3912a148cdf66e2
Author: jan Iversen 
Date:   Fri Oct 6 14:50:22 2017 +0200

iOS cross-compile even for x86-64

Based on advice from IRC, cross compile is also active
for simulator.
The assumption build arch == host arch calls for not
cross compiling, did not work due to the fact that iOS
compiles without DESKTOP.

Cross compiling to the same platform gives problems with e.g. libxml2
will be solved in a later commit

Change-Id: If18ee5f9473dd983e2cb705390017229c4205a71

diff --git a/configure.ac b/configure.ac
index 396d02b88296..f02204df4b81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3075,7 +3075,7 @@ if test "$_os" = "WINNT"; then
 BITNESS_OVERRIDE=64
 fi
 fi
-if test "$_os" = "iOS" -a "$host_cpu" = "arm64"; then
+if test "$_os" = "iOS"; then
 cross_compiling="yes"
 fi
 
___
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' - writerfilter/source

2017-10-06 Thread Caolán McNamara
 writerfilter/source/dmapper/NumberingManager.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 5f597e3eea220cc9f7dd519e0767079ca9c7815d
Author: Caolán McNamara 
Date:   Thu Oct 5 15:54:42 2017 +0100

crashtesting: crash on import of abi3007-4.rtf

which started happending at...

commit 56a695fddb915bcba13b088b5b2b4e0841d4acbc
Date:   Tue Sep 26 09:13:05 2017 +0200

tdf#112211 RTF import: fix unwanted direct formatting for left indents

Change-Id: Id3e8c4452238b48495b1014eff14cdaddcb047ab
Reviewed-on: https://gerrit.libreoffice.org/43172
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit ca95e886b42157d1d6394ed0b4c910978f5c2fda)
Reviewed-on: https://gerrit.libreoffice.org/43178
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index 970992f99151..d608fac48c68 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -763,16 +763,19 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
 }
 break;
 case NS_ooxml::LN_CT_Ind_left:
-pCurrentLvl->Insert(
-PROP_INDENT_AT, uno::makeAny( 
ConversionHelper::convertTwipToMM100( nIntValue ) ));
+if ( pCurrentLvl.get( ) )
+pCurrentLvl->Insert(
+PROP_INDENT_AT, uno::makeAny( 
ConversionHelper::convertTwipToMM100( nIntValue ) ));
 break;
 case NS_ooxml::LN_CT_Ind_hanging:
-pCurrentLvl->Insert(
-PROP_FIRST_LINE_INDENT, uno::makeAny( - 
ConversionHelper::convertTwipToMM100( nIntValue ) ));
+if ( pCurrentLvl.get( ) )
+pCurrentLvl->Insert(
+PROP_FIRST_LINE_INDENT, uno::makeAny( - 
ConversionHelper::convertTwipToMM100( nIntValue ) ));
 break;
 case NS_ooxml::LN_CT_Ind_firstLine:
-pCurrentLvl->Insert(
-PROP_FIRST_LINE_INDENT, uno::makeAny( 
ConversionHelper::convertTwipToMM100( nIntValue ) ));
+if ( pCurrentLvl.get( ) )
+pCurrentLvl->Insert(
+PROP_FIRST_LINE_INDENT, uno::makeAny( 
ConversionHelper::convertTwipToMM100( nIntValue ) ));
 break;
 case NS_ooxml::LN_CT_Lvl_ilvl: //overrides previous level - unsupported
 case NS_ooxml::LN_CT_Lvl_tplc: //template code - unsupported
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Caolán McNamara
 filter/source/graphicfilter/itiff/itiff.cxx |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 411f5e9cbd14bc3ffe7024b21434231662f6246d
Author: Caolán McNamara 
Date:   Fri Oct 6 11:35:06 2017 +0100

ofz#3566: fix oom

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

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx 
b/filter/source/graphicfilter/itiff/itiff.cxx
index 0e27706c8fde..83dbc0b72424 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1374,7 +1374,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & 
rGraphic )
 nBytesPerRow = nRowSize;
 }
 
-if ( bStatus )
+if (bStatus)
 {
 //sanity check consider ReadMap condition for last row and
 //last plane
@@ -1441,7 +1441,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & 
rGraphic )
 bStatus = false;
 }
 }
-else if ( nCompression == 5 )
+else if (nCompression == 5)
 {
 sal_uInt32 np = nPlanes - 1;
 if (np >= SAL_N_ELEMENTS(aMap))
@@ -1464,6 +1464,13 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & 
rGraphic )
 bStatus = false;
 }
 }
+else if (nCompression == 32773)
+{
+}
+else
+{
+bStatus = false;
+}
 }
 
 if ( bStatus )
___
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

2017-10-06 Thread Jan-Marek Glogowski
 sw/inc/IDocumentTimerAccess.hxx |5 +
 sw/inc/doc.hxx  |9 +-
 sw/source/core/doc/DocumentTimerManager.cxx |  121 
 sw/source/core/doc/SwDocIdle.cxx|6 +
 sw/source/core/doc/docnew.cxx   |   17 ++-
 sw/source/core/inc/DocumentTimerManager.hxx |   23 -
 sw/source/uibase/uiview/view0.cxx   |2 
 7 files changed, 121 insertions(+), 62 deletions(-)

New commits:
commit 53da556c600fa82ba84bc7fdce6a594b43f2b097
Author: Jan-Marek Glogowski 
Date:   Fri Oct 6 11:00:19 2017 +0200

Don't schedule the Idle job for busy documents

This refactors DocumentTimerManager to export the busy status
independent of the Idle function. This way it can be ignored in
the Scheduler while the document is busy,

Change-Id: Icec2075d3338ad8dd4440678eb0570d7fe887778
Reviewed-on: https://gerrit.libreoffice.org/43197
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx
index 717728f83c99..6efe1a114963 100644
--- a/sw/inc/IDocumentTimerAccess.hxx
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -55,6 +55,11 @@ public:
 */
 virtual void StartBackgroundJobs() = 0;
 
+/**
+ * Is the document ready to be processed?
+ */
+virtual bool IsDocIdle() const = 0;
+
 protected:
 virtual ~IDocumentTimerAccess() {};
 };
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index b12d2f8d821b..7476a3665f20 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -223,9 +223,6 @@ namespace sfx2 {
 
 void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
 
-// global function to start grammar checking in the document
-void StartGrammarChecking( SwDoc &rDoc );
-
 using SwRubyList = std::vector>;
 
 // Represents the model of a Writer document.
@@ -1630,6 +1627,12 @@ public:
   rTable.end());
 }
 
+/**
+ * @param bSkipStart don't actually start the jobs, just check
+ * @returns true if new background checking jobs were started
+ */
+bool StartGrammarChecking( bool bSkipStart = false );
+
 private:
 // Copies master header to left / first one, if necessary - used by 
ChgPageDesc().
 void CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader 
&rHead, SwPageDesc &pDesc, bool bLeft, bool bFirst);
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx 
b/sw/source/core/doc/DocumentTimerManager.cxx
index ec4874ea9ecc..5429c6edbda6 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -80,27 +80,16 @@ void DocumentTimerManager::StartBackgroundJobs()
 maDocIdle.Start();
 }
 
-IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pIdle, void )
+DocumentTimerManager::IdleJob DocumentTimerManager::GetNextIdleJob() const
 {
-#ifdef TIMELOG
-static ::rtl::Logfile* pModLogFile = 0;
-if( !pModLogFile )
-pModLogFile = new ::rtl::Logfile( "First DoIdleJobs" );
-#endif
-
 SwRootFrame* pTmpRoot = 
m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout();
 if( pTmpRoot &&
 !SfxProgress::GetActiveProgress( m_rDoc.GetDocShell() ) )
 {
 SwViewShell* 
pShell(m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell());
 for(SwViewShell& rSh : pShell->GetRingContainer())
-{
 if( rSh.ActionPend() )
-{
-pIdle->Start();
-return;
-}
-}
+return IdleJob::Busy;
 
 if( pTmpRoot->IsNeedGrammarCheck() )
 {
@@ -109,59 +98,93 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, 
pIdle, void )
 SvtLinguConfig().GetProperty( OUString(
 UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
 
-if (bIsOnlineSpell && bIsAutoGrammar)
-StartGrammarChecking( m_rDoc );
+if( bIsOnlineSpell && bIsAutoGrammar && 
m_rDoc.StartGrammarChecking( true ) )
+return IdleJob::Grammar;
 }
-std::set aAllLayouts = m_rDoc.GetAllLayouts();
-std::set::iterator pLayIter = aAllLayouts.begin();
-for ( ;pLayIter != aAllLayouts.end();++pLayIter )
+
+for ( auto pLayout : m_rDoc.GetAllLayouts() )
 {
-if ((*pLayIter)->IsIdleFormat())
-{
-(*pLayIter)->GetCurrShell()->LayoutIdle();
-// Defer the remaining work.
-pIdle->Start();
-return;
-}
+if( pLayout->IsIdleFormat() )
+return IdleJob::Layout;
 }
 
 SwFieldUpdateFlags nFieldUpdFlag = 
m_rDoc.GetDocumentSettingManager().getFieldUpdateFlags(true);
 if( ( AUTOUPD_FIELD_ONLY == nFieldUpdFlag
-|| AUTOUPD_FIELD_AND_CHARTS == nFieldUpdFlag ) &&
-
m_rDoc.getIDocumentFieldsAccess().GetUpdateFields().IsFieldsDirty()
-// If w

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

2017-10-06 Thread Jan-Marek Glogowski
 vcl/inc/unx/gendisp.hxx |2 -
 vcl/inc/unx/saldisp.hxx |2 -
 vcl/source/app/salusereventlist.cxx |1 
 vcl/unx/generic/app/gendisp.cxx |4 +-
 vcl/unx/generic/app/salinst.cxx |3 +
 vcl/unx/kde4/KDESalDisplay.cxx  |3 -
 vcl/unx/kde4/KDEXLib.cxx|   62 ++--
 vcl/unx/kde4/KDEXLib.hxx|   19 ++-
 8 files changed, 64 insertions(+), 32 deletions(-)

New commits:
commit 0d24dd25e6f506b5f9128d70d7eb21f0bb4dde89
Author: Jan-Marek Glogowski 
Date:   Thu Oct 5 18:19:32 2017 +0200

KDE update system loop integration

This updates the system loop integration to be on par with the
other backends. This includes:

1. Process LO user events before other LO events
2. Correctly handle elapsed QTimer events
3. Don't wait-yield in the main thread from a non-main thread

Change-Id: Ia17be032ae39dc4c7bfa44cadd22d85a1b9c4fbd
Reviewed-on: https://gerrit.libreoffice.org/43198
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/inc/unx/gendisp.hxx b/vcl/inc/unx/gendisp.hxx
index 5c8f5113c300..2d5bc12fcadf 100644
--- a/vcl/inc/unx/gendisp.hxx
+++ b/vcl/inc/unx/gendisp.hxx
@@ -47,7 +47,7 @@ public:
 
 void SendInternalEvent( SalFrame* pFrame, void* pData, SalEvent nEvent = 
SalEvent::UserEvent );
 void CancelInternalEvent( SalFrame* pFrame, void* pData, SalEvent nEvent );
-bool DispatchInternalEvent();
+bool DispatchInternalEvent( bool bHandleAllCurrentEvent = false );
 
 bool MouseCaptured( const SalFrame *pFrameData ) const
 { return m_pCapture == pFrameData; }
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 8f96e03630b0..54799149e25c 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -179,7 +179,7 @@ public:
 virtual voidStartTimer( sal_uLong nMS );
 virtual voidStopTimer();
 
-boolCheckTimeout( bool bExecuteTimers = true );
+virtual boolCheckTimeout( bool bExecuteTimers = true );
 
 SalI18N_InputMethod* GetInputMethod() const { return m_pInputMethod; }
 Display* GetDisplay() const { return m_pDisplay; }
diff --git a/vcl/source/app/salusereventlist.cxx 
b/vcl/source/app/salusereventlist.cxx
index 6384d8805be4..8f9d76ed313f 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -51,6 +51,7 @@ bool SalUserEventList::DispatchUserEvents( bool 
bHandleAllCurrentEvents )
 
 {
 osl::MutexGuard aGuard( m_aUserEventsMutex );
+assert( m_aProcessingUserEvents.empty() );
 if( ! m_aUserEvents.empty() )
 {
 if( bHandleAllCurrentEvents )
diff --git a/vcl/unx/generic/app/gendisp.cxx b/vcl/unx/generic/app/gendisp.cxx
index 1be8606602e0..c83283a7b0e0 100644
--- a/vcl/unx/generic/app/gendisp.cxx
+++ b/vcl/unx/generic/app/gendisp.cxx
@@ -47,9 +47,9 @@ void SalGenericDisplay::emitDisplayChanged()
 pAnyFrame->CallCallback( SalEvent::DisplayChanged, nullptr );
 }
 
-bool SalGenericDisplay::DispatchInternalEvent()
+bool SalGenericDisplay::DispatchInternalEvent( bool bHandleAllCurrentEvent )
 {
-return DispatchUserEvents( false );
+return DispatchUserEvents( bHandleAllCurrentEvent );
 }
 
 void SalGenericDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, 
SalEvent nEvent )
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index abd29a78c077..0d30e1d17a99 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -147,7 +147,8 @@ bool X11SalInstance::AnyInput(VclInputFlags nType)
 
 if( (nType & VclInputFlags::TIMER) && (mpXLib && 
mpXLib->CheckTimeout(false)) )
 bRet = true;
-else if (XPending(pDisplay) )
+
+if( !bRet && XPending(pDisplay) )
 {
 PredicateReturn aInput;
 XEvent  aEvent;
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 8a2422a3918d..14a753e1c0a1 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -47,9 +47,6 @@ SalKDEDisplay::~SalKDEDisplay()
 
 void SalKDEDisplay::Yield()
 {
-if( DispatchInternalEvent() )
-return;
-
 // Prevent blocking from Drag'n'Drop events, which may have already have 
processed the event
 if (XEventsQueued( pDisp_, QueuedAfterReading ) == 0)
 return;
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index f047ed9fce65..43e055a2c0bb 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -53,6 +53,7 @@ KDEXLib::KDEXLib() :
 m_nFakeCmdLineArgs( 0 ),
 m_isGlibEventLoopType(false), m_allowKdeDialogs(false),
 m_timerEventId( -1 ), m_postUserEventId( -1 )
+, m_bTimedOut( false )
 {
 m_timerEventId = QEvent::registerEventType();
 m_postUserEventId = QEvent::registerEventType();
@@ -269,22 +270,24 @@ void KDEXLib::socketNotifierActivate

[Libreoffice-commits] online.git: 5 commits - common/Crypto.cpp common/Seccomp.cpp configure.ac .gitignore loleaflet/src Makefile.am tools/Config.cpp wsd/DocumentBroker.cpp wsd/LOOLWSD.cpp wsd/LOOLWSD

2017-10-06 Thread Jan Holesovsky
 .gitignore   |1 
 Makefile.am  |4 +
 common/Crypto.cpp|   17 +-
 common/Seccomp.cpp   |   13 -
 configure.ac |   20 +---
 loleaflet/src/control/Control.Menubar.js |   20 +++-
 tools/Config.cpp |   56 +++---
 wsd/DocumentBroker.cpp   |5 ++
 wsd/LOOLWSD.cpp  |   76 ++-
 wsd/LOOLWSD.hpp  |3 +
 10 files changed, 153 insertions(+), 62 deletions(-)

New commits:
commit 262916363d6e86beb4e40f0e97d19b539c8f5fb6
Author: Jan Holesovsky 
Date:   Fri Oct 6 15:42:53 2017 +0200

rlimits: The fsize and nofile need more tweaking...

Change-Id: Ifdb4d24f103f54fd286b8ffa715c0a61c2cff94f

diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index ac57d071..42922b55 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -272,6 +272,10 @@ bool handleSetrlimitCommand(const 
std::vector& tokens)
 if (lim <= 0)
 lim = RLIM_INFINITY;
 
+/* FIXME Currently the RLIMIT_FSIZE handling is non-ideal, and can
+ * lead to crashes of the kit processes due to not handling signal
+ * 25 gracefully.  Let's disable for now before there's a more
+ * concrete plan.
 rlimit rlim = { lim, lim };
 if (setrlimit(RLIMIT_FSIZE, &rlim) != 0)
 LOG_SYS("Failed to set RLIMIT_FSIZE to " << lim << " bytes.");
@@ -280,6 +284,8 @@ bool handleSetrlimitCommand(const std::vector& 
tokens)
 LOG_INF("RLIMIT_FSIZE is " << rlim.rlim_max << " bytes after 
setting it to " << lim << " bytes.");
 else
 LOG_SYS("Failed to get RLIMIT_FSIZE.");
+*/
+LOG_SYS("Ignored setting RLIMIT_FSIZE to " << lim << " bytes.");
 
 return true;
 }
@@ -289,14 +295,19 @@ bool handleSetrlimitCommand(const 
std::vector& tokens)
 if (lim <= 0)
 lim = RLIM_INFINITY;
 
+/* FIXME Currently the RLIMIT_ is non-ideal, and can lead to
+ * problems.  Let's disable for now before there's a more
+ * concrete plan.
 rlimit rlim = { lim, lim };
 if (setrlimit(RLIMIT_NOFILE, &rlim) != 0)
-LOG_SYS("Failed to set RLIMIT_NOFILE to " << lim << " bytes.");
+LOG_SYS("Failed to set RLIMIT_NOFILE to " << lim << " files.");
 
 if (getrlimit(RLIMIT_NOFILE, &rlim) == 0)
 LOG_INF("RLIMIT_NOFILE is " << rlim.rlim_max << " files after 
setting it to " << lim << " files.");
 else
 LOG_SYS("Failed to get RLIMIT_NOFILE.");
+*/
+LOG_SYS("Ignored setting RLIMIT_NOFILE to " << lim << " files.");
 
 return true;
 }
commit dec231da0fba698d089b986712410236de5cc817
Author: Jan Holesovsky 
Date:   Wed Oct 4 06:36:29 2017 +0200

Move the language menus one level up.

Change-Id: I01f5d985ac3ebd9265200ecc161b861dc582ad69
Reviewed-on: https://gerrit.libreoffice.org/43113
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 0abeea34..2132417e 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -173,15 +173,13 @@ L.Control.Menubar = L.Control.extend({
{name: _('Merge cells'), type: 
'unocommand', uno: '.uno:MergeCells'}]
},
{name: _('Tools'), id: 'tools', type: 'menu', menu: [
-   {name: _('Automatic Spell Checking'), type: 
'unocommand', uno: '.uno:SpellOnline'},
-   {name: _('Language'), type: 'menu', menu: [
-   {name: _('For Selection'), type: 
'menu', menu: [
-   {name: _('Reset to Default 
Language'), id: 'resetselection', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES'}]},
-   {name: _('For Paragraph'), type: 
'menu', menu: [
-   {name: _('Reset to Default 
Language'), id: 'resetparagraph', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES'}]},
-   {name: _('For all Text'), type: 'menu', 
menu: [
-   {name: _('Reset to Default 
Language'), id: 'resetlanguage', type: 'unocommand', 
uno:'.uno:LanguageStatus?Language:string=Default_RESET_LANGUAGES'}]}
-   ]}
+   {name: _('Automatic spell checking'), type: 
'unocommand', uno: '.

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - common/Seccomp.cpp

2017-10-06 Thread Jan Holesovsky
 common/Seccomp.cpp |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit b4b777d9d68caf75bf834f7ee5316757faf4a56c
Author: Jan Holesovsky 
Date:   Fri Oct 6 15:42:53 2017 +0200

rlimits: The fsize and nofile need more tweaking...

Change-Id: Ifdb4d24f103f54fd286b8ffa715c0a61c2cff94f
Reviewed-on: https://gerrit.libreoffice.org/43201
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index e46d2eb8..9dbb5f9f 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -268,6 +268,10 @@ bool handleSetrlimitCommand(const 
std::vector& tokens)
 if (lim <= 0)
 lim = RLIM_INFINITY;
 
+/* FIXME Currently the RLIMIT_FSIZE handling is non-ideal, and can
+ * lead to crashes of the kit processes due to not handling signal
+ * 25 gracefully.  Let's disable for now before there's a more
+ * concrete plan.
 rlimit rlim = { lim, lim };
 if (setrlimit(RLIMIT_FSIZE, &rlim) != 0)
 LOG_SYS("Failed to set RLIMIT_FSIZE to " << lim << " bytes.");
@@ -276,6 +280,8 @@ bool handleSetrlimitCommand(const std::vector& 
tokens)
 LOG_INF("RLIMIT_FSIZE is " << rlim.rlim_max << " bytes after 
setting it to " << lim << " bytes.");
 else
 LOG_SYS("Failed to get RLIMIT_FSIZE.");
+*/
+LOG_SYS("Ignored setting RLIMIT_FSIZE to " << lim << " bytes.");
 
 return true;
 }
@@ -285,14 +291,19 @@ bool handleSetrlimitCommand(const 
std::vector& tokens)
 if (lim <= 0)
 lim = RLIM_INFINITY;
 
+/* FIXME Currently the RLIMIT_ is non-ideal, and can lead to
+ * problems.  Let's disable for now before there's a more
+ * concrete plan.
 rlimit rlim = { lim, lim };
 if (setrlimit(RLIMIT_NOFILE, &rlim) != 0)
-LOG_SYS("Failed to set RLIMIT_NOFILE to " << lim << " bytes.");
+LOG_SYS("Failed to set RLIMIT_NOFILE to " << lim << " files.");
 
 if (getrlimit(RLIMIT_NOFILE, &rlim) == 0)
 LOG_INF("RLIMIT_NOFILE is " << rlim.rlim_max << " files after 
setting it to " << lim << " files.");
 else
 LOG_SYS("Failed to get RLIMIT_NOFILE.");
+*/
+LOG_SYS("Ignored setting RLIMIT_NOFILE to " << lim << " files.");
 
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'refs/tags/2.1.4-3' - 0 commits -

2017-10-06 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/2.1.4-3'

2017-10-06 Thread Jan Holesovsky
Tag '2.1.4-3' created by Andras Timar  at 
2017-10-06 13:50 +

2.1.4-3

Changes since 2.1.4-rc2-10:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx reportdesign/source sc/source sd/source svtools/source svx/source sw/source

2017-10-06 Thread Noel Grandin
 include/svx/xmleohlp.hxx  |4 +-
 reportdesign/source/core/api/ReportDefinition.cxx |   10 ++---
 sc/source/filter/xml/xmlwrap.cxx  |   33 +-
 sd/source/filter/xml/sdxmlwrp.cxx |   22 ++--
 svtools/source/misc/embedhlp.cxx  |   40 +-
 svx/source/xml/xmleohlp.cxx   |   20 ++-
 svx/source/xml/xmlexport.cxx  |   22 ++--
 sw/source/filter/xml/swxml.cxx|   11 +++---
 sw/source/filter/xml/wrtxml.cxx   |   11 +++---
 sw/source/filter/xml/xmlexp.cxx   |   12 +++---
 sw/source/filter/xml/xmlimp.cxx   |   10 ++---
 sw/source/filter/xml/xmlimp.hxx   |3 +
 12 files changed, 94 insertions(+), 104 deletions(-)

New commits:
commit 3035a8066ffc7120bb6a6da2c50d5b032611bb90
Author: Noel Grandin 
Date:   Fri Oct 6 14:10:00 2017 +0200

use rtl::Reference in SvXMLEmbeddedObjectHelper

instead of manual ref-counting

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

diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx
index 51227dbb8b0d..8d93889e3723 100644
--- a/include/svx/xmleohlp.hxx
+++ b/include/svx/xmleohlp.hxx
@@ -99,11 +99,11 @@ public:
 ::comphelper::IEmbeddedHelper& rDocPersist,
 SvXMLEmbeddedObjectHelperMode eCreateMode 
);
 
-static SvXMLEmbeddedObjectHelper*   Create(
+static rtl::Reference Create(
 const css::uno::Reference < 
css::embed::XStorage >&,
 ::comphelper::IEmbeddedHelper& rDocPersist,
 SvXMLEmbeddedObjectHelperMode eCreateMode 
);
-static SvXMLEmbeddedObjectHelper*   Create(
+static rtl::Reference   Create(
 ::comphelper::IEmbeddedHelper& rDocPersist,
 SvXMLEmbeddedObjectHelperMode eCreateMode 
);
 static void Destroy( SvXMLEmbeddedObjectHelper* 
pSvXMLEmbeddedObjectHelper );
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index a2a746474283..d26f42962e44 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1340,9 +1340,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const 
uno::Reference< embed::XS
 SvXMLGraphicHelper* pGraphicHelper = 
SvXMLGraphicHelper::Create(_xStorageToSaveTo,SvXMLGraphicHelperMode::Write);
 xGrfResolver = pGraphicHelper;
 pGraphicHelper->release();
-SvXMLEmbeddedObjectHelper* pEmbeddedObjectHelper = 
SvXMLEmbeddedObjectHelper::Create( _xStorageToSaveTo,*this, 
SvXMLEmbeddedObjectHelperMode::Write );
-xObjectResolver = pEmbeddedObjectHelper;
-pEmbeddedObjectHelper->release();
+xObjectResolver = SvXMLEmbeddedObjectHelper::Create( 
_xStorageToSaveTo,*this, SvXMLEmbeddedObjectHelperMode::Write ).get();
 
 aDelegatorArguments.realloc(nArgsLen+2);
 aDelegatorArguments[nArgsLen++] <<= xGrfResolver;
@@ -2036,7 +2034,7 @@ uno::Reference< uno::XInterface > SAL_CALL 
OReportDefinition::createInstanceWith
 aValue.Value >>= xStorage;
 }
 m_pImpl->m_pObjectContainer->SwitchPersistence(xStorage);
-xRet = static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( xStorage,*this, 
SvXMLEmbeddedObjectHelperMode::Read ));
+xRet = static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( xStorage,*this, 
SvXMLEmbeddedObjectHelperMode::Read ).get());
 }
 return xRet;
 }
@@ -2123,9 +2121,9 @@ uno::Reference< uno::XInterface > SAL_CALL 
OReportDefinition::createInstance( co
 return m_pImpl->m_xMarkerTable;
 }
 else if ( aServiceSpecifier == 
"com.sun.star.document.ImportEmbeddedObjectResolver" )
-return static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, 
SvXMLEmbeddedObjectHelperMode::Read ));
+return static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, 
SvXMLEmbeddedObjectHelperMode::Read ).get());
 else if ( aServiceSpecifier == 
"com.sun.star.document.ExportEmbeddedObjectResolver" )
-return static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, 
SvXMLEmbeddedObjectHelperMode::Write ));
+return static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, 
SvXMLEmbeddedObjectHelperMode::Write ).get());
 else if ( aServiceSpecifier == 
"com.sun.star.document.ImportGraphicObjectResolver" )
 {
 SvXMLGraphicHelper* pGraphi

[Libreoffice-commits] core.git: Branch 'feature/RotGrfFlyFrame' - 3 commits - basegfx/source include/svx svx/source sw/inc sw/sdi sw/source sw/uiconfig

2017-10-06 Thread Armin Le Grand
Rebased ref, commits from common ancestor:
commit 95196bd1977364224103b6ff37383f9f27180993
Author: Armin Le Grand 
Date:   Thu Oct 5 22:00:35 2017 +0200

RotGrfFlyFrame: Clang error fix

Change-Id: Ifae68d4d5a17446f01c97ce2e94cd0419217259e

diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index f437c4274f06..55e05d73e57f 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -829,11 +829,7 @@ void SwDrawView::CheckPossibilities()
 pFrame = pFly->GetAnchorFrame();
 if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() )
 {
-// SwNoTextNode& rNoTNd = 
const_cast(*static_cast((static_cast(pFly->Lower()))->GetNode()));
-// SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
-// SwOLENode* pOLENd = rNoTNd.GetOLENode();
-
-const SwContentFrame* pCntFr = 
const_cast(static_cast(pFly->Lower()));
+const SwContentFrame* pCntFr(static_cast(pFly->Lower()));
 const SwOLENode* pOLENd = pCntFr->GetNode()->GetOLENode();
 const SwGrfNode* pGrfNd = pCntFr->GetNode()->GetGrfNode();
 
commit d288152b288e5bcd843053c32104509c3cb69235
Author: Armin Le Grand 
Date:   Wed Oct 4 17:44:24 2017 +0200

RotGrfFlyFrame: Added interactive rotation mode

The FlyFrames containing a graphic now support an
interactive rotation mode. Added a rotation icon to the
Toolbar close to right/left 90degree rotation. When
activated, works as similar to draw object mode as
possible. Shear and move of the rotation center is
deactivated since not supported. It uses as much of the
existing interaction stuff as possible.

Change-Id: Ia1a4e5c064d8576b114c3fcf3a96ccb42c9372bb

diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx 
b/basegfx/source/matrix/b2dhommatrixtools.cxx
index 26936aff2e5c..e26fb922f5b6 100644
--- a/basegfx/source/matrix/b2dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b2dhommatrixtools.cxx
@@ -364,7 +364,8 @@ namespace basegfx
 {
 basegfx::B2DHomMatrix aRetval;
 
-// RotGrfFlyFrame: Take rotation into account. Rotation is in 10th 
degrees
+// RotGrfFlyFrame: Create a transformation that maps the range 
inside of itself
+// so that it fits, takes as much space as possible and keeps the 
aspect ratio
 if(0.0 != fRotate)
 {
 // Fit rotated graphic to center of available space, keeping 
page ratio:
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 3d7ded0a7fe9..cd6953312565 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -410,6 +410,10 @@ public:
 void SingleObjectPainter(OutputDevice& rOut) const;
 bool LineGeometryUsageIsNecessary() const;
 
+// RotGrfFlyFrame: If true, this SdrObject supports only limited rotation, 
that
+// means no change of the rotation point (only centered) and no shear 
allowed
+virtual bool HasLimitedRotation() const;
+
 // Returns a copy of the object. Every inherited class must reimplement 
this (in class Foo
 // it should be sufficient to do "virtual Foo* Clone() const { return 
CloneHelper< Foo >(); }".
 // Note that this function uses operator= internally.
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index a6223975572d..c6d626e1305f 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -68,6 +68,9 @@ public:
 virtual OUString TakeObjNameSingul() const override;
 virtual OUString TakeObjNamePlural() const override;
 
+// RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
+virtual bool HasLimitedRotation() const override;
+
 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
 virtual sal_uInt32 GetHdlCount() const override;
 virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const override;
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 79ebc50726c1..8d0e22a22179 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -919,7 +919,7 @@
 #define SID_ROTATE_GRAPHIC_LEFT ( SID_SVX_START + 1121 
)
 #define SID_ROTATE_GRAPHIC_RIGHT( SID_SVX_START + 1122 
)
 #define SID_ROTATE_GRAPHIC_180  ( SID_SVX_START + 1123 
)
-#define SID_ROTATE_GRAPHIC_RESET( SID_SVX_START + 1092 
) /* RotGrfFlyFrame: new slot */
+#define SID_ROTATE_GRAPHIC_RESET( SID_SVX_START + 1092 
) /* RotGrfFlyFrame: */
 
 // new slots for panels
 #define SID_ATTR_FILL_TRANSPARENCE  ( SID_SVX_START + 1124 
)
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 3348579bd508..a00528f61af8 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -2097,18 +2097,28 @@ bool SdrDragRotate::BeginSdrDrag()

C[++]: Normalizing include syntax ("" vs <>)

2017-10-06 Thread Kaganski Mike
Hi!

Lately, I've pushed some commits ([1], [2], [3]) that change syntax used 
for some includes. I wanted to share my rationale behind that, along 
with some notes about past discussion on this topic.

The topic is using one of two syntaxes described for #include directive 
in standard (section [cpp.include]): in angular brackets <> vs in quotes 
"". The standard reads:

 > 2 A preprocessing directive of the form
 > # include < h-char-sequence > new-line
 > searches a sequence of implementation-defined places for a header 
identified uniquely by the specified sequence
 > between the < and > delimiters, and causes the replacement of that 
directive by the entire contents of the
 > header. How the places are specified or the header identified is 
implementation-defined.
 > 3 A preprocessing directive of the form
 > # include " q-char-sequence " new-line
 > causes the replacement of that directive by the entire contents of 
the source file identified by the specified
 > sequence between the " delimiters. The named source file is searched 
for in an implementation-defined
 > manner. If this search is not supported, or if the search fails, the 
directive is reprocessed as if it read
 > # include < h-char-sequence > new-line
 > with the identical contained sequence (including > characters, if 
any) from the original directive.
 > ...
 > [ Note: Although an implementation may provide a mechanism for making 
arbitrary source files available to
 > the < > search, in general programmers should use the < > form for 
headers provided with the implementation,
 > and the " " form for sources outside the control of the implementation.

The discussion that took place at [4] raised some concerns on possible 
problems due to inconsistent treatment of the quoted syntax in MS 
compiler vs gcc. Namely, [5] states, that
 > The preprocessor searches for include files in this order:
 > 1) In the same directory as the file that contains the #include 
statement.
 > 2) In the directories of the currently opened include files, in the 
reverse order in which they were opened. The search begins in the 
directory of the parent include file and continues upward through the 
directories of any grandparent include files.
 > 3) Along the path that's specified by each /I compiler option.
 > 4) Along the paths that are specified by the INCLUDE environment 
variable.

while [6] reads about quoted syntax:
 > This variant is used for header files of your own program. It 
searches for a file named file first in the directory containing the 
current file, then in the quote directories and then the same 
directories used for . You can prepend directories to the list of 
quote directories with the -iquote option.

So, it is speculated that these differences might result in very hard to 
trace bugs. Thus, it was suggested to use <> syntax uniformly, to avoid 
that possibility.

However, doing so creates some problems, at least with IDE integration 
with VisualStudio. The generated project, naturally, doesn't add 
file-specific include paths to each file, to include the files' 
directories. This makes the includes of headers sitting in the same 
directory as the source file, referenced using <> syntax, to fail in the 
editor's parser, and errors (failed includes + unknown identifiers) 
being highlighted (underlined with red) in editor window. This impairs 
the ease of use of the IDE aids (e.g., Intellisense, and error 
highlighting that gets masked by false errors throughout the code).

Here I propose an updated rule to follow in the use of includes in the 
project's code:

1. Use *only* <> syntax for any include that resides in include paths 
explicitly defined in the module's mk file (gb_Library_set_include), 
global includes ($INCLUDE), e.g., /include, and system headers ( 
or ) - these are interface headers.
As all implementations agree to use both implementation include places 
and -I-defined places as search paths for <> syntax, this will likely 
not allow inconsistency problems (and is actually what is used now in 
most of the code).

2. Use *only* <> syntax for includes inside headers that reside in such 
places (e.g., no header in /include should include other headers using 
"" itself). This is aimed to prevent cases where some header placed in 
the current source's directory would conflict with an include referred 
from a global interface header.

3. *Always* use "" syntax *only* for includes that refer to headers 
placed next to the current source in the same directory (or 
subdirectories), i.e. that would be found using the "." entry of -I 
switch. These are implementation headers. This applies to both includes 
in c[xx] files as well as in h[xx] residing in directories like 
/sw/source/core/access (as opposed to those in /sw/inc).

As all implementations search current source's directory first for 
includes referred using "" syntax, as a side effect, these rules will 
(1) speed up searching for same-directory implementation headers (whic

[Libreoffice-commits] core.git: sw/CppunitTest_sw_uiwriter.mk

2017-10-06 Thread Stephan Bergmann
 sw/CppunitTest_sw_uiwriter.mk |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9dd0c0fcc141ae53cacb29cd0b144ac2b13e9f86
Author: Stephan Bergmann 
Date:   Fri Oct 6 18:09:22 2017 +0200

Missing dependency

external/more_fonts/ExternalPackage_liberation.mk not installed caused
SwUiWriterTest::testTdf112860 (sw/qa/extras/uiwriter/uiwriter.cxx) to fail, 
see
63d845dc88690b9c5c8194e1512a8e4390c7ee24 "Fix -fsanitize=signed-integer-
overflow"

Change-Id: Ied4dcf9cfe167e741c3bb0c1f4fe853cb44b0d2b

diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk
index 34eb38c0087d..b657e1999e6c 100644
--- a/sw/CppunitTest_sw_uiwriter.mk
+++ b/sw/CppunitTest_sw_uiwriter.mk
@@ -65,4 +65,9 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,sw_uiwriter, \
 $(call gb_CppunitTest_get_target,sw_uiwriter): \
 $(call gb_Library_get_target,textconv_dict)
 
+ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),)
+$(call gb_CppunitTest_get_target,sw_uiwriter): \
+$(call gb_ExternalPackage_get_target,fonts_liberation)
+endif
+
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Stephan Bergmann
 sw/source/core/layout/newfrm.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ce057e662b2e10e111353e9461c3c01434ddbb0f
Author: Stephan Bergmann 
Date:   Fri Oct 6 18:26:15 2017 +0200

Revert "Fix -fsanitize=signed-integer-overflow"

This reverts commit 63d845dc88690b9c5c8194e1512a8e4390c7ee24.  The immediate
problem is fixed with 9dd0c0fcc141ae53cacb29cd0b144ac2b13e9f86 "Missing
dependency" now.  For the general issue that loading
sw/qa/extras/uiwriter/data/tdf112860.fodt fails with a UBSan error or a null
deref SIGSEGV when fonts are missing see

"SwUiWriterTest::testTdf112860 crashes when Liberation fonts are missing".

diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index c51c379b89cf..6673ed22b909 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -17,9 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-
-#include 
 #include 
 #include 
 #include 
@@ -107,7 +104,7 @@ static SwRectFnCollection aHorizontal = {
 &FirstMinusSecond,
 &FirstMinusSecond,
 &SwIncrement,
-&o3tl::saturating_add,
+&SwIncrement,
 &SwRect::SetLeftAndWidth,
 &SwRect::SetTopAndHeight
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Serge Krot
 sw/source/filter/ww8/docxexport.cxx |   20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 40f627c28deb9c7eacd77c4a2c4e2eb919d5cf88
Author: Serge Krot 
Date:   Mon Oct 2 17:40:59 2017 +0200

tdf#66398 Remove double initialization of the form protection

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

diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index b76c121bb0d2..8e6b8d5cce21 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -931,12 +931,6 @@ void DocxExport::WriteSettings()
 pFS->singleElementNS( XML_w, XML_defaultTabStop, FSNS( XML_w, XML_val 
),
 OString::number( m_aSettings.defaultTabStop).getStr(), FSEND );
 
-// Protect form
-if( m_pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::PROTECT_FORM ))
-{
-pFS->singleElementNS( XML_w, XML_documentProtection, FSNS(XML_w, 
XML_edit), "forms", FSNS(XML_w, XML_enforcement), "1",  FSEND );
-}
-
 // Do not justify lines with manual break
 if( m_pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK ))
 {
@@ -1070,14 +1064,18 @@ void DocxExport::WriteSettings()
 }
 }
 
+// Protect form
 // Section-specific write protection
-if ( m_pSections->DocumentIsProtected() )
+if 
(m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM) ||
+m_pSections->DocumentIsProtected())
 {
-pFS->singleElementNS( XML_w, XML_documentProtection,
-  FSNS( XML_w, XML_enforcement ), "true",
-  FSNS( XML_w, XML_edit ), "forms",
-  FSEND );
+pFS->singleElementNS(XML_w, XML_documentProtection,
+FSNS(XML_w, XML_edit), "forms",
+FSNS(XML_w, XML_enforcement), "true",
+FSEND);
 }
+
+// finish settings.xml
 pFS->endElementNS( XML_w, XML_settings );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Serge Krot
 sw/source/filter/ww8/docxexport.cxx |   22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 4054051cd5aee8cbc6cd2b3384b4ab3d6b6a6ace
Author: Serge Krot 
Date:   Mon Oct 2 17:51:24 2017 +0200

tdf#66398 Do not output document protection in docx twice

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

diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index 8e6b8d5cce21..4ecd04f7d425 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -965,6 +965,7 @@ void DocxExport::WriteSettings()
 // Has themeFontLang information
 uno::Reference< beans::XPropertySet > xPropSet( 
m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
 
+bool hasProtectionProperties = false;
 uno::Reference< beans::XPropertySetInfo > xPropSetInfo = 
xPropSet->getPropertySetInfo();
 const OUString aGrabBagName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
 if ( xPropSetInfo->hasPropertyByName( aGrabBagName ) )
@@ -1057,8 +1058,12 @@ void DocxExport::WriteSettings()
 
 if (rAttributeList.getLength())
 {
+// we have document protection from from input DOCX file
+
 sax_fastparser::XFastAttributeListRef 
xAttributeList(pAttributeList);
 pFS->singleElementNS(XML_w, XML_documentProtection, 
xAttributeList);
+
+hasProtectionProperties = true;
 }
 }
 }
@@ -1066,13 +1071,18 @@ void DocxExport::WriteSettings()
 
 // Protect form
 // Section-specific write protection
-if 
(m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM) ||
-m_pSections->DocumentIsProtected())
+if (! hasProtectionProperties)
 {
-pFS->singleElementNS(XML_w, XML_documentProtection,
-FSNS(XML_w, XML_edit), "forms",
-FSNS(XML_w, XML_enforcement), "true",
-FSEND);
+if 
(m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM) ||
+m_pSections->DocumentIsProtected())
+{
+// we have form protection from Writer or from input ODT file
+
+pFS->singleElementNS(XML_w, XML_documentProtection,
+FSNS(XML_w, XML_edit), "forms",
+FSNS(XML_w, XML_enforcement), "true",
+FSEND);
+}
 }
 
 // finish settings.xml
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Serge Krot
 writerfilter/source/ooxml/factoryimpl.py|5 ++---
 writerfilter/source/ooxml/factoryimpl_ns.py |6 --
 2 files changed, 2 insertions(+), 9 deletions(-)

New commits:
commit f4cbd31465d3737855e694b7341fb3bc063d63c4
Author: Serge Krot 
Date:   Wed Oct 4 09:45:53 2017 +0200

related tdf#66398 remove useless breaks

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

diff --git a/writerfilter/source/ooxml/factoryimpl.py 
b/writerfilter/source/ooxml/factoryimpl.py
index 2168fff556d7..3605892fe71f 100644
--- a/writerfilter/source/ooxml/factoryimpl.py
+++ b/writerfilter/source/ooxml/factoryimpl.py
@@ -25,7 +25,7 @@ def createFastChildContextFromFactory(model):
 (OOXMLFastContextHandler* pHandler, OOXMLFactory_ns::Pointer_t pFactory, 
Token_t Element)
 {
 uno::Reference  aResult;
-Id nDefine = pHandler->getDefine();
+const Id nDefine = pHandler->getDefine();
 
 if (pFactory.get() != NULL)
 {
@@ -33,7 +33,7 @@ def createFastChildContextFromFactory(model):
 Id nElementId;
 if (pFactory->getElementId(nDefine, Element, nResource, nElementId))
 {
-Id nId = pFactory->getResourceId(nDefine, Element);
+const Id nId = pFactory->getResourceId(nDefine, Element);
 
 switch (nResource)
 {""")
@@ -108,7 +108,6 @@ def fastTokenToId(model):
 print("""
 std::string fastTokenToId(sal_uInt32 nToken)
 {
-
 std::string sResult;
 #ifdef DEBUG_WRITERFILTER
 
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py 
b/writerfilter/source/ooxml/factoryimpl_ns.py
index 1134a14cb331..54e3b8c9060a 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.py
+++ b/writerfilter/source/ooxml/factoryimpl_ns.py
@@ -235,7 +235,6 @@ def printValueData(values):
 output_else = "else "
 print("else { return false; }")
 print("return true;")
-print("break;")
 print("}")
 
 
@@ -258,7 +257,6 @@ def factoryGetListValue(nsNode):
 appendValueData(values, valueData, 
idToLabel(valueNode.getAttribute("tokenid")))
 printValueData(values)
 print("return false;")
-print("break;")
 
 print("""default:
 break;
@@ -376,7 +374,6 @@ def factoryCreateElementMap(files, nsNode):
 print("default: return false;")
 print("}")
 print("return true;")
-print("break;")
 print("default:")
 print("switch (nId)")
 print("{")
@@ -384,10 +381,7 @@ def factoryCreateElementMap(files, nsNode):
 print("""default: return false;
 }
 return true;
-break;
 }
-
-return false;
 }
 """)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/CppunitTest_sc_databaserangeobj.mk sc/CppunitTest_sc_datapilottableobj.mk sc/CppunitTest_sc_namedrangeobj.mk sc/CppunitTest_sc_namedrangesobj.mk sc/CppunitTest_sc_ta

2017-10-06 Thread Jan-Marek Glogowski
 sc/CppunitTest_sc_databaserangeobj.mk  |1 +
 sc/CppunitTest_sc_datapilottableobj.mk |1 +
 sc/CppunitTest_sc_namedrangeobj.mk |1 +
 sc/CppunitTest_sc_namedrangesobj.mk|1 +
 sc/CppunitTest_sc_tablesheetobj.mk |1 +
 test/source/bootstrapfixture.cxx   |5 +
 vcl/source/app/scheduler.cxx   |3 ++-
 7 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 141fe1c5e7fbf67a083b34e49e19b6ea78a0eb2b
Author: Jan-Marek Glogowski 
Date:   Fri Oct 6 12:53:05 2017 +0200

Process all pending events during Cppunit setUp

Larger unit tests collect a lot of events, which are just processed
on shutdown. But since the Scheduler is just an unsorted linked
list, processing these in order is O(n^2) for lookup, which really
adds up, e.g. sw_ooxmlexport8 has 35047 tasks on shutdown.

So this just processes all pending events before running each unit
test.

Also adds missing spellchecking components to some calc tests.

Change-Id: Icf12146015afc17a1f52f79c18f248b72650ad46
Reviewed-on: https://gerrit.libreoffice.org/43199
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/sc/CppunitTest_sc_databaserangeobj.mk 
b/sc/CppunitTest_sc_databaserangeobj.mk
index 528829687311..ff48e3c0a1f6 100644
--- a/sc/CppunitTest_sc_databaserangeobj.mk
+++ b/sc/CppunitTest_sc_databaserangeobj.mk
@@ -73,6 +73,7 @@ $(eval $(call 
gb_CppunitTest_use_components,sc_databaserangeobj,\
 forms/util/frm \
 framework/util/fwk \
 i18npool/util/i18npool \
+linguistic/source/lng \
 oox/util/oox \
 package/source/xstor/xstor \
 package/util/package2 \
diff --git a/sc/CppunitTest_sc_datapilottableobj.mk 
b/sc/CppunitTest_sc_datapilottableobj.mk
index ea953602add4..3ba76c2c288e 100644
--- a/sc/CppunitTest_sc_datapilottableobj.mk
+++ b/sc/CppunitTest_sc_datapilottableobj.mk
@@ -73,6 +73,7 @@ $(eval $(call 
gb_CppunitTest_use_components,sc_datapilottableobj,\
 forms/util/frm \
 framework/util/fwk \
 i18npool/util/i18npool \
+linguistic/source/lng \
 oox/util/oox \
 package/source/xstor/xstor \
 package/util/package2 \
diff --git a/sc/CppunitTest_sc_namedrangeobj.mk 
b/sc/CppunitTest_sc_namedrangeobj.mk
index 3b68504ac429..b18ba6c64569 100644
--- a/sc/CppunitTest_sc_namedrangeobj.mk
+++ b/sc/CppunitTest_sc_namedrangeobj.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangeobj,\
 forms/util/frm \
 framework/util/fwk \
 i18npool/util/i18npool \
+linguistic/source/lng \
 oox/util/oox \
 package/source/xstor/xstor \
 package/util/package2 \
diff --git a/sc/CppunitTest_sc_namedrangesobj.mk 
b/sc/CppunitTest_sc_namedrangesobj.mk
index 49d5f43f9f54..0b7c012c27ce 100644
--- a/sc/CppunitTest_sc_namedrangesobj.mk
+++ b/sc/CppunitTest_sc_namedrangesobj.mk
@@ -73,6 +73,7 @@ $(eval $(call 
gb_CppunitTest_use_components,sc_namedrangesobj,\
 forms/util/frm \
 framework/util/fwk \
 i18npool/util/i18npool \
+linguistic/source/lng \
 oox/util/oox \
 package/source/xstor/xstor \
 package/util/package2 \
diff --git a/sc/CppunitTest_sc_tablesheetobj.mk 
b/sc/CppunitTest_sc_tablesheetobj.mk
index ef212c33574f..c4347c083a9d 100644
--- a/sc/CppunitTest_sc_tablesheetobj.mk
+++ b/sc/CppunitTest_sc_tablesheetobj.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_tablesheetobj,\
 framework/util/fwk \
 i18npool/source/search/i18nsearch \
 i18npool/util/i18npool \
+linguistic/source/lng \
 oox/util/oox \
 package/source/xstor/xstor \
 package/util/package2 \
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 415292bd2a26..a195db529d71 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -104,6 +105,10 @@ void test::BootstrapFixture::setUp()
 test::BootstrapFixtureBase::setUp();
 
 test_init_impl(m_bAssertOnDialog, m_bNeedUCB, m_xSFactory.get());
+
+#if OSL_DEBUG_LEVEL > 0
+Scheduler::ProcessEventsToIdle();
+#endif
 }
 
 test::BootstrapFixture::~BootstrapFixture()
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 5c1b1bc8f5f4..8fd26ec79a55 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -105,7 +105,8 @@ void Scheduler::ImplDeInitScheduler()
 ++nTasks;
 pSchedulerData = pSchedulerData->mpNext;
 }
-SAL_INFO( "vcl.schedule.deinit", "DeInit the scheduler - tasks: " << 
nTasks );
+SAL_INFO( "vcl.schedule.deinit",
+  "DeInit the scheduler - pending tasks: " << nTasks );
 }
 
 // clean up all the sfx::SfxItemDisruptor_Impl Idles
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/li

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

2017-10-06 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit c8377d3cada65d20786f52db0a14b7e7de6d8324
Author: Jan-Marek Glogowski 
Date:   Fri Oct 6 11:00:19 2017 +0200

Don't schedule the Idle job for busy documents

This refactors DocumentTimerManager to export the busy status
independent of the Idle function. This way it can be ignored in
the Scheduler while the document is busy,

Reviewed-on: https://gerrit.libreoffice.org/43197
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 53da556c600fa82ba84bc7fdce6a594b43f2b097)

Conflicts:
sw/inc/doc.hxx
sw/source/core/doc/DocumentTimerManager.cxx
sw/source/core/inc/DocumentTimerManager.hxx

Change-Id: Icec2075d3338ad8dd4440678eb0570d7fe887778

diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx
index 2cdb33e5ab7d..94947b35ac30 100644
--- a/sw/inc/IDocumentTimerAccess.hxx
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -55,6 +55,11 @@ public:
 */
 virtual void StartBackgroundJobs() = 0;
 
+/**
+ * Is the document ready to be processed?
+ */
+virtual bool IsDocIdle() const = 0;
+
 protected:
 virtual ~IDocumentTimerAccess() {};
 };
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index f154c4379021..9ce4526fcd80 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -238,9 +238,6 @@ typedef std::vector> 
SwPageDescs;
 
 void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
 
-// global function to start grammar checking in the document
-void StartGrammarChecking( SwDoc &rDoc );
-
 // Represents the model of a Writer document.
 class SW_DLLPUBLIC SwDoc :
 public IInterface
@@ -1651,6 +1648,12 @@ public:
 std::swap(mvUnoCursorTable, unoCursorTable);
 }
 
+/**
+ * @param bSkipStart don't actually start the jobs, just check
+ * @returns true if new background checking jobs were started
+ */
+bool StartGrammarChecking( bool bSkipStart = false );
+
 private:
 // Copies master header to left / first one, if necessary - used by 
ChgPageDesc().
 void CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader 
&rHead, SwPageDesc &pDesc, bool bLeft, bool bFirst);
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx 
b/sw/source/core/doc/DocumentTimerManager.cxx
index f3d71cd48a47..66018bcefca1 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -80,27 +80,16 @@ void DocumentTimerManager::StartBackgroundJobs()
 maDocIdle.Start();
 }
 
-IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Timer*, pIdle, void )
+DocumentTimerManager::IdleJob DocumentTimerManager::GetNextIdleJob() const
 {
-#ifdef TIMELOG
-static ::rtl::Logfile* pModLogFile = 0;
-if( !pModLogFile )
-pModLogFile = new ::rtl::Logfile( "First DoIdleJobs" );
-#endif
-
 SwRootFrame* pTmpRoot = 
m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout();
 if( pTmpRoot &&
 !SfxProgress::GetActiveProgress( m_rDoc.GetDocShell() ) )
 {
 SwViewShell* 
pShell(m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell());
 for(SwViewShell& rSh : pShell->GetRingContainer())
-{
 if( rSh.ActionPend() )
-{
-pIdle->Start();
-return;
-}
-}
+return IdleJob::Busy;
 
 if( pTmpRoot->IsNeedGrammarCheck() )
 {
@@ -109,59 +98,93 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Timer*, 
pIdle, void )
 SvtLinguConfig().GetProperty( OUString(
 UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
 
-if (bIsOnlineSpell && bIsAutoGrammar)
-StartGrammarChecking( m_rDoc );
+if( bIsOnlineSpell && bIsAutoGrammar && 
m_rDoc.StartGrammarChecking( true ) )
+return IdleJob::Grammar;
 }
-std::set aAllLayouts = m_rDoc.GetAllLayouts();
-std::set::iterator pLayIter = aAllLayouts.begin();
-for ( ;pLayIter != aAllLayouts.end();++pLayIter )
+
+for ( auto pLayout : m_rDoc.GetAllLayouts() )
 {
-if ((*pLayIter)->IsIdleFormat())
-{
-(*pLayIter)->GetCurrShell()->LayoutIdle();
-// Defer the remaining work.
-pIdle->Start();
-return;
-}
+if( pLayout->IsIdleFormat() )
+return IdleJob::Layout;
 }
 
 SwFieldUpdateFlags nFieldUpdFlag = 
m_rDoc.GetDocumentSettingManager().getFieldUpdateFlags(true);
 if( ( AUTOUPD_FIELD_ONLY == nFieldUpdFlag
-|| AUTOUPD_FIELD_AND_CHARTS == nFieldUpdFlag ) &&
-
m_rDoc.getIDocumentFieldsAccess().GetUpdateFields().IsFieldsDirty()
-// If we switch the field name the Fields are not updated.
-// So the "background update" should always be carried out
-

[Libreoffice-commits] core.git: Branch 'private/jmux/libreoffice-4-1-6+all-no-merge' - 0 commits -

2017-10-06 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/libreoffice-4-1-6+backports+unit' - 0 commits -

2017-10-06 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/libreoffice-4-1-6+backports' - 0 commits -

2017-10-06 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/libreoffice-4-1+kde4+fixes' - 0 commits -

2017-10-06 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/libreoffice-4-1+kde4' - 0 commits -

2017-10-06 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 17 commits - configure.ac filter/source include/svx reportdesign/source sc/CppunitTest_sc_databaserangeobj.mk sc/CppunitTest_sc_

2017-10-06 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit eff62066d4dc945053e3c003e0aa8adf198d942c
Author: Jan-Marek Glogowski 
Date:   Fri Sep 29 22:24:15 2017 +0200

WIP Fix unprocessed shutdown events

DO NOT MERGE!

This is just a test patch, since I can't reproduce the
Jenkins failures locally. It's not "make check" tested,
just "make vcl".

This fixes multiple problems, which I missed.

We're not interested in WM_TIMER events, but in active
SAL_MSG_TIMER_CALLBACK, which is indicated by PollForMessage().

This includes a revert of "tdf#38915: don't wait on message queue
if application already has quit.", which is commited as
f054b9187155bc32b7d06808aea87127cb0a3a4f.

We can't ignore the wait flag, just because the application will
quit, as we have to deliver the expected event announced by
pTimer->PollForMessage().

And we don't try to "clean" the message queue, as invalid events
are simply identified by there version ID.

On Mac we can probably drop the workaround. We can't wait for a
timer event in a redirected dispatch_async, for whatever reason.

Change-Id: If806d41c6fcfce10b0c4c7fdcf1df5df6ac16a1d

diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 5ad6a1718f19..532765e050f0 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -34,7 +34,7 @@ class WinSalTimer final : public SalTimer, protected 
VersionedEvent
 
 void ImplStart( sal_uIntPtr nMS );
 void ImplStop();
-void ImplEmitTimerCallback();
+void ImplHandleTimerEvent( WPARAM aWPARAM );
 
 public:
 WinSalTimer();
@@ -43,16 +43,9 @@ public:
 virtual void Start(sal_uIntPtr nMS) override;
 virtual void Stop() override;
 
-inline bool IsValidWPARAM( WPARAM wParam ) const;
-
 inline bool PollForMessage() const;
 };
 
-inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const
-{
-return IsValidEventVersion( static_cast( aWPARAM ) );
-}
-
 inline bool WinSalTimer::PollForMessage() const
 {
 return m_bPollForMessage;
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d475f30275b0..0334087f57cf 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -570,10 +570,10 @@ bool AquaSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents)
 // handle available events
 NSEvent* pEvent = nil;
 NSTimeInterval now = [[NSProcessInfo processInfo] systemUptime];
+AquaSalInstance *pInst = GetSalData()->mpInstance;
 do
 {
 SolarMutexReleaser aReleaser;
-
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
 // 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
 pEvent = [NSApp nextEventMatchingMask: NSAnyEventMask
@@ -591,6 +591,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 
 [NSApp updateWindows];
 
+if ( AquaSalInstance::AnyInput( VclInputFlags::TIMER ) && 
!pInst->mbNoYieldLock && !bHadEvent )
+continue;
 if ( !bHandleAllCurrentEvents || !pEvent || now < [pEvent 
timestamp] )
 break;
 }
@@ -618,7 +620,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 }
 
 // collect update rectangles
-for( auto pSalFrame : GetSalData()->mpInstance->getFrames() )
+for( auto pSalFrame : pInst->getFrames() )
 {
 AquaSalFrame* pFrame = static_cast( pSalFrame );
 if( pFrame->mbShown && ! pFrame->maInvalidRect.IsEmpty() )
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 877fdfae85b5..e6336fbedd6e 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -44,30 +44,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
subtype: nEventId
data1: nUserData
data2: 0];
-assert( pEvent );
 if ( nil == pEvent )
-return;
-if ( NO == bAtStart )
-{
-// nextEventMatchingMask has to run in the main thread!
-assert([NSThread isMainThread]);
-
-// Posting an event to the end of an empty queue fails,
-// so we peek the queue and post to the start, if empty.
-// Some Qt bugs even indicate nextEvent without dequeue
-// sometimes blocks, so we dequeue and re-add the event.
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-// 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
-NSEvent* pPeekEvent = [NSApp nextEventMatchingMask: NSAnyEventMask
-SAL_WNODEPRECATED_DECLARATIONS_POP
-   untilDate: nil
-   inMode: NSDefaultRunLoopMode
-   dequeue: YES];
-if ( nil == pPeekEvent )
-bAtStart = YES;
-else
-[NSApp postEvent: pPeekEvent atStart: YES];
-}
+std::abort();
 [NSApp postEvent: pEvent atStart: bAtStart];
 }
 
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 8fd26ec7

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

2017-10-06 Thread Tamás Zolnai
 sc/source/filter/excel/xepivotxml.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit bab595df78bd05a45f92aa15dca058f27b86d5be
Author: Tamás Zolnai 
Date:   Fri Oct 6 18:55:27 2017 +0200

tdf#112936: Pivot table: LO created XLSX file makes Excel to crash

It's not actually clear, why Excel crashes, but setting the version
makes it working. I expect that this version number (which specifies MSO
Excel versions) makes MSO to handle the pivot table differently. As the
internal implementation of the pivot table was changed in different
versions. The name "DATA" might had a special meaning in the earlier
versions (e.g. XP, MSO 2000) which leads this crash.
So setting the version to MSO 2007 seems a good solution for this.
Older versions not seems a target of LO exported XLSX files in these days.
Also smaller values leads to the crash described in the bug report.

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

diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index 270066f76126..9bc8836a57f4 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -221,6 +221,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( 
XclExpXmlStream& rStrm, const Entr
 FSNS(XML_xmlns, XML_r), 
XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(officeRel))).getStr(),
 FSNS(XML_r, XML_id), XclXmlUtils::ToOString(aRelId).getStr(),
 XML_recordCount, 
OString::number(rEntry.mpCache->GetDataSize()).getStr(),
+XML_createdVersion, "3", // MS Excel 2007, tdf#112936: setting version 
number makes MSO to handle the pivot table differently
 FSEND);
 
 if (rEntry.meType == Worksheet)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Noel Grandin
 connectivity/source/drivers/evoab2/NStatement.cxx |   32 +-
 connectivity/source/drivers/evoab2/NStatement.hxx |6 ++--
 connectivity/source/drivers/odbc/OConnection.cxx  |   29 ---
 connectivity/source/inc/odbc/OConnection.hxx  |7 ++--
 4 files changed, 33 insertions(+), 41 deletions(-)

New commits:
commit c8cbcd77484d8172d76d0758f16f9b340277fa52
Author: Noel Grandin 
Date:   Fri Oct 6 15:57:05 2017 +0200

use more rtl::Reference in connectivity

instead of manual ref counting

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

diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx 
b/connectivity/source/drivers/evoab2/NStatement.cxx
index 58225437ace1..095d2abf7038 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -72,7 +72,7 @@ OCommonStatement::OCommonStatement(OEvoabConnection* 
_pConnection)
 , ::comphelper::OPropertyContainer(OCommonStatement_IBase::rBHelper)
 , OStatement_CBase( static_cast(_pConnection), this )
 , m_xResultSet(nullptr)
-, m_pConnection(_pConnection)
+, m_xConnection(_pConnection)
 , m_aParser(_pConnection->getDriver().getComponentContext())
 , m_aSQLIterator( _pConnection, 
_pConnection->createCatalog()->getTables(), m_aParser )
 , m_pParseTree(nullptr)
@@ -85,8 +85,6 @@ OCommonStatement::OCommonStatement(OEvoabConnection* 
_pConnection)
 , m_nResultSetConcurrency(ResultSetConcurrency::UPDATABLE)
 , m_bEscapeProcessing(true)
 {
-m_pConnection->acquire();
-
 #define REGISTER_PROP( id, member ) \
 registerProperty( \
 OMetaConnection::getPropMap().getNameByIndex( id ), \
@@ -126,9 +124,7 @@ void OCommonStatement::disposing()
 
 disposeResultSet();
 
-if (m_pConnection)
-m_pConnection->release();
-m_pConnection = nullptr;
+m_xConnection.clear();
 
 dispose_ChildImpl();
 OCommonStatement_IBase::disposing();
@@ -198,7 +194,7 @@ OUString 
OCommonStatement::impl_getColumnRefColumnName_throw( const OSQLParseNod
 }
 
 if ( !sColumnName.getLength() )
-m_pConnection->throwGenericSQLException( STR_QUERY_TOO_COMPLEX, *this 
);
+m_xConnection->throwGenericSQLException( STR_QUERY_TOO_COMPLEX, *this 
);
 
 return sColumnName;
 }
@@ -230,7 +226,7 @@ void OCommonStatement::orderByAnalysis( const 
OSQLParseNode* _pOrderByClause, So
 
 // column name -> column field
 if ( !SQL_ISRULE( pColumnRef, column_ref ) )
-m_pConnection->throwGenericSQLException( STR_SORT_BY_COL_ONLY, 
*this );
+m_xConnection->throwGenericSQLException( STR_SORT_BY_COL_ONLY, 
*this );
 const OUString sColumnName( impl_getColumnRefColumnName_throw( 
*pColumnRef ) );
 guint nField = evoab::findEvoabField( sColumnName );
 // ascending/descending?
@@ -301,14 +297,14 @@ EBookQuery *OCommonStatement::whereAnalysis( const 
OSQLParseNode* parseTree )
 )
 )
 {
-m_pConnection->throwGenericSQLException( STR_QUERY_TOO_COMPLEX, 
*this );
+m_xConnection->throwGenericSQLException( STR_QUERY_TOO_COMPLEX, 
*this );
 }
 
 if  (   ( pPrec->getNodeType() != SQLNodeType::Equal )
 &&  ( pPrec->getNodeType() != SQLNodeType::NotEqual )
 )
 {
-m_pConnection->throwGenericSQLException( STR_OPERATOR_TOO_COMPLEX, 
*this );
+m_xConnection->throwGenericSQLException( STR_OPERATOR_TOO_COMPLEX, 
*this );
 }
 
 // recognize the special "0 = 1" condition
@@ -342,7 +338,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const 
OSQLParseNode* parseTree )
 const OSQLParseNode* pPart2 = parseTree->getChild(1);
 
 if( ! SQL_ISRULE( parseTree->getChild( 0 ), column_ref) )
-
m_pConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_COLUMN,*this);
+
m_xConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_COLUMN,*this);
 
 OUString aColumnName( impl_getColumnRefColumnName_throw( 
*parseTree->getChild( 0 ) ) );
 
@@ -358,7 +354,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const 
OSQLParseNode* parseTree )
 SAL_INFO(
 "connectivity.evoab2",
 "analyseSQL : pAtom->count() = " << pAtom->count());
-
m_pConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,*this);
+
m_xConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,*this);
 }
 
 const sal_Unicode WILDCARD = '%';
@@ -383,7 +379,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const 
OSQLParseNode* parseTree )
 else if( bNotLike )
 {
 // We currently can't handle a 'NOT LIKE' when there are '%'
-
m_pConnection->throwGenericSQLException(

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

2017-10-06 Thread Noel Grandin
 svx/source/svdraw/svdoole2.cxx |   62 +
 1 file changed, 21 insertions(+), 41 deletions(-)

New commits:
commit 3ee1c87e6cf3fac38e1c7666c4c7ea357f26bec8
Author: Noel Grandin 
Date:   Fri Oct 6 15:57:25 2017 +0200

use more rtl::Reference in SdrLightEmbeddedClient_Impl

instead of manual ref counting

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

diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 02a41ca31e0a..d2b0470196b7 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -120,7 +120,6 @@ class SdrLightEmbeddedClient_Impl : public 
::cppu::WeakImplHelper
 
 public:
 explicit SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj );
-void Release();
 
 void SetSizeScale( const Fraction& aScaleWidth, const Fraction& 
aScaleHeight )
 {
@@ -185,16 +184,6 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changingState( 
const css::lang::Event
 {
 }
 
-void SdrLightEmbeddedClient_Impl::Release()
-{
-{
-SolarMutexGuard aGuard;
-mpObj = nullptr;
-}
-
-release();
-}
-
 void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const 
css::lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 
nNewState )
 {
 SolarMutexGuard aGuard;
@@ -595,9 +584,9 @@ public:
 svt::EmbeddedObjectRef mxObjRef;
 
 std::unique_ptr mxGraphic;
-OUString maProgName;
+OUStringmaProgName;
 OUStringaPersistName;   // name of object in persist
-SdrLightEmbeddedClient_Impl* pLightClient; // must be registered as client 
only using AddOwnLightClient() call
+rtl::Reference mxLightClient; // must be 
registered as client only using AddOwnLightClient() call
 
 bool mbFrame:1; // Due to compatibility at SdrTextObj for now
 bool mbSuppressSetVisAreaSize:1; // #i118524#
@@ -612,7 +601,6 @@ public:
 rtl::Reference mxModifyListener;
 
 explicit SdrOle2ObjImpl( bool bFrame ) :
-pLightClient (nullptr),
 mbFrame(bFrame),
 mbSuppressSetVisAreaSize(false),
 mbTypeAsked(false),
@@ -626,7 +614,6 @@ public:
 
 SdrOle2ObjImpl( bool bFrame, const svt::EmbeddedObjectRef& rObjRef ) :
 mxObjRef(rObjRef),
-pLightClient (nullptr),
 mbFrame(bFrame),
 mbSuppressSetVisAreaSize(false),
 mbTypeAsked(false),
@@ -713,11 +700,7 @@ SdrOle2Obj::~SdrOle2Obj()
 
 DisconnectFileLink_Impl();
 
-if ( mpImpl->pLightClient )
-{
-mpImpl->pLightClient->Release();
-mpImpl->pLightClient = nullptr;
-}
+mpImpl->mxLightClient.clear();
 }
 
 void SdrOle2Obj::SetAspect( sal_Int64 nAspect )
@@ -962,14 +945,11 @@ void SdrOle2Obj::Connect_Impl()
 
 if ( mpImpl->mxObjRef.is() )
 {
-if ( !mpImpl->pLightClient )
-{
-mpImpl->pLightClient = new SdrLightEmbeddedClient_Impl( 
this );
-mpImpl->pLightClient->acquire();
-}
+if ( !mpImpl->mxLightClient.is() )
+mpImpl->mxLightClient = new SdrLightEmbeddedClient_Impl( 
this );
 
-mpImpl->mxObjRef->addStateChangeListener( mpImpl->pLightClient 
);
-mpImpl->mxObjRef->addEventListener( uno::Reference< 
document::XEventListener >( mpImpl->pLightClient ) );
+mpImpl->mxObjRef->addStateChangeListener( 
mpImpl->mxLightClient.get() );
+mpImpl->mxObjRef->addEventListener( uno::Reference< 
document::XEventListener >( mpImpl->mxLightClient.get() ) );
 
 if ( mpImpl->mxObjRef->getCurrentState() != 
embed::EmbedStates::LOADED )
 GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
@@ -1119,10 +1099,10 @@ void SdrOle2Obj::Disconnect_Impl()
 }
 }
 
-if ( mpImpl->mxObjRef.is() && mpImpl->pLightClient )
+if ( mpImpl->mxObjRef.is() && mpImpl->mxLightClient.is() )
 {
-mpImpl->mxObjRef->removeStateChangeListener ( mpImpl->pLightClient 
);
-mpImpl->mxObjRef->removeEventListener( uno::Reference< 
document::XEventListener >( mpImpl->pLightClient ) );
+mpImpl->mxObjRef->removeStateChangeListener ( 
mpImpl->mxLightClient.get() );
+mpImpl->mxObjRef->removeEventListener( uno::Reference< 
document::XEventListener >( mpImpl->mxLightClient.get() ) );
 mpImpl->mxObjRef->setClientSite( nullptr );
 
 GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
@@ -1518,8 +1498,8 @@ void SdrOle2Obj::ImpSetVisAreaSize()
 // the client is required to get access to scaling
 SfxInPlaceClient* pClient = SfxInPlaceClient::GetClient( 
dynamic_cast(pModel->GetPersist()), 
mpImpl->mxObjRef.GetObject() );
 bool bHasOwnClient =
-( mpImpl->pLightClient

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

2017-10-06 Thread Michael Stahl
 sw/source/core/doc/docnew.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 05c704d3bea7f9a7ec51ac28d4d55ba8068f2da5
Author: Michael Stahl 
Date:   Fri Oct 6 21:39:24 2017 +0200

sw: fix infinite grammar checking idle loop

The grammar checker always wants to be started in DoIdleJobs(),
even if all paragraphs are already marked as checked.

This is because there is currently no call anywhere of
SwRootFrame::SetNeedGrammarCheck(false) to reset the flag
and prevent DoIdleJobs from trying to start the grammar checker.

This call was already there before but was removed without
any justification in commit 9160fe814a46e93da6907e169ce9d58e46fa37f2.

This has become an infinite loop in several Junit tests with commit
53da556c600fa82ba84bc7fdce6a594b43f2b097.

Change-Id: Ibe7ad93442070aac0577725d044281912307d9e8

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 9e2a82d3083c..d414b920aef0 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -172,7 +172,14 @@ bool SwDoc::StartGrammarChecking( bool bSkipStart )
 {
 bStarted = true;
 if ( !bSkipStart )
+{
+for (auto pLayout : GetAllLayouts())
+{   // we're starting it now, don't start grammar checker
+// again until the user modifies the document
+pLayout->SetNeedGrammarCheck(false);
+}
 xGCIterator->startProofreading( xDoc, xFPIP );
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Tamás Zolnai
 sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx |   19 +++
 sc/source/filter/excel/xepivotxml.cxx |6 ++
 3 files changed, 25 insertions(+)

New commits:
commit ad439ded005cffd525ffe874f535fca7a4da1f49
Author: Tamás Zolnai 
Date:   Fri Oct 6 20:35:54 2017 +0200

tdf#112946: Pivot table: Missing selector for a row field after RT in Calc

We need to explicitly set compact flags to false, since true is
the default. It seems MSO prefers compact mode, when the file
contains colliding mode flags.

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

diff --git a/sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx 
b/sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx
new file mode 100755
index ..6b575c0af7b3
Binary files /dev/null and b/sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index d0596bdf06ef..21837ff11152 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -226,6 +226,7 @@ public:
 void testPivotTableBoolFieldFilterXLSX();
 void testPivotTableRowColPageFieldFilterXLSX();
 void testPivotTableErrorItemFilterXLSX();
+void testPivotTableOutlineModeXLSX();
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
@@ -346,6 +347,7 @@ public:
 CPPUNIT_TEST(testPivotTableBoolFieldFilterXLSX);
 CPPUNIT_TEST(testPivotTableRowColPageFieldFilterXLSX);
 CPPUNIT_TEST(testPivotTableErrorItemFilterXLSX);
+CPPUNIT_TEST(testPivotTableOutlineModeXLSX);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -5251,6 +5253,23 @@ void ScExportTest::testPivotTableErrorItemFilterXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testPivotTableOutlineModeXLSX()
+{
+ScDocShellRef xShell = loadDoc("pivottable_outline_mode.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xShell.is());
+
+std::shared_ptr pXPathFile = 
ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
+xmlDocPtr pTable = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/pivotTables/pivotTable1.xml");
+CPPUNIT_ASSERT(pTable);
+
+// Next to the outline flags, compact flags also should be set (true is 
the default)
+assertXPath(pTable, "/x:pivotTableDefinition", "outline", "1");
+assertXPath(pTable, "/x:pivotTableDefinition", "outlineData", "1");
+assertXPath(pTable, "/x:pivotTableDefinition", "compact", "0");
+assertXPath(pTable, "/x:pivotTableDefinition", "compactData", "0");
+assertXPath(pTable, 
"/x:pivotTableDefinition/x:pivotFields/x:pivotField[1]", "compact", "0");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index 9bc8836a57f4..6f9f7106f997 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -674,6 +674,8 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 XML_indent, ToPsz10(false),
 XML_outline, ToPsz10(true),
 XML_outlineData, ToPsz10(true),
+XML_compact, ToPsz10(false),
+XML_compactData, ToPsz10(false),
 FSEND);
 
 // NB: Excel's range does not include page field area (if any).
@@ -723,6 +725,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 {
 pPivotStrm->singleElement(XML_pivotField,
 XML_showAll, ToPsz10(false),
+XML_compact, ToPsz10(false),
 FSEND);
 continue;
 }
@@ -733,6 +736,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 {
 pPivotStrm->singleElement(XML_pivotField,
 XML_showAll, ToPsz10(false),
+XML_compact, ToPsz10(false),
 FSEND);
 continue;
 }
@@ -742,6 +746,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 pPivotStrm->singleElement(XML_pivotField,
 XML_dataField, ToPsz10(true),
 XML_showAll, ToPsz10(false),
+XML_compact, ToPsz10(false),
 FSEND);
 
 continue;
@@ -810,6 +815,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 if (!bHasDefaultSubtotal)
 pAttList->add(XML_defaultSubtotal, ToPsz10(false));
 
+pAttList->add( XML_compact, ToPsz10(false));
 sax_fastparser::XFastAttributeListRef xAttributeList(pAttList);
 pPivotStrm->startElement(XML_pivotField, xAttributeList);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesk

[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 6 commits - connectivity/source sc/qa sc/source svx/source sw/source vcl/inc vcl/osx vcl/source vcl/win

2017-10-06 Thread Jan-Marek Glogowski
Rebased ref, commits from common ancestor:
commit de21edd69c985de4be8ee637cc61824e87e53d2a
Author: Jan-Marek Glogowski 
Date:   Fri Sep 29 22:24:15 2017 +0200

WIP Fix unprocessed shutdown events

DO NOT MERGE!

This is just a test patch, since I can't reproduce the
Jenkins failures locally. It's not "make check" tested,
just "make vcl".

This fixes multiple problems, which I missed.

We're not interested in WM_TIMER events, but in active
SAL_MSG_TIMER_CALLBACK, which is indicated by PollForMessage().

This includes a revert of "tdf#38915: don't wait on message queue
if application already has quit.", which is commited as
f054b9187155bc32b7d06808aea87127cb0a3a4f.

We can't ignore the wait flag, just because the application will
quit, as we have to deliver the expected event announced by
pTimer->PollForMessage().

And we don't try to "clean" the message queue, as invalid events
are simply identified by there version ID.

On Mac we can probably drop the workaround. We can't wait for a
timer event in a redirected dispatch_async, for whatever reason.

Change-Id: If806d41c6fcfce10b0c4c7fdcf1df5df6ac16a1d

diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 5ad6a1718f19..532765e050f0 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -34,7 +34,7 @@ class WinSalTimer final : public SalTimer, protected 
VersionedEvent
 
 void ImplStart( sal_uIntPtr nMS );
 void ImplStop();
-void ImplEmitTimerCallback();
+void ImplHandleTimerEvent( WPARAM aWPARAM );
 
 public:
 WinSalTimer();
@@ -43,16 +43,9 @@ public:
 virtual void Start(sal_uIntPtr nMS) override;
 virtual void Stop() override;
 
-inline bool IsValidWPARAM( WPARAM wParam ) const;
-
 inline bool PollForMessage() const;
 };
 
-inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const
-{
-return IsValidEventVersion( static_cast( aWPARAM ) );
-}
-
 inline bool WinSalTimer::PollForMessage() const
 {
 return m_bPollForMessage;
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d475f30275b0..0334087f57cf 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -570,10 +570,10 @@ bool AquaSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents)
 // handle available events
 NSEvent* pEvent = nil;
 NSTimeInterval now = [[NSProcessInfo processInfo] systemUptime];
+AquaSalInstance *pInst = GetSalData()->mpInstance;
 do
 {
 SolarMutexReleaser aReleaser;
-
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
 // 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
 pEvent = [NSApp nextEventMatchingMask: NSAnyEventMask
@@ -591,6 +591,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 
 [NSApp updateWindows];
 
+if ( AquaSalInstance::AnyInput( VclInputFlags::TIMER ) && 
!pInst->mbNoYieldLock && !bHadEvent )
+continue;
 if ( !bHandleAllCurrentEvents || !pEvent || now < [pEvent 
timestamp] )
 break;
 }
@@ -618,7 +620,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 }
 
 // collect update rectangles
-for( auto pSalFrame : GetSalData()->mpInstance->getFrames() )
+for( auto pSalFrame : pInst->getFrames() )
 {
 AquaSalFrame* pFrame = static_cast( pSalFrame );
 if( pFrame->mbShown && ! pFrame->maInvalidRect.IsEmpty() )
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 877fdfae85b5..e6336fbedd6e 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -44,30 +44,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
subtype: nEventId
data1: nUserData
data2: 0];
-assert( pEvent );
 if ( nil == pEvent )
-return;
-if ( NO == bAtStart )
-{
-// nextEventMatchingMask has to run in the main thread!
-assert([NSThread isMainThread]);
-
-// Posting an event to the end of an empty queue fails,
-// so we peek the queue and post to the start, if empty.
-// Some Qt bugs even indicate nextEvent without dequeue
-// sometimes blocks, so we dequeue and re-add the event.
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-// 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
-NSEvent* pPeekEvent = [NSApp nextEventMatchingMask: NSAnyEventMask
-SAL_WNODEPRECATED_DECLARATIONS_POP
-   untilDate: nil
-   inMode: NSDefaultRunLoopMode
-   dequeue: YES];
-if ( nil == pPeekEvent )
-bAtStart = YES;
-else
-[NSApp postEvent: pPeekEvent atStart: YES];
-}
+std::abort();
 [NSApp postEvent: pEvent atStart: bAtStart];
 }
 
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 8fd26ec7

[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.2.1' - 2 commits - sw/qa sw/source

2017-10-06 Thread Miklos Vajna
 sw/qa/extras/uiwriter/data/tdf112860.fodt | 1394 ++
 sw/qa/extras/uiwriter/uiwriter.cxx|   10 
 sw/source/core/layout/ftnfrm.cxx  |1 
 sw/source/core/layout/sectfrm.cxx |2 
 sw/source/core/layout/tabfrm.cxx  |   40 
 5 files changed, 1445 insertions(+), 2 deletions(-)

New commits:
commit a3884863aba7807e7b473a0acb3f7aa4e4ae9a37
Author: Miklos Vajna 
Date:   Fri Oct 6 22:50:03 2017 +0200

sw: work around layout loop with split sections inside nested tables

This is just a short-term workaround, the actual root cause has to be
fixed (and that fix needs a testcase).

The change just makes sure that once a page is formatted, then a follow
page's table row doesn't invalidate the previous page (when the row is
shrinking), this way avoiding the loop.

Change-Id: Ic4b9252157ed29c3b554f06caf0630e56ba2ac79

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 0c6db983d50d..0a336f9cbe76 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4319,6 +4319,43 @@ SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, 
bool bInfo )
 return nReal;
 }
 
+static bool lcl_ContainsNestedTableContainingSection(SwRowFrame* pRow)
+{
+SwFrame* pLower = pRow->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsCellFrame())
+return false;
+SwCellFrame* pOuterCell = static_cast(pLower);
+
+pLower = pOuterCell->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsTabFrame())
+return false;
+SwTabFrame* pInnerTab = static_cast(pLower);
+
+pLower = pInnerTab->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsRowFrame())
+return false;
+SwRowFrame* pInnerRow = static_cast(pLower);
+
+pLower = pInnerRow->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsCellFrame())
+return false;
+SwCellFrame* pInnerCell = static_cast(pLower);
+
+pLower = pInnerCell->Lower();
+if (!pLower)
+return false;
+
+return pLower->IsSctFrame();
+}
+
 SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
 {
 SWRECTFN( this )
@@ -4407,7 +,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
  && !pTab->IsInRecalcLowerRow() )
 {
 SwTabFrame* pMasterTab = pTab->FindMaster();
-pMasterTab->InvalidatePos();
+if (!lcl_ContainsNestedTableContainingSection(this))
+pMasterTab->InvalidatePos();
 }
 }
 AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, true );
commit 84cd7643533aa5b1c4a096ec47fbd44992a03198
Author: Miklos Vajna 
Date:   Tue Oct 3 17:44:01 2017 +0200

tdf#112860 sw: avoid shortcut for tables in SwFrame::GetNextSctLeaf()

As the comment says the shortcut only works if no columns or pages are
between the section frames, while for tables there are definitely table,
row and column frames. This resulted later in
SwFrame::IsFootnoteAllowed() a nullptr dereference, as the frame was
still marked as in-table, but wasn't in a table anymore.

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

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

Change-Id: I4191c77d20c6ccc096156fae15ca7c22cc5b68b6

diff --git a/sw/qa/extras/uiwriter/data/tdf112860.fodt 
b/sw/qa/extras/uiwriter/data/tdf112860.fodt
new file mode 100644
index ..845c55ae8f42
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112860.fodt
@@ -0,0 +1,1394 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/200

[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.2' - 2 commits - sw/qa sw/source

2017-10-06 Thread Miklos Vajna
 sw/qa/extras/uiwriter/data/tdf112860.fodt | 1394 ++
 sw/qa/extras/uiwriter/uiwriter.cxx|   10 
 sw/source/core/layout/ftnfrm.cxx  |1 
 sw/source/core/layout/sectfrm.cxx |2 
 sw/source/core/layout/tabfrm.cxx  |   40 
 5 files changed, 1445 insertions(+), 2 deletions(-)

New commits:
commit bfdc36ede39f5bb165446a6f02b33d82589bd64c
Author: Miklos Vajna 
Date:   Fri Oct 6 22:50:03 2017 +0200

sw: work around layout loop with split sections inside nested tables

This is just a short-term workaround, the actual root cause has to be
fixed (and that fix needs a testcase).

The change just makes sure that once a page is formatted, then a follow
page's table row doesn't invalidate the previous page (when the row is
shrinking), this way avoiding the loop.

Change-Id: Ic4b9252157ed29c3b554f06caf0630e56ba2ac79

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 0c6db983d50d..0a336f9cbe76 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4319,6 +4319,43 @@ SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, 
bool bInfo )
 return nReal;
 }
 
+static bool lcl_ContainsNestedTableContainingSection(SwRowFrame* pRow)
+{
+SwFrame* pLower = pRow->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsCellFrame())
+return false;
+SwCellFrame* pOuterCell = static_cast(pLower);
+
+pLower = pOuterCell->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsTabFrame())
+return false;
+SwTabFrame* pInnerTab = static_cast(pLower);
+
+pLower = pInnerTab->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsRowFrame())
+return false;
+SwRowFrame* pInnerRow = static_cast(pLower);
+
+pLower = pInnerRow->Lower();
+if (!pLower)
+return false;
+if (!pLower->IsCellFrame())
+return false;
+SwCellFrame* pInnerCell = static_cast(pLower);
+
+pLower = pInnerCell->Lower();
+if (!pLower)
+return false;
+
+return pLower->IsSctFrame();
+}
+
 SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
 {
 SWRECTFN( this )
@@ -4407,7 +,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
  && !pTab->IsInRecalcLowerRow() )
 {
 SwTabFrame* pMasterTab = pTab->FindMaster();
-pMasterTab->InvalidatePos();
+if (!lcl_ContainsNestedTableContainingSection(this))
+pMasterTab->InvalidatePos();
 }
 }
 AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, true );
commit f60b65a808d77f4eac813fd8dd3e4688b6372e20
Author: Miklos Vajna 
Date:   Tue Oct 3 17:44:01 2017 +0200

tdf#112860 sw: avoid shortcut for tables in SwFrame::GetNextSctLeaf()

As the comment says the shortcut only works if no columns or pages are
between the section frames, while for tables there are definitely table,
row and column frames. This resulted later in
SwFrame::IsFootnoteAllowed() a nullptr dereference, as the frame was
still marked as in-table, but wasn't in a table anymore.

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

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

Change-Id: I4191c77d20c6ccc096156fae15ca7c22cc5b68b6

diff --git a/sw/qa/extras/uiwriter/data/tdf112860.fodt 
b/sw/qa/extras/uiwriter/data/tdf112860.fodt
new file mode 100644
index ..845c55ae8f42
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112860.fodt
@@ -0,0 +1,1394 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/200

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

2017-10-06 Thread Henry Castro
 loleaflet/src/control/Control.Menubar.js |   19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit e78d9a0d915ef9a95bb87359d3f80e7b38bc5699
Author: Henry Castro 
Date:   Fri Oct 6 17:33:26 2017 -0400

loleaflet: add "None (Do not check spelling)" option

Change-Id: Iae5176cf5b6b87b5c9540e392e6e81db7193e83f

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 2132417e..57ec87e9 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -175,11 +175,11 @@ L.Control.Menubar = L.Control.extend({
{name: _('Tools'), id: 'tools', type: 'menu', menu: [
{name: _('Automatic spell checking'), type: 
'unocommand', uno: '.uno:SpellOnline'},
{name: _('Language for selection'), type: 
'menu', menu: [
-   {name: _('Reset to Default Language'), 
id: 'resetselection', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES'}]},
+   {name: _('None (Do not check 
spelling)'), id: 'noneselection', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE'}]},
{name: _('Language for paragraph'), type: 
'menu', menu: [
-   {name: _('Reset to Default Language'), 
id: 'resetparagraph', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES'}]},
+   {name: _('None (Do not check 
spelling)'), id: 'noneparagraph', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE'}]},
{name: _('Language for entire document'), type: 
'menu', menu: [
-   {name: _('Reset to Default Language'), 
id: 'resetlanguage', type: 'unocommand', 
uno:'.uno:LanguageStatus?Language:string=Default_RESET_LANGUAGES'}]}
+   {name: _('None (Do not check 
spelling)'), id: 'nonelanguage', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]}
]},
{name: _('Help'), id: 'help', type: 'menu', menu: [
{name: _('Keyboard shortcuts'), id: 
'keyboard-shortcuts', type: 'action'},
@@ -359,14 +359,21 @@ L.Control.Menubar = L.Control.extend({
 
_onInitMenu: function (e) {
if (e.commandName === '.uno:LanguageStatus') {
-   $menuSelection = $('#menu-resetselection').parent();
-   $menuParagraph = $('#menu-resetparagraph').parent();
-   $menuDefault = $('#menu-resetlanguage').parent();
+   var resetLang = _('Reset to Default Language');
+   $menuSelection = $('#menu-noneselection').parent();
+   $menuParagraph = $('#menu-noneparagraph').parent();
+   $menuDefault = $('#menu-nonelanguage').parent();
for (var lang in e.commandValues) {

$menuSelection.append(this._createLangMenuItem(_(e.commandValues[lang]), 
encodeURIComponent('Current_' + e.commandValues[lang])));

$menuParagraph.append(this._createLangMenuItem(_(e.commandValues[lang]), 
encodeURIComponent('Paragraph_' + e.commandValues[lang])));

$menuDefault.append(this._createLangMenuItem(_(e.commandValues[lang]), 
encodeURIComponent('Default_' + e.commandValues[lang])));
}
+   $menuSelection.append(this._createMenu([{type: 
'separator'}]));
+   $menuParagraph.append(this._createMenu[{type: 
'separator'}]);
+   $menuDefault.append(this._createMenu([{type: 
'separator'}]));
+   
$menuSelection.append(this._createLangMenuItem(resetLang, 
'Current_RESET_LANGUAGES'));
+   
$menuParagraph.append(this._createLangMenuItem(resetLang, 
'Paragraph_RESET_LANGUAGES'));
+   $menuDefault.append(this._createLangMenuItem(resetLang, 
'Default_RESET_LANGUAGES'));
}
},
 
___
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

2017-10-06 Thread Michael Stahl
 sw/source/core/doc/docnew.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit b853c74fe6fc661dd0a7594dc877ae5c21dd7a86
Author: Michael Stahl 
Date:   Fri Oct 6 21:39:24 2017 +0200

sw: fix infinite grammar checking idle loop

The grammar checker always wants to be started in DoIdleJobs(),
even if all paragraphs are already marked as checked.

This is because there is currently no call anywhere of
SwRootFrame::SetNeedGrammarCheck(false) to reset the flag
and prevent DoIdleJobs from trying to start the grammar checker.

This call was already there before but was removed without
any justification in commit 9160fe814a46e93da6907e169ce9d58e46fa37f2.

This has become an infinite loop in several Junit tests with commit
53da556c600fa82ba84bc7fdce6a594b43f2b097.

Change-Id: Ibe7ad93442070aac0577725d044281912307d9e8
(cherry picked from commit 05c704d3bea7f9a7ec51ac28d4d55ba8068f2da5)

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 53b173b7ba28..4c90a33b628e 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -185,7 +185,14 @@ bool SwDoc::StartGrammarChecking( bool bSkipStart )
 {
 bStarted = true;
 if ( !bSkipStart )
+{
+for (auto pLayout : GetAllLayouts())
+{   // we're starting it now, don't start grammar checker
+// again until the user modifies the document
+pLayout->SetNeedGrammarCheck(false);
+}
 xGCIterator->startProofreading( xDoc, xFPIP );
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-10-06 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c5a93cad149618bbd43632f1660a558c34bdbf7e
Author: Adolfo Jayme Barrientos 
Date:   Fri Oct 6 20:09:34 2017 -0500

Updated core
Project: help  208b4ffb21e49ad906280ce3663852d5a1b83994

tdf#112754 Enlarge H1, make its fonts thinner & increase margin-bottom

Change-Id: Ie683cdd429626bfcb1e2ebc0ad8ae88ec1fe50be

diff --git a/helpcontent2 b/helpcontent2
index 0f0c9fd543e5..208b4ffb21e4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0f0c9fd543e5ceb5ae6d0a823997bd009b549753
+Subproject commit 208b4ffb21e49ad906280ce3663852d5a1b83994
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/default.css

2017-10-06 Thread Adolfo Jayme Barrientos
 help3xsl/default.css |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 208b4ffb21e49ad906280ce3663852d5a1b83994
Author: Adolfo Jayme Barrientos 
Date:   Fri Oct 6 20:09:34 2017 -0500

tdf#112754 Enlarge H1, make its fonts thinner & increase margin-bottom

Change-Id: Ie683cdd429626bfcb1e2ebc0ad8ae88ec1fe50be

diff --git a/help3xsl/default.css b/help3xsl/default.css
index cc8fafb27..d686169b1 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -87,7 +87,7 @@ h3,
 h4,
 h5,
 h6 {
-margin-bottom: 5pt;
+margin-bottom: 8pt;
 color: #18A303;
 }
 p,
@@ -96,10 +96,10 @@ td {
 margin: 2px 2px 2px 2px;
 }
 h1 {
-font-size: 18pt;
-border-bottom: 5px solid #18A303;
+font-size: 22pt;
+font-weight: 300;
+border-bottom: 3px solid #18A303;
 padding-bottom: 6px;
-margin-bottom: 6px;
 }
 h2 {
 font-size: 14pt;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 54157] LibreOffice 4.0 most annoying bugs

2017-10-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=54157
Bug 54157 depends on bug 60769, which changed state.

Bug 60769 Summary: FILEOPEN, FILESAVE, "Could not save document, error in 
writing sub document context.xml" then corrupt file.
https://bugs.documentfoundation.org/show_bug.cgi?id=60769

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 54157] LibreOffice 4.0 most annoying bugs

2017-10-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=54157
Bug 54157 depends on bug 60769, which changed state.

Bug 60769 Summary: FILEOPEN, FILESAVE, "Could not save document, error in 
writing sub document context.xml" then corrupt file.
https://bugs.documentfoundation.org/show_bug.cgi?id=60769

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-10-06 Thread Noel Grandin
 include/xmloff/xmlictxt.hxx|4 
 sw/source/uibase/config/StoredChapterNumbering.cxx |2 +-
 xmloff/source/core/xmlictxt.cxx|   15 ---
 xmloff/source/forms/elementimport.hxx  |2 +-
 xmloff/source/forms/propertyimport.hxx |2 +-
 5 files changed, 3 insertions(+), 22 deletions(-)

New commits:
commit e054b898e7510388d613e4f918afce53aa5444c7
Author: Noel Grandin 
Date:   Fri Oct 6 15:58:13 2017 +0200

drop use of tools::SvRef in xmloff

instead of mixing and matching rtl::Reference and tools::SvRef, lets
just use rtl::Reference

Change-Id: I5d77c8a662e1455f97935e5f4a99e484e8cad332
Reviewed-on: https://gerrit.libreoffice.org/43205
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index d22a72394504..77f701795f32 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -116,10 +116,6 @@ public:
 const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
Attribs) override;
 
 virtual void SAL_CALL characters(const OUString & aChars) override;
-
-void AddFirstRef();
-void AddNextRef();
-void ReleaseRef();
 };
 
 #endif // INCLUDED_XMLOFF_XMLICTXT_HXX
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx 
b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 271602493317..c575863f00e7 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -317,7 +317,7 @@ class StoredChapterNumberingRootContext
 private:
 SwChapterNumRules & m_rNumRules;
 size_t m_nCounter;
-std::vector> m_Contexts;
+std::vector> m_Contexts;
 
 public:
 StoredChapterNumberingRootContext(
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index f2242af256de..e1805057dcdd 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -162,19 +162,4 @@ void SAL_CALL SvXMLImportContext::characters(const 
OUString &rChars)
 mrImport.Characters( rChars );
 }
 
-void SvXMLImportContext::AddFirstRef()
-{
-acquire();
-}
-
-void SvXMLImportContext::AddNextRef()
-{
-acquire();
-}
-
-void SvXMLImportContext::ReleaseRef()
-{
-release();
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/forms/elementimport.hxx 
b/xmloff/source/forms/elementimport.hxx
index 79d223948391..c2cfc36f5b03 100644
--- a/xmloff/source/forms/elementimport.hxx
+++ b/xmloff/source/forms/elementimport.hxx
@@ -512,7 +512,7 @@ namespace xmloff
 void implSelectCurrentItem();
 void implDefaultSelectCurrentItem();
 };
-typedef tools::SvRef OListAndComboImportRef;
+typedef rtl::Reference OListAndComboImportRef;
 
 //= OListOptionImport
 /** helper class for importing a single  element.
diff --git a/xmloff/source/forms/propertyimport.hxx 
b/xmloff/source/forms/propertyimport.hxx
index c0ee5be0f4b2..30e57fac4904 100644
--- a/xmloff/source/forms/propertyimport.hxx
+++ b/xmloff/source/forms/propertyimport.hxx
@@ -150,7 +150,7 @@ namespace xmloff
 m_aGenericValues.push_back(_rProp);
 }
 };
-typedef tools::SvRef OPropertyImportRef;
+typedef rtl::Reference OPropertyImportRef;
 
 //= OPropertyElementsContext
 /** helper class for importing the  element
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-06 Thread Mike Kaganski
 sw/source/core/unocore/unofield.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 053827916ea927ade09bf5856b61f30ba7deea9e
Author: Mike Kaganski 
Date:   Fri Oct 6 22:22:12 2017 +0200

Replace a magic number with its syntactic meaning

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

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 0b0d8d0859a1..8902c0ea8c27 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2652,7 +2652,7 @@ SwXTextFieldMasters::~SwXTextFieldMasters()
 static SwFieldIds lcl_GetIdByName( OUString& rName, OUString& rTypeName )
 {
 if (rName.startsWithIgnoreAsciiCase(COM_TEXT_FLDMASTER_CC))
-rName = rName.copy(30);
+rName = rName.copy(RTL_CONSTASCII_LENGTH(COM_TEXT_FLDMASTER_CC));
 
 SwFieldIds nResId = SwFieldIds::Unknown;
 sal_Int32 nFound = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits