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

2019-06-07 Thread Andrea Gelmini (via logerrit)
 fpicker/source/office/fpinteraction.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1a5ab865115f965a0a6fa8989b12cfbe6f4b8e86
Author: Andrea Gelmini 
AuthorDate: Tue May 14 21:23:12 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:53:05 2019 +0200

Fix typo

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

diff --git a/fpicker/source/office/fpinteraction.hxx 
b/fpicker/source/office/fpinteraction.hxx
index 5827463d8801..fb66488d8f0f 100644
--- a/fpicker/source/office/fpinteraction.hxx
+++ b/fpicker/source/office/fpinteraction.hxx
@@ -33,7 +33,7 @@ namespace svt
 typedef ::cppu::WeakImplHelper <   css::task::XInteractionHandler
 >   OFilePickerInteractionHandler_Base;
 
-/** a InteractionHandler implementation which extends another handler with 
some customizability
+/** an InteractionHandler implementation which extends another handler 
with some customizability
 */
 class OFilePickerInteractionHandler final : public 
OFilePickerInteractionHandler_Base
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Andrea Gelmini (via logerrit)
 oox/source/drawingml/shape.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 65844edb150284abbc87af0c32dea12c01f44c46
Author: Andrea Gelmini 
AuthorDate: Fri Jun 7 20:52:07 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:51:57 2019 +0200

Fix typo

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

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 34582aa0920d..8c19ce84e869 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -476,7 +476,7 @@ static void lcl_createPresetShape(const 
uno::Reference& xShape,
 || (rClass == "fontwork-circle-curve")
 || (rClass == "fontwork-circle-pour" && aEntry.maName == "adj1"))
 {
-// DrawingML has 1/6 degree unit, but WortArt simple degree. 
Range [0..360[
+// DrawingML has 1/6 degree unit, but WordArt simple degree. 
Range [0..360[
 // or range ]-180..180] doesn't matter, because only cos(angle) and
 // sin(angle) are used.
 fValue = NormAngle360(fValue / 6.0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/inc/ViewShell.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 714fa1af62187a432dc610b76ee78a15f7f0f5fd
Author: Andrea Gelmini 
AuthorDate: Fri Jun 7 20:50:37 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:52:39 2019 +0200

 Fix typo

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

diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index c8fce2036aeb..b4f612933400 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -412,7 +412,7 @@ public:
 
 /// Allows adjusting the point or mark of the selection to a document 
coordinate.
 void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool 
bClearMark);
-/// Gets the current selectiion
+/// Gets the current selection
 css::uno::Reference 
GetSelectionTransferrable();
 /// Allows starting or ending a graphic move or resize action.
 void SetGraphicMm100Position(bool bStart, const Point& rPosition);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Andrea Gelmini (via logerrit)
 framework/inc/helper/dockingareadefaultacceptor.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 561e1b6aed328f63612746fb4f48296e27888a52
Author: Andrea Gelmini 
AuthorDate: Tue May 14 21:23:06 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:50:03 2019 +0200

Fix typo

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

diff --git a/framework/inc/helper/dockingareadefaultacceptor.hxx 
b/framework/inc/helper/dockingareadefaultacceptor.hxx
index 4d7fbbe46e4a..f3a3f54c32fc 100644
--- a/framework/inc/helper/dockingareadefaultacceptor.hxx
+++ b/framework/inc/helper/dockingareadefaultacceptor.hxx
@@ -39,7 +39,7 @@ class DockingAreaDefaultAcceptor:   public 
::cppu::WeakImplHelper< css::ui::
 
/*-
 @short  constructor to initialize this instance
 @descr  A docking area acceptor
-But we need a instance to create more than one 
enumerations to the same tasklist!
+But we need an instance to create more than one 
enumerations to the same tasklist!
 
 @seealsoclass Desktop
 @seealsoclass OTasksEnumeration
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Andrea Gelmini (via logerrit)
 fpicker/source/win32/VistaFilePickerEventHandler.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0c5cb20f26806eaa16adf121440236750fe47b79
Author: Andrea Gelmini 
AuthorDate: Tue May 14 21:23:10 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:49:27 2019 +0200

Fix typo

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

diff --git a/fpicker/source/win32/VistaFilePickerEventHandler.hxx 
b/fpicker/source/win32/VistaFilePickerEventHandler.hxx
index 8e01df71a18c..ea990ac7758a 100644
--- a/fpicker/source/win32/VistaFilePickerEventHandler.hxx
+++ b/fpicker/source/win32/VistaFilePickerEventHandler.hxx
@@ -136,7 +136,7 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
 /** stop listening for file picker events on the internally cached 
dialog COM object.
  *
  *  The COM dialog provided on the startListening() call was cached 
internally.
- *  And now its used to deregister this listener. Doing so the also 
internally cached
+ *  And now it's used to deregister this listener. Doing so the also 
internally cached
  *  listener handle is used. If listener was not already registered - 
nothing will happen.
  */
 void stopListening();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - framework/inc

2019-06-07 Thread Andrea Gelmini (via logerrit)
 framework/inc/classes/framecontainer.hxx  |2 +-
 framework/inc/dispatch/interceptionhelper.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6704943336d10ea2798d4b76b507b6aa3abad4cc
Author: Andrea Gelmini 
AuthorDate: Tue May 14 21:23:07 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:45:33 2019 +0200

Fix typo

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

diff --git a/framework/inc/dispatch/interceptionhelper.hxx 
b/framework/inc/dispatch/interceptionhelper.hxx
index 97e65f81c998..446ba2537354 100644
--- a/framework/inc/dispatch/interceptionhelper.hxx
+++ b/framework/inc/dispatch/interceptionhelper.hxx
@@ -200,7 +200,7 @@ class InterceptionHelper : public  ::cppu::WeakImplHelper<
 
 /** @short implements an optimized queryDispatch() for remote.
 
-@descr It capsulate more than one queryDispatch() requests and 
return a lits of dispatch objects
+@descr It capsulate more than one queryDispatch() requests and 
return a list of dispatch objects
as result. Because both lists (in and out) correspond 
together, it's not allowed to
pack it - means suppress NULL references!
 
commit de60d2ad558b071c552c93f7dbf2284de565f050
Author: Andrea Gelmini 
AuthorDate: Tue May 14 21:23:09 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:44:26 2019 +0200

Fix typo

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

diff --git a/framework/inc/classes/framecontainer.hxx 
b/framework/inc/classes/framecontainer.hxx
index 5a82d3f9a315..f28e314ed3cd 100644
--- a/framework/inc/classes/framecontainer.hxx
+++ b/framework/inc/classes/framecontainer.hxx
@@ -42,7 +42,7 @@ typedef ::std::vector< css::uno::Reference< 
css::frame::XFrame > >  TFrameContai
 
 
/*-
 @short  implement a container to hold children of frame, task or 
desktop
-@descr  Every object of frame, task or desktop hold reference to 
his children. These container is used as helper
+@descr  Every object of frame, task or desktop hold reference to 
its children. These container is used as helper
 to do this. Some helper-classes like OFrames or 
OTasksAccess use it to. They hold a pointer to an instance
 of this class, which is a member of a frame, task or 
desktop! You can append and remove frames.
 It's possible to set one of these frames as active or 
deactivate. You could have full index-access to
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Andrea Gelmini (via logerrit)
 fpicker/source/office/fpsmartcontent.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8c90c9d2f82c9be09c5527d125c531e5ed4890c0
Author: Andrea Gelmini 
AuthorDate: Tue May 14 21:23:11 2019 +
Commit: Julien Nabet 
CommitDate: Sat Jun 8 08:43:18 2019 +0200

Fix typo

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

diff --git a/fpicker/source/office/fpsmartcontent.cxx 
b/fpicker/source/office/fpsmartcontent.cxx
index 4151753cf6f8..53b3a8b3d291 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -179,7 +179,7 @@ namespace svt
 return false;
 
 assert( m_pContent && "SmartContent::implIs: inconsistence!" );
-// if, after an bindTo, we don't have a content, then we should be 
INVALID, or at least
+// if, after a bindTo, we don't have a content, then we should be 
INVALID, or at least
 // NOT_BOUND (the latter happens, for example, if somebody tries 
to ask for an empty URL)
 
 bool bIs = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vclplug_kde5.mk vcl/qt5 vcl/unx

2019-06-07 Thread Jan-Marek Glogowski (via logerrit)
 vcl/Library_vclplug_kde5.mk  |1 
 vcl/inc/qt5/Qt5Graphics_Controls.hxx |5 --
 vcl/inc/qt5/Qt5SvpGraphics.hxx   |   46 +-
 vcl/qt5/Qt5Frame.cxx |2 
 vcl/qt5/Qt5Instance.cxx  |5 +-
 vcl/qt5/Qt5SvpGraphics.cxx   |   65 +-
 vcl/qt5/Qt5SvpVirtualDevice.hxx  |8 +--
 vcl/unx/kde5/KDE5SalFrame.cxx|3 -
 vcl/unx/kde5/KDE5SalFrame.hxx|6 --
 vcl/unx/kde5/KDE5SalGraphics.cxx |   85 ---
 vcl/unx/kde5/KDE5SalGraphics.hxx |   84 --
 vcl/unx/kde5/KDE5SalInstance.cxx |   17 ---
 vcl/unx/kde5/KDE5SalInstance.hxx |4 -
 13 files changed, 117 insertions(+), 214 deletions(-)

New commits:
commit 3e82710d1e368a4c1a942270efa3ee6f4c936f67
Author: Jan-Marek Glogowski 
AuthorDate: Fri Jun 7 22:20:53 2019 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Sat Jun 8 05:56:44 2019 +0200

KDE5 merge KDE5SalGraphics into Qt5SvpGraphics

Nothing KDE specific left in there, so just merge it.

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

diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index e60ea79c1f5e..d097845bd5ce 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -81,7 +81,6 @@ $(eval $(call gb_Library_add_libs,vclplug_kde5,\
 $(eval $(call gb_Library_add_exception_objects,vclplug_kde5,\
 vcl/unx/kde5/KDE5FilePicker2 \
 vcl/unx/kde5/KDE5SalFrame \
-vcl/unx/kde5/KDE5SalGraphics \
 vcl/unx/kde5/KDE5SalInstance \
 ))
 
diff --git a/vcl/inc/qt5/Qt5Graphics_Controls.hxx 
b/vcl/inc/qt5/Qt5Graphics_Controls.hxx
index c83d3ef458f1..f8b5c5a6759c 100644
--- a/vcl/inc/qt5/Qt5Graphics_Controls.hxx
+++ b/vcl/inc/qt5/Qt5Graphics_Controls.hxx
@@ -24,11 +24,10 @@
 
 #include 
 
+#include 
 #include 
 #include 
-
-class QImage;
-class QPushButton;
+#include 
 
 // Native control support
 class VCLPLUG_QT5_PUBLIC Qt5Graphics_Controls
diff --git a/vcl/inc/qt5/Qt5SvpGraphics.hxx b/vcl/inc/qt5/Qt5SvpGraphics.hxx
index e6a931b77f55..9dd8a53aeb54 100644
--- a/vcl/inc/qt5/Qt5SvpGraphics.hxx
+++ b/vcl/inc/qt5/Qt5SvpGraphics.hxx
@@ -22,14 +22,17 @@
 #include 
 #include 
 
-class QWidget;
+#include "Qt5Graphics_Controls.hxx"
+
+class Qt5Frame;
 
 class VCLPLUG_QT5_PUBLIC Qt5SvpGraphics : public SvpSalGraphics
 {
-QWidget* m_pQWidget;
+Qt5Graphics_Controls m_aControl;
+Qt5Frame* const m_pFrame;
 
 public:
-Qt5SvpGraphics(QWidget* pQWidget);
+Qt5SvpGraphics(Qt5Frame* pFrame);
 ~Qt5SvpGraphics() override;
 
 void updateQWidget() const;
@@ -41,6 +44,43 @@ public:
 cairo::SurfaceSharedPtr CreateSurface(const OutputDevice& rRefDevice, int 
x, int y, int width,
   int height) const override;
 #endif // ENABLE_CAIRO_CANVAS
+
+virtual bool IsNativeControlSupported(ControlType, ControlPart) override;
+
+virtual bool hitTestNativeControl(ControlType, ControlPart, const 
tools::Rectangle&,
+  const Point&, bool&) override;
+
+virtual bool drawNativeControl(ControlType, ControlPart, const 
tools::Rectangle&, ControlState,
+   const ImplControlValue&, const OUString&) 
override;
+
+virtual bool getNativeControlRegion(ControlType, ControlPart, const 
tools::Rectangle&,
+ControlState, const ImplControlValue&, 
const OUString&,
+tools::Rectangle&, tools::Rectangle&) 
override;
+
+virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
 };
 
+inline bool Qt5SvpGraphics::IsNativeControlSupported(ControlType nType, 
ControlPart nPart)
+{
+return Qt5Graphics_Controls::IsNativeControlSupported(nType, nPart);
+}
+
+inline bool Qt5SvpGraphics::hitTestNativeControl(ControlType nType, 
ControlPart nPart,
+ const tools::Rectangle& 
rControlRegion,
+ const Point& aPos, bool& 
rIsInside)
+{
+return Qt5Graphics_Controls::hitTestNativeControl(nType, nPart, 
rControlRegion, aPos,
+  rIsInside);
+}
+
+inline bool Qt5SvpGraphics::getNativeControlRegion(
+ControlType nType, ControlPart nPart, const tools::Rectangle& 
rControlRegion,
+ControlState nState, const ImplControlValue& aValue, const OUString& 
aCaption,
+tools::Rectangle& rNativeBoundingRegion, tools::Rectangle& 
rNativeContentRegion)
+{
+return Qt5Graphics_Controls::getNativeControlRegion(nType, nPart, 
rControlRegion, nState,
+aValue, aCaption, 
rNativeBoundingRegion,
+rNative

CppunitTest_sc_macros_test hanging indefinitely with font scaling on Windows

2019-06-07 Thread Kaganski Mike
Hi!

On Windows 10 x64 (1903 build 18362.116), having "all items scaling" set 
to 150%, with current master (now at 
b170256fb6ebaf774b02b89835b19d9f3a1afb89) built for x64 in dbgutil 
config, running

 > make CppunitTest_sc_macros_test

reliably hangs indefinitely. It never returns from 
Scheduler::ProcessEventsToIdle (specifically, never leaves the while( 
Application::Reschedule( true ) ) loop); the call stack is

> vcllo.dll!Scheduler::ProcessEventsToIdle() Line 480
>   at C:\cygwin\home\user\lode\dev\core\vcl\source\app\svapp.cxx(480)
> test.dll!test::BootstrapFixture::setUp() Line 119
>   at 
> C:\cygwin\home\user\lode\dev\core\test\source\bootstrapfixture.cxx(119)
> subsequenttest.dll!UnoApiTest::setUp() Line 28
>   at C:\cygwin\home\user\lode\dev\core\test\source\unoapi_test.cxx(28)
> test_sc_macros_test.dll!CppUnit::TestCaller::setUp() Line 181
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\include\cppunit\TestCaller.h(181)
> cppunitd_dll.dll!CppUnit::TestCaseMethodFunctor::operator()() Line 33
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp(33)
> vclbootstrapprotector.dll!`anonymous namespace'::Protector::protect(const 
> CppUnit::Functor & functor, const CppUnit::ProtectorContext & __formal) Line 
> 49
>   at 
> C:\cygwin\home\user\lode\dev\core\test\source\vclbootstrapprotector.cxx(49)
> cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp(21)
> unobootstrapprotector.dll!`anonymous namespace'::Prot::protect(const 
> CppUnit::Functor & functor, const CppUnit::ProtectorContext & __formal) Line 
> 90
>   at 
> C:\cygwin\home\user\lode\dev\core\unotest\source\cpp\unobootstrapprotector\unobootstrapprotector.cxx(90)
> cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp(21)
> unoexceptionprotector.dll!`anonymous namespace'::Prot::protect(const 
> CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 63
>   at 
> C:\cygwin\home\user\lode\dev\core\unotest\source\cpp\unoexceptionprotector\unoexceptionprotector.cxx(63)
> cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp(21)
> cppunitd_dll.dll!CppUnit::DefaultProtector::protect(const CppUnit::Functor & 
> functor, const CppUnit::ProtectorContext & context) Line 15
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\DefaultProtector.cpp(15)
> cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp(21)
> cppunitd_dll.dll!CppUnit::ProtectorChain::protect(const CppUnit::Functor & 
> functor, const CppUnit::ProtectorContext & context) Line 86
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp(86)
> cppunitd_dll.dll!CppUnit::TestResult::protect(const CppUnit::Functor & 
> functor, CppUnit::Test * test, const 
> std::basic_string,std::allocator > & 
> shortDescription) Line 182
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp(182)
> cppunitd_dll.dll!CppUnit::TestCase::run(CppUnit::TestResult * result) Line 87
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp(87)
> cppunitd_dll.dll!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult 
> * controller) Line 65
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp(65)
> cppunitd_dll.dll!CppUnit::TestComposite::run(CppUnit::TestResult * result) 
> Line 24
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp(24)
> cppunitd_dll.dll!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult 
> * controller) Line 65
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp(65)
> cppunitd_dll.dll!CppUnit::TestComposite::run(CppUnit::TestResult * result) 
> Line 24
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp(24)
> cppunitd_dll.dll!CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult 
> * result) Line 48
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp(48)
> cppunitd_dll.dll!CppUnit::TestResult::runTest(CppUnit::Test * test) Line 150
>   at 
> C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp(150)
> 

[Libreoffice-commits] core.git: bin/gbuild-to-ide

2019-06-07 Thread Michael Weghorn (via logerrit)
 bin/gbuild-to-ide |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 92c03d9bf644b0f10de52ce0da09f97056e46247
Author: Michael Weghorn 
AuthorDate: Fri Jun 7 21:44:03 2019 +0200
Commit: Michael Weghorn 
CommitDate: Sat Jun 8 03:58:00 2019 +0200

qtcreator: Take over '-std=...' from CXXFLAGS

If the '-std=' compiler flag is set in CXXFLAGS,
take that over into the .pro files used by
Qt Creator.

This makes ClangCodeModel use the correct std version,
and e.g. know about 'std::string_view' if '-std=gnu++2a'
(or anything else indicating C++17 or higher is supported)
is used and thus avoids unnecessary errors/warnings from
being displayed.

Use a list, so other flags can easily be added later.
(It currently doesn't seem reasonable to me to just pass all
cxxflags though, since .pro files are currently only generated
per top-level module, while C++ flags can differ between
different targets in the same module).

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

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 1365c548c218..e012c08c0828 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -1671,6 +1671,12 @@ class 
QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
 if ext:
 headers_list.append(lopath(file_ + ext))
 
+cxxflags_list = []
+for cxxflag in lib.cxxflags:
+# extract flag for C++ standard version
+if cxxflag.startswith('-std'):
+cxxflags_list.append(cxxflag)
+
 # List all include paths
 for hdir in (lib.include + lib.include_sys):
 hf_lopath = lopath(hdir)
@@ -1695,12 +1701,14 @@ class 
QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
 if lib_folder in self.data_libs:
 self.data_libs[lib_folder]['sources'] |= set(sources_list)
 self.data_libs[lib_folder]['headers'] |= set(headers_list)
+self.data_libs[lib_folder]['cxxflags'] |= set(cxxflags_list)
 self.data_libs[lib_folder]['includepath'] |= 
set(includepath_list)
 self.data_libs[lib_folder]['defines'] |= set(defines_list)
 else:
 self.data_libs[lib_folder] = {
 'sources': set(sources_list),
 'headers': set(headers_list),
+'cxxflags': set(cxxflags_list),
 'includepath': set(includepath_list),
 'defines': set(defines_list),
 'loc': lib.location,
@@ -1723,6 +1731,7 @@ class 
QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
 for lib_folder in subdirs_list:
 sources_list = sorted(self.data_libs[lib_folder]['sources'])
 headers_list = sorted(self.data_libs[lib_folder]['headers'])
+cxxflags_list = sorted(self.data_libs[lib_folder]['cxxflags'])
 includepath_list = 
sorted(self.data_libs[lib_folder]['includepath'])
 defines_list = sorted(self.data_libs[lib_folder]['defines'])
 lib_loc = self.data_libs[lib_folder]['loc']
@@ -1730,13 +1739,15 @@ class 
QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
 
 sources = " \\\n".join(sources_list)
 headers = " \\\n".join(headers_list)
+cxxflags = " \\\n".join(cxxflags_list)
 includepath = " \\\n".join(includepath_list)
 defines = " \\\n".join(defines_list)
 
 # create .pro file
 qt_pro_file = '%s/%s.pro' % (lib_loc, lib_name)
 try:
-content = QtCreatorIntegrationGenerator.pro_template % 
{'sources': sources, 'headers': headers, 'includepath': includepath, 'defines': 
defines}
+content = QtCreatorIntegrationGenerator.pro_template % 
{'sources': sources, 'headers': headers,
+
'cxxflags': cxxflags, 'includepath': includepath, 'defines': defines}
 mode = 'w+'
 with open(qt_pro_file, mode) as fpro:
 fpro.write(content)
@@ -1799,6 +1810,8 @@ CONFIG += console
 CONFIG -= app_bundle
 CONFIG -= qt
 
+QMAKE_CXXFLAGS += %(cxxflags)s
+
 INCLUDEPATH += %(includepath)s
 
 SOURCES += %(sources)s
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Mike Kaganski (via logerrit)
 sw/source/core/text/atrhndl.hxx |   10 +-
 sw/source/core/text/atrstck.cxx |   14 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit c744dac16ad808c73021cb2cecefe1d484934451
Author: Mike Kaganski 
AuthorDate: Fri Jun 7 21:02:19 2019 +1000
Commit: Mike Kaganski 
CommitDate: Sat Jun 8 03:53:00 2019 +0200

tdf#125624: this bugdoc overflows sal_uInt16

Change-Id: I8ecc08d3ef42b9f7cc501017e0e169bde2196317
Reviewed-on: https://gerrit.libreoffice.org/73654
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2d5821ceacf399ec9267a3704ee0b2cc8a598f04)
Reviewed-on: https://gerrit.libreoffice.org/73671

diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index f12bd76a34b1..81a141327e30 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -47,8 +47,8 @@ private:
 private:
 SwTextAttr*  m_pInitialArray[ INITIAL_NUM_ATTR ];
 SwTextAttr** m_pArray;
-sal_uInt16 m_nCount; // number of elements on stack
-sal_uInt16 m_nSize;  // number of positions in Array
+sal_uInt32 m_nCount; // number of elements on stack
+sal_uInt32 m_nSize;  // number of positions in Array
 
 public:
 // Ctor, Dtor
@@ -64,7 +64,7 @@ private:
 void Push( const SwTextAttr& rAttr ) { Insert(rAttr, m_nCount); };
 // insert at specified position, take care for not inserting behind
 // the value returned by Count()
-void Insert( const SwTextAttr& rAttr, const sal_uInt16 nPos );
+void Insert( const SwTextAttr& rAttr, const sal_uInt32 nPos );
 
 // remove specified attribute
 void Remove( const SwTextAttr& rAttr );
@@ -73,11 +73,11 @@ private:
 const SwTextAttr* Top() const;
 
 // number of elements on stack
-sal_uInt16 Count() const { return m_nCount; };
+sal_uInt32 Count() const { return m_nCount; };
 
 // returns position of rAttr on Stack if found, otherwise USHRT_MAX
 // can be used for Remove of an attribute
-sal_uInt16 Pos( const SwTextAttr& rAttr ) const;
+sal_uInt32 Pos( const SwTextAttr& rAttr ) const;
 };
 
 SwAttrStack m_aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 9130208cc7c2..eb2762fffb40 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -270,7 +270,7 @@ inline SwAttrHandler::SwAttrStack::SwAttrStack()
 m_pArray = m_pInitialArray;
 }
 
-void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const 
sal_uInt16 nPos )
+void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const 
sal_uInt32 nPos )
 {
 // do we still have enough space?
 if (m_nCount >= m_nSize)
@@ -311,7 +311,7 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& 
rAttr, const sal_uInt
 
 void SwAttrHandler::SwAttrStack::Remove( const SwTextAttr& rAttr )
 {
-sal_uInt16 nPos = Pos( rAttr );
+sal_uInt32 nPos = Pos( rAttr );
 if (nPos < m_nCount)
 {
 memmove( m_pArray + nPos, m_pArray + nPos + 1,
@@ -326,20 +326,20 @@ const SwTextAttr* SwAttrHandler::SwAttrStack::Top() const
 return m_nCount ? m_pArray[ m_nCount - 1 ] : nullptr;
 }
 
-sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
+sal_uInt32 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
 {
 if ( ! m_nCount )
 // empty stack
-return USHRT_MAX;
+return std::numeric_limits::max();
 
-for (sal_uInt16 nIdx = m_nCount; nIdx > 0;)
+for (sal_uInt32 nIdx = m_nCount; nIdx > 0;)
 {
 if (&rAttr == m_pArray[ --nIdx ])
 return nIdx;
 }
 
 // element not found
-return USHRT_MAX;
+return std::numeric_limits::max();
 }
 
 SwAttrHandler::SwAttrHandler()
@@ -487,7 +487,7 @@ bool SwAttrHandler::Push( const SwTextAttr& rAttr, const 
SfxPoolItem& rItem )
 return true;
 }
 
-const sal_uInt16 nPos = m_aAttrStack[ nStack ].Count();
+const sal_uInt32 nPos = m_aAttrStack[ nStack ].Count();
 OSL_ENSURE( nPos, "empty stack?" );
 m_aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Mike Kaganski (via logerrit)
 sw/source/core/text/atrhndl.hxx |   47 +-
 sw/source/core/text/atrstck.cxx |  129 +---
 2 files changed, 35 insertions(+), 141 deletions(-)

New commits:
commit 5fca7ba2fd6031515636842b44996bac74287568
Author: Mike Kaganski 
AuthorDate: Fri Jun 7 23:22:13 2019 +1000
Commit: Mike Kaganski 
CommitDate: Sat Jun 8 03:50:29 2019 +0200

Drop SwAttrHandler::SwAttrStack; use std::vector instead

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

diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index 81a141327e30..8abb678ea9fd 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -20,10 +20,10 @@
 #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_ATRHNDL_HXX
 #define INCLUDED_SW_SOURCE_CORE_TEXT_ATRHNDL_HXX
 
-#define INITIAL_NUM_ATTR 3
 #define NUM_ATTRIBUTE_STACKS 44
 
 #include 
+#include 
 #include 
 
 class SwTextAttr;
@@ -40,47 +40,7 @@ extern const sal_uInt8 StackPos[];
 class SwAttrHandler
 {
 private:
-
-/// Container for SwTextAttr Objects
-class SwAttrStack
-{
-private:
-SwTextAttr*  m_pInitialArray[ INITIAL_NUM_ATTR ];
-SwTextAttr** m_pArray;
-sal_uInt32 m_nCount; // number of elements on stack
-sal_uInt32 m_nSize;  // number of positions in Array
-
-public:
-// Ctor, Dtor
-inline SwAttrStack();
-~SwAttrStack() {
-if (m_nSize > INITIAL_NUM_ATTR) delete [] m_pArray;
-}
-
-// reset stack
-void Reset() { m_nCount = 0; };
-
-// insert on top
-void Push( const SwTextAttr& rAttr ) { Insert(rAttr, m_nCount); };
-// insert at specified position, take care for not inserting behind
-// the value returned by Count()
-void Insert( const SwTextAttr& rAttr, const sal_uInt32 nPos );
-
-// remove specified attribute
-void Remove( const SwTextAttr& rAttr );
-
-// get attribute from top if exists, otherwise 0
-const SwTextAttr* Top() const;
-
-// number of elements on stack
-sal_uInt32 Count() const { return m_nCount; };
-
-// returns position of rAttr on Stack if found, otherwise USHRT_MAX
-// can be used for Remove of an attribute
-sal_uInt32 Pos( const SwTextAttr& rAttr ) const;
-};
-
-SwAttrStack m_aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
+std::vector m_aAttrStack[NUM_ATTRIBUTE_STACKS]; // 
stack collection
 const SfxPoolItem* m_pDefaultArray[ NUM_DEFAULT_VALUES ];
 const IDocumentSettingAccess* m_pIDocumentSettingAccess;
 const SwViewShell* m_pShell;
@@ -91,6 +51,9 @@ private:
 
 bool m_bVertLayout;
 
+const SwTextAttr* GetTop(sal_uInt16 nStack);
+void RemoveFromStack(sal_uInt16 nWhich, const SwTextAttr& rAttr);
+
 // change font according to pool item
 void FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush );
 
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index eb2762fffb40..39ea69a42b33 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -54,8 +54,6 @@
 #include 
 #include 
 
-#define STACK_INCREMENT 4
-
 /**
  * Attribute to Stack Mapping
  *
@@ -264,84 +262,6 @@ static bool lcl_ChgHyperLinkColor( const SwTextAttr& rAttr,
 return false;
 }
 
-inline SwAttrHandler::SwAttrStack::SwAttrStack()
-: m_nCount( 0 ), m_nSize( INITIAL_NUM_ATTR )
-{
-m_pArray = m_pInitialArray;
-}
-
-void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const 
sal_uInt32 nPos )
-{
-// do we still have enough space?
-if (m_nCount >= m_nSize)
-{
- // we are still in our initial array
-if (INITIAL_NUM_ATTR == m_nSize)
-{
-m_nSize += STACK_INCREMENT;
-m_pArray = new SwTextAttr*[ m_nSize ];
-// copy from pInitArray to new Array
-memcpy( m_pArray, m_pInitialArray,
-INITIAL_NUM_ATTR * sizeof(SwTextAttr*)
-);
-}
-// we are in new memory
-else
-{
-m_nSize += STACK_INCREMENT;
-SwTextAttr** pTmpArray = new SwTextAttr*[ m_nSize ];
-// copy from m_pArray to new Array
-memcpy( pTmpArray, m_pArray, m_nCount * sizeof(SwTextAttr*) );
-// free old array
-delete [] m_pArray;
-m_pArray = pTmpArray;
-}
-}
-
-OSL_ENSURE(nPos <= m_nCount, "wrong position for insert operation");
-
-if (nPos < m_nCount)
-memmove( m_pArray + nPos + 1, m_pArray + nPos,
-(m_nCount - nPos) * sizeof(SwTextAttr*)
-);
-m_pArray[ nPos ] = const_cast(&rAttr);
-
-m_nCount++;
-}
-
-void SwAttrHandler::SwAttrStack::Remove( const SwTextAttr& rAttr )
-{
-sa

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

2019-06-07 Thread Jan-Marek Glogowski (via logerrit)
 vcl/headless/svpvd.cxx|   10 ++---
 vcl/inc/headless/svpvd.hxx|5 
 vcl/source/window/bufferdevice.cxx|2 -
 vcl/unx/kde5/KDE5SalGraphics.cxx  |2 -
 vcl/unx/kde5/KDE5SalInstance.cxx  |   19 +
 vcl/unx/kde5/KDE5SalInstance.hxx  |4 +++
 vcl/unx/kde5/KDE5SalVirtualDevice.hxx |   36 ++
 7 files changed, 72 insertions(+), 6 deletions(-)

New commits:
commit 2cb6a591b643a0f65dc58f060f60cc707ad3589c
Author: Jan-Marek Glogowski 
AuthorDate: Fri Jun 7 19:09:18 2019 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Sat Jun 8 03:30:45 2019 +0200

tdf#125673 KDE5 implement a KDE5SalVirtualDevice

We just need AcquireGraphics() to return a KDE5Graphics.
Otherwise the BufferDevice's SVP will use a SvpSalGraphics
instead of the KDE5Graphics, which knows about Qt's theming.

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

diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index eeccf2c014a9..a1e415739d6b 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -45,14 +45,18 @@ SvpSalVirtualDevice::~SvpSalVirtualDevice()
 cairo_surface_destroy(m_pRefSurface);
 }
 
-SalGraphics* SvpSalVirtualDevice::AcquireGraphics()
+SvpSalGraphics* SvpSalVirtualDevice::AddGraphics(SvpSalGraphics* pGraphics)
 {
-SvpSalGraphics* pGraphics = new SvpSalGraphics();
 pGraphics->setSurface(m_pSurface, m_aFrameSize);
-m_aGraphics.push_back( pGraphics );
+m_aGraphics.push_back(pGraphics);
 return pGraphics;
 }
 
+SalGraphics* SvpSalVirtualDevice::AcquireGraphics()
+{
+return AddGraphics(new SvpSalGraphics());
+}
+
 void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics )
 {
 m_aGraphics.erase(std::remove(m_aGraphics.begin(), m_aGraphics.end(), 
dynamic_cast(pGraphics)), m_aGraphics.end());
diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx
index 776cee7cde15..3da74b5e1ba8 100644
--- a/vcl/inc/headless/svpvd.hxx
+++ b/vcl/inc/headless/svpvd.hxx
@@ -21,6 +21,8 @@
 #define INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -35,6 +37,9 @@ class VCL_DLLPUBLIC SvpSalVirtualDevice : public 
SalVirtualDevice
 basegfx::B2IVector  m_aFrameSize;
 std::vector< SvpSalGraphics* >  m_aGraphics;
 
+protected:
+SvpSalGraphics* AddGraphics(SvpSalGraphics* aGraphics);
+
 public:
 SvpSalVirtualDevice(DeviceFormat eFormat, cairo_surface_t* pRefSurface);
 virtual ~SvpSalVirtualDevice() override;
diff --git a/vcl/source/window/bufferdevice.cxx 
b/vcl/source/window/bufferdevice.cxx
index 5db4cfff458a..d1480588d48f 100644
--- a/vcl/source/window/bufferdevice.cxx
+++ b/vcl/source/window/bufferdevice.cxx
@@ -12,7 +12,7 @@
 namespace vcl
 {
 BufferDevice::BufferDevice(const VclPtr& pWindow, 
vcl::RenderContext& rRenderContext)
-: m_pBuffer(VclPtr::Create())
+: m_pBuffer(VclPtr::Create(rRenderContext))
 , m_pWindow(pWindow)
 , m_rRenderContext(rRenderContext)
 {
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 6e30b9599740..268f8331f7e7 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -40,7 +40,7 @@ static void QImage2BitmapBuffer(QImage* pImg, BitmapBuffer* 
pBuf)
 }
 
 KDE5SalGraphics::KDE5SalGraphics(Qt5Frame* pFrame)
-: Qt5SvpGraphics(pFrame->GetQWidget())
+: Qt5SvpGraphics(pFrame ? pFrame->GetQWidget() : nullptr)
 , m_pFrame(pFrame)
 {
 }
diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx
index e2bd75277d23..e83d48007712 100644
--- a/vcl/unx/kde5/KDE5SalInstance.cxx
+++ b/vcl/unx/kde5/KDE5SalInstance.cxx
@@ -28,8 +28,9 @@
 #include 
 
 #include "KDE5FilePicker.hxx"
-#include "KDE5SalInstance.hxx"
 #include "KDE5SalFrame.hxx"
+#include "KDE5SalInstance.hxx"
+#include "KDE5SalVirtualDevice.hxx"
 
 using namespace com::sun::star;
 
@@ -69,6 +70,22 @@ Qt5FilePicker* 
KDE5SalInstance::createPicker(QFileDialog::FileMode eMode)
 return Qt5Instance::createPicker(eMode);
 }
 
+std::unique_ptr 
KDE5SalInstance::CreateVirtualDevice(SalGraphics* pGraphics,
+   long& 
nDX, long& nDY,
+   
DeviceFormat eFormat,
+   const 
SystemGraphicsData*)
+{
+std::unique_ptr pVD;
+assert(pGraphics);
+RunInMainThread(std::function([&]() {
+KDE5SalGraphics* pKDE5Graphics = 
dynamic_cast(pGraphics);
+assert(pKDE5Graphics);
+pVD.reset(new KDE5SalVirtualDevice(eFormat, 
pKDE5Graphics->getSurface()));
+pVD->SetSize(nDX, nDY);
+}));
+return pVD;
+}
+
 extern "C" {
 VCLPLUG_KDE5_PUBLIC SalInstance

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

2019-06-07 Thread Miklos Vajna (via logerrit)
 sd/qa/unit/uiimpress.cxx   |7 +++
 svx/source/svdraw/svddrgmt.cxx |2 +-
 svx/source/svdraw/svdedtv1.cxx |   24 
 3 files changed, 20 insertions(+), 13 deletions(-)

New commits:
commit 9870ff897f088563426bee9567dd9cb722c2b929
Author: Miklos Vajna 
AuthorDate: Fri Jun 7 17:20:34 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 23:46:25 2019 +0200

Related: tdf#111522 svx: fix crash with view1 doing textedit and 
resize/rotate

The two actually affected functions are SdrEditView::RotateMarkedObj()
and SdrDragObjOwn::EndSdrDrag(), but it looks like the other functions
in SdrEditView are safe to be changed the same way.

I expect IsUndoEnabled() can't be changed, though: that would mean there
would be no undo for the text edit itself, either.

If other actions still crash, the pattern is the same: put a breakpoint
on the SdrUndoAction constructor and see the backtrace to find the
function that calls IsUndoEnabled() without calling CanDoSdrUndo() at
the same time.

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

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 910f4a9dd0c3..2d3710faa7ed 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -93,6 +93,13 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
 // Without the accompanying fix in place, this test would have failed with 
an assertion failure
 // in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not 
nullptr.
 pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, 
SfxCallMode::SYNCHRON);
+
+// Rotate the shape in window 2 & undo.
+pView2->MarkObj(pShape2, pView2->GetSdrPageView());
+pView2->RotateMarkedObj(pShape2->GetLastBoundRect().Center(), 
/*nAngle=*/45);
+// Without the accompanying fix in place, this test would have failed with 
an assertion failure
+// in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not 
nullptr.
+pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, 
SfxCallMode::SYNCHRON);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 05d44ce6bf70..f41a7991ccec 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1366,7 +1366,7 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
 {
 std::unique_ptr pUndo;
 std::unique_ptr pUndo2;
-const bool bUndo = getSdrDragView().IsUndoEnabled();
+const bool bUndo = getSdrDragView().IsUndoEnabled() && 
getSdrDragView().CanDoSdrUndo();
 
 if( bUndo )
 {
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 66bc4c15ae69..47e05a0ad5e4 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -88,7 +88,7 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& 
rRect)
 long w1=rRect.Right()-x1;
 long h1=rRect.Bottom()-y1;
 
-const bool bUndo = IsUndoEnabled();
+const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 if( bUndo )
 BegUndo(ImpGetDescriptionString(STR_EditPosSize));
 
@@ -208,7 +208,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool 
bCopy)
 
 void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, 
const Fraction& yFact, bool bCopy)
 {
-const bool bUndo = IsUndoEnabled();
+const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 if( bUndo )
 {
 OUString aStr {ImpGetDescriptionString(STR_EditResize)};
@@ -242,7 +242,7 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
 const bool bWdh,
 const bool bHgt)
 {
-const bool bUndo = IsUndoEnabled();
+const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 if( bUndo )
 {
 BegUndo(ImpGetDescriptionString(STR_EditResize));
@@ -302,7 +302,7 @@ long SdrEditView::GetMarkedObjRotate() const
 
 void SdrEditView::RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy)
 {
-const bool bUndo = IsUndoEnabled();
+const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 if( bUndo )
 {
 OUString aStr {ImpGetDescriptionString(STR_EditRotate)};
@@ -357,7 +357,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long 
nAngle, bool bCopy)
 
 void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool 
bCopy)
 {
-const bool bUndo = IsUndoEnabled();
+const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
 if( bUndo )
 {
@@ -456,7 +456,7 @@ long SdrEditView::GetMarkedObjShear() const
 
 void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, 
bool bCopy)
 {
-const bool bUndo = IsUndoEnabled();
+const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
 if( bUndo )
 {
@@ -569,7 +569,7 @@ void 

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

2019-06-07 Thread Grzegorz Araminowicz (via logerrit)
 oox/source/export/drawingml.cxx |   18 ++
 sd/qa/unit/data/pptx/tdf125551.pptx |binary
 sd/qa/unit/export-tests-ooxml2.cxx  |   17 +
 3 files changed, 31 insertions(+), 4 deletions(-)

New commits:
commit 8aae7e4bc8dee27bc9dce3f1478777beeeb76e2f
Author: Grzegorz Araminowicz 
AuthorDate: Fri Jun 7 15:48:25 2019 +0200
Commit: Grzegorz Araminowicz 
CommitDate: Fri Jun 7 23:12:45 2019 +0200

tdf#125551 PPTX export: correct position and size of diagrams

Save position and size of diagram background instead of whole group shape.
Some diagrams contain shapes that are outside these boundaries. That caused
diagram to grow and move.

Change-Id: I909c13a5dc268f77832234b3884b91292922823c
Reviewed-on: https://gerrit.libreoffice.org/73663
Tested-by: Jenkins
Reviewed-by: Grzegorz Araminowicz 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index cd91bb12cbe0..85834a14b1b0 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -67,6 +67,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -4074,10 +4075,19 @@ void DrawingML::WriteDiagram(const 
css::uno::Reference& rX
 
 mpFS->endElementNS(XML_p, XML_nvGraphicFramePr);
 
-awt::Point aPos = rXShape->getPosition();
-awt::Size aSize = rXShape->getSize();
-WriteTransformation(tools::Rectangle(Point(aPos.X, aPos.Y), 
Size(aSize.Width, aSize.Height)),
-XML_p, false, false, 0, false);
+// store size and position of background shape instead of group shape
+// as some shapes may be outside
+css::uno::Reference xShapes(rXShape, 
uno::UNO_QUERY);
+if (xShapes.is() && xShapes->hasElements())
+{
+css::uno::Reference 
xShapeBg(xShapes->getByIndex(0),
+   uno::UNO_QUERY);
+awt::Point aPos = xShapeBg->getPosition();
+awt::Size aSize = xShapeBg->getSize();
+WriteTransformation(
+tools::Rectangle(Point(aPos.X, aPos.Y), Size(aSize.Width, 
aSize.Height)),
+XML_p, false, false, 0, false);
+}
 
 mpFS->startElementNS(XML_a, XML_graphic);
 }
diff --git a/sd/qa/unit/data/pptx/tdf125551.pptx 
b/sd/qa/unit/data/pptx/tdf125551.pptx
new file mode 100644
index ..fb7c106d20e2
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf125551.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index bc987a018af2..9c6cc27aa804 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -205,6 +205,7 @@ public:
 void testTdf125360();
 void testTdf125360_1();
 void testTdf125360_2();
+void testTdf125551();
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
 
@@ -292,6 +293,7 @@ public:
 CPPUNIT_TEST(testTdf125360);
 CPPUNIT_TEST(testTdf125360_1);
 CPPUNIT_TEST(testTdf125360_2);
+CPPUNIT_TEST(testTdf125551);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2318,6 +2320,21 @@ void SdOOXMLExportTest2::testTdf125360_2()
 xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest2::testTdf125551()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125551.pptx"), 
PPTX);
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+uno::Reference xGroupShape(getShapeFromPage(0, 0, 
xDocShRef), uno::UNO_QUERY);
+uno::Reference xShapeBg(xGroupShape->getByIndex(0), 
uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(1024), 
xShapeBg->getPosition().X);
+CPPUNIT_ASSERT_EQUAL(static_cast(576), 
xShapeBg->getPosition().Y);
+CPPUNIT_ASSERT_EQUAL(static_cast(10815), 
xShapeBg->getSize().Width);
+CPPUNIT_ASSERT_EQUAL(static_cast(8587), 
xShapeBg->getSize().Height);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - 5 commits - wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2019-06-07 Thread Michael Meeks (via logerrit)
 wsd/ClientSession.cpp  |   14 +++---
 wsd/DocumentBroker.cpp |   38 +++---
 wsd/DocumentBroker.hpp |   11 +++
 wsd/LOOLWSD.cpp|   13 -
 4 files changed, 61 insertions(+), 15 deletions(-)

New commits:
commit 61d5a3d9a06d0e7a0dcc7ac868c728a9c01a2952
Author: Michael Meeks 
AuthorDate: Wed May 22 02:38:39 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 21:26:49 2019 +0100

Avoid exceptions in some shutdown corner cases.

Change-Id: I1c301dc96d925fd5d74c00bf4b9417782822a997

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 32dbd37ca..0c5ad5020 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1850,11 +1850,14 @@ void ConvertToBroker::removeFile(const std::string 
&uriOrig)
 {
 if (!uriOrig.empty())
 {
-// Remove source file and directory
-Poco::Path path = uriOrig;
-Poco::File(path).remove();
-Poco::File(path.makeParent()).remove();
-FileUtil::removeFile(uriOrig);
+try {
+// Remove source file and directory
+Poco::Path path = uriOrig;
+Poco::File(path).remove();
+Poco::File(path.makeParent()).remove();
+} catch (const std::exception &ex) {
+LOG_ERR("Error while removing conversion temporary: '" << uriOrig 
<< "' - " << ex.what());
+}
 }
 }
 
commit db96450f370f0edd1d64af3e60272b3caa8c503d
Author: Michael Meeks 
AuthorDate: Tue May 21 19:50:17 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 21:26:33 2019 +0100

tdf#123482 - cleanup convert-to folder even more reliably.

Problems could occur if exceptiosn thrown when parsing the input stream.

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 7623c8ab3..32dbd37ca 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1843,13 +1843,18 @@ ConvertToBroker::ConvertToBroker(const std::string& uri,
 ConvertToBroker::~ConvertToBroker()
 {
 NumConverters--;
-if (!_uriOrig.empty())
+removeFile(_uriOrig);
+}
+
+void ConvertToBroker::removeFile(const std::string &uriOrig)
+{
+if (!uriOrig.empty())
 {
 // Remove source file and directory
-Poco::Path path = _uriOrig;
+Poco::Path path = uriOrig;
 Poco::File(path).remove();
 Poco::File(path.makeParent()).remove();
-FileUtil::removeFile(_uriOrig);
+FileUtil::removeFile(uriOrig);
 }
 }
 
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index adc98ee7f..fe51d7194 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -474,6 +474,9 @@ public:
 
 /// How many live conversions are running.
 static size_t getInstanceCount();
+
+/// Cleanup path and its parent
+static void removeFile(const std::string &uri);
 };
 
 #endif
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 2ab3b4af8..996f974e2 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -503,6 +503,9 @@ class ConvertToPartHandler : public PartHandler
 public:
 std::string getFilename() const { return _filename; }
 
+/// Afterwards someone else is responsible for cleaning that up.
+void takeFile() { _filename.clear(); }
+
 ConvertToPartHandler(bool convertTo = false)
 : _convertTo(convertTo)
 {
@@ -510,6 +513,11 @@ public:
 
 virtual ~ConvertToPartHandler()
 {
+if (!_filename.empty())
+{
+LOG_TRC("Remove un-handled temporary file '" << _filename << "'");
+ConvertToBroker::removeFile(_filename);
+}
 }
 
 virtual void handlePart(const MessageHeader& header, std::istream& stream) 
override
@@ -2235,6 +2243,7 @@ private:
 
 LOG_DBG("New DocumentBroker for docKey [" << docKey << 
"].");
 auto docBroker = 
std::make_shared(fromPath, uriPublic, docKey);
+handler.takeFile();
 
 cleanupDocBrokers();
 
commit 136622a82d5e547cf8836011051743d4b73d5020
Author: Michael Meeks 
AuthorDate: Tue Mar 12 15:41:54 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 21:25:05 2019 +0100

Don't count convert-to connections vs. the document count.

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 465549c27..7623c8ab3 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1825,8 +1825,24 @@ void DocumentBroker::getIOStats(uint64_t &sent, uint64_t 
&recv)
 }
 }
 
+static std::atomic NumConverters;
+
+size_t ConvertToBroker::getInstanceCount()
+{
+return NumConverters;
+}
+
+ConvertToBr

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

2019-06-07 Thread andreas kainz (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu |4 
 sc/uiconfig/scalc/ui/notebookbar.ui  |   63 
 sc/uiconfig/scalc/ui/notebookbar_compact.ui  | 4871 
--
 sd/uiconfig/sdraw/ui/notebookbar_compact.ui  |  168 
 sw/uiconfig/swriter/ui/notebookbar_compact.ui| 1017 +-
 5 files changed, 4652 insertions(+), 1471 deletions(-)

New commits:
commit 42223dc7577e18f085592ae2cc06fa4bf3362631
Author: andreas kainz 
AuthorDate: Fri Jun 7 15:32:25 2019 +0200
Commit: andreas_kainz 
CommitDate: Fri Jun 7 22:10:54 2019 +0200

notebookbar_compact update

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
index 998f0f46935b..28b38336294c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
@@ -369,7 +369,7 @@
 false
   
   
-4
+3
   
   
 notebookbar.ui
@@ -397,7 +397,7 @@
 false
   
   
-3
+4
   
   
 notebookbar_compact.ui
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index c8a230786225..5743fac0b855 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -1486,135 +1486,142 @@
 True
 False
 
-  
+  
 True
 False
 .uno:SpellDialog
   
 
 
-  
+  
 True
 False
 .uno:SpellOnline
   
 
 
-  
+  
 True
 False
 .uno:ThesaurusDialog
   
 
 
-  
+  
 True
 False
   
 
 
-  
+  
 True
 False
 .uno:SetLanguageAllTextMenu
   
 
 
-  
+  
 True
 False
   
 
 
-  
+  
 True
 False
 .uno:Hyphenate
   
 
 
-  
+  
 True
 False
 .uno:ChineseConversion
   
 
 
-  
+  
 True
 False
 .uno:HangulHanjaConversion
   
 
 
-  
+  
 True
 False
 .uno:MoreDictionaries
   
 
 
-  
+  
 True
 False
   
 
 
-  
+  
 True
 False
 .uno:TraceChangeMode
   
 
 
-  
+  
 True
 False
 .uno:AcceptChanges
   
 
 
-  
+  
 True
 False
   
 
 
-  
+  
 True
 False
 .uno:InsertAnnotation
   
 
 
-  
+  
 True
 False
 .uno:ShowAllNotes
   
 
 
-  
+  
 True
 False
+.uno:HideAllNotes
   
 
 
-  
+  
+True
+False
+  
+
+
+  
 True
 False
 .uno:Protect
   
 
 
-  
+  
 True
 False
 .uno:CompareDocuments
   
 
 
-  
+  
 True
 False
 .uno:MergeDocuments
@@ -4164,10 +4171,10 @@
   
 
 
-  
+  
 True
 False
-.uno:InsertRowsAfter
+.uno:DeleteRows
   
   
 False
@@ -4175,10 +4182,10 @@
   
 
 
-  
+  
 True
 False
-.uno:DeleteRows
+.uno:RowOperations
   
   
 False
@@ -4210,10 +4217,10 @@
   
 
 
-  
+  
 True
 False
-.uno:InsertColumnsAfter
+.uno:DeleteColumns
   
   

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

2019-06-07 Thread Regina Henschel (via logerrit)
 oox/source/drawingml/shape.cxx  |   77 ++--
 sd/qa/unit/data/pptx/tdf116350-texteffects.pptx |binary
 2 files changed, 58 insertions(+), 19 deletions(-)

New commits:
commit 95b61f7da41acaabeb0a4bf74749b8fa95ae9966
Author: Regina Henschel 
AuthorDate: Thu Jun 6 16:07:29 2019 +0200
Commit: Regina Henschel 
CommitDate: Fri Jun 7 21:52:53 2019 +0200

tdf#125563 Adapt adjustment values to binary shape geometry

All presetTextWarp shapes are mapped to MS binary WordArt geometry in
current implementation. But they use different reference systems for
coordinates and different unit for angles. So _all_ adjustment values
have to be adapted. Error was, that only angles were treated.
Correct test file to actually contain the claimed 213.25 degree.
Other bugs than adjustment values will be addressed in separate issues.

Change-Id: I719b364af23887e50f003cf9878665755b8989ae
Reviewed-on: https://gerrit.libreoffice.org/73624
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 4656c96bc111..34582aa0920d 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -454,36 +454,72 @@ static void lcl_createPresetShape(const 
uno::Reference& xShape,
 if (!xSet.is())
 return;
 
-auto aGdList = pCustomShapePropertiesPtr->getAdjustmentGuideList();
+// The DrawingML shapes from the presetTextWarpDefinitions are mapped to 
the definitions
+// in svx/../EnhancedCustomShapeGeometry.cxx, which are used for WordArt 
shapes from
+// binary MS Office. Therefore all adjustment values need to be adapted.
+auto aAdjGdList = pCustomShapePropertiesPtr->getAdjustmentGuideList();
 Sequence aAdjustment(
-!aGdList.empty() ? aGdList.size() : 1 );
+!aAdjGdList.empty() ? aAdjGdList.size() : 1 );
 
 int nIndex = 0;
-for (auto& aEntry : aGdList)
+for (auto& aEntry : aAdjGdList)
 {
-double fAngle = NormAngle36000( aEntry.maFormula.toDouble() / -600.0 );
-fAngle = 360.0 - fAngle / 100.0;
+double fValue = aEntry.maFormula.toDouble();
+// then: polar-handle, else: XY-handle
+// There exist only 8 polar-handles at all in presetTextWarp.
+if ((rClass == "fontwork-arch-down-curve")
+|| (rClass == "fontwork-arch-down-pour" && aEntry.maName == "adj1")
+|| (rClass == "fontwork-arch-up-curve")
+|| (rClass == "fontwork-arch-up-pour" && aEntry.maName == "adj1")
+|| (rClass == "fontwork-open-circle-curve")
+|| (rClass == "fontwork-open-circle-pour" && aEntry.maName == 
"adj1")
+|| (rClass == "fontwork-circle-curve")
+|| (rClass == "fontwork-circle-pour" && aEntry.maName == "adj1"))
+{
+// DrawingML has 1/6 degree unit, but WortArt simple degree. 
Range [0..360[
+// or range ]-180..180] doesn't matter, because only cos(angle) and
+// sin(angle) are used.
+fValue = NormAngle360(fValue / 6.0);
+}
+else
+{
+// DrawingML writes adjustment guides as relative value with 100% 
= 10,
+// but WordArt definitions use values absolute in viewBox 0 0 
21600 21600,
+// so scale with 21600/10 = 0.216, with two exceptions:
+// X-handles of waves describe increase/decrease relative to 
horizontal center.
+// The gdRefR of pour-shapes is not relative to viewBox but to 
radius.
+if ((rClass == "mso-spt158" && aEntry.maName == "adj2") // 
textDoubleWave1
+|| (rClass == "fontwork-wave" && aEntry.maName == "adj2") // 
textWave1
+|| (rClass == "mso-spt157" && aEntry.maName == "adj2") // 
textWave2
+|| (rClass == "mso-spt159" && aEntry.maName == "adj2")) // 
textWave4
+{
+fValue = (fValue + 5.0) * 0.216;
+}
+else if ( (rClass == "fontwork-arch-down-pour" && aEntry.maName == 
"adj2")
+|| (rClass == "fontwork-arch-up-pour" && aEntry.maName == 
"adj2")
+|| (rClass == "fontwork-open-circle-pour" && aEntry.maName 
== "adj2")
+|| (rClass == "fontwork-circle-pour" && aEntry.maName == 
"adj2"))
+{
+fValue *= 0.108;
+}
+else
+{
+fValue *= 0.216;
+}
+}
 
-aAdjustment[nIndex].Value <<= fAngle;
+aAdjustment[nIndex].Value <<= fValue;
 aAdjustment[nIndex++].State = css::beans::PropertyState_DIRECT_VALUE;
 }
 
-if (aGdList.empty())
-{
-// Default angle
-double fAngle = 0;
-if (rClass == "fontwork-arch-up-curve")
-fAngle = 180;
-
-aAdjustment[0].Value <<= fAngle;
-aAdjustment[0].State = css

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

2019-06-07 Thread Stephan Bergmann (via logerrit)
 configure.ac |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 74a088d5777fc9976747304681ead2f91c261cbf
Author: Stephan Bergmann 
AuthorDate: Fri Jun 7 15:52:54 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 7 21:29:42 2019 +0200

Don't reset PYTHON_VERSION if it was explicitly passed in

...along with PYTHON, PYTHON_CFLAGS, and PYTHON_LIBS.  (PYTHON_VERSION is
apparently set by AM_PATH_PYTHON.  When explicitly passing in PYTHON_CFLAGS 
and
PYTHON_LIBS under --enable-python=system, AM_PATH_PYTHON does not get 
called,
but PYTHON_VERSION needs to be set, so needs to be passed in explicitly.)

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

diff --git a/configure.ac b/configure.ac
index 7b86e2ed823f..e14d3b4f4d45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8365,12 +8365,16 @@ AC_SUBST(XMLLINT)
 # ./configure PYTHON=/usr/bin/python
 # =
 if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
-# This allows a lack of system python with no error, we use internal one 
in that case.
-AM_PATH_PYTHON([2.7],, [:])
-# Clean PYTHON_VERSION checked below if cross-compiling
-PYTHON_VERSION=""
-if test "$PYTHON" != ":"; then
+if test -n "$PYTHON"; then
 PYTHON_FOR_BUILD=$PYTHON
+else
+# This allows a lack of system python with no error, we use internal 
one in that case.
+AM_PATH_PYTHON([2.7],, [:])
+# Clean PYTHON_VERSION checked below if cross-compiling
+PYTHON_VERSION=""
+if test "$PYTHON" != ":"; then
+PYTHON_FOR_BUILD=$PYTHON
+fi
 fi
 fi
 AC_SUBST(PYTHON_FOR_BUILD)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/vcl vcl/source

2019-06-07 Thread Jan Holesovsky (via logerrit)
 include/vcl/aboutdialog.hxx   |3 +++
 vcl/source/app/salvtables.cxx |6 +++---
 vcl/source/window/aboutdialog.cxx |1 +
 vcl/source/window/builder.cxx |2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 8bb5da0d676cfe041dcb2ffe41a1f9cd35697510
Author: Jan Holesovsky 
AuthorDate: Thu Jun 6 17:23:26 2019 +0200
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 20:48:51 2019 +0200

android: Fix build after welding AboutDialog.

Without this, the vcl's AboutDialog conflicts with the AboutDialog from
cui during linking of liblo-native-code.so.

Change-Id: Ie6e5ddd52bb7bdee1c7d53c37ea566d7ce6c9385
Reviewed-on: https://gerrit.libreoffice.org/73613
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 
(cherry picked from commit e9660591f8997c7696a55731a9ae81d26a9d452a)
Reviewed-on: https://gerrit.libreoffice.org/73656
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/aboutdialog.hxx b/include/vcl/aboutdialog.hxx
index 4126f9519a1b..8a620a004c5a 100644
--- a/include/vcl/aboutdialog.hxx
+++ b/include/vcl/aboutdialog.hxx
@@ -17,6 +17,8 @@
 #include 
 #include 
 
+namespace vcl
+{
 class AboutDialog : public Dialog
 {
 private:
@@ -54,6 +56,7 @@ public:
 
 OUString GetWebsiteLabel() const { return m_xBuildIdLink->GetText(); }
 };
+}
 
 #endif
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 166a5133feb0..b6c5dfde1b68 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1384,9 +1384,9 @@ public:
 class SalInstanceAboutDialog : public SalInstanceDialog, public virtual 
weld::AboutDialog
 {
 private:
-VclPtr<::AboutDialog> m_xAboutDialog;
+VclPtr m_xAboutDialog;
 public:
-SalInstanceAboutDialog(::AboutDialog* pDialog, SalInstanceBuilder* 
pBuilder, bool bTakeOwnership)
+SalInstanceAboutDialog(vcl::AboutDialog* pDialog, SalInstanceBuilder* 
pBuilder, bool bTakeOwnership)
 : SalInstanceDialog(pDialog, pBuilder, bTakeOwnership)
 , m_xAboutDialog(pDialog)
 {
@@ -5082,7 +5082,7 @@ public:
 
 virtual std::unique_ptr weld_about_dialog(const OString 
&id, bool bTakeOwnership) override
 {
-AboutDialog* pAboutDialog = m_xBuilder->get(id);
+vcl::AboutDialog* pAboutDialog = m_xBuilder->get(id);
 std::unique_ptr pRet(pAboutDialog ? new 
SalInstanceAboutDialog(pAboutDialog, this, false) : nullptr);
 if (bTakeOwnership && pAboutDialog)
 {
diff --git a/vcl/source/window/aboutdialog.cxx 
b/vcl/source/window/aboutdialog.cxx
index 1a563dfd367d..b8a8aa595982 100644
--- a/vcl/source/window/aboutdialog.cxx
+++ b/vcl/source/window/aboutdialog.cxx
@@ -43,6 +43,7 @@
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star;
+using namespace vcl;
 
 AboutDialog::AboutDialog(vcl::Window* pParent, WinBits nStyle, 
Dialog::InitFlag eFlag)
 : Dialog(pParent, nStyle, eFlag)
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 61df46ffe9b7..72d7ec18a1c0 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1654,7 +1654,7 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 if (extractResizable(rMap))
 nBits |= WB_SIZEABLE;
 if (name == "GtkAboutDialog")
-xWindow = VclPtr::Create(pParent, nBits, !pParent ? 
Dialog::InitFlag::NoParent : Dialog::InitFlag::Default);
+xWindow = VclPtr::Create(pParent, nBits, 
!pParent ? Dialog::InitFlag::NoParent : Dialog::InitFlag::Default);
 else
 xWindow = VclPtr::Create(pParent, nBits, !pParent ? 
Dialog::InitFlag::NoParent : Dialog::InitFlag::Default);
 #if HAVE_FEATURE_DESKTOP
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |   51 +++-
 1 file changed, 50 insertions(+), 1 deletion(-)

New commits:
commit 5d47b7b3f6a134037f1f3d8c018505244d7be484
Author: László Németh 
AuthorDate: Thu Jun 6 14:25:32 2019 +0200
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 20:48:32 2019 +0200

sanitize LibreLogo calls

Change-Id: Ie4d9858e5b4b3e55ab08416fb9338d2df34ee5e1
Reviewed-on: https://gerrit.libreoffice.org/73627
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 1b63fa32bbd4a5b89d2ee3a53b28de4250c8dad3)
Reviewed-on: https://gerrit.libreoffice.org/73655
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index e58537b2338a..2fa16ed81822 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -145,6 +145,7 @@ __LineStyle_DOTTED__ = 2
 class __Doc__:
 def __init__(self, doc):
 self.doc = doc
+self.secure = False
 try:
 self.drawpage = doc.DrawPage # Writer
 except:
@@ -468,10 +469,58 @@ class LogoProgram(threading.Thread):
 self.code = code
 threading.Thread.__init__(self)
 
+def secure(self):
+# 0 = secure
+if _.secure:
+return 0
+
+# 1 = forms, fields or embedded objects are forbidden
+if _.doc.DrawPage.Forms.getCount() > 0 or 
_.doc.getTextFields().createEnumeration().hasMoreElements() or 
_.doc.getEmbeddedObjects().getCount() > 0:
+return 1
+
+# 2 = hyperlinks with script events
+nodes = _.doc.Text.createEnumeration()
+while nodes.hasMoreElements():
+node = nodes.nextElement()
+if node.supportsService("com.sun.star.text.Paragraph"):
+portions = node.createEnumeration()
+while portions.hasMoreElements():
+portion = portions.nextElement()
+if 
portion.PropertySetInfo.hasPropertyByName("HyperLinkEvents"):
+events = portion.getPropertyValue("HyperLinkEvents")
+for event in events.getElementNames():
+attributes = events.getByName(event)
+for attribute in attributes:
+if attribute.Name == "EventType" and 
attribute.Value == "Script":
+return 2
+
+# 2 = images with script events
+images = _.doc.DrawPage.createEnumeration()
+while images.hasMoreElements():
+image = images.nextElement()
+try:
+events = image.Events
+for event in events.getElementNames():
+attributes = events.getByName(event)
+for attribute in attributes:
+if attribute.Name == "EventType" and attribute.Value 
== "Script":
+return 2
+except:
+pass
+
+_.secure = True
+return 0
+
 def run(self):
 global __thread__
 try:
-exec(self.code)
+# check document security
+secid = self.secure()
+if secid > 0:
+parent = _.doc.CurrentController.Frame.ContainerWindow
+MessageBox(parent, "Document objects with%s script events" % 
[" possible", ""][secid-1], "LibreLogo program can't start", "errorbox")
+else:
+exec(self.code)
 if _.origcursor[0] and _.origcursor[1]:
 __dispatcher__(".uno:Escape")
 try:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Caolán McNamara (via logerrit)
 sw/source/ui/chrdlg/pardlg.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 9d42c1c67d8b356626e57bedc63d5be59444d580
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 15:29:53 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 20:47:59 2019 +0200

Resolves: tdf#125761 there is no page called 'labelTP_BACKGROUND'

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

diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 7d74c451942e..e089b4bed935 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -116,7 +116,6 @@ SwParaDlg::SwParaDlg(weld::Window *pParent,
 {
 RemoveTabPage("labelTP_NUMPARA");
 RemoveTabPage("labelTP_DROPCAPS");
-RemoveTabPage("labelTP_BACKGROUND");
 RemoveTabPage("labelTP_BORDER");
 RemoveTabPage("area");
 RemoveTabPage("transparence");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Caolán McNamara (via logerrit)
 sw/source/ui/chrdlg/pardlg.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit cb0fd00eb3356e5b8cb8aa2c68eceffd63d250bf
Author: Caolán McNamara 
AuthorDate: Fri Jun 7 15:29:53 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 20:47:44 2019 +0200

Resolves: tdf#125761 there is no page called 'labelTP_BACKGROUND'

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

diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 7d74c451942e..e089b4bed935 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -116,7 +116,6 @@ SwParaDlg::SwParaDlg(weld::Window *pParent,
 {
 RemoveTabPage("labelTP_NUMPARA");
 RemoveTabPage("labelTP_DROPCAPS");
-RemoveTabPage("labelTP_BACKGROUND");
 RemoveTabPage("labelTP_BORDER");
 RemoveTabPage("area");
 RemoveTabPage("transparence");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Miklos Vajna (via logerrit)
 sw/source/core/view/viewsh.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 802e3a960e166b24e18da04a821862620047f37f
Author: Miklos Vajna 
AuthorDate: Fri Jun 7 11:12:31 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 20:33:21 2019 +0200

tdf#117347 sw form controls: fix disappearing FixedText when editing 
TextField

This is nominally a regression from commit
af11abf3626e12d2b4b7dd9d255c6c71bf84cd4b (SwViewShell::ImplEndAction:
still paint directly when non-double-buffering, 2015-09-01), but that
just uncovered an already existing problem introduced earlier in commit
2b26c1796d0a05f47cfb01d79ee4f69344efbbb2 (tdf#92577 sw rendercontext:
paint transparent from controls conditionally, 2015-07-06).

Given that the first commit (as a side-effect) solved the problem the
second commit tried to solve, it's safe to just revert this.

(Sadly we have no way to test incremental paints with a reasonable
amount of effort, so no testcase.)

(cherry picked from commit 00dfa6dc890dbbc8140fe613599becb5e4c55486)

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

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ae1bc40512d0..66775b933a8d 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -430,8 +430,8 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
 DLPostPaint2(true);
 }
 }
-else
-lcl_PaintTransparentFormControls(*this, aRect); // 
i#107365
+
+lcl_PaintTransparentFormControls(*this, aRect); // i#107365
 }
 }
 if( bShowCursor )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Michael Meeks (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4ad994c9f2c11b9f42bdc7883847933b5947a5c3
Author: Michael Meeks 
AuthorDate: Fri Jun 7 17:16:25 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 17:16:25 2019 +0100

Fix thinko in sw unit test.

Change-Id: I6c72ce5d416151e7864e87e3b9d801a218525a16

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 42ea3754ee2f..93ff00e5eb84 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -403,7 +403,7 @@ void SwTiledRenderingTest::testGetTextSelection()
 
 SwXTextDocument* pXTextDocument = createDoc("shape-with-text.fodt");
 // No crash, just empty output for unexpected mime type.
-CPPUNIT_ASSERT_EQUAL(OString(), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(),
 "foo/bar"));
+CPPUNIT_ASSERT_EQUAL(OString(), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), 
"foo/bar"));
 
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 // Move the cursor into the first word.
@@ -412,10 +412,10 @@ void SwTiledRenderingTest::testGetTextSelection()
 pWrtShell->SelWrd();
 
 // Make sure that we selected text from the body text.
-CPPUNIT_ASSERT_EQUAL(OString("Hello"), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(),
 "text/plain;charset=utf-8"));
+CPPUNIT_ASSERT_EQUAL(OString("Hello"), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), 
"text/plain;charset=utf-8"));
 
 // Make sure we produce something for HTML.
-
CPPUNIT_ASSERT(!apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(),
 "text/html").isEmpty());
+
CPPUNIT_ASSERT(!apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(),
 "text/html").isEmpty());
 
 // Now select some shape text and check again.
 SdrPage* pPage = 
pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
@@ -426,7 +426,7 @@ void SwTiledRenderingTest::testGetTextSelection()
 EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView();
 ESelection aWordSelection(0, 0, 0, 5);
 rEditView.SetSelection(aWordSelection);
-CPPUNIT_ASSERT_EQUAL(OString("Shape"), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(),
 "text/plain;charset=utf-8"));
+CPPUNIT_ASSERT_EQUAL(OString("Shape"), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), 
"text/plain;charset=utf-8"));
 }
 
 void SwTiledRenderingTest::testSetGraphicSelection()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: Saving documents with broken zip streams (Re: minutes of ESC call ...)

2019-06-07 Thread Wols Lists
On 07/06/19 10:07, Luboš Luňák wrote:
> On Thursday 06 of June 2019, Caolán McNamara wrote:
>> On Mon, 2019-06-03 at 21:52 +0200, Luboš Luňák wrote:
>>> Any idea what to do about that? Is it really ok that we just refuse
>>> to save it? Or should we save it even though the contents may be
>>> broken?
>>
>> For what its worth those sample documents are not "realworld" user
>> documents, but the output of fuzzing engines so any non-catastrophic
>> outcome is acceptable IMO
> 
>  I have avoided the assert with https://gerrit.libreoffice.org/#/c/73646/ . 
> Given that it's (hopefully) very unlikely to find real documents with broken 
> zip internals, I find that good enough.
> 
Bear in mind I don't know the background to this ...

My immediate reaction was "we can't refuse to let the user save their
document, so could we disable 'save' and do a 'save as'?".

As for unlikely to find broken documents, it's too long ago for me to
remember the details, but I remember salvaging a broken calc document by
unzipping it and recovering the data portion. So real-world broken
documents do happen (although I think in this case it was broken such
that LO refused to open it ...)

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

[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.2' - 5 commits - Makefile.fetch sw/CppunitTest_sw_layoutwriter.mk sw/inc sw/Module_sw.mk sw/qa sw/source writerperfect/qa

2019-06-07 Thread Mark Hung (via logerrit)
 Makefile.fetch |2 
 dev/null   |binary
 sw/CppunitTest_sw_layoutwriter.mk  |   72 ++
 sw/Module_sw.mk|1 
 sw/inc/calc.hxx|1 
 sw/inc/usrfld.hxx  |   14 ++
 sw/qa/extras/layout/data/tdf106390.odt |binary
 sw/qa/extras/layout/data/user-field-type-language.fodt |   21 
 sw/qa/extras/layout/layout.cxx |   83 +
 sw/qa/extras/odfimport/odfimport.cxx   |9 -
 sw/source/core/bastyp/calc.cxx |5 +
 sw/source/core/fields/usrfld.cxx   |   31 +-
 sw/source/core/layout/pagechg.cxx  |   16 +++
 sw/source/core/layout/paintfrm.cxx |   14 ++
 14 files changed, 251 insertions(+), 18 deletions(-)

New commits:
commit 50eafa86655e0e9fe5860d68c6a75b2a363b3bad
Author: Mark Hung 
AuthorDate: Wed May 23 11:25:05 2018 +0800
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 17:58:30 2019 +0200

tdf#106390 Intersect the table borders with upper frames.

Also removes dead code because SwTabFramePainter::Insert()
is always called with a cell frame and IsTabFrame() always
returns false.

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

Conflicts:
sw/qa/extras/layout/layout.cxx
sw/source/core/layout/paintfrm.cxx

(cherry picked from commit 948283caae76fa5c42216d10519c86bcbffb6d1d)

Change-Id: I2505d876d20e44ded1faf760bc3b7b1d34b0fd8d

diff --git a/sw/qa/extras/layout/data/tdf106390.odt 
b/sw/qa/extras/layout/data/tdf106390.odt
new file mode 100755
index ..b2adf5332e34
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf106390.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 84d1e55e5a22..2baa48dea3aa 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -19,9 +19,11 @@ class SwLayoutWriter : public SwModelTestBase
 {
 public:
 void testUserFieldTypeLanguage();
+void testTdf106390();
 
 CPPUNIT_TEST_SUITE(SwLayoutWriter);
 CPPUNIT_TEST(testUserFieldTypeLanguage);
+CPPUNIT_TEST(testTdf106390);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -57,6 +59,24 @@ void SwLayoutWriter::testUserFieldTypeLanguage()
 assertXPath(pXmlDoc, "/root/page/body/txt/Special[@nType='POR_FLD']", 
"rText", "1,234.56");
 }
 
+void SwLayoutWriter::testTdf106390()
+{
+SwDoc* pDoc = createDoc("tdf106390.odt");
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocPtr pXmlDoc = dumper.dumpAndParse(*xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+sal_Int32 nBottom = getXPath(pXmlDoc, "//sectrectclipregion", 
"bottom").toInt32();
+
+// No end point of line segments shall go below the bottom of the clipping 
area.
+const OString sXPath = "//polyline/point[@y>" + OString::number(nBottom) + 
"]";
+
+assertXPath(pXmlDoc, sXPath, 0);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index b973507a21ea..3145da01039a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2960,10 +2960,16 @@ void SwTabFramePainter::Insert( const SwFrame& rFrame, 
const SvxBoxItem& rBoxIte
 {
 // build 4 line entries for the 4 borders:
 SwRect aBorderRect = rFrame.Frame();
-if ( rFrame.IsTabFrame() )
-{
-aBorderRect = rFrame.Prt();
-aBorderRect.Pos() += rFrame.Frame().Pos();
+// Frame area of a table might be larger than the containing frame
+// so we have to intersect the border rect with upper frames til
+// the first frame that is not part of a table.
+const SwLayoutFrame *pUpper = rFrame.GetUpper();
+while(pUpper)
+{
+aBorderRect.Intersection(pUpper->Frame());
+if (!pUpper->IsInTab())
+break;
+pUpper = pUpper->GetUpper();
 }
 
 bool const 
bBottomAsTop(lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
commit e87f6c248a939c27d7023e752a16c3c278aa922b
Author: Miklos Vajna 
AuthorDate: Thu Aug 2 17:53:06 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 15:40:27 2019 +0200

sw user field type: fix locale of string -> float conversion

The key part is the SwUserFieldType::GetValue() hunk, the field type has
to always use the same locale, which means if we get an SwCalc reference
that works with the document or 

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

2019-06-07 Thread Mike Kaganski (via logerrit)
 sw/source/core/text/atrhndl.hxx |   10 +-
 sw/source/core/text/atrstck.cxx |   14 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 2d5821ceacf399ec9267a3704ee0b2cc8a598f04
Author: Mike Kaganski 
AuthorDate: Fri Jun 7 21:02:19 2019 +1000
Commit: Mike Kaganski 
CommitDate: Fri Jun 7 16:28:55 2019 +0200

tdf#125624: this bugdoc overflows sal_uInt16

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

diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index f12bd76a34b1..81a141327e30 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -47,8 +47,8 @@ private:
 private:
 SwTextAttr*  m_pInitialArray[ INITIAL_NUM_ATTR ];
 SwTextAttr** m_pArray;
-sal_uInt16 m_nCount; // number of elements on stack
-sal_uInt16 m_nSize;  // number of positions in Array
+sal_uInt32 m_nCount; // number of elements on stack
+sal_uInt32 m_nSize;  // number of positions in Array
 
 public:
 // Ctor, Dtor
@@ -64,7 +64,7 @@ private:
 void Push( const SwTextAttr& rAttr ) { Insert(rAttr, m_nCount); };
 // insert at specified position, take care for not inserting behind
 // the value returned by Count()
-void Insert( const SwTextAttr& rAttr, const sal_uInt16 nPos );
+void Insert( const SwTextAttr& rAttr, const sal_uInt32 nPos );
 
 // remove specified attribute
 void Remove( const SwTextAttr& rAttr );
@@ -73,11 +73,11 @@ private:
 const SwTextAttr* Top() const;
 
 // number of elements on stack
-sal_uInt16 Count() const { return m_nCount; };
+sal_uInt32 Count() const { return m_nCount; };
 
 // returns position of rAttr on Stack if found, otherwise USHRT_MAX
 // can be used for Remove of an attribute
-sal_uInt16 Pos( const SwTextAttr& rAttr ) const;
+sal_uInt32 Pos( const SwTextAttr& rAttr ) const;
 };
 
 SwAttrStack m_aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 9130208cc7c2..eb2762fffb40 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -270,7 +270,7 @@ inline SwAttrHandler::SwAttrStack::SwAttrStack()
 m_pArray = m_pInitialArray;
 }
 
-void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const 
sal_uInt16 nPos )
+void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const 
sal_uInt32 nPos )
 {
 // do we still have enough space?
 if (m_nCount >= m_nSize)
@@ -311,7 +311,7 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& 
rAttr, const sal_uInt
 
 void SwAttrHandler::SwAttrStack::Remove( const SwTextAttr& rAttr )
 {
-sal_uInt16 nPos = Pos( rAttr );
+sal_uInt32 nPos = Pos( rAttr );
 if (nPos < m_nCount)
 {
 memmove( m_pArray + nPos, m_pArray + nPos + 1,
@@ -326,20 +326,20 @@ const SwTextAttr* SwAttrHandler::SwAttrStack::Top() const
 return m_nCount ? m_pArray[ m_nCount - 1 ] : nullptr;
 }
 
-sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
+sal_uInt32 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
 {
 if ( ! m_nCount )
 // empty stack
-return USHRT_MAX;
+return std::numeric_limits::max();
 
-for (sal_uInt16 nIdx = m_nCount; nIdx > 0;)
+for (sal_uInt32 nIdx = m_nCount; nIdx > 0;)
 {
 if (&rAttr == m_pArray[ --nIdx ])
 return nIdx;
 }
 
 // element not found
-return USHRT_MAX;
+return std::numeric_limits::max();
 }
 
 SwAttrHandler::SwAttrHandler()
@@ -487,7 +487,7 @@ bool SwAttrHandler::Push( const SwTextAttr& rAttr, const 
SfxPoolItem& rItem )
 return true;
 }
 
-const sal_uInt16 nPos = m_aAttrStack[ nStack ].Count();
+const sal_uInt32 nPos = m_aAttrStack[ nStack ].Count();
 OSL_ENSURE( nPos, "empty stack?" );
 m_aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/inc vcl/qt5

2019-06-07 Thread Jan-Marek Glogowski (via logerrit)
 vcl/inc/qt5/Qt5Widget.hxx   |5 ++
 vcl/qt5/Qt5AccessibleWidget.cxx |2 -
 vcl/qt5/Qt5Widget.cxx   |   79 +++-
 3 files changed, 43 insertions(+), 43 deletions(-)

New commits:
commit 019c3f7b55ef40e5ad704e49f7538c5efe469caf
Author: Jan-Marek Glogowski 
AuthorDate: Sun May 5 23:22:09 2019 +
Commit: Michael Weghorn 
CommitDate: Fri Jun 7 16:27:54 2019 +0200

Qt5 make Qt5Widdget's frame a private reference

Kind of a regression from commit 4d382636b0b1 ("qt5: Add basic
a11y support"), which made it public for a single call.

Change-Id: I631a861a98388223770cfca2704c3ddee6a0a8a0
Reviewed-on: https://gerrit.libreoffice.org/71836
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 8c71d28069acffa2d4590a4acf95a98d1415b563)
Reviewed-on: https://gerrit.libreoffice.org/73650
Reviewed-by: Michael Weghorn 

diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index d96afa64aeb0..30998a8a1c6d 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -42,6 +42,8 @@ class Qt5Widget : public QWidget
 {
 Q_OBJECT
 
+Qt5Frame& m_rFrame;
+
 bool handleKeyEvent(QKeyEvent*, bool);
 void handleMouseButtonEvent(QMouseEvent*, bool);
 
@@ -71,7 +73,8 @@ public slots:
 
 public:
 Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f = Qt::WindowFlags());
-Qt5Frame* m_pFrame;
+
+Qt5Frame& getFrame() const { return m_rFrame; }
 void startDrag(sal_Int8 nSourceActions);
 };
 
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index e2cc0a31765c..9757eab27837 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -718,7 +718,7 @@ QAccessibleInterface* 
Qt5AccessibleWidget::customFactory(const QString& classnam
 if (classname == QLatin1String("Qt5Widget") && object && 
object->isWidgetType())
 {
 Qt5Widget* pWidget = static_cast(object);
-vcl::Window* pWindow = pWidget->m_pFrame->GetWindow();
+vcl::Window* pWindow = pWidget->getFrame().GetWindow();
 
 if (pWindow)
 return new Qt5AccessibleWidget(pWindow->GetAccessible());
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 62d02e58565d..2137109beac7 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -47,12 +47,12 @@
 void Qt5Widget::paintEvent(QPaintEvent* pEvent)
 {
 QPainter p(this);
-if (!m_pFrame->m_bNullRegion)
-p.setClipRegion(m_pFrame->m_aRegion);
+if (!m_rFrame.m_bNullRegion)
+p.setClipRegion(m_rFrame.m_aRegion);
 
-if (m_pFrame->m_bUseCairo)
+if (m_rFrame.m_bUseCairo)
 {
-cairo_surface_t* pSurface = m_pFrame->m_pSurface.get();
+cairo_surface_t* pSurface = m_rFrame.m_pSurface.get();
 cairo_surface_flush(pSurface);
 
 QImage aImage(cairo_image_surface_get_data(pSurface), size().width(), 
size().height(),
@@ -60,55 +60,55 @@ void Qt5Widget::paintEvent(QPaintEvent* pEvent)
 p.drawImage(pEvent->rect().topLeft(), aImage, pEvent->rect());
 }
 else
-p.drawImage(pEvent->rect().topLeft(), *m_pFrame->m_pQImage, 
pEvent->rect());
+p.drawImage(pEvent->rect().topLeft(), *m_rFrame.m_pQImage, 
pEvent->rect());
 }
 
 void Qt5Widget::resizeEvent(QResizeEvent* pEvent)
 {
-if (m_pFrame->m_bUseCairo)
+if (m_rFrame.m_bUseCairo)
 {
 int width = size().width();
 int height = size().height();
 
-if (m_pFrame->m_pSvpGraphics)
+if (m_rFrame.m_pSvpGraphics)
 {
 cairo_surface_t* pSurface
 = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, 
height);
 cairo_surface_set_user_data(pSurface, 
SvpSalGraphics::getDamageKey(),
-&m_pFrame->m_aDamageHandler, nullptr);
-m_pFrame->m_pSvpGraphics->setSurface(pSurface, 
basegfx::B2IVector(width, height));
-UniqueCairoSurface old_surface(m_pFrame->m_pSurface.release());
-m_pFrame->m_pSurface.reset(pSurface);
+&m_rFrame.m_aDamageHandler, nullptr);
+m_rFrame.m_pSvpGraphics->setSurface(pSurface, 
basegfx::B2IVector(width, height));
+UniqueCairoSurface old_surface(m_rFrame.m_pSurface.release());
+m_rFrame.m_pSurface.reset(pSurface);
 
 int min_width = qMin(pEvent->oldSize().width(), 
pEvent->size().width());
 int min_height = qMin(pEvent->oldSize().height(), 
pEvent->size().height());
 
 SalTwoRect rect(0, 0, min_width, min_height, 0, 0, min_width, 
min_height);
 
-m_pFrame->m_pSvpGraphics->copySource(rect, old_surface.get());
+m_rFrame.m_pSvpGraphics->copySource(rect, old_surface.get());
 }
 }
 else
 {
 QImage* pImage = nullptr;
 
-if (m_pFrame->m_pQImage)
+if (m_rFrame.m_pQImage)
 pI

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

2019-06-07 Thread Noel Grandin (via logerrit)
 vcl/source/control/button.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e51aa80ea31cd4494bc4259b0faf8aeaff2e0287
Author: Noel Grandin 
AuthorDate: Fri Jun 7 14:14:21 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 7 16:23:00 2019 +0200

fix assert in make screenshot

after
commit a46a257794f1f53b294735fc876c394be23a3811
Date:   Wed Jun 5 15:24:04 2019 +0200
improve empty tools::Rectangle (width)

Change-Id: I496d92712aa7627f7d6932d7d01f70a68a1ee781
Reviewed-on: https://gerrit.libreoffice.org/73657
Reviewed-by: Stephan Bergmann 
Tested-by: Noel Grandin 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 864214b66e43..4c954b4fe6d1 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -805,7 +805,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* 
pDev, DrawFlags nDrawFl
 DrawSymbolFlags nStyle;
 
 if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
-aInRect.SetEmpty();
+return; // nothing to do
 
 pDev->Push( PushFlags::CLIPREGION );
 pDev->IntersectClipRegion( aInRect );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - desktop/source include/test include/vcl sc/inc sc/qa sc/source sd/qa sd/source sw/inc sw/qa sw/source test/Library_test.mk test/sourc

2019-06-07 Thread Michael Meeks (via logerrit)
 desktop/source/lib/init.cxx|   96 +++--
 include/test/helper/transferable.hxx   |   30 +++
 include/vcl/ITiledRenderable.hxx   |7 -
 sc/inc/docuno.hxx  |4 -
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   18 ++--
 sc/source/ui/unoobj/docuno.cxx |   61 ---
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   12 +--
 sd/source/ui/inc/ViewShell.hxx |4 -
 sd/source/ui/inc/unomodel.hxx  |4 -
 sd/source/ui/unoidl/unomodel.cxx   |6 -
 sd/source/ui/view/viewshel.cxx |   53 +
 sw/inc/unotxdoc.hxx|4 -
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   10 +-
 sw/source/uibase/uno/unotxdoc.cxx  |   47 
 test/Library_test.mk   |1 
 test/source/helper/transferable.cxx|   87 ++
 16 files changed, 247 insertions(+), 197 deletions(-)

New commits:
commit 6804b001d4255a38f680182099c6d23d7e53a976
Author: Michael Meeks 
AuthorDate: Thu Jun 6 22:20:33 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 12:44:44 2019 +0100

lok: re-factor getTextSelection.

Change-Id: I2c27c213ee980e19d6020e9599b2b72115e7f28e

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2bafd7dc62e4..4ab1f67d7e68 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -76,6 +76,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3366,6 +3367,71 @@ static void doc_setTextSelection(LibreOfficeKitDocument* 
pThis, int nType, int n
 pDoc->setTextSelection(nType, nX, nY);
 }
 
+static bool getFromTransferrable(
+const css::uno::Reference &xTransferable,
+const char *pMimeType, OString &aRet)
+{
+// Take care of UTF-8 text here.
+OString aMimeType(pMimeType);
+bool bConvert = false;
+sal_Int32 nIndex = 0;
+if (aMimeType.getToken(0, ';', nIndex) == "text/plain")
+{
+if (aMimeType.getToken(0, ';', nIndex) == "charset=utf-8")
+{
+aMimeType = "text/plain;charset=utf-16";
+bConvert = true;
+}
+}
+
+datatransfer::DataFlavor aFlavor;
+aFlavor.MimeType = OUString::fromUtf8(aMimeType.getStr());
+if (aMimeType == "text/plain;charset=utf-16")
+aFlavor.DataType = cppu::UnoType::get();
+else
+aFlavor.DataType = cppu::UnoType< uno::Sequence >::get();
+
+if (!xTransferable->isDataFlavorSupported(aFlavor))
+{
+SetLastExceptionMsg("Flavor " + aFlavor.MimeType + " is not 
supported");
+return false;
+}
+
+uno::Any aAny;
+try
+{
+aAny = xTransferable->getTransferData(aFlavor);
+}
+catch (const css::datatransfer::UnsupportedFlavorException& e)
+{
+SetLastExceptionMsg("Unsupported flavor " + aFlavor.MimeType + " 
exception " + e.Message);
+return false;
+}
+catch (const css::uno::Exception& e)
+{
+SetLastExceptionMsg("Exception getting " + aFlavor.MimeType + " 
exception " + e.Message);
+return false;
+}
+
+if (aFlavor.DataType == cppu::UnoType::get())
+{
+OUString aString;
+aAny >>= aString;
+if (bConvert)
+aRet = OUStringToOString(aString, RTL_TEXTENCODING_UTF8);
+else
+aRet = OString(reinterpret_cast(aString.getStr()), aString.getLength() * sizeof(sal_Unicode));
+}
+else
+{
+uno::Sequence aSequence;
+aAny >>= aSequence;
+aRet = OString(reinterpret_cast(aSequence.getArray()), 
aSequence.getLength());
+}
+
+return true;;
+}
+
 static char* doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* 
pMimeType, char** pUsedMimeType)
 {
 comphelper::ProfileZone aZone("doc_getTextSelection");
@@ -3380,18 +3446,34 @@ static char* 
doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* pMi
 return nullptr;
 }
 
-OString aUsedMimeType;
-OString aRet = pDoc->getTextSelection(pMimeType, aUsedMimeType);
-if (aUsedMimeType.isEmpty())
-aRet = pDoc->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+css::uno::Reference xTransferable = 
pDoc->getSelection();
+if (!xTransferable)
+{
+SetLastExceptionMsg("No selection available");
+return nullptr;
+}
+
+const char *pType = pMimeType;
+if (!pType || pType[0] == '\0')
+pType = "text/plain;charset=utf-8";
+
+OString aRet;
+bool bSuccess = getFromTransferrable(xTransferable, pType, aRet);
+if (!bSuccess)
+return nullptr;
 
 char* pMemory = static_cast(malloc(aRet.getLength() + 1));
 strcpy(pMemory, aRet.getStr());
 
-if (pUsedMimeType)
+if (pUsedMimeType) // legacy
 {
-*pUsedMimeType = static_cast(malloc(aUsedMimeType.getLength() + 
1

[Libreoffice-commits] core.git: desktop/source include/test include/vcl sc/inc sc/qa sc/source sd/qa sd/source sw/inc sw/qa sw/source test/Library_test.mk test/source

2019-06-07 Thread Michael Meeks (via logerrit)
 desktop/source/lib/init.cxx|   96 +++--
 include/test/helper/transferable.hxx   |   30 +++
 include/vcl/ITiledRenderable.hxx   |7 -
 sc/inc/docuno.hxx  |4 -
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   19 ++--
 sc/source/ui/unoobj/docuno.cxx |   61 ---
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   12 +--
 sd/source/ui/inc/ViewShell.hxx |4 -
 sd/source/ui/inc/unomodel.hxx  |4 -
 sd/source/ui/unoidl/unomodel.cxx   |6 -
 sd/source/ui/view/viewshel.cxx |   53 +
 sw/inc/unotxdoc.hxx|4 -
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   10 +-
 sw/source/uibase/uno/unotxdoc.cxx  |   47 
 test/Library_test.mk   |1 
 test/source/helper/transferable.cxx|   87 ++
 16 files changed, 248 insertions(+), 197 deletions(-)

New commits:
commit 03d33ba9410433d2072364b3afb9dbd6b19c4d0d
Author: Michael Meeks 
AuthorDate: Thu Jun 6 17:45:24 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 15:42:05 2019 +0200

lok: re-factor getTextSelection.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index da37be0570a9..7c1a9533b073 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -77,6 +77,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3248,6 +3249,71 @@ static void doc_setTextSelection(LibreOfficeKitDocument* 
pThis, int nType, int n
 pDoc->setTextSelection(nType, nX, nY);
 }
 
+static bool getFromTransferrable(
+const css::uno::Reference &xTransferable,
+const char *pMimeType, OString &aRet)
+{
+// Take care of UTF-8 text here.
+OString aMimeType(pMimeType);
+bool bConvert = false;
+sal_Int32 nIndex = 0;
+if (aMimeType.getToken(0, ';', nIndex) == "text/plain")
+{
+if (aMimeType.getToken(0, ';', nIndex) == "charset=utf-8")
+{
+aMimeType = "text/plain;charset=utf-16";
+bConvert = true;
+}
+}
+
+datatransfer::DataFlavor aFlavor;
+aFlavor.MimeType = OUString::fromUtf8(aMimeType.getStr());
+if (aMimeType == "text/plain;charset=utf-16")
+aFlavor.DataType = cppu::UnoType::get();
+else
+aFlavor.DataType = cppu::UnoType< uno::Sequence >::get();
+
+if (!xTransferable->isDataFlavorSupported(aFlavor))
+{
+SetLastExceptionMsg("Flavor " + aFlavor.MimeType + " is not 
supported");
+return false;
+}
+
+uno::Any aAny;
+try
+{
+aAny = xTransferable->getTransferData(aFlavor);
+}
+catch (const css::datatransfer::UnsupportedFlavorException& e)
+{
+SetLastExceptionMsg("Unsupported flavor " + aFlavor.MimeType + " 
exception " + e.Message);
+return false;
+}
+catch (const css::uno::Exception& e)
+{
+SetLastExceptionMsg("Exception getting " + aFlavor.MimeType + " 
exception " + e.Message);
+return false;
+}
+
+if (aFlavor.DataType == cppu::UnoType::get())
+{
+OUString aString;
+aAny >>= aString;
+if (bConvert)
+aRet = OUStringToOString(aString, RTL_TEXTENCODING_UTF8);
+else
+aRet = OString(reinterpret_cast(aString.getStr()), aString.getLength() * sizeof(sal_Unicode));
+}
+else
+{
+uno::Sequence aSequence;
+aAny >>= aSequence;
+aRet = OString(reinterpret_cast(aSequence.getArray()), 
aSequence.getLength());
+}
+
+return true;;
+}
+
 static char* doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* 
pMimeType, char** pUsedMimeType)
 {
 comphelper::ProfileZone aZone("doc_getTextSelection");
@@ -3262,19 +3328,35 @@ static char* 
doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* pMi
 return nullptr;
 }
 
-OString aUsedMimeType;
-OString aRet = pDoc->getTextSelection(pMimeType, aUsedMimeType);
-if (aUsedMimeType.isEmpty())
-aRet = pDoc->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+css::uno::Reference xTransferable = 
pDoc->getSelection();
+if (!xTransferable)
+{
+SetLastExceptionMsg("No selection available");
+return nullptr;
+}
+
+const char *pType = pMimeType;
+if (!pType || pType[0] == '\0')
+pType = "text/plain;charset=utf-8";
+
+OString aRet;
+bool bSuccess = getFromTransferrable(xTransferable, pType, aRet);
+if (!bSuccess)
+return nullptr;
 
 char* pMemory = static_cast(malloc(aRet.getLength() + 1));
 assert(pMemory); // Don't handle OOM conditions
 strcpy(pMemo

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/source

2019-06-07 Thread Caolán McNamara (via logerrit)
 vcl/source/window/dlgctrl.cxx |1 -
 vcl/source/window/legacyaccessibility.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 50b1d8d8fe931774d5359675951fdfb9865dc8fc
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 09:44:59 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 14:51:56 2019 +0200

drop some unneeded includes

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

diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 4394513ef4eb..dbbe5641d272 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/vcl/source/window/legacyaccessibility.cxx 
b/vcl/source/window/legacyaccessibility.cxx
index b2b3e0634c6e..11914595fb4c 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Miklos Vajna (via logerrit)
 sw/source/core/view/viewsh.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 00dfa6dc890dbbc8140fe613599becb5e4c55486
Author: Miklos Vajna 
AuthorDate: Fri Jun 7 11:12:31 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 14:17:10 2019 +0200

tdf#117347 sw form controls: fix disappearing FixedText when editing 
TextField

This is nominally a regression from commit
af11abf3626e12d2b4b7dd9d255c6c71bf84cd4b (SwViewShell::ImplEndAction:
still paint directly when non-double-buffering, 2015-09-01), but that
just uncovered an already existing problem introduced earlier in commit
2b26c1796d0a05f47cfb01d79ee4f69344efbbb2 (tdf#92577 sw rendercontext:
paint transparent from controls conditionally, 2015-07-06).

Given that the first commit (as a side-effect) solved the problem the
second commit tried to solve, it's safe to just revert this.

(Sadly we have no way to test incremental paints with a reasonable
amount of effort, so no testcase.)

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

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ae1bc40512d0..66775b933a8d 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -430,8 +430,8 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
 DLPostPaint2(true);
 }
 }
-else
-lcl_PaintTransparentFormControls(*this, aRect); // 
i#107365
+
+lcl_PaintTransparentFormControls(*this, aRect); // i#107365
 }
 }
 if( bShowCursor )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Jan Holesovsky (via logerrit)
 include/vcl/aboutdialog.hxx   |3 +++
 vcl/source/app/salvtables.cxx |6 +++---
 vcl/source/window/aboutdialog.cxx |1 +
 vcl/source/window/builder.cxx |2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit e9660591f8997c7696a55731a9ae81d26a9d452a
Author: Jan Holesovsky 
AuthorDate: Thu Jun 6 17:23:26 2019 +0200
Commit: Jan Holesovsky 
CommitDate: Fri Jun 7 13:41:05 2019 +0200

android: Fix build after welding AboutDialog.

Without this, the vcl's AboutDialog conflicts with the AboutDialog from
cui during linking of liblo-native-code.so.

Change-Id: Ie6e5ddd52bb7bdee1c7d53c37ea566d7ce6c9385
Reviewed-on: https://gerrit.libreoffice.org/73613
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/include/vcl/aboutdialog.hxx b/include/vcl/aboutdialog.hxx
index 4126f9519a1b..8a620a004c5a 100644
--- a/include/vcl/aboutdialog.hxx
+++ b/include/vcl/aboutdialog.hxx
@@ -17,6 +17,8 @@
 #include 
 #include 
 
+namespace vcl
+{
 class AboutDialog : public Dialog
 {
 private:
@@ -54,6 +56,7 @@ public:
 
 OUString GetWebsiteLabel() const { return m_xBuildIdLink->GetText(); }
 };
+}
 
 #endif
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 166a5133feb0..b6c5dfde1b68 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1384,9 +1384,9 @@ public:
 class SalInstanceAboutDialog : public SalInstanceDialog, public virtual 
weld::AboutDialog
 {
 private:
-VclPtr<::AboutDialog> m_xAboutDialog;
+VclPtr m_xAboutDialog;
 public:
-SalInstanceAboutDialog(::AboutDialog* pDialog, SalInstanceBuilder* 
pBuilder, bool bTakeOwnership)
+SalInstanceAboutDialog(vcl::AboutDialog* pDialog, SalInstanceBuilder* 
pBuilder, bool bTakeOwnership)
 : SalInstanceDialog(pDialog, pBuilder, bTakeOwnership)
 , m_xAboutDialog(pDialog)
 {
@@ -5082,7 +5082,7 @@ public:
 
 virtual std::unique_ptr weld_about_dialog(const OString 
&id, bool bTakeOwnership) override
 {
-AboutDialog* pAboutDialog = m_xBuilder->get(id);
+vcl::AboutDialog* pAboutDialog = m_xBuilder->get(id);
 std::unique_ptr pRet(pAboutDialog ? new 
SalInstanceAboutDialog(pAboutDialog, this, false) : nullptr);
 if (bTakeOwnership && pAboutDialog)
 {
diff --git a/vcl/source/window/aboutdialog.cxx 
b/vcl/source/window/aboutdialog.cxx
index 1a563dfd367d..b8a8aa595982 100644
--- a/vcl/source/window/aboutdialog.cxx
+++ b/vcl/source/window/aboutdialog.cxx
@@ -43,6 +43,7 @@
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star;
+using namespace vcl;
 
 AboutDialog::AboutDialog(vcl::Window* pParent, WinBits nStyle, 
Dialog::InitFlag eFlag)
 : Dialog(pParent, nStyle, eFlag)
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 61df46ffe9b7..72d7ec18a1c0 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1654,7 +1654,7 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 if (extractResizable(rMap))
 nBits |= WB_SIZEABLE;
 if (name == "GtkAboutDialog")
-xWindow = VclPtr::Create(pParent, nBits, !pParent ? 
Dialog::InitFlag::NoParent : Dialog::InitFlag::Default);
+xWindow = VclPtr::Create(pParent, nBits, 
!pParent ? Dialog::InitFlag::NoParent : Dialog::InitFlag::Default);
 else
 xWindow = VclPtr::Create(pParent, nBits, !pParent ? 
Dialog::InitFlag::NoParent : Dialog::InitFlag::Default);
 #if HAVE_FEATURE_DESKTOP
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - librelogo/source

2019-06-07 Thread László Németh (via logerrit)
 librelogo/source/LibreLogo/LibreLogo.py |   51 +++-
 1 file changed, 50 insertions(+), 1 deletion(-)

New commits:
commit d9fdf2033148a6a15a43d05c799b181f1ed3b989
Author: László Németh 
AuthorDate: Thu Jun 6 14:25:32 2019 +0200
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 13:40:39 2019 +0200

sanitize LibreLogo calls

Change-Id: Ie4d9858e5b4b3e55ab08416fb9338d2df34ee5e1
Reviewed-on: https://gerrit.libreoffice.org/73627
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 1b63fa32bbd4a5b89d2ee3a53b28de4250c8dad3)
Reviewed-on: https://gerrit.libreoffice.org/73638
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/librelogo/source/LibreLogo/LibreLogo.py 
b/librelogo/source/LibreLogo/LibreLogo.py
index e58537b2338a..2fa16ed81822 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -145,6 +145,7 @@ __LineStyle_DOTTED__ = 2
 class __Doc__:
 def __init__(self, doc):
 self.doc = doc
+self.secure = False
 try:
 self.drawpage = doc.DrawPage # Writer
 except:
@@ -468,10 +469,58 @@ class LogoProgram(threading.Thread):
 self.code = code
 threading.Thread.__init__(self)
 
+def secure(self):
+# 0 = secure
+if _.secure:
+return 0
+
+# 1 = forms, fields or embedded objects are forbidden
+if _.doc.DrawPage.Forms.getCount() > 0 or 
_.doc.getTextFields().createEnumeration().hasMoreElements() or 
_.doc.getEmbeddedObjects().getCount() > 0:
+return 1
+
+# 2 = hyperlinks with script events
+nodes = _.doc.Text.createEnumeration()
+while nodes.hasMoreElements():
+node = nodes.nextElement()
+if node.supportsService("com.sun.star.text.Paragraph"):
+portions = node.createEnumeration()
+while portions.hasMoreElements():
+portion = portions.nextElement()
+if 
portion.PropertySetInfo.hasPropertyByName("HyperLinkEvents"):
+events = portion.getPropertyValue("HyperLinkEvents")
+for event in events.getElementNames():
+attributes = events.getByName(event)
+for attribute in attributes:
+if attribute.Name == "EventType" and 
attribute.Value == "Script":
+return 2
+
+# 2 = images with script events
+images = _.doc.DrawPage.createEnumeration()
+while images.hasMoreElements():
+image = images.nextElement()
+try:
+events = image.Events
+for event in events.getElementNames():
+attributes = events.getByName(event)
+for attribute in attributes:
+if attribute.Name == "EventType" and attribute.Value 
== "Script":
+return 2
+except:
+pass
+
+_.secure = True
+return 0
+
 def run(self):
 global __thread__
 try:
-exec(self.code)
+# check document security
+secid = self.secure()
+if secid > 0:
+parent = _.doc.CurrentController.Frame.ContainerWindow
+MessageBox(parent, "Document objects with%s script events" % 
[" possible", ""][secid-1], "LibreLogo program can't start", "errorbox")
+else:
+exec(self.code)
 if _.origcursor[0] and _.origcursor[1]:
 __dispatcher__(".uno:Escape")
 try:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: android/app

2019-06-07 Thread Jan Holesovsky (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
 |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e0a5b522e34fd34da3f2c274bf5e5502dea1
Author: Jan Holesovsky 
AuthorDate: Thu Jun 6 22:12:26 2019 +0200
Commit: Jan Holesovsky 
CommitDate: Fri Jun 7 12:58:25 2019 +0200

android: Create the handler on demand.

Somehow I've seen situation when the activity tried to read it before it
was even initialized...

Change-Id: Iafa2f5bebfb7005db9d38bd4832f2027373cd950

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
index 8ae751e6f..22594f665 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
@@ -18,10 +18,12 @@ public class LibreOfficeApplication extends Application {
 private static Handler mainHandler;
 
 public LibreOfficeApplication() {
-mainHandler = new Handler();
 }
 
 public static Handler getMainHandler() {
+if (mainHandler == null)
+mainHandler = new Handler();
+
 return mainHandler;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - reportdesign/inc

2019-06-07 Thread Caolán McNamara (via logerrit)
 reportdesign/inc/pch/precompiled_rptui.hxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 0bab1d4e9c5c84685c6547b7cf05b624da0ba059
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 09:43:10 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 12:40:58 2019 +0200

update precompiled_rptui.hxx

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

diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx 
b/reportdesign/inc/pch/precompiled_rptui.hxx
index 85690c15e6bc..0c85969347da 100644
--- a/reportdesign/inc/pch/precompiled_rptui.hxx
+++ b/reportdesign/inc/pch/precompiled_rptui.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2019-05-12 16:57:00 using:
+ Generated on 2019-06-06 09:42:49 using:
  ./bin/update_pch reportdesign rptui --cutoff=4 --exclude:system 
--include:module --include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -46,7 +46,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -100,7 +99,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -108,7 +106,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -151,12 +148,9 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -378,14 +372,12 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Caolán McNamara (via logerrit)
 vcl/source/window/dlgctrl.cxx |1 -
 vcl/source/window/legacyaccessibility.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit b1ffd72e32530951f56bc5a36932a32bd7b6cf18
Author: Caolán McNamara 
AuthorDate: Thu Jun 6 09:44:59 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 7 12:40:41 2019 +0200

drop some unneeded includes

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

diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 4394513ef4eb..dbbe5641d272 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/vcl/source/window/legacyaccessibility.cxx 
b/vcl/source/window/legacyaccessibility.cxx
index b2b3e0634c6e..11914595fb4c 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Szymon Kłos (via logerrit)
 loleaflet/src/layer/AnnotationManager.js |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 6108fabea34ac83e81f8aff853b9cbc5cc1faf0b
Author: Szymon Kłos 
AuthorDate: Fri Jun 7 12:19:36 2019 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jun 7 12:20:38 2019 +0200

Multiple annotations switching active class

Change-Id: I54ab4660842b069d5198a7b4933d46e3078484f1
Reviewed-on: https://gerrit.libreoffice.org/73652
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index a4a4d2754..eba39f4ef 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -243,8 +243,9 @@ L.AnnotationManager = L.Class.extend({
 
unselect: function () {
if (this._selected) {
-   if 
($(this._selected._container).hasClass('annotation-active'))
+   if (this._selected && 
$(this._selected._container).hasClass('annotation-active'))

$(this._selected._container).removeClass('annotation-active');
+
this._selected = null;
this.update();
}
@@ -254,9 +255,15 @@ L.AnnotationManager = L.Class.extend({
if (annotation) {
// Select the root comment
var idx = this.getRootIndexOf(annotation._data.id);
+
+   if (this._selected && 
$(this._selected._container).hasClass('annotation-active'))
+   
$(this._selected._container).removeClass('annotation-active');
+
this._selected = this._items[idx];
-   if 
(!$(this._selected._container).hasClass('annotation-active'))
+
+   if (this._selected && 
!$(this._selected._container).hasClass('annotation-active'))

$(this._selected._container).addClass('annotation-active');
+
this.update();
}
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Patrick Jaap (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf125324.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |7 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |6 ++
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit a62583681703f28bb421da26e343fd0be9f8fe50
Author: Patrick Jaap 
AuthorDate: Mon Jun 3 17:27:03 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 11:48:35 2019 +0200

tdf#125324 table export: do not ignore default values

It seems like Writer default values for table positioning
differ from OOXML spec. if nothing is given.
So write them anyway during export.

Change-Id: If5bf77de71b457a826be8f1559212e7d06c5237c
Reviewed-on: https://gerrit.libreoffice.org/73402
Tested-by: Jenkins
Reviewed-by: Patrick Jaap 
(cherry picked from commit dac2ff37431151d13589801fa4767633b4df72b9)
Reviewed-on: https://gerrit.libreoffice.org/73609
(cherry picked from commit 48653935ec71ab703c3a4c387dc192bae4643356)
Reviewed-on: https://gerrit.libreoffice.org/73641
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf125324.docx 
b/sw/qa/extras/ooxmlexport/data/tdf125324.docx
new file mode 100644
index ..9382e295f00c
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf125324.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index ca211e0e7eb9..d9f1978705cf 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -112,6 +112,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx")
 CPPUNIT_ASSERT_EQUAL(true, bCaught);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
+{
+discardDumpedLayout();
+xmlDocPtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, 
"/root/page/body/txt[2]/anchored/fly/tab/infos/bounds", "top", "4193");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 39f1318f1bce..0438a1e54caf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3859,15 +3859,13 @@ void DocxAttributeOutput::TableDefinition( 
ww8::WW8TableNodeInfoInner::Pointer_t
 OString sTblpYSpec = convertToOOXMLVertOrient( 
pFrame->GetFrameFormat().GetVertOrient().GetVertOrient() );
 
 sOrientation = convertToOOXMLVertOrientRel( 
pFrame->GetFrameFormat().GetVertOrient().GetRelationOrient() );
-if(sOrientation != "page") // do not write default
-attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), 
sOrientation.getStr() );
+attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), 
sOrientation.getStr() );
 
 if( !sTblpYSpec.isEmpty() )
 attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), 
sTblpYSpec.getStr() );
 
 sOrientation = convertToOOXMLHoriOrientRel( 
pFrame->GetFrameFormat().GetHoriOrient().GetRelationOrient() );
-if(sOrientation != "page") // do not wirte default
-attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), 
sOrientation.getStr() );
+attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), 
sOrientation.getStr() );
 
 if( !sTblpXSpec.isEmpty() )
 attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), 
sTblpXSpec.getStr() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Eike Rathke (via logerrit)
 sax/source/tools/fastserializer.cxx |   43 +++-
 1 file changed, 33 insertions(+), 10 deletions(-)

New commits:
commit d93ebeb0f785489050dcbe55c5111d639b4b4c1e
Author: Eike Rathke 
AuthorDate: Wed May 29 21:08:38 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 11:47:42 2019 +0200

Resolves: tdf#125279 do not double _x005F_ escapement

Reading OOXML _x005F_ escaped content may not get unescaped, so
when writing back to OOXML do not attempt to escape it again, i.e.
write _x005F_x_ as is and not as _x005F_x005F_x_.

This is more a workaround, the proper fix would be to unescape
_x005F_ content upon read. But then the entire "invalid XML
character" escapement and handling control characters rat tail
would come into play.

Change-Id: I3d31dc84a362753c23a8c89f7a5d7bfd06e4367b
Reviewed-on: https://gerrit.libreoffice.org/73187
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit f677885fec59f252f36673ee4d8c0b4863625a4d)
Reviewed-on: https://gerrit.libreoffice.org/73219
Tested-by: Xisco Faulí 
Reviewed-by: Miklos Vajna 

diff --git a/sax/source/tools/fastserializer.cxx 
b/sax/source/tools/fastserializer.cxx
index d299ca73ce08..364dec9db2e1 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -196,6 +196,7 @@ namespace sax_fastparser {
 break;
 default:
 {
+char c1, c2, c3, c4;
 // Escape characters not valid in XML 1.0 as
 // _x_. A literal "_x_" has to be
 // escaped as _x005F_x_ (effectively
@@ -206,22 +207,44 @@ namespace sax_fastparser {
 if (c == '_' && i >= nNextXescape && i <= nLen 
- kXescapeLen &&
 pStr[i+6] == '_' &&
 ((pStr[i+1] | 0x20) == 'x') &&
-isHexDigit( pStr[i+2] ) &&
-isHexDigit( pStr[i+3] ) &&
-isHexDigit( pStr[i+4] ) &&
-isHexDigit( pStr[i+5] ))
+isHexDigit( c1 = pStr[i+2] ) &&
+isHexDigit( c2 = pStr[i+3] ) &&
+isHexDigit( c3 = pStr[i+4] ) &&
+isHexDigit( c4 = pStr[i+5] ))
 {
 // OOXML has the odd habit to write some
 // names using this that when re-saving
 // should *not* be escaped, specifically
 // _x0020_ for blanks in w:xpath values.
-if (strncmp( pStr+i+2, "0020", 4) != 0)
+if (!(c1 == '0' && c2 == '0' && c3 == '2' 
&& c4 == '0'))
 {
-writeBytes( "_x005F_", kXescapeLen);
-// Remember this escapement so in
-// _x_x_ only the first '_' is
-// escaped.
-nNextXescape = i + kXescapeLen;
+// When encountering "_x005F_x_"
+// assume that is an already escaped
+// sequence that was not unescaped and
+// shall be written as is, to not end
+// up with "_x005F_x005F_x_" and
+// repeated..
+if (c1 == '0' && c2 == '0' && c3 == 
'5' && (c4 | 0x20) == 'f' &&
+i + kXescapeLen <= nLen - 6 &&
+pStr[i+kXescapeLen+5] == '_' &&
+((pStr[i+kXescapeLen+0] | 
0x20) == 'x') &&
+isHexDigit( 
pStr[i+kXescapeLen+1] ) &&
+isHexDigit( 
pStr[i+kXescapeLen+2] ) &&
+isHexDigit( 
pStr[i+kXescapeLen+3] ) &&
+isHexDigit( 
pStr[i+kXescapeLen+4] ))
+{
+writeBytes( &c, 1 );
+// Remember this fake escapement.
+nNextXescape = i + kXescapeLen + 6;
+ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx

2019-06-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |   19 +++
 1 file changed, 19 insertions(+)

New commits:
commit 8eff9425897a42acb3f95750a4a2654e4f428444
Author: Caolán McNamara 
AuthorDate: Wed May 29 15:41:15 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 11:46:51 2019 +0200

tdf#124694 gtk3 GtkFixed takes the max size of all its children...

as its preferred size, causing it to not clip its child, but grow instead to
match

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

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 2127a52d2c1e..adcde282e3b1 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -913,11 +913,30 @@ void GtkSalFrame::resizeWindow( long nWidth, long nHeight 
)
 window_resize(nWidth, nHeight);
 }
 
+// tdf#124694 GtkFixed takes the max size of all its children as its
+// preferred size, causing it to not clip its child, but grow instead.
+
+static void
+ooo_fixed_get_preferred_height(GtkWidget*, gint *minimum, gint *natural)
+{
+*minimum = 0;
+*natural = 0;
+}
+
+static void
+ooo_fixed_get_preferred_width(GtkWidget*, gint *minimum, gint *natural)
+{
+*minimum = 0;
+*natural = 0;
+}
+
 static void
 ooo_fixed_class_init(GtkFixedClass *klass)
 {
 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
 widget_class->get_accessible = ooo_fixed_get_accessible;
+widget_class->get_preferred_height = ooo_fixed_get_preferred_height;
+widget_class->get_preferred_width = ooo_fixed_get_preferred_width;
 }
 
 /*
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/autocdlg.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d0c5664add278379e07cec673f28d6aec35b1f81
Author: Caolán McNamara 
AuthorDate: Sun May 26 16:42:27 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 11:46:28 2019 +0200

Resolves: tdf#125348 some an initial fixed width for the treeview

the final width will be determined by the width of the entry boxes above it

Change-Id: Ifcac2a2ef220cbacf5cd0ef6531e4a04e10a7326
Reviewed-on: https://gerrit.libreoffice.org/72989
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/73020
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index ee0ab7f2e37a..6a3223aebc33 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -775,7 +775,9 @@ 
OfaAutocorrReplacePage::OfaAutocorrReplacePage(TabPageParent pParent,
 {
 sNew = m_xNewReplacePB->get_label();
 sModify = m_xReplacePB->get_label();
-m_xReplaceTLB->set_size_request(-1, m_xReplaceTLB->get_height_rows(10));
+// tdf#125348 set some small but fixed initial width size, final width will
+// depend on the size of the entry boxes
+m_xReplaceTLB->set_size_request(42, m_xReplaceTLB->get_height_rows(10));
 
 SfxModule *pMod = SfxApplication::GetModule(SfxToolsModule::Writer);
 bSWriter = pMod == SfxModule::GetActiveModule();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'libreoffice-6-3' - 2 commits - loleaflet/src

2019-06-07 Thread Michael Meeks (via logerrit)
 loleaflet/src/control/Control.AlertDialog.js |2 +-
 loleaflet/src/map/Map.js |8 ++--
 loleaflet/src/map/handler/Map.Keyboard.js|3 +++
 loleaflet/src/map/handler/Map.Mouse.js   |1 +
 4 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit a04c6926d4be31130ea13bccb8a4e7b95893ed50
Author: Michael Meeks 
AuthorDate: Thu Jun 6 20:43:27 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 10:20:51 2019 +0100

Be more aggressive about updating last active time.

Change-Id: I5d269dfe0114fadf41359baa90ceeac4726171e5

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index c1eba3297..2cff2fecc 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1071,6 +1071,10 @@ L.Map = L.Evented.extend({
this._socket.sendMessage('userinactive');
},
 
+   notifyActive : function() {
+   this.lastActiveTime = Date.now();
+   },
+
_dimIfInactive: function () {
console.debug('_dimIfInactive: diff=' + (Date.now() - 
this.lastActiveTime));
if (this._docLoaded && // don't dim if document hasn't been 
loaded yet
@@ -1194,9 +1198,9 @@ L.Map = L.Evented.extend({
},
 
_handleDOMEvent: function (e) {
-   if (!this._docLayer || !this._loaded || !this._enabled || 
L.DomEvent._skipped(e)) { return; }
+   this.notifyActive();
 
-   this.lastActiveTime = Date.now();
+   if (!this._docLayer || !this._loaded || !this._enabled || 
L.DomEvent._skipped(e)) { return; }
 
// find the layer the event is propagating from
var target = this._targets[L.stamp(e.target || e.srcElement)],
diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 4e3b51354..9ef49f1b9 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -234,6 +234,7 @@ L.Map.Keyboard = L.Handler.extend({
},
 
_onMouseDown: function () {
+   this._map.notifyActive();
if (this._map._permission === 'edit') {
return;
}
@@ -246,6 +247,7 @@ L.Map.Keyboard = L.Handler.extend({
},
 
_onKeyDown: function (e, keyEventFn, compEventFn, inputEle) {
+   this._map.notifyActive();
if (this._map.slideShow && this._map.slideShow.fullscreen) {
return;
}
@@ -399,6 +401,7 @@ L.Map.Keyboard = L.Handler.extend({
},
 
_onIME: function (e) {
+   this._map.notifyActive();
if (e.type === 'compositionstart') {
this._isComposing = true; // we are starting composing 
with IME
} else if (e.type === 'compositionupdate') {
diff --git a/loleaflet/src/map/handler/Map.Mouse.js 
b/loleaflet/src/map/handler/Map.Mouse.js
index 248ef9105..39d2cf722 100644
--- a/loleaflet/src/map/handler/Map.Mouse.js
+++ b/loleaflet/src/map/handler/Map.Mouse.js
@@ -38,6 +38,7 @@ L.Map.Mouse = L.Handler.extend({
},
 
_onMouseEvent: function (e) {
+   this._map.notifyActive();
var docLayer = this._map._docLayer;
if (!docLayer || (this._map.slideShow && 
this._map.slideShow.fullscreen) || this._map.rulerActive) {
return;
commit 8d48e004ffe0c346d0aa18224001a6a400d5bcd8
Author: Michael Meeks 
AuthorDate: Thu Jun 6 12:31:59 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Jun 7 10:20:43 2019 +0100

When dismissing a dialog use afterClose to re-focus map.

It seems beforeClose is used by vex itself to emit the callback.

diff --git a/loleaflet/src/control/Control.AlertDialog.js 
b/loleaflet/src/control/Control.AlertDialog.js
index d0bd78339..1e1267649 100644
--- a/loleaflet/src/control/Control.AlertDialog.js
+++ b/loleaflet/src/control/Control.AlertDialog.js
@@ -64,7 +64,7 @@ L.Control.AlertDialog = L.Control.extend({
showCloseButton: true,
buttons: buttonsList,
callback: function() {},
-   beforeClose: function () {
+   afterClose: function () {
e.map.focus();
e.map.enable(true);
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: Saving documents with broken zip streams (Re: minutes of ESC call ...)

2019-06-07 Thread Luboš Luňák
On Thursday 06 of June 2019, Caolán McNamara wrote:
> On Mon, 2019-06-03 at 21:52 +0200, Luboš Luňák wrote:
> > Any idea what to do about that? Is it really ok that we just refuse
> > to save it? Or should we save it even though the contents may be
> > broken?
>
> For what its worth those sample documents are not "realworld" user
> documents, but the output of fuzzing engines so any non-catastrophic
> outcome is acceptable IMO

 I have avoided the assert with https://gerrit.libreoffice.org/#/c/73646/ . 
Given that it's (hopefully) very unlikely to find real documents with broken 
zip internals, I find that good enough.

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] core.git: avmedia/Library_avmediagst_0_10.mk avmedia/Module_avmedia.mk avmedia/source bin/check-elf-dynamic-objects config_host.mk.in configure.ac distro-configs/LibreOfficeAndro

2019-06-07 Thread Michael Weghorn (via logerrit)
 Repository.mk|1 
 avmedia/Library_avmediagst_0_10.mk   |   46 --
 avmedia/Module_avmedia.mk|6 
 avmedia/source/gstreamer/avmediagstreamer_0_10.component |   15 --
 avmedia/source/gstreamer/gst_0_10.cxx|   27 
 avmedia/source/gstreamer/gstframegrabber.cxx |   33 
 avmedia/source/gstreamer/gstplayer.cxx   |  101 ---
 avmedia/source/gstreamer/gstuno.cxx  |9 -
 avmedia/source/inc/mediamisc.hxx |1 
 avmedia/source/viewer/mediawindow_impl.cxx   |5 
 bin/check-elf-dynamic-objects|4 
 config_host.mk.in|3 
 configure.ac |   42 --
 distro-configs/LibreOfficeAndroid.conf   |1 
 distro-configs/LibreOfficeAndroidAarch64.conf|1 
 distro-configs/LibreOfficeAndroidX86.conf|1 
 distro-configs/LibreOfficeCoverity.conf  |1 
 postprocess/Rdb_services.mk  |3 
 solenv/clang-format/blacklist|1 
 19 files changed, 10 insertions(+), 291 deletions(-)

New commits:
commit 6b911ae9eb9484bebbdc1323210020486f5ef33f
Author: Michael Weghorn 
AuthorDate: Thu Jun 6 18:16:36 2019 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Jun 7 11:07:42 2019 +0200

Drop support for gstreamer-0.10

Drop all GStreamer 0.10 support according to
ESC decision of 2019-06-06.

GStreamer 0.10 is obsolete and no longer needed,
superseded by GStreamer 1.0 which is available in
baseline (RHEL 7 or CentOS 7) and all relevant distros.

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

diff --git a/Repository.mk b/Repository.mk
index a88b0f282897..a0faa0d2a026 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -600,7 +600,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(if $(ENABLE_VLC),avmediavlc) \
$(if $(ENABLE_GSTREAMER_1_0),avmediagst) \
-   $(if $(ENABLE_GSTREAMER_0_10),avmediagst_0_10) \
$(if $(filter WNT,$(OS)),avmediawin) \
cached1 \
collator_data \
diff --git a/avmedia/Library_avmediagst_0_10.mk 
b/avmedia/Library_avmediagst_0_10.mk
deleted file mode 100644
index 16f2d5db1440..
--- a/avmedia/Library_avmediagst_0_10.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Library_Library,avmediagst_0_10))
-
-$(eval $(call 
gb_Library_set_componentfile,avmediagst_0_10,avmedia/source/gstreamer/avmediagstreamer_0_10))
-
-$(eval $(call gb_Library_set_include,avmediagst_0_10,\
-   $$(INCLUDE) \
-   -I$(SRCDIR)/avmedia/source/inc \
-   $(GSTREAMER_0_10_CFLAGS) \
-))
-
-$(eval $(call gb_Library_use_externals,avmediagst_0_10,\
-   boost_headers \
-   libxml2 \
-))
-
-$(eval $(call gb_Library_use_sdk_api,avmediagst_0_10))
-
-$(eval $(call gb_Library_use_libraries,avmediagst_0_10,\
-   comphelper \
-   cppu \
-   cppuhelper \
-   sal \
-   salhelper \
-   tl \
-   vcl \
-))
-
-$(eval $(call gb_Library_add_libs,avmediagst_0_10,\
-   $(GSTREAMER_0_10_LIBS) \
-   -lgstinterfaces-0.10 \
-))
-
-$(eval $(call gb_Library_add_exception_objects,avmediagst_0_10,\
-   avmedia/source/gstreamer/gst_0_10 \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk
index a3a3895f3ec7..9d8895a8eee8 100644
--- a/avmedia/Module_avmedia.mk
+++ b/avmedia/Module_avmedia.mk
@@ -24,12 +24,6 @@ $(eval $(call gb_Module_add_targets,avmedia,\
 ))
 endif
 
-ifeq ($(ENABLE_GSTREAMER_0_10),TRUE)
-$(eval $(call gb_Module_add_targets,avmedia,\
-   Library_avmediagst_0_10 \
-))
-endif
-
 ifeq ($(ENABLE_VLC),TRUE)
 $(eval $(call gb_Module_add_targets,avmedia,\
Library_avmediavlc \
diff --git a/avmedia/source/gstreamer/avmediagstreamer_0_10.component 
b/avmedia/source/gstreamer/avmediagstreamer_0_10.component
deleted file mode 100644
index 849173cea28c..
--- a/avmedia/source/gstreamer/avmediagstreamer_0_10.component
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-http://openoffice.org/2010/uno-components";>
-  
-
-  
-
diff --git a/avmedia/source/gstreamer/gst_0_10.cxx 
b/avmedia/source/gstreamer/gst_0_10.cxx
deleted file mode 100644
index a2

[Libreoffice-commits] core.git: editeng/source include/tools sc/source sd/source svtools/source svx/source sw/source tools/source vcl/osx vcl/source vcl/win

2019-06-07 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/impedit3.cxx|2 
 include/tools/gen.hxx  |   83 ++---
 sc/source/ui/view/gridwin.cxx  |   55 +++--
 sd/source/filter/eppt/escherex.cxx |3 
 svtools/source/control/tabbar.cxx  |6 -
 svx/source/sdr/contact/objectcontactofpageview.cxx |3 
 sw/source/core/view/vdraw.cxx  |2 
 sw/source/uibase/uiview/viewport.cxx   |8 +-
 tools/source/generic/gen.cxx   |   32 ++--
 vcl/osx/salnativewidgets.cxx   |2 
 vcl/source/control/tabctrl.cxx |2 
 vcl/source/gdi/mtfxmldump.cxx  |2 
 vcl/source/outdev/rect.cxx |3 
 vcl/source/treelist/treelistbox.cxx|2 
 vcl/win/gdi/salnativewidgets-luna.cxx  |3 
 15 files changed, 137 insertions(+), 71 deletions(-)

New commits:
commit a46a257794f1f53b294735fc876c394be23a3811
Author: Noel Grandin 
AuthorDate: Wed Jun 5 15:24:04 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 7 11:01:37 2019 +0200

improve empty tools::Rectangle (width)

This is the width part, the height part will come next.

Instead of storing "empty" as a special value (which is easy to get
wrong, eg. some image filters pass in that special value, expecting it
to be a valid width), just use separate boolean values for width and
height empty.

Also lots of code was calling GetBottom() or GetRight() on an
empty rectangle, getting back that magic value and doing calculations
on it, resulting in completely bogus data.

So
(1) make the various Rectangle methods do something reasonable
when the empty flags are set
(2) fix various other code to handle empty better
(3) assert when code accesses Bottom or Right and the empty flag
is set.

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

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index ec3e10cf1290..bbcf17179fb4 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2921,6 +2921,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
tools::Rectangle aClipRect, Po
 {
 if ( !GetUpdateMode() && !bStripOnly )
 return;
+if ( aClipRect.IsEmpty() )
+return;
 
 if ( !IsFormatted() )
 FormatDoc();
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 0d9a81ebdcee..d84d359b543a 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SvStream;
 namespace rtl
@@ -386,12 +387,12 @@ public:
 Rectangle( const Point& rLT, const Size& rSize );
 
 longLeft() const{ return nLeft;   }
-longRight() const   { return nRight;  }
+longRight() const   { assert(!mbWidthEmpty); return 
nRight;  }
 longTop() const { return nTop;}
 longBottom() const  { return nBottom; }
 
 voidSetLeft(long v){ nLeft = v;   }
-voidSetRight(long v)   { nRight = v;  }
+voidSetRight(long v)   { nRight = v; mbWidthEmpty = false; 
}
 voidSetTop(long v) { nTop = v;}
 voidSetBottom(long v)  { nBottom = v; }
 
@@ -409,7 +410,17 @@ public:
 inline void Move( long nHorzMoveDelta, long nVertMoveDelta );
 voidMove( Size const & s ) { Move(s.Width(), s.Height()); }
 longAdjustLeft( long nHorzMoveDelta ) { nLeft += 
nHorzMoveDelta; return nLeft; }
-longAdjustRight( long nHorzMoveDelta ) { nRight += 
nHorzMoveDelta; return nRight; }
+longAdjustRight( long nHorzMoveDelta )
+{
+if (mbWidthEmpty)
+{
+mbWidthEmpty = false;
+nRight = nLeft + nHorzMoveDelta - 1;
+}
+else
+nRight += nHorzMoveDelta;
+return nRight;
+}
 longAdjustTop( long nVertMoveDelta ) { nTop += 
nVertMoveDelta; return nTop; }
 longAdjustBottom( long nVertMoveDelta ) { nBottom += 
nVertMoveDelta; return nBottom; }
 inline void SetPos( const Point& rPoint );
@@ -432,11 +443,11 @@ public:
 boolIsInside( const tools::Rectangle& rRect ) const;
 boolIsOver( const tools::Rectangle& rRect ) const;
 
-voidSetEmpty() { nRight = nBottom = RECT_EMPTY; }
-voidSetWidthEmpty() { nRight = RECT_EMPTY; }
+voidSetEmpty() { nRight = 0; nBottom = RECT_EMPTY; 
mb

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

2019-06-07 Thread Tomaž Vajngerl (via logerrit)
 vcl/source/control/button.cxx |1 +
 vcl/uiconfig/theme_definitions/ios/definition.xml |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a4ec8b5d3df1d78b0288c06109887490c74801ba
Author: Tomaž Vajngerl 
AuthorDate: Thu Jun 6 17:14:53 2019 +0900
Commit: Tor Lillqvist 
CommitDate: Fri Jun 7 10:35:46 2019 +0200

tdf#124947 fix hit area of the radio buttons, size in ios theme

The hit area of the radio buttons was not calculated correctly, so
sometimes when you hit the radio button at the "wrong" place,
nothing happened. This fixes the hit area to correctly cover the
radio button and the text.

Another issue was that the ios theme size of the radio button was
not defined correctly (32px instead of 26px), which increased the
error when calculating the hit are even more. The height of the
radio button should be the same as defined in the definition.xml,
and not bigger (or smaller).

Change-Id: I4b03f36ca9d9c82bd6dc442bd6e06af938c62bdd
Reviewed-on: https://gerrit.libreoffice.org/73592
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
Reviewed-on: https://gerrit.libreoffice.org/73593
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index f2a909dd753f..1f4a049b6c60 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2056,6 +2056,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 rMouseRect  = tools::Rectangle( aPos, aSize );
 rMouseRect.Left()   = rPos.X();
+rMouseRect.Top()= rPos.Y();
 
 rStateRect.Left()   = rPos.X();
 rStateRect.Top()= rMouseRect.Top();
diff --git a/vcl/uiconfig/theme_definitions/ios/definition.xml 
b/vcl/uiconfig/theme_definitions/ios/definition.xml
index 61d6aa21578e..b0e26f01079c 100644
--- a/vcl/uiconfig/theme_definitions/ios/definition.xml
+++ b/vcl/uiconfig/theme_definitions/ios/definition.xml
@@ -85,7 +85,7 @@
 
 
 
-
+

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

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

2019-06-07 Thread Szymon Kłos (via logerrit)
 loleaflet/src/layer/AnnotationManager.js |4 
 1 file changed, 4 insertions(+)

New commits:
commit d3aed5b6df90d91792308c9d87e4331aa45a5a4b
Author: Szymon Kłos 
AuthorDate: Fri Jun 7 10:21:13 2019 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jun 7 10:30:21 2019 +0200

Add annotation-active class when active

Change-Id: I53768271de756c2ea0c741996ebec9e0845bd47c
Reviewed-on: https://gerrit.libreoffice.org/73644
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit a22e652db40dd06d9a707e2debd9c37e56711ba7)
Reviewed-on: https://gerrit.libreoffice.org/73645
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index c8a623639..a4a4d2754 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -243,6 +243,8 @@ L.AnnotationManager = L.Class.extend({
 
unselect: function () {
if (this._selected) {
+   if 
($(this._selected._container).hasClass('annotation-active'))
+   
$(this._selected._container).removeClass('annotation-active');
this._selected = null;
this.update();
}
@@ -253,6 +255,8 @@ L.AnnotationManager = L.Class.extend({
// Select the root comment
var idx = this.getRootIndexOf(annotation._data.id);
this._selected = this._items[idx];
+   if 
(!$(this._selected._container).hasClass('annotation-active'))
+   
$(this._selected._container).addClass('annotation-active');
this.update();
}
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - loleaflet/src

2019-06-07 Thread Samuel Mehrbrodt (via logerrit)
 loleaflet/src/map/handler/Map.WOPI.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58b07ddb45950804e30685d05ca9cce1ef310b6d
Author: Samuel Mehrbrodt 
AuthorDate: Fri Jun 7 10:06:26 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Fri Jun 7 10:06:26 2019 +0200

Revert "loleaflet: add postmessage check"

Valid use case: PostMessage sent by other frames than direct parent frame

This reverts commit 5d97ef0c6be89f7041475126ecabbaa1cfb656e2.

diff --git a/loleaflet/src/map/handler/Map.WOPI.js 
b/loleaflet/src/map/handler/Map.WOPI.js
index 2c343055f..654b2a51c 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -124,7 +124,7 @@ L.Map.WOPI = L.Handler.extend({
},
 
_postMessageListener: function(e) {
-   if (!window.WOPIPostmessageReady || (e.origin !== 
window.parent.origin)) {
+   if (!window.WOPIPostmessageReady) {
return;
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-07 Thread Noel Grandin (via logerrit)
 sd/source/filter/ppt/pptin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3309893de4e99a7d89fb1e9b4616631b1f040df0
Author: Noel Grandin 
AuthorDate: Thu Jun 6 13:31:52 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 7 09:23:54 2019 +0200

tdf#125556 URL fragment leaked from one object..

to another when importing Powerpoint ppt file

regression from
commit 4245454d0c3d6df2d0e0a75aed6f22f0a26ce3e2
Date:   Wed Feb 28 15:50:29 2018 +0200
loplugin:useuniqueptr in SdrPowerPointImport

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

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 7fa7ad359a02..520618b15163 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -396,9 +396,9 @@ bool ImplSdPPTImport::Import()
 
 nPropCount /= 6;// 6 properties per 
hyperlink
 
-SdHyperlinkEntry aHyperlink;
 for ( i = 0; i < nPropCount; i++ )
 {
+SdHyperlinkEntry aHyperlink;
 aHyperlink.nIndex = 0;
 aPropItem.ReadUInt32( nType );
 if ( nType != VT_I4 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: basctl/source chart2/source cui/source editeng/source filter/source include/editeng include/IwyuFilter_include.yaml include/svl sc/qa sc/source sd/source sfx2/source sv

2019-06-07 Thread Gabor Kelemen (via logerrit)
 basctl/source/basicide/IDEComboBox.cxx |1 +
 chart2/source/view/main/ChartView.cxx  |1 +
 cui/source/customize/cfg.cxx   |1 +
 cui/source/tabpages/grfpage.cxx|1 +
 editeng/source/editeng/editeng.cxx |1 +
 editeng/source/editeng/editview.cxx|1 +
 editeng/source/editeng/impedit4.cxx|1 +
 filter/source/msfilter/escherex.cxx|1 +
 include/IwyuFilter_include.yaml|4 
 include/editeng/outlobj.hxx|1 +
 include/svl/adrparse.hxx   |1 +
 include/svl/custritm.hxx   |1 -
 include/svl/eitem.hxx  |1 -
 include/svl/itemprop.hxx   |1 -
 include/svl/msodocumentlockfile.hxx|2 --
 include/svl/style.hxx  |2 +-
 sc/qa/unit/screenshots/screenshots.cxx |1 +
 sc/source/core/data/column4.cxx|1 +
 sc/source/core/data/table7.cxx |2 ++
 sc/source/filter/dif/difimp.cxx|1 +
 sc/source/filter/html/htmlexp2.cxx |1 +
 sc/source/filter/rtf/rtfexp.cxx|1 +
 sc/source/ui/docshell/datastream.cxx   |1 +
 sd/source/filter/xml/sdxmlwrp.cxx  |1 +
 sd/source/ui/func/fuinsfil.cxx |1 +
 sd/source/ui/unoidl/UnoDocumentSettings.cxx|1 +
 sd/source/ui/unoidl/unopage.cxx|2 ++
 sd/source/ui/view/drawview.cxx |1 +
 sd/source/ui/view/sdview4.cxx  |1 +
 sfx2/source/dialog/dinfdlg.cxx |1 +
 sfx2/source/doc/SfxRedactionHelper.cxx |1 +
 sfx2/source/doc/objxtor.cxx|1 +
 svl/qa/unit/items/stylepool.cxx|1 -
 svl/qa/unit/lockfiles/test_lockfiles.cxx   |1 -
 svl/qa/unit/svl.cxx|8 ++--
 svl/qa/unit/test_INetContentType.cxx   |1 -
 svl/qa/unit/test_URIHelper.cxx |5 -
 svl/source/config/asiancfg.cxx |2 --
 svl/source/config/cjkoptions.cxx   |1 -
 svl/source/config/ctloptions.cxx   |4 
 svl/source/config/itemholder2.cxx  |1 -
 svl/source/crypto/cryptosign.cxx   |7 ---
 svl/source/fsstor/fsfactory.cxx|2 --
 svl/source/fsstor/fsstorage.cxx|   13 +++--
 svl/source/fsstor/fsstorage.hxx|8 ++--
 svl/source/fsstor/ostreamcontainer.hxx |2 --
 svl/source/inc/poolio.hxx  |2 --
 svl/source/items/cenumitm.cxx  |1 -
 svl/source/items/cintitem.cxx  |1 -
 svl/source/items/custritm.cxx  |1 -
 svl/source/items/flagitem.cxx  |1 -
 svl/source/items/globalnameitem.cxx|2 --
 svl/source/items/grabbagitem.cxx   |2 +-
 svl/source/items/ilstitem.cxx  |1 -
 svl/source/items/int64item.cxx |1 -
 svl/source/items/intitem.cxx   |1 -
 svl/source/items/itemiter.cxx  |1 -
 svl/source/items/itemprop.cxx  |1 +
 svl/source/items/itemset.cxx   |6 --
 svl/source/items/lckbitem.cxx  |2 --
 svl/source/items/poolcach.cxx  |2 --
 svl/source/items/poolio.cxx|2 --
 svl/source/items/poolitem.cxx  |1 -
 svl/source/items/ptitem.cxx|1 -
 svl/source/items/rectitem.cxx  |1 -
 svl/source/items/rngitem.cxx   |2 --
 svl/source/items/sitem.cxx |1 -
 svl/source/items/slstitm.cxx   |3 +--
 svl/source/items/srchitem.cxx  |6 +-
 svl/source/items/stritem.cxx   |1 -
 svl/source/items/style.cxx |2 --
 svl/source/items/visitem.cxx   |1 -
 svl/source/misc/documentlockfile.cxx   |9 -
 svl/source/misc/getstringresource.cxx  |3 ---
 svl/source/misc/gridprinter.cxx|2 +-
 svl/source/misc/inethist.cxx   |1 -
 svl/source/misc/inettype.cxx   |5 -
 svl/source/misc/lockfilecommon.cxx |7 ---
 svl/source/misc/msodocumentlockfile.cxx|1 -
 svl/source/misc/ownlist.cxx|4 +++-
 svl/source/misc/sharecont

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

2019-06-07 Thread Miklos Vajna (via logerrit)
 sw/ooxmlexport_setup.mk |1 
 sw/qa/extras/ooxmlexport/data/btlr-textbox.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx  |   18 
 sw/source/core/doc/textboxhelper.cxx|   26 ++--
 4 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit 9c945cdbe170104cbacafa2c37babec5210b9ca2
Author: Miklos Vajna 
AuthorDate: Thu Jun 6 21:32:07 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 09:05:08 2019 +0200

sw btlr writing mode: DOCX drawingML import for fly frames

By using the now working btlr direction of the underlying fly frame,
instead of the character-level workaround.

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

diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 9d3c13325098..c482ef40ce6f 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -16,6 +16,7 @@ define sw_ooxmlexport_libraries
editeng \
sal \
sfx \
+   svl \
sw \
test \
tl \
diff --git a/sw/qa/extras/ooxmlexport/data/btlr-textbox.docx 
b/sw/qa/extras/ooxmlexport/data/btlr-textbox.docx
new file mode 100644
index ..181d305eac95
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/btlr-textbox.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index e392644f0de3..c754acafc9ed 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -13,9 +13,11 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -75,6 +77,22 @@ DECLARE_OOXMLEXPORT_TEST(testTbrlTextbox, 
"tbrl-textbox.docx")
  aGeometry["TextPreRotateAngle"].get());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testBtlrShape, "btlr-textbox.docx")
+{
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), rFormats.size());
+CPPUNIT_ASSERT_EQUAL(static_cast(RES_DRAWFRMFMT), 
rFormats[0]->Which());
+CPPUNIT_ASSERT_EQUAL(static_cast(RES_FLYFRMFMT), 
rFormats[1]->Which());
+// Without the accompanying fix in place, this test would have failed with 
'Expected: 5, Actual:
+// 4', i.e. the textbox inherited its writing direction instead of having 
an explicit btlr
+// value.
+CPPUNIT_ASSERT_EQUAL(SvxFrameDirection::Vertical_LR_BT,
+ rFormats[1]->GetAttrSet().GetFrameDir().GetValue());
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf124637_sectionMargin, 
"tdf124637_sectionMargin.docx")
 {
 uno::Reference 
xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/core/doc/textboxhelper.cxx 
b/sw/source/core/doc/textboxhelper.cxx
index 532f1ea9f00f..f729e4e44afd 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -359,35 +359,15 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, 
const OUString& rPrope
 if (it != aCustomShapeGeometry.end())
 {
 auto nTextPreRotateAngle = it->second.get();
-if (nTextPreRotateAngle == -270)
-{
-// That would be the btLr text direction which we don't 
support at a frame level, so
-// do it at a character level.
-const SwNodeIndex* pNodeIndex = 
pFormat->GetContent().GetContentIdx();
-if (!pNodeIndex)
-return;
-
-SwPaM 
aPaM(*pFormat->GetDoc()->GetNodes()[pNodeIndex->GetIndex() + 1], 0);
-aPaM.SetMark();
-if (SwTextNode* pMark
-= pFormat->GetDoc()
-  
->GetNodes()[pNodeIndex->GetNode().EndOfSectionIndex() - 1]
-  ->GetTextNode())
-{
-aPaM.GetMark()->nNode = *pMark;
-aPaM.GetMark()->nContent.Assign(pMark, 
pMark->GetText().getLength());
-SvxCharRotateItem aItem(900, false, RES_CHRATR_ROTATE);
-
pFormat->GetDoc()->getIDocumentContentOperations().InsertPoolItem(aPaM, aItem);
-}
-return;
-}
-
 sal_Int16 nDirection = 0;
 switch (nTextPreRotateAngle)
 {
 case -90:
 nDirection = text::WritingMode2::TB_RL;
 break;
+case -270:
+nDirection = text::WritingMode2::BT_LR;
+break;
 }
 
 if (nDirection)
___
Libreoffice-commits mailing li