[Libreoffice-bugs] [Bug 100635] crash after switching on the bibliography 'number entries' option (big file)

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=100635

--- Comment #5 from Yury  ---
Tried this file in 5.2.0.4/rpm64, had the same issue.

Version: 5.2.0.4
Build ID: 066b007f5ebcc236395c7d282ba488bca6720265
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 

And I'd like to remind you, guys, in 4.3.7.2/rpm64 (as distributred from 'old
releases' section) this operation on this file works perfectly every time. Talk
about laugh.

I again offer to provide this file PERSONALLY to someone who'll look into the
problem. You'll likely discover the cause and create the concise testcase
quickly, and need not my file any more after that.

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


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

2016-08-07 Thread Markus Mohrhard
 sfx2/source/appl/workwin.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a5a8006c4b77ea7fce4e6c808031c785373624eb
Author: Markus Mohrhard 
Date:   Mon Aug 8 04:06:38 2016 +0200

make clearer what the code is actually doing

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

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index c2c50c3..ec9cda9 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -614,10 +614,11 @@ void SfxWorkWindow::DeleteControllers_Impl()
 }
 
 // Delete Child-Windows
-for (size_t n=0; npWin;
 if (pChild)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Markus Mohrhard
 sfx2/source/appl/workwin.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 97cae1350fc83f8aed56e008d0ae08b669bd2933
Author: Markus Mohrhard 
Date:   Mon Aug 8 03:55:18 2016 +0200

reduce scope of variable

Change-Id: I42fc09957f243c89a0c45309b92a91cf3c2692b1
Reviewed-on: https://gerrit.libreoffice.org/27944
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index a40d921..c2c50c3 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -606,8 +606,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
 
 // Lock SplitWindows (which means suppressing the Resize-Reaction of the
 // DockingWindows)
-sal_uInt16 n;
-for ( n=0; nGetWindowCount())
@@ -615,7 +614,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
 }
 
 // Delete Child-Windows
-for ( n=0; n

[Libreoffice-bugs] [Bug 100870] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=100870

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:5.3.0

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


[Libreoffice-bugs] [Bug 100870] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=100870

--- Comment #7 from Commit Notification 
 ---
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b0f4291e5c0fe6d61d621e692cbc8bea4cb4c401

no range based for loop when container is modified, tdf#100870, tdf#101320

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

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


[Libreoffice-bugs] [Bug 101320] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101320

--- Comment #3 from Commit Notification 
 ---
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b0f4291e5c0fe6d61d621e692cbc8bea4cb4c401

no range based for loop when container is modified, tdf#100870, tdf#101320

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

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


[Libreoffice-bugs] [Bug 101320] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101320

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:5.3.0

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


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

2016-08-07 Thread Markus Mohrhard
 sfx2/source/appl/workwin.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b0f4291e5c0fe6d61d621e692cbc8bea4cb4c401
Author: Markus Mohrhard 
Date:   Mon Aug 8 05:36:59 2016 +0200

no range based for loop when container is modified, tdf#100870, tdf#101320

This crash has been responsible for around 20% of the 5.2.0.4 crashes
with backtraces for the modification of the container similar to:

sxlo.dll!SfxWorkWindow::SetChildWindowVisible_Impl(unsigned long lId, 
bool bEnabled, unsigned short nMode) Line 1834C++
 sfxlo.dll!SfxDispatcher::Update_Impl_(bool bUIActive, bool bIsMDIApp, 
bool bIsIPOwner, SfxWorkWindow * pTaskWin) Line 1452C++
 sfxlo.dll!SfxDispatcher::Update_Impl(bool bForce) Line 1326C++
 sfxlo.dll!SfxApplication::SetViewFrame_Impl(SfxViewFrame * pFrame) 
Line 372C++
 sfxlo.dll!SfxViewFrame::SetViewFrame(SfxViewFrame * pFrame) Line 3138  
  C++
 sfxlo.dll!SfxViewFrame::MakeActive_Impl(bool bGrabFocus) Line 1697
C++
 sfxlo.dll!SfxFrameWindow_Impl::Notify(NotifyEvent & rNEvt) Line 111
C++
 vcllo.dll!vcl::Window::CompatNotify(NotifyEvent & rNEvt) Line 3747
C++
 vcllo.dll!vcl::Window::Notify(NotifyEvent & rNEvt) Line 198C++
 vcllo.dll!DockingWindow::Notify(NotifyEvent & rNEvt) Line 633C++
 vcllo.dll!vcl::Window::CompatNotify(NotifyEvent & rNEvt) Line 3747
C++
 vcllo.dll!vcl::Window::Notify(NotifyEvent & rNEvt) Line 198C++
 vcllo.dll!DockingWindow::Notify(NotifyEvent & rNEvt) Line 633C++
 sfxlo.dll!SfxDockingWindow::Notify(NotifyEvent & rEvt) Line 1655C++
 vcllo.dll!vcl::Window::CompatNotify(NotifyEvent & rNEvt) Line 3747
C++
 vcllo.dll!vcl::Window::Notify(NotifyEvent & rNEvt) Line 198C++
 vcllo.dll!vcl::Window::CompatNotify(NotifyEvent & rNEvt) Line 3747
C++
 vcllo.dll!vcl::Window::Notify(NotifyEvent & rNEvt) Line 198C++
 vcllo.dll!vcl::Window::CompatNotify(NotifyEvent & rNEvt) Line 3747
C++
 vcllo.dll!vcl::Window::Notify(NotifyEvent & rNEvt) Line 198C++
 vcllo.dll!Control::Notify(NotifyEvent & rNEvt) Line 274C++
 vcllo.dll!vcl::Window::CompatNotify(NotifyEvent & rNEvt) Line 3747
C++
 vcllo.dll!vcl::Window::GetFocus() Line 1842C++
 svtlo.dll!SvTreeListBox::GetFocus() Line 2096C++
 swlo.dll!SwContentTree::GetFocus() Line 2571C++
 vcllo.dll!vcl::Window::CompatGetFocus() Line 3716C++
 vcllo.dll!vcl::Window::ImplGrabFocus(GetFocusFlags nFlags) Line 384
C++
 vcllo.dll!vcl::Window::GrabFocus() Line 3004C++
 swlo.dll!SwNavigationPI::SwNavigationPI(SfxBindings * _pBindings, 
SfxChildWindowContext * pCw, vcl::Window * pParent) Line 835C++
 swlo.dll!VclPtr::Create(SfxBinsfdings * & , SwNavigationChild * const && , 
vcl::Window * & ) Line 131C++
 swlo.dll!SwNavigationChild::SwNavigationChild(vcl::Window * pParent, 
unsigned short nId, SfxBindings * _pBindings, SfxChildWinInfo * __formal) Line 
1306C++
 swlo.dll!SwNavigationChild::CreateImpl(vcl::Window * pParent, 
SfxBindings * pBindings, SfxChildWinInfo * pInfo) Line 69C++
 sfxlo.dll!SfxChildWindow::CreateContext(unsigned short nContextId, 
SfxBindings & rBindings) Line 457C++
 sfxlo.dll!SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl * pCW, 
bool bSetFocus) Line 1436C++
 sfxlo.dll!SfxWorkWindow::UpdateChildWindows_Impl() Line 1328C++
 sfxlo.dll!SfxWorkWindow::UpdateObjectBars_Impl() Line 1283C++
 sfxlo.dll!SfxFrameWorkWin_Impl::UpdateObjectBars_Impl() Line 1114
C++
 sfxlo.dll!SfxDispatcher::Update_Impl(bool bForce) Line 1329C++
 sfxlo.dll!SfxBaseController::ConnectSfxFrame_Impl(const 
SfxBaseController::ConnectSfxFrame i_eConnect) Line 1326C++
 sfxlo.dll!SfxBaseController::attachFrame(const 
com::sun::star::uno::Reference & xFrame) Line 
584C++
 sfxlo.dll!`anonymous 
namespace'::SfxFrameLoader_Impl::impl_createDocumentView(const 
com::sun::star::uno::Reference & i_rModel, 
const com::sun::star::uno::Reference & i_rFrame, 
const comphelper::NamedValueCollection & i_rViewFactoryArgs, const 
rtl::OUString & i_rViewName) Line 604C++
 sfxlo.dll!`anonymous namespace'::SfxFrameLoader_Impl::load(const 
com::sun::star::uno::Sequence & rArgs, 
const com::sun::star::uno::Reference & 
_rTargetFrame) Line 721C++
 fwklo.dll!framework::LoadEnv::impl_loadContent() Line 1122C++
 fwklo.dll!framework::LoadEnv::startLoading() Line 379C++
 fwklo.dll!framework::LoadDispatcher::impl_dispatch(const 
com::sun::star::util::URL & rURL, const 
com::sun::star::uno::Sequence & 
lArguments, const 
com::sun::star::uno::Reference 
& xListener) Line 116C++
 

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

2016-08-07 Thread Markus Mohrhard
 sc/source/ui/app/inputwin.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8b86768a9a72ce6ef326615cb7c9ad5c76172921
Author: Markus Mohrhard 
Date:   Mon Aug 8 05:01:04 2016 +0200

GetInputHdl may return nullptr

As can be seen in the other places we need to check for nullptr.

See

http://crashreport.libreoffice.org/stats/crash_details/553b9ef5-c85f-4cda-b432-472501795634

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

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b37e376..d79e280 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1056,7 +1056,8 @@ IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, 
void)
 TriggerToolboxLayout();
 
 // Restore focus to input line(s) if necessary
-if (  SC_MOD()->GetInputHdl()->IsTopMode() )
+ScInputHandler* pHdl = SC_MOD()->GetInputHdl();
+if ( pHdl && pHdl->IsTopMode() )
 maTextWnd->GrabFocus();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Markus Mohrhard
 sc/source/ui/view/preview.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 87ef2d8f2808a951c92387ba0582ea02a19f89e7
Author: Markus Mohrhard 
Date:   Fri Aug 5 02:56:30 2016 +0200

workaround missing SetSelectedSheet call for print preview, tdf#99333

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

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index a8dc240..a629d0a 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -224,6 +224,12 @@ void ScPreview::CalcPages()
 ScDocument& rDoc = pDocShell->GetDocument();
 nTabCount = rDoc.GetTableCount();
 
+if (maSelectedTabs.empty())
+{
+SCTAB nCurrentTab = ScDocShell::GetCurTab();
+maSelectedTabs.insert(nCurrentTab);
+}
+
 SCTAB nStart = nTabsTested;
 if (!bValid)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Markus Mohrhard
 vcl/source/filter/GraphicNativeMetadata.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 855df248c8a380e253a35feefec21ebc1dee1aca
Author: Markus Mohrhard 
Date:   Mon Aug 8 04:52:28 2016 +0200

don't try to memcpy from and to a nullptr

See e.g.

http://crashreport.libreoffice.org/stats/crash_details/2218a489-b64c-4193-a7d4-cd01c6a607cb

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

diff --git a/vcl/source/filter/GraphicNativeMetadata.cxx 
b/vcl/source/filter/GraphicNativeMetadata.cxx
index 2f9880c..aea930d 100644
--- a/vcl/source/filter/GraphicNativeMetadata.cxx
+++ b/vcl/source/filter/GraphicNativeMetadata.cxx
@@ -37,7 +37,11 @@ bool GraphicNativeMetadata::read(Graphic& rGraphic)
 GfxLink aLink = rGraphic.GetLink();
 if ( aLink.GetType() != GfxLinkType::NativeJpg )
 return false;
+
 sal_uInt32 aDataSize = aLink.GetDataSize();
+if (!aDataSize)
+return false;
+
 std::unique_ptr aBuffer(new sal_uInt8[aDataSize]);
 
 memcpy(aBuffer.get(), aLink.GetData(), aDataSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/Log.cpp loolwsd/Log.hpp loolwsd/LOOLWSD.cpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp |   29 -
 loolwsd/Log.cpp |   39 +--
 loolwsd/Log.hpp |6 +-
 3 files changed, 66 insertions(+), 8 deletions(-)

New commits:
commit 0c91e3313361b637d4fe2116064e104ce72cac16
Author: Ashod Nakashian 
Date:   Sun Aug 7 23:32:39 2016 -0400

loolwsd: logging to file support

Change-Id: Ie18c6d7c3563078becb9d42e81ef3b6a14288e98
Reviewed-on: https://gerrit.libreoffice.org/27976
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index c9ce709..58c1b59 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1330,6 +1330,15 @@ void LOOLWSD::initialize(Application& self)
 { "storage.wopi.host[0]", "localhost" },
 { "storage.wopi.max_file_size", "0" },
 { "storage.webdav[@allow]", "false" },
+{ "logging.file[@enable]", "false" },
+{ "logging.file.property[0][@name]", "path" },
+{ "logging.file.property[0]", "loolwsd.log" },
+{ "logging.file.property[1][@name]", "rotation" },
+{ "logging.file.property[1]", "never" },
+{ "logging.file.property[2][@name]", "compress" },
+{ "logging.file.property[2]", "true" },
+{ "logging.file.property[3][@name]", "flush" },
+{ "logging.file.property[3]", "false" }
 };
 
 // Set default values, in case they are missing from the config file.
@@ -1356,7 +1365,25 @@ void LOOLWSD::initialize(Application& self)
 const auto withColor = getConfigValue(conf, "logging.color", true);
 if (withColor)
 setenv("LOOL_LOGCOLOR", "1", true);
-Log::initialize("wsd", logLevel, withColor);
+
+const auto logToFile = getConfigValue(conf, "logging.file[@enable]", 
false);
+std::map logProperties;
+for (size_t i = 0; ; ++i)
+{
+const std::string confPath = "logging.file.property[" + 
std::to_string(i) + "]";
+const auto name = config().getString(confPath + "[@name]", "");
+if (!name.empty())
+{
+const auto value = config().getString(confPath, "");
+logProperties.emplace(name, value);
+}
+else if (!config().has(confPath))
+{
+break;
+}
+}
+
+Log::initialize("wsd", logLevel, withColor, logToFile, logProperties);
 
 #if ENABLE_SSL
 LOOLWSD::SSLEnabled.set(getConfigValue(conf, "ssl.enable", true));
diff --git a/loolwsd/Log.cpp b/loolwsd/Log.cpp
index dc3e0da..11db618 100644
--- a/loolwsd/Log.cpp
+++ b/loolwsd/Log.cpp
@@ -9,13 +9,18 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
 
 #include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
@@ -25,10 +30,12 @@ static char LogPrefix[256] = { '\0' };
 
 namespace Log
 {
+using namespace Poco;
+
 static const Poco::Int64 epochStart = 
Poco::Timestamp().epochMicroseconds();
 // help avoid destruction ordering issues.
 struct StaticNames {
-bool inited;
+std::atomic inited;
 std::string name;
 std::string id;
 StaticNames() :
@@ -101,7 +108,11 @@ namespace Log
 signalLog(buffer);
 }
 
-void initialize(const std::string& name, const std::string& logLevel, 
const bool withColor)
+void initialize(const std::string& name,
+const std::string& logLevel,
+const bool withColor,
+const bool logToFile,
+std::map config)
 {
 Source.name = name;
 std::ostringstream oss;
@@ -112,11 +123,27 @@ namespace Log
 strncpy(LogPrefix, oss.str().c_str(), sizeof(LogPrefix));
 
 // Configure the logger.
-auto channel = (isatty(fileno(stderr)) || withColor
- ? static_cast(new 
Poco::ColorConsoleChannel())
- : static_cast(new 
Poco::ConsoleChannel()));
+AutoPtr channelConsole = (isatty(fileno(stderr)) || withColor
+? static_cast(new 
Poco::ColorConsoleChannel())
+: static_cast(new 
Poco::ConsoleChannel()));
+
+AutoPtr channel = channelConsole;
+if (logToFile)
+{
+AutoPtr splitterChannel(new SplitterChannel());
+splitterChannel->addChannel(channelConsole);
+
+AutoPtr rotatedFileChannel(new 
FileChannel("loolwsd.log"));
+for (const auto& pair : config)
+{
+rotatedFileChannel->setProperty(pair.first, pair.second);
+}
+
+splitterChannel->addChannel(rotatedFileChannel);
+channel = splitterChannel;
+}
+
 auto& logger = Poco::Logger::create(Source.name, channel, 

[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/loolwsd.xml.in loolwsd/test loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp |3 +-
 loolwsd/TraceFile.hpp   |   47 +---
 loolwsd/loolwsd.xml.in  |2 -
 loolwsd/test/TileCacheTests.cpp |2 +
 4 files changed, 40 insertions(+), 14 deletions(-)

New commits:
commit 807b3c2e55226a1555cf9c0c1ec41d5150f7b59a
Author: Ashod Nakashian 
Date:   Sat Aug 6 21:23:57 2016 -0400

loolstress: support trace file compression

Compression to .gz is supported and is controlled
via the XML configuration.

Change-Id: If26fad2c0b5f3c4ffd93362608644dc917172a41
Reviewed-on: https://gerrit.libreoffice.org/27975
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 0a994aa..c9ce709 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1418,7 +1418,8 @@ void LOOLWSD::initialize(Application& self)
 }
 }
 
-TraceDumper.reset(new TraceFileWriter(path, recordOutgoing, filters));
+const auto compress = getConfigValue(conf, 
"trace.path[@compress]", false);
+TraceDumper.reset(new TraceFileWriter(path, recordOutgoing, compress, 
filters));
 Log::info("Command trace dumping enabled to file: " + path);
 }
 
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index dec080c..eee746f 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -13,6 +13,8 @@
 #include 
 #include 
 
+#include 
+
 #include "Util.hpp"
 
 /// Dumps commands and notification trace.
@@ -42,11 +44,14 @@ public:
 class TraceFileWriter
 {
 public:
-TraceFileWriter(const std::string& path, const bool recordOugoing, const 
std::vector& filters) :
+TraceFileWriter(const std::string& path, const bool recordOugoing, const 
bool compress,
+const std::vector& filters) :
 _epochStart(Poco::Timestamp().epochMicroseconds()),
 _recordOutgoing(recordOugoing),
+_compress(compress),
 _filter(true),
-_stream(path, std::ios::out)
+_stream(path, compress ? std::ios::binary : std::ios::out),
+_deflater(_stream, Poco::DeflatingStreamBuf::STREAM_GZIP)
 {
 for (const auto& f : filters)
 {
@@ -56,6 +61,7 @@ public:
 
 ~TraceFileWriter()
 {
+_deflater.close();
 _stream.close();
 }
 
@@ -85,22 +91,39 @@ private:
 {
 std::unique_lock lock(_mutex);
 const Poco::Int64 usec = Poco::Timestamp().epochMicroseconds() - 
_epochStart;
-_stream.write(, 1);
-_stream << usec;
-_stream.write(, 1);
-_stream << pId;
-_stream.write(, 1);
-_stream << sessionId;
-_stream.write(, 1);
-_stream.write(data.c_str(), data.size());
-_stream.write("\n", 1);
+if (_compress)
+{
+_deflater.write(, 1);
+_deflater << usec;
+_deflater.write(, 1);
+_deflater << pId;
+_deflater.write(, 1);
+_deflater << sessionId;
+_deflater.write(, 1);
+_deflater.write(data.c_str(), data.size());
+_deflater.write("\n", 1);
+}
+else
+{
+_stream.write(, 1);
+_stream << usec;
+_stream.write(, 1);
+_stream << pId;
+_stream.write(, 1);
+_stream << sessionId;
+_stream.write(, 1);
+_stream.write(data.c_str(), data.size());
+_stream.write("\n", 1);
+}
 }
 
 private:
 const Poco::Int64 _epochStart;
 const bool _recordOutgoing;
+const bool _compress;
 Util::RegexListMatcher _filter;
-std::fstream _stream;
+std::ofstream _stream;
+Poco::DeflatingOutputStream _deflater;
 std::mutex _mutex;
 };
 
diff --git a/loolwsd/loolwsd.xml.in b/loolwsd/loolwsd.xml.in
index 6acfdf6..d05724f 100644
--- a/loolwsd/loolwsd.xml.in
+++ b/loolwsd/loolwsd.xml.in
@@ -24,7 +24,7 @@
 
 
 
-/tmp/dump
+/tmp/looltrace.gz
 
 tile.*
 
diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index d4b0a4f..54177d4 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -419,11 +419,13 @@ void 
TileCacheTests::checkBlackTiles(Poco::Net::WebSocket& socket, const int /*p
 
 const auto tile = getResponseMessage(socket, "tile:", "checkBlackTiles ");
 const std::string firstLine = LOOLProtocol::getFirstLine(tile);
+
 #if 0
 std::fstream outStream("/tmp/black.png", std::ios::out);
 outStream.write(tile.data() + firstLine.size() + 1, tile.size() - 
firstLine.size() - 1);
 outStream.close();
 #endif
+
 std::stringstream streamTile;
 std::copy(tile.begin() + firstLine.size() + 1, tile.end(), 
std::ostream_iterator(streamTile));
 checkBlackTile(streamTile);

[Libreoffice-commits] online.git: loolwsd/test

2016-08-07 Thread Ashod Nakashian
 loolwsd/test/httpwstest.cpp |   52 
 1 file changed, 38 insertions(+), 14 deletions(-)

New commits:
commit b9b3a41952aae6ba9a7aceee88416074008a95d7
Author: Ashod Nakashian 
Date:   Sat Aug 6 21:23:09 2016 -0400

loolwsd: compare uncompressed PNG in unittests

Change-Id: I5d8db39a0076bcb83d786b6afff96cd84a1f1360
Reviewed-on: https://gerrit.libreoffice.org/27974
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index c25328f..6f5be2f 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -38,13 +38,13 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
-#include 
-
-#include "helpers.hpp"
+#include "Common.hpp"
+#include "LOOLProtocol.hpp"
+#include "Png.hpp"
+#include "UserMessages.hpp"
+#include "Util.hpp"
 #include "countloolkits.hpp"
+#include "helpers.hpp"
 
 using namespace helpers;
 
@@ -1589,11 +1589,6 @@ void HTTPWSTest::testCalcEditRendering()
 
 const auto tile = getResponseMessage(socket, "tile:", "calcEditRendering 
");
 std::cout << "size: " << tile.size() << std::endl;
-const std::string firstLine = LOOLProtocol::getFirstLine(tile);
-
-std::vector res(tile.begin() + firstLine.size() + 1, tile.end());
-
-const std::vector exp = 
readDataFromFile("calc_render_0_512x512.3840,0.7680x7680.png");
 
 // Return early for now when on LO >= 5.2.
 std::string clientVersion = "loolclient 0.1";
@@ -1614,9 +1609,38 @@ void HTTPWSTest::testCalcEditRendering()
 if (major > 5 || (major == 5 && minor >= 2))
 return;
 
-CPPUNIT_ASSERT_EQUAL(exp.size(), res.size());
-const bool eq = std::equal(exp.begin(), exp.end(), res.data());
-CPPUNIT_ASSERT_MESSAGE("Tile not rendered as expected.", eq);
+const std::string firstLine = LOOLProtocol::getFirstLine(tile);
+std::vector res(tile.begin() + firstLine.size() + 1, tile.end());
+std::stringstream streamRes;
+std::copy(res.begin(), res.end(), std::ostream_iterator(streamRes));
+
+std::fstream outStream("/tmp/res.png", std::ios::out);
+outStream.write(res.data(), res.size());
+outStream.close();
+
+png_uint_32 height = 0;
+png_uint_32 width = 0;
+png_uint_32 rowBytes = 0;
+auto rows = png::decodePNG(streamRes, height, width, rowBytes);
+
+const std::vector exp = 
readDataFromFile("calc_render_0_512x512.3840,0.7680x7680.png");
+std::stringstream streamExp;
+std::copy(exp.begin(), exp.end(), std::ostream_iterator(streamExp));
+
+png_uint_32 heightExp = 0;
+png_uint_32 widthExp = 0;
+png_uint_32 rowBytesExp = 0;
+auto rowsExp = png::decodePNG(streamExp, heightExp, widthExp, rowBytesExp);
+
+CPPUNIT_ASSERT_EQUAL(heightExp, height);
+CPPUNIT_ASSERT_EQUAL(widthExp, width);
+CPPUNIT_ASSERT_EQUAL(rowBytesExp, rowBytes);
+
+for (png_uint_32 itRow = 0; itRow < height; ++itRow)
+{
+const bool eq = std::equal(rowsExp[itRow], rowsExp[itRow] + rowBytes, 
rows[itRow]);
+CPPUNIT_ASSERT_MESSAGE("Tile not rendered as expected @ row #" + 
std::to_string(itRow), eq);
+}
 }
 
 std::string HTTPWSTest::getFontList(const std::string& message)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/Png.hpp loolwsd/test

2016-08-07 Thread Ashod Nakashian
 loolwsd/Png.hpp |   75 
 loolwsd/test/TileCacheTests.cpp |   91 +++-
 2 files changed, 92 insertions(+), 74 deletions(-)

New commits:
commit 18ab6d28bfdf69bdd1827185d73081631d3e13af
Author: Ashod Nakashian 
Date:   Sat Aug 6 11:24:49 2016 -0400

loolwsd: refactored png decoding into own function

Change-Id: I8310b3880f2171c26cecbee4cb1780889d38ea31
Reviewed-on: https://gerrit.libreoffice.org/27973
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/Png.hpp b/loolwsd/Png.hpp
index 7533c4e..6796adf 100644
--- a/loolwsd/Png.hpp
+++ b/loolwsd/Png.hpp
@@ -48,6 +48,8 @@
 #define PNG_SKIP_SETJMP_CHECK
 #include 
 
+#include 
+
 namespace png
 {
 
@@ -155,6 +157,79 @@ bool encodeBufferToPNG(unsigned char* pixmap, int width, 
int height,
 return encodeSubBufferToPNG(pixmap, 0, 0, width, height, width, height, 
output, mode);
 }
 
+static
+void readTileData(png_structp png_ptr, png_bytep data, png_size_t length)
+{
+png_voidp io_ptr = png_get_io_ptr(png_ptr);
+assert(io_ptr);
+
+assert(io_ptr != nullptr);
+std::stringstream& streamTile = *(std::stringstream*)io_ptr;
+streamTile.read((char*)data, length);
+}
+
+inline
+std::vector decodePNG(std::stringstream& stream, png_uint_32& 
height, png_uint_32& width, png_uint_32& rowBytes)
+{
+png_byte signature[0x08];
+stream.read((char *)signature, 0x08);
+if (png_sig_cmp(signature, 0x00, 0x08))
+{
+throw std::runtime_error("Invalid PNG signature.");
+}
+
+png_structp ptrPNG = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, 
NULL, NULL);
+if (ptrPNG == nullptr)
+{
+throw std::runtime_error("png_create_read_struct failed.");
+}
+
+png_infop ptrInfo = png_create_info_struct(ptrPNG);
+if (ptrInfo == nullptr)
+{
+throw std::runtime_error("png_create_info_struct failed.");
+}
+
+png_infop ptrEnd = png_create_info_struct(ptrPNG);
+if (ptrEnd == nullptr)
+{
+throw std::runtime_error("png_create_info_struct failed.");
+}
+
+png_set_read_fn(ptrPNG, , readTileData);
+png_set_sig_bytes(ptrPNG, 0x08);
+
+png_read_info(ptrPNG, ptrInfo);
+
+width = png_get_image_width(ptrPNG, ptrInfo);
+height = png_get_image_height(ptrPNG, ptrInfo);
+
+png_set_interlace_handling(ptrPNG);
+png_read_update_info(ptrPNG, ptrInfo);
+
+rowBytes = png_get_rowbytes(ptrPNG, ptrInfo);
+assert(width == rowBytes / 4);
+
+const size_t dataSize = (rowBytes + sizeof(png_bytep)) * height / 
sizeof(png_bytep);
+const size_t size = dataSize + height + sizeof(png_bytep);
+
+std::vector rows;
+rows.resize(size);
+
+// rows
+for (png_uint_32 itRow = 0; itRow < height; itRow++)
+{
+const auto index = height + (itRow * rowBytes + sizeof(png_bytep) - 1) 
/ sizeof(png_bytep);
+rows[itRow] = reinterpret_cast([index]);
+}
+
+png_read_image(ptrPNG, rows.data());
+png_read_end(ptrPNG, ptrEnd);
+png_destroy_read_struct(, , );
+
+return rows;
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index 6c0ba64..d4b0a4f 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -9,16 +9,16 @@
 
 #include "config.h"
 
-#include 
 #include 
 #include 
 
+#include "Common.hpp"
+#include "LOOLProtocol.hpp"
+#include "Png.hpp"
+#include "TileCache.hpp"
+#include "Unit.hpp"
+#include "Util.hpp"
 #include "helpers.hpp"
-#include 
-#include 
-#include 
-#include 
-#include 
 
 using namespace helpers;
 
@@ -376,90 +376,33 @@ void TileCacheTests::testLoad12ods()
 }
 }
 
-void readTileData(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-png_voidp io_ptr = png_get_io_ptr(png_ptr);
-CPPUNIT_ASSERT(io_ptr);
-
-assert(io_ptr != nullptr);
-std::stringstream& streamTile = *(std::stringstream*)io_ptr;
-streamTile.read((char*)data, length);
-}
-
 void TileCacheTests::checkBlackTile(std::stringstream& tile)
 {
-png_uint_32 width;
-png_uint_32 height;
-png_uint_32 itRow;
-png_uint_32 itCol;
-png_uint_32 black;
-png_uint_32 rowBytes;
-
-png_infop ptrInfo;
-png_infop ptrEnd;
-png_structp ptrPNG;
-png_byte signature[0x08];
-
-tile.read((char *)signature, 0x08);
-CPPUNIT_ASSERT_MESSAGE( "Tile is not recognized as a PNG", 
!png_sig_cmp(signature, 0x00, 0x08));
-
-ptrPNG = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-CPPUNIT_ASSERT_MESSAGE("png_create_read_struct failed", ptrPNG);
-
-ptrInfo = png_create_info_struct(ptrPNG);
-CPPUNIT_ASSERT_MESSAGE("png_create_info_struct failed", ptrInfo);
-
-ptrEnd = png_create_info_struct(ptrPNG);
-CPPUNIT_ASSERT_MESSAGE("png_create_info_struct 

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

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 7ae28d5642cb99595b804561ebcd034a96f12706
Author: Ashod Nakashian 
Date:   Thu Aug 4 20:17:13 2016 -0400

loolstress: new option to replay without timing delays

Change-Id: Ic1f6c911f504128b7d1aa5e3ee2354e382b825c5
Reviewed-on: https://gerrit.libreoffice.org/27971
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index f042901..9b7981c 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -53,6 +53,7 @@ public:
 Stress();
 ~Stress() {}
 
+static bool NoDelay;
 unsigned_numClients;
 std::string _serverURI;
 
@@ -152,9 +153,14 @@ private:
 
 const auto deltaCurrent = 
std::chrono::duration_cast(std::chrono::steady_clock::now()
 - epochCurrent).count();
 const auto deltaFile = rec.TimestampNs - epochFile;
-const auto delay = deltaFile - deltaCurrent;
+const auto delay = (Stress::NoDelay ? 0 : deltaFile - 
deltaCurrent);
 if (delay > 0)
 {
+if (delay > 1e6)
+{
+std::cerr << "Sleeping for " << delay / 1000 << " ms.\n";
+}
+
 std::this_thread::sleep_for(std::chrono::microseconds(delay));
 }
 
@@ -251,6 +257,8 @@ private:
 std::map> 
Sessions;
 };
 
+bool Stress::NoDelay = false;
+
 Stress::Stress() :
 _numClients(1),
 #if ENABLE_SSL
@@ -267,6 +275,8 @@ void Stress::defineOptions(OptionSet& optionSet)
 
 optionSet.addOption(Option("help", "", "Display help information on 
command line arguments.")
 .required(false).repeatable(false));
+optionSet.addOption(Option("nodelay", "", "Replay at full speed 
disregarding original timing.")
+.required(false).repeatable(false));
 optionSet.addOption(Option("clientsperdoc", "", "Number of simultaneous 
clients on each doc.")
 .required(false).repeatable(false)
 .argument("concurrency"));
@@ -290,6 +300,8 @@ void Stress::handleOption(const std::string& optionName,
 helpFormatter.format(std::cout);
 std::exit(Application::EXIT_OK);
 }
+else if (optionName == "nodelay")
+Stress::NoDelay = true;
 else if (optionName == "clientsperdoc")
 _numClients = std::max(std::stoi(value), 1);
 else if (optionName == "server")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/README loolwsd/LOOLWSD.cpp loolwsd/loolwsd.xml.in loolwsd/TraceFile.hpp loolwsd/Util.hpp

2016-08-07 Thread Ashod Nakashian
 loleaflet/README   |5 +
 loolwsd/LOOLWSD.cpp|   18 +-
 loolwsd/TraceFile.hpp  |   17 ++---
 loolwsd/Util.hpp   |   21 +++--
 loolwsd/loolwsd.xml.in |3 +++
 5 files changed, 58 insertions(+), 6 deletions(-)

New commits:
commit 045f0b6388c155eb67b4fb2137ea60c5934da2e2
Author: Ashod Nakashian 
Date:   Fri Aug 5 11:25:49 2016 -0400

loleaflet: npm requirement and upgrade instructions added

Change-Id: Id769931cfef8c6c1cc291b12ed399484f6b19f97
Reviewed-on: https://gerrit.libreoffice.org/27972
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loleaflet/README b/loleaflet/README
index 8daebaf..cfac4c5 100644
--- a/loleaflet/README
+++ b/loleaflet/README
@@ -13,6 +13,11 @@ First you need to install 'jake', and 'browserify'.  As 
root, do:
 
 npm is provided by the nodejs package.
 
+npm should be at least 2.14, if not 3.x. Use `npm -v` to find the current 
version.
+Upgrade npm (as root):
+
+npm install -g npm
+
 Another way is to use npm as a user, but set its prefix to a directory where
 you have write access. If you want that, you need to have an ~/.npmrc with the
 line e.g.
commit a3e9fc81397d83188466373cd04c2bdecaa91f23
Author: Ashod Nakashian 
Date:   Thu Aug 4 18:44:24 2016 -0400

loolstress: filter trace messages by regex config

Change-Id: I13483cd6614e5753a22408102c9cc310a587db2e
Reviewed-on: https://gerrit.libreoffice.org/27970
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index a8c397a..0a994aa 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1402,7 +1402,23 @@ void LOOLWSD::initialize(Application& self)
 if (getConfigValue(conf, "trace[@enable]", false))
 {
 const auto& path = getConfigValue(conf, "trace.path", "");
-TraceDumper.reset(new TraceFileWriter(path, getConfigValue(conf, 
"trace.outgoing.record", false)));
+const auto recordOutgoing = getConfigValue(conf, 
"trace.outgoing.record", false);
+std::vector filters;
+for (size_t i = 0; ; ++i)
+{
+const std::string confPath = "trace.filter.message[" + 
std::to_string(i) + "]";
+const auto regex = config().getString(confPath, "");
+if (!regex.empty())
+{
+filters.push_back(regex);
+}
+else if (!config().has(confPath))
+{
+break;
+}
+}
+
+TraceDumper.reset(new TraceFileWriter(path, recordOutgoing, filters));
 Log::info("Command trace dumping enabled to file: " + path);
 }
 
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index d9b02bf..dec080c 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -13,6 +13,8 @@
 #include 
 #include 
 
+#include "Util.hpp"
+
 /// Dumps commands and notification trace.
 class TraceFileRecord
 {
@@ -40,11 +42,16 @@ public:
 class TraceFileWriter
 {
 public:
-TraceFileWriter(const std::string& path, const bool recordOugoing) :
+TraceFileWriter(const std::string& path, const bool recordOugoing, const 
std::vector& filters) :
 _epochStart(Poco::Timestamp().epochMicroseconds()),
 _recordOutgoing(recordOugoing),
+_filter(true),
 _stream(path, std::ios::out)
 {
+for (const auto& f : filters)
+{
+_filter.deny(f);
+}
 }
 
 ~TraceFileWriter()
@@ -59,12 +66,15 @@ public:
 
 void writeIncoming(const std::string& pId, const std::string& sessionId, 
const std::string& data)
 {
-write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Incoming));
+if (_filter.match(data))
+{
+write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Incoming));
+}
 }
 
 void writeOutgoing(const std::string& pId, const std::string& sessionId, 
const std::string& data)
 {
-if (_recordOutgoing)
+if (_recordOutgoing && _filter.match(data))
 {
 write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Outgoing));
 }
@@ -89,6 +99,7 @@ private:
 private:
 const Poco::Int64 _epochStart;
 const bool _recordOutgoing;
+Util::RegexListMatcher _filter;
 std::fstream _stream;
 std::mutex _mutex;
 };
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index 1bbd377..f3425fe 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -114,22 +114,37 @@ namespace Util
 class RegexListMatcher
 {
 public:
-RegexListMatcher()
+RegexListMatcher() :
+_allowByDefault(false)
+{
+}
+
+RegexListMatcher(const bool allowByDefault) :
+_allowByDefault(allowByDefault)

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

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp|2 +-
 loolwsd/TraceFile.hpp  |9 +++--
 loolwsd/loolwsd.xml.in |3 +++
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit f57964bd058a360ec36fb210c2ff78783c79ecd7
Author: Ashod Nakashian 
Date:   Thu Aug 4 13:52:28 2016 -0400

loolstress: outgoing trace recording controlled from config

Change-Id: I5788da96d4c2fecde818c6dde8ebfcd6ae206cec
Reviewed-on: https://gerrit.libreoffice.org/27969
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index c86ceb7..a8c397a 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1402,7 +1402,7 @@ void LOOLWSD::initialize(Application& self)
 if (getConfigValue(conf, "trace[@enable]", false))
 {
 const auto& path = getConfigValue(conf, "trace.path", "");
-TraceDumper.reset(new TraceFileWriter(path));
+TraceDumper.reset(new TraceFileWriter(path, getConfigValue(conf, 
"trace.outgoing.record", false)));
 Log::info("Command trace dumping enabled to file: " + path);
 }
 
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 5e01967..d9b02bf 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -40,8 +40,9 @@ public:
 class TraceFileWriter
 {
 public:
-TraceFileWriter(const std::string& path) :
+TraceFileWriter(const std::string& path, const bool recordOugoing) :
 _epochStart(Poco::Timestamp().epochMicroseconds()),
+_recordOutgoing(recordOugoing),
 _stream(path, std::ios::out)
 {
 }
@@ -63,7 +64,10 @@ public:
 
 void writeOutgoing(const std::string& pId, const std::string& sessionId, 
const std::string& data)
 {
-write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Outgoing));
+if (_recordOutgoing)
+{
+write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Outgoing));
+}
 }
 
 private:
@@ -84,6 +88,7 @@ private:
 
 private:
 const Poco::Int64 _epochStart;
+const bool _recordOutgoing;
 std::fstream _stream;
 std::mutex _mutex;
 };
diff --git a/loolwsd/loolwsd.xml.in b/loolwsd/loolwsd.xml.in
index f5916e6..1267210 100644
--- a/loolwsd/loolwsd.xml.in
+++ b/loolwsd/loolwsd.xml.in
@@ -25,6 +25,9 @@
 
 
 /tmp/dump
+
+false
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLStress.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |  159 ++---
 loolwsd/TraceFile.hpp  |   14 ++--
 2 files changed, 94 insertions(+), 79 deletions(-)

New commits:
commit f9ec1bade3325fc4c3505b60ef63665d32e38739
Author: Ashod Nakashian 
Date:   Thu Aug 4 12:17:22 2016 -0400

loolstress: time-accurate replay

Change-Id: I1aff521f042c61916ef6ddfc50c2fe06c41b29ee
Reviewed-on: https://gerrit.libreoffice.org/27968
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index f60aa55..f042901 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -124,108 +124,119 @@ public:
 
 void run() override
 {
-const auto epochStart(std::chrono::steady_clock::now());
 try
 {
-for (;;)
+doRun();
+}
+catch (const Poco::Exception )
+{
+std::cerr << "Error: " << e.name() << ' '
+  << e.message() << std::endl;
+}
+}
+
+private:
+
+void doRun()
+{
+auto epochFile(_traceFile.getEpoch());
+auto epochCurrent(std::chrono::steady_clock::now());
+for (;;)
+{
+const auto rec = _traceFile.getNextRecord();
+if (rec.Dir == TraceFileRecord::Direction::Invalid)
 {
-const auto rec = _traceFile.getNextRecord();
-if (rec.Dir == TraceFileRecord::Direction::Invalid)
-{
-// End of trace file.
-break;
-}
+// End of trace file.
+break;
+}
 
-const auto delta = (epochStart - 
std::chrono::steady_clock::now());
-const auto delay = rec.TimestampNs - 
std::chrono::duration_cast(delta).count();
-if (delay > 0)
-{
-
std::this_thread::sleep_for(std::chrono::microseconds(delay));
-}
+const auto deltaCurrent = 
std::chrono::duration_cast(std::chrono::steady_clock::now()
 - epochCurrent).count();
+const auto deltaFile = rec.TimestampNs - epochFile;
+const auto delay = deltaFile - deltaCurrent;
+if (delay > 0)
+{
+std::this_thread::sleep_for(std::chrono::microseconds(delay));
+}
 
-if (rec.Dir == TraceFileRecord::Direction::Event)
-{
-// Meta info about about an event.
-static const std::string NewSession("NewSession: ");
-static const std::string EndSession("EndSession: ");
+if (rec.Dir == TraceFileRecord::Direction::Event)
+{
+// Meta info about about an event.
+static const std::string NewSession("NewSession: ");
+static const std::string EndSession("EndSession: ");
 
-if (rec.Payload.find(NewSession) == 0)
+if (rec.Payload.find(NewSession) == 0)
+{
+const auto& uri = rec.Payload.substr(NewSession.size());
+auto it = Sessions.find(uri);
+if (it != Sessions.end())
 {
-const auto& uri = 
rec.Payload.substr(NewSession.size());
-auto it = Sessions.find(uri);
-if (it != Sessions.end())
+// Add a new session.
+if (it->second.find(rec.SessionId) != it->second.end())
 {
-// Add a new session.
-if (it->second.find(rec.SessionId) != 
it->second.end())
-{
-std::cerr << "ERROR: session [" << 
rec.SessionId << "] already exists on doc [" << uri << "]\n";
-}
-else
-{
-it->second.emplace(rec.SessionId, 
Connection::create(_app._serverURI, uri, rec.SessionId));
-}
+std::cerr << "ERROR: session [" << rec.SessionId 
<< "] already exists on doc [" << uri << "]\n";
 }
 else
 {
-std::cerr << "New Document: " << uri << "\n";
-ChildToDoc.emplace(rec.Pid, uri);
-Sessions[uri].emplace(rec.SessionId, 
Connection::create(_app._serverURI, uri, rec.SessionId));
+it->second.emplace(rec.SessionId, 
Connection::create(_app._serverURI, uri, rec.SessionId));
 }
 }
-else if (rec.Payload.find(EndSession) == 0)
+ 

[Libreoffice-commits] online.git: loolwsd/LOOLStress.cpp loolwsd/LOOLWSD.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |  135 +++--
 loolwsd/LOOLWSD.cpp|5 -
 loolwsd/TraceFile.hpp  |   52 ++
 3 files changed, 152 insertions(+), 40 deletions(-)

New commits:
commit 7af51f51c4f4d89c837c96bd3c59e66288025a77
Author: Ashod Nakashian 
Date:   Thu Aug 4 10:31:11 2016 -0400

loolstress: new Connection manager and event handler

Change-Id: Ifc921f7fcf298457a848da444c2d3830b9755603
Reviewed-on: https://gerrit.libreoffice.org/27967
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index 6a7c38d..f60aa55 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -76,37 +76,63 @@ using Poco::Util::HelpFormatter;
 using Poco::Util::Option;
 using Poco::Util::OptionSet;
 
-class Worker: public Runnable
+class Connection
 {
 public:
+static
+std::unique_ptr create(const std::string& serverURI, const 
std::string& documentURL, const std::string& sessionId)
+{
+Poco::URI uri(serverURI);
 
-Worker(Stress& app, const std::string& traceFilePath) :
-_app(app), _traceFile(traceFilePath)
+// Load a document and get its status.
+std::cerr << "NewSession [" << sessionId << "]: " << uri.toString() << 
"... ";
+Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
"/lool/ws/" + documentURL);
+Poco::Net::HTTPResponse response;
+auto ws = helpers::connectLOKit(uri, request, response, "loolStress ");
+std::cerr << "Connected.\n";
+return std::unique_ptr(new Connection(documentURL, 
sessionId, ws));
+}
+
+void send(const std::string& data) const
 {
+helpers::sendTextFrame(_ws, data, "loolstress ");
 }
 
-void run() override
+private:
+Connection(const std::string& documentURL, const std::string& sessionId, 
std::shared_ptr& ws) :
+_documentURL(documentURL),
+_sessionId(sessionId),
+_ws(ws)
 {
-std::cerr << "Connecting to server: " << _app._serverURI << "\n";
+}
 
-Poco::URI uri(_app._serverURI);
+private:
+const std::string _documentURL;
+const std::string _sessionId;
+std::shared_ptr _ws;
+};
 
-const auto documentURL = _traceFile.getDocURI();
-std::cerr << "Loading: " << documentURL << "\n";
+class Worker: public Runnable
+{
+public:
 
-// Load a document and get its status.
-Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
documentURL);
-Poco::Net::HTTPResponse response;
-auto socket = helpers::connectLOKit(uri, request, response, 
"loolStress ");
+Worker(Stress& app, const std::string& traceFilePath) :
+_app(app),
+_traceFile(traceFilePath)
+{
+}
 
+void run() override
+{
 const auto epochStart(std::chrono::steady_clock::now());
 try
 {
 for (;;)
 {
-const auto rec = 
_traceFile.getNextRecord(TraceFileRecord::Direction::Incoming);
+const auto rec = _traceFile.getNextRecord();
 if (rec.Dir == TraceFileRecord::Direction::Invalid)
 {
+// End of trace file.
 break;
 }
 
@@ -117,7 +143,82 @@ public:
 
std::this_thread::sleep_for(std::chrono::microseconds(delay));
 }
 
-helpers::sendTextFrame(socket, rec.Payload);
+if (rec.Dir == TraceFileRecord::Direction::Event)
+{
+// Meta info about about an event.
+static const std::string NewSession("NewSession: ");
+static const std::string EndSession("EndSession: ");
+
+if (rec.Payload.find(NewSession) == 0)
+{
+const auto& uri = 
rec.Payload.substr(NewSession.size());
+auto it = Sessions.find(uri);
+if (it != Sessions.end())
+{
+// Add a new session.
+if (it->second.find(rec.SessionId) != 
it->second.end())
+{
+std::cerr << "ERROR: session [" << 
rec.SessionId << "] already exists on doc [" << uri << "]\n";
+}
+else
+{
+it->second.emplace(rec.SessionId, 
Connection::create(_app._serverURI, uri, rec.SessionId));
+}
+}
+else
+{
+std::cerr << "New Document: " << uri << "\n";
+ChildToDoc.emplace(rec.Pid, uri);
+

[Libreoffice-commits] online.git: loolwsd/ClientSession.cpp loolwsd/DocumentBroker.cpp loolwsd/LOOLWSD.hpp loolwsd/PrisonerSession.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/ClientSession.cpp   |2 +-
 loolwsd/DocumentBroker.cpp  |2 +-
 loolwsd/LOOLWSD.hpp |8 
 loolwsd/PrisonerSession.cpp |2 +-
 loolwsd/TraceFile.hpp   |   23 ---
 5 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit c304cbc95b8cfab213f4695d76dca41f274be18b
Author: Ashod Nakashian 
Date:   Wed Aug 3 08:15:04 2016 -0400

loolstress: trace session ID and child pid

Change-Id: Iac6b3dadedfcdec91db21a5e90eb3827705281d4
Reviewed-on: https://gerrit.libreoffice.org/27966
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp
index 57da9a6..d2debdf 100644
--- a/loolwsd/ClientSession.cpp
+++ b/loolwsd/ClientSession.cpp
@@ -64,7 +64,7 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 StringTokenizer tokens(firstLine, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
 Log::trace(getName() + ": handling [" + firstLine + "].");
 
-LOOLWSD::dumpIncomingTrace(firstLine);
+LOOLWSD::dumpIncomingTrace(_docBroker->getJailId(), getId(), firstLine);
 
 if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
 {
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index f998ab4..a0d59ca 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -454,7 +454,7 @@ bool DocumentBroker::handleInput(const std::vector& 
payload)
 Log::trace("DocumentBroker got child message: [" + 
LOOLProtocol::getAbbreviatedMessage(payload) + "].");
 
 const auto command = LOOLProtocol::getFirstToken(payload);
-LOOLWSD::dumpOutgoingTrace(command);
+LOOLWSD::dumpOutgoingTrace(getJailId(), "0", command);
 
 if (command == "tile:")
 {
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 588c37d..1544fd1 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -71,20 +71,20 @@ public:
 }
 
 static
-void dumpIncomingTrace(const std::string& data)
+void dumpIncomingTrace(const std::string& pId, const std::string& 
sessionId, const std::string& data)
 {
 if (TraceDumper)
 {
-TraceDumper->writeIncoming(data);
+TraceDumper->writeIncoming(pId, sessionId, data);
 }
 }
 
 static
-void dumpOutgoingTrace(const std::string& data)
+void dumpOutgoingTrace(const std::string& pId, const std::string& 
sessionId, const std::string& data)
 {
 if (TraceDumper)
 {
-TraceDumper->writeOutgoing(data);
+TraceDumper->writeOutgoing(pId, sessionId, data);
 }
 }
 
diff --git a/loolwsd/PrisonerSession.cpp b/loolwsd/PrisonerSession.cpp
index 2114f5c..95a5fbd 100644
--- a/loolwsd/PrisonerSession.cpp
+++ b/loolwsd/PrisonerSession.cpp
@@ -54,7 +54,7 @@ bool PrisonerSession::_handleInput(const char *buffer, int 
length)
 StringTokenizer tokens(firstLine, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
 Log::trace(getName() + ": handling [" + firstLine + "].");
 
-LOOLWSD::dumpOutgoingTrace(firstLine);
+LOOLWSD::dumpOutgoingTrace(_docBroker->getJailId(), getId(), firstLine);
 
 if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
 {
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 6e8a6a9..cd429a6 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -31,8 +31,9 @@ public:
 }
 
 Direction Dir;
-unsigned Pid;
 unsigned TimestampNs;
+unsigned Pid;
+unsigned SessionId;
 std::string Payload;
 };
 
@@ -52,31 +53,31 @@ public:
 
 void writeEvent(const std::string& pId, const std::string& sessionId, 
const std::string& data)
 {
-(void)pId;
-(void)sessionId;
-write(data, static_cast(TraceFileRecord::Direction::Event));
+write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Event));
 }
 
-void writeIncoming(const std::string& data)
+void writeIncoming(const std::string& pId, const std::string& sessionId, 
const std::string& data)
 {
-write(data, static_cast(TraceFileRecord::Direction::Incoming));
+write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Incoming));
 }
 
-void writeOutgoing(const std::string& data)
+void writeOutgoing(const std::string& pId, const std::string& sessionId, 
const std::string& data)
 {
-write(data, static_cast(TraceFileRecord::Direction::Outgoing));
+write(pId, sessionId, data, 
static_cast(TraceFileRecord::Direction::Outgoing));
 }
 
 private:
-void write(const std::string& data, const char delim)
+void write(const std::string& pId, const std::string& sessionId, const 
std::string& data, const char delim)
 {
 std::unique_lock lock(_mutex);
 const Poco::Int64 usec = 

[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/LOOLWSD.hpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp   |3 +++
 loolwsd/LOOLWSD.hpp   |9 +
 loolwsd/TraceFile.hpp |   10 +-
 3 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit d5aa200471b91077af66772a39135bac444f5879
Author: Ashod Nakashian 
Date:   Tue Aug 2 21:09:01 2016 -0400

loolstress: trace events

Change-Id: I1a38ab37dc5d276cdf5336fb04b0ad372804a00d
Reviewed-on: https://gerrit.libreoffice.org/27965
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 74f22af..187c68f 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -683,6 +683,8 @@ private:
 // Wait until the client has connected with a prison socket.
 waitBridgeCompleted(session);
 
+LOOLWSD::dumpEventTrace(docBroker->getJailId(), id, "NewSession");
+
 // Now the bridge beetween the client and kit process is connected
 status = "statusindicator: ready";
 Log::trace("Sending to Client [" + status + "].");
@@ -758,6 +760,7 @@ private:
 Admin::instance().rmDoc(docKey);
 }
 
+LOOLWSD::dumpEventTrace(docBroker->getJailId(), id, "EndSession");
 Log::info("Finishing GET request handler for session [" + id + "]. 
Joining the queue.");
 queue->put("eof");
 queueHandlerThread.join();
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 5d14171..588c37d 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -62,6 +62,15 @@ public:
 }
 
 static
+void dumpEventTrace(const std::string& pId, const std::string& sessionId, 
const std::string& data)
+{
+if (TraceDumper)
+{
+TraceDumper->writeEvent(pId, sessionId, data);
+}
+}
+
+static
 void dumpIncomingTrace(const std::string& data)
 {
 if (TraceDumper)
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index a5dc558..6e8a6a9 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -21,7 +21,8 @@ public:
 {
 Invalid = 0,
 Incoming = '>',
-Outgoing = '<'
+Outgoing = '<',
+Event = '-'
 };
 
 TraceFileRecord() :
@@ -49,6 +50,13 @@ public:
 _stream.close();
 }
 
+void writeEvent(const std::string& pId, const std::string& sessionId, 
const std::string& data)
+{
+(void)pId;
+(void)sessionId;
+write(data, static_cast(TraceFileRecord::Direction::Event));
+}
+
 void writeIncoming(const std::string& data)
 {
 write(data, static_cast(TraceFileRecord::Direction::Incoming));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp   |2 +
 loolwsd/TraceFile.hpp |   70 ++
 2 files changed, 39 insertions(+), 33 deletions(-)

New commits:
commit ca9135e7a5682df3b0368cc84d73efcf2058f0f9
Author: Ashod Nakashian 
Date:   Tue Aug 2 10:00:37 2016 -0400

loolstress: add pid to trace file and parse it

Change-Id: I74569d5692291b4f3310b996d1cf49d5c951d0fc
Reviewed-on: https://gerrit.libreoffice.org/27964
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index c2df0b3..74f22af 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -862,6 +862,8 @@ public:
 const auto id = LOOLWSD::GenSessionId();
 
 Poco::URI requestUri(request.getURI());
+Log::debug("Handling GET: " + request.getURI());
+
 std::vector reqPathSegs;
 requestUri.getPathSegments(reqPathSegs);
 
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index bb39c44..a5dc558 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -14,6 +14,27 @@
 #include 
 
 /// Dumps commands and notification trace.
+class TraceFileRecord
+{
+public:
+enum class Direction : char
+{
+Invalid = 0,
+Incoming = '>',
+Outgoing = '<'
+};
+
+TraceFileRecord() :
+Dir(Direction::Invalid)
+{
+}
+
+Direction Dir;
+unsigned Pid;
+unsigned TimestampNs;
+std::string Payload;
+};
+
 class TraceFileWriter
 {
 public:
@@ -30,22 +51,24 @@ public:
 
 void writeIncoming(const std::string& data)
 {
-std::unique_lock lock(_mutex);
-const Poco::Int64 usec = Poco::Timestamp().epochMicroseconds() - 
_epochStart;
-_stream.write(">", 1);
-_stream << usec;
-_stream.write(">", 1);
-_stream.write(data.c_str(), data.size());
-_stream.write("\n", 1);
+write(data, static_cast(TraceFileRecord::Direction::Incoming));
 }
 
 void writeOutgoing(const std::string& data)
 {
+write(data, static_cast(TraceFileRecord::Direction::Outgoing));
+}
+
+private:
+void write(const std::string& data, const char delim)
+{
 std::unique_lock lock(_mutex);
 const Poco::Int64 usec = Poco::Timestamp().epochMicroseconds() - 
_epochStart;
-_stream.write("<", 1);
+_stream.write(, 1);
+_stream << getpid();
+_stream.write(, 1);
 _stream << usec;
-_stream.write("<", 1);
+_stream.write(, 1);
 _stream.write(data.c_str(), data.size());
 _stream.write("\n", 1);
 }
@@ -56,26 +79,6 @@ private:
 std::mutex _mutex;
 };
 
-class TraceFileRecord
-{
-public:
-enum class Direction
-{
-Invalid,
-Incoming,
-Outgoing
-};
-
-TraceFileRecord() :
-Dir(Direction::Invalid)
-{
-}
-
-Direction Dir;
-unsigned TimestampNs;
-std::string Payload;
-};
-
 class TraceFileReader
 {
 public:
@@ -124,12 +127,13 @@ private:
 while (std::getline(_stream, line) && !line.empty())
 {
 const auto v = split(line, line[0]);
-if (v.size() == 2)
+if (v.size() == 3)
 {
 TraceFileRecord rec;
-rec.Dir = (line[0] == '>' ? 
TraceFileRecord::Direction::Incoming : TraceFileRecord::Direction::Outgoing);
-rec.TimestampNs = std::atoi(v[0].c_str());
-rec.Payload = v[1];
+rec.Dir = static_cast(line[0]);
+rec.Pid = std::atoi(v[0].c_str());
+rec.TimestampNs = std::atoi(v[1].c_str());
+rec.Payload = v[2];
 _records.push_back(rec);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

New commits:
commit a750edd70dda63a2dd5ca3c72641b207d4f45c99
Author: Ashod Nakashian 
Date:   Mon Aug 1 22:21:06 2016 -0400

loolstress: replay trace file

Change-Id: I076ec4ff398cf22ca6916ad11afc9ecb75421ac1
Reviewed-on: https://gerrit.libreoffice.org/27963
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index c83d641..6a7c38d 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -10,11 +10,13 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -87,9 +89,6 @@ public:
 {
 std::cerr << "Connecting to server: " << _app._serverURI << "\n";
 
-const auto rec = 
_traceFile.getNextRecord(TraceFileRecord::Direction::Incoming);
-std::cout << rec.Payload << "\n";
-
 Poco::URI uri(_app._serverURI);
 
 const auto documentURL = _traceFile.getDocURI();
@@ -100,9 +99,26 @@ public:
 Poco::Net::HTTPResponse response;
 auto socket = helpers::connectLOKit(uri, request, response, 
"loolStress ");
 
+const auto epochStart(std::chrono::steady_clock::now());
 try
 {
-
+for (;;)
+{
+const auto rec = 
_traceFile.getNextRecord(TraceFileRecord::Direction::Incoming);
+if (rec.Dir == TraceFileRecord::Direction::Invalid)
+{
+break;
+}
+
+const auto delta = (epochStart - 
std::chrono::steady_clock::now());
+const auto delay = rec.TimestampNs - 
std::chrono::duration_cast(delta).count();
+if (delay > 0)
+{
+
std::this_thread::sleep_for(std::chrono::microseconds(delay));
+}
+
+helpers::sendTextFrame(socket, rec.Payload);
+}
 }
 catch (const Poco::Exception )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/TraceFile.hpp |   60 +++---
 1 file changed, 57 insertions(+), 3 deletions(-)

New commits:
commit 4f57e43fdc79f87a6ba4c827dd78ed9e08177d7c
Author: Ashod Nakashian 
Date:   Sun Jul 31 19:32:37 2016 -0400

loolstress: load trace file records

Change-Id: Id0f76c1848863f5910d4492b2d37c6b18d1b3871
Reviewed-on: https://gerrit.libreoffice.org/27961
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index cf51981..41f316d 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -61,10 +61,16 @@ class TraceFileRecord
 public:
 enum class Direction
 {
+Invalid,
 Incoming,
 Outgoing
 };
 
+TraceFileRecord() :
+Dir(Direction::Invalid)
+{
+}
+
 Direction Dir;
 unsigned TimestampNs;
 std::string Payload;
@@ -75,12 +81,43 @@ class TraceFileReader
 public:
 TraceFileReader(const std::string& path) :
 _epochStart(Poco::Timestamp().epochMicroseconds()),
-_stream(path)
+_stream(path),
+_indexIn(-1),
+_indexOut(-1)
 {
+readFile();
 }
 
+TraceFileRecord getNextRecord(const TraceFileRecord::Direction dir)
+{
+if (dir == TraceFileRecord::Direction::Incoming)
+{
+if (_indexIn < _records.size())
+{
+const TraceFileRecord rec = _records[_indexIn];
+_indexIn = advance(_indexIn, dir);
+return rec;
+}
+}
+else
+{
+if (_indexOut < _records.size())
+{
+const TraceFileRecord rec = _records[_indexOut];
+_indexOut = advance(_indexOut, dir);
+return rec;
+}
+}
+
+// Invalid.
+return TraceFileRecord();
+}
+
+private:
 void readFile()
 {
+_records.clear();
+
 std::string line;
 while (std::getline(_stream, line) && !line.empty())
 {
@@ -94,10 +131,12 @@ public:
 _records.push_back(rec);
 }
 }
+
+_indexIn = advance(-1, TraceFileRecord::Direction::Incoming);
+_indexOut = advance(-1, TraceFileRecord::Direction::Outgoing);
 }
 
-private:
-std::vector split(const std::string& s, const char delim)
+std::vector split(const std::string& s, const char delim) 
const
 {
 std::stringstream ss(s);
 std::string item;
@@ -113,10 +152,25 @@ private:
 return v;
 }
 
+unsigned advance(unsigned index, const TraceFileRecord::Direction dir)
+{
+while (++index < _records.size())
+{
+if (_records[index].Dir == dir)
+{
+break;
+}
+}
+
+return index;
+}
+
 private:
 const Poco::Int64 _epochStart;
 std::ifstream _stream;
 std::vector _records;
+unsigned _indexIn;
+unsigned _indexOut;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLStress.cpp loolwsd/Makefile.am loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   19 ++-
 loolwsd/Makefile.am|3 ++-
 loolwsd/TraceFile.hpp  |   22 ++
 3 files changed, 34 insertions(+), 10 deletions(-)

New commits:
commit 831a917977b040e157d544ace8835483f77c402c
Author: Ashod Nakashian 
Date:   Mon Aug 1 21:53:09 2016 -0400

loolstress: Parse trace file header and document URI

Change-Id: I659f9ec3d0cb9f1333d930d0b21c5b3afd115d32
Reviewed-on: https://gerrit.libreoffice.org/27962
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index ef06135..c83d641 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -85,19 +85,20 @@ public:
 
 void run() override
 {
-_traceFile.readFile();
-
 std::cerr << "Connecting to server: " << _app._serverURI << "\n";
 
+const auto rec = 
_traceFile.getNextRecord(TraceFileRecord::Direction::Incoming);
+std::cout << rec.Payload << "\n";
+
 Poco::URI uri(_app._serverURI);
 
-const auto documentURL = "lool/ws/file://" + 
Poco::Path(_traceFilePath).makeAbsolute().toString();
+const auto documentURL = _traceFile.getDocURI();
+std::cerr << "Loading: " << documentURL << "\n";
 
-std::unique_ptr session;
-if (_app._serverURI.compare(0, 5, "https"))
-session.reset(new Poco::Net::HTTPSClientSession(uri.getHost(), 
uri.getPort()));
-else
-session.reset(new Poco::Net::HTTPClientSession(uri.getHost(), 
uri.getPort()));
+// Load a document and get its status.
+Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
documentURL);
+Poco::Net::HTTPResponse response;
+auto socket = helpers::connectLOKit(uri, request, response, 
"loolStress ");
 
 try
 {
@@ -117,7 +118,7 @@ private:
 };
 
 Stress::Stress() :
-_numClients(4),
+_numClients(1),
 #if ENABLE_SSL
 _serverURI("https://127.0.0.1:; + 
std::to_string(DEFAULT_CLIENT_PORT_NUMBER))
 #else
diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index d3cd9ef..4f36078 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -78,7 +78,8 @@ loolmap_SOURCES = loolmap.c
 
 looltool_SOURCES = LOOLTool.cpp
 
-loolstress_SOURCES = LOOLStress.cpp
+loolstress_SOURCES = LOOLStress.cpp \
+ LOOLProtocol.cpp
 
 noinst_HEADERS = Admin.hpp \
  AdminModel.hpp \
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 41f316d..bb39c44 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -88,6 +88,8 @@ public:
 readFile();
 }
 
+const std::string& getDocURI() const { return _docURI; }
+
 TraceFileRecord getNextRecord(const TraceFileRecord::Direction dir)
 {
 if (dir == TraceFileRecord::Direction::Incoming)
@@ -134,6 +136,25 @@ private:
 
 _indexIn = advance(-1, TraceFileRecord::Direction::Incoming);
 _indexOut = advance(-1, TraceFileRecord::Direction::Outgoing);
+
+if (_records.size() > 1)
+{
+if (_records[0].Payload.find("loolclient") == 0 &&
+_records[1].Payload.find("load url=") == 0)
+{
+_docURI = _records[1].Payload.substr(9);
+return;
+}
+else if (_records[0].Payload.find("load url=") == 0)
+{
+_docURI = _records[0].Payload.substr(9);
+return;
+}
+}
+
+fprintf(stderr, "Invalid trace file with %ld records. First record: 
%s\n", _records.size(),
+_records.empty() ? "" : _records[0].Payload.c_str());
+throw std::runtime_error("Invalid trace file.");
 }
 
 std::vector split(const std::string& s, const char delim) 
const
@@ -169,6 +190,7 @@ private:
 const Poco::Int64 _epochStart;
 std::ifstream _stream;
 std::vector _records;
+std::string _docURI;
 unsigned _indexIn;
 unsigned _indexOut;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLStress.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |4 ++-
 loolwsd/TraceFile.hpp  |   55 +++--
 2 files changed, 56 insertions(+), 3 deletions(-)

New commits:
commit 4d7c2e4002b51d4a1347a5178103612df2985ddc
Author: Ashod Nakashian 
Date:   Sun Jul 31 18:06:01 2016 -0400

loolstress: parse trace file

Change-Id: I04964744a74d3a025e310d7ec52f5d1f5b6d100d
Reviewed-on: https://gerrit.libreoffice.org/27960
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index 6bda492..ef06135 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -79,12 +79,14 @@ class Worker: public Runnable
 public:
 
 Worker(Stress& app, const std::string& traceFilePath) :
-_app(app), _traceFilePath(traceFilePath)
+_app(app), _traceFile(traceFilePath)
 {
 }
 
 void run() override
 {
+_traceFile.readFile();
+
 std::cerr << "Connecting to server: " << _app._serverURI << "\n";
 
 Poco::URI uri(_app._serverURI);
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 73713e6..cf51981 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -9,7 +9,9 @@
 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 /// Dumps commands and notification trace.
 class TraceFileWriter
@@ -54,18 +56,67 @@ private:
 std::mutex _mutex;
 };
 
+class TraceFileRecord
+{
+public:
+enum class Direction
+{
+Incoming,
+Outgoing
+};
+
+Direction Dir;
+unsigned TimestampNs;
+std::string Payload;
+};
+
 class TraceFileReader
 {
 public:
 TraceFileReader(const std::string& path) :
 _epochStart(Poco::Timestamp().epochMicroseconds()),
-_stream(path, std::ios::in)
+_stream(path)
 {
 }
 
+void readFile()
+{
+std::string line;
+while (std::getline(_stream, line) && !line.empty())
+{
+const auto v = split(line, line[0]);
+if (v.size() == 2)
+{
+TraceFileRecord rec;
+rec.Dir = (line[0] == '>' ? 
TraceFileRecord::Direction::Incoming : TraceFileRecord::Direction::Outgoing);
+rec.TimestampNs = std::atoi(v[0].c_str());
+rec.Payload = v[1];
+_records.push_back(rec);
+}
+}
+}
+
+private:
+std::vector split(const std::string& s, const char delim)
+{
+std::stringstream ss(s);
+std::string item;
+std::vector v;
+while (std::getline(ss, item, delim))
+{
+if (!item.empty())
+{
+v.push_back(item);
+}
+}
+
+return v;
+}
+
 private:
 const Poco::Int64 _epochStart;
-std::fstream _stream;
+std::ifstream _stream;
+std::vector _records;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLStress.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLStress.cpp |   14 +-
 loolwsd/TraceFile.hpp  |   17 -
 2 files changed, 21 insertions(+), 10 deletions(-)

New commits:
commit b394ad89d87ef207f6b26d96134b345a8cf07112
Author: Ashod Nakashian 
Date:   Sun Jul 31 14:17:52 2016 -0400

loolstress: TraceFileReader class added

Change-Id: I81d508bb794ca56f647d0eb5b9dd27585100fe07
Reviewed-on: https://gerrit.libreoffice.org/27959
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
index 6232128..6bda492 100644
--- a/loolwsd/LOOLStress.cpp
+++ b/loolwsd/LOOLStress.cpp
@@ -16,14 +16,9 @@
 #include 
 #include 
 
-#include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -39,14 +34,15 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include "Common.hpp"
 #include "LOOLProtocol.hpp"
+#include "TraceFile.hpp"
 #include "Util.hpp"
 #include "test/helpers.hpp"
 
-#include 
-#include 
-
 /// Stress testing and performance/scalability benchmarking tool.
 
 class Stress: public Poco::Util::Application
@@ -115,7 +111,7 @@ public:
 
 private:
 Stress& _app;
-std::string _traceFilePath;
+TraceFileReader _traceFile;
 };
 
 Stress::Stress() :
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 8c61d1f..73713e6 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -7,8 +7,9 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
 #include 
+#include 
+#include 
 
 /// Dumps commands and notification trace.
 class TraceFileWriter
@@ -53,4 +54,18 @@ private:
 std::mutex _mutex;
 };
 
+class TraceFileReader
+{
+public:
+TraceFileReader(const std::string& path) :
+_epochStart(Poco::Timestamp().epochMicroseconds()),
+_stream(path, std::ios::in)
+{
+}
+
+private:
+const Poco::Int64 _epochStart;
+std::fstream _stream;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/LOOLWSD.hpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp   |4 ++--
 loolwsd/LOOLWSD.hpp   |2 +-
 loolwsd/TraceFile.hpp |6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d1e66718b5f44ce608b33356d8c4a91062baa25e
Author: Ashod Nakashian 
Date:   Sun Jul 31 13:56:57 2016 -0400

loolstress: TraceFile -> TraceFileWriter

Change-Id: Icf22189170cfb57f014346c91ba99a9cae5fe18a
Reviewed-on: https://gerrit.libreoffice.org/27958
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index cb0cb19..c2df0b3 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1265,7 +1265,7 @@ static std::string UnitTestLibrary;
 unsigned int LOOLWSD::NumPreSpawnedChildren = 0;
 std::atomic LOOLWSD::NumDocBrokers;
 std::atomic LOOLWSD::NumConnections;
-std::unique_ptr LOOLWSD::TraceDumper;
+std::unique_ptr LOOLWSD::TraceDumper;
 
 class AppConfigMap : public Poco::Util::MapConfiguration
 {
@@ -1398,7 +1398,7 @@ void LOOLWSD::initialize(Application& self)
 if (getConfigValue(conf, "trace[@enable]", false))
 {
 const auto& path = getConfigValue(conf, "trace.path", "");
-TraceDumper.reset(new TraceFile(path));
+TraceDumper.reset(new TraceFileWriter(path));
 Log::info("Command trace dumping enabled to file: " + path);
 }
 
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 72f3ffe..5d14171 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -47,7 +47,7 @@ public:
 static std::string LOKitVersion;
 static std::atomic NumDocBrokers;
 static std::atomic NumConnections;
-static std::unique_ptr TraceDumper;
+static std::unique_ptr TraceDumper;
 
 static
 std::string GenSessionId()
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 476b409..8c61d1f 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -11,16 +11,16 @@
 #include 
 
 /// Dumps commands and notification trace.
-class TraceFile
+class TraceFileWriter
 {
 public:
-TraceFile(const std::string& path) :
+TraceFileWriter(const std::string& path) :
 _epochStart(Poco::Timestamp().epochMicroseconds()),
 _stream(path, std::ios::out)
 {
 }
 
-~TraceFile()
+~TraceFileWriter()
 {
 _stream.close();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/test

2016-08-07 Thread Ashod Nakashian
 loolwsd/test/helpers.hpp |4 
 1 file changed, 4 insertions(+)

New commits:
commit e3427aff34446d0a6becda272f00fcf098d257c7
Author: Ashod Nakashian 
Date:   Sun Jul 31 11:17:06 2016 -0400

loolwsd: when TDOC is not defined assume blank

Change-Id: Iaf8ee6a8dff8dc4d602e7622a288a43b3459fb92
Reviewed-on: https://gerrit.libreoffice.org/27956
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index ce21613..61bcb89 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -43,6 +43,10 @@
 #include 
 #include 
 
+#ifndef TDOC
+#define TDOC ""
+#endif
+
 /// Common helper testing functions.
 /// Avoid the temptation to reuse from LOOL code!
 /// These are supposed to be testing the latter.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/.gitignore loolwsd/LOOLStress.cpp loolwsd/Makefile.am

2016-08-07 Thread Ashod Nakashian
 loolwsd/.gitignore |1 
 loolwsd/LOOLStress.cpp |  198 +
 loolwsd/Makefile.am|4 
 3 files changed, 202 insertions(+), 1 deletion(-)

New commits:
commit a7c1a17f98f906eef5356067546640bab4ea0957
Author: Ashod Nakashian 
Date:   Sun Jul 31 11:18:03 2016 -0400

loolwsd: new LOOLStress utility to stress benchmark LOOL

Change-Id: Ic43f15f9bda4e08feb6df97caeb7cc40a7d24e23
Reviewed-on: https://gerrit.libreoffice.org/27957
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/.gitignore b/loolwsd/.gitignore
index 52e0067..9bdd0f7 100644
--- a/loolwsd/.gitignore
+++ b/loolwsd/.gitignore
@@ -46,5 +46,6 @@ loolforkit
 loolmount
 loolmap
 looltool
+loolstress
 loolforkit-nocaps
 loadtest
diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp
new file mode 100644
index 000..6232128
--- /dev/null
+++ b/loolwsd/LOOLStress.cpp
@@ -0,0 +1,198 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "Common.hpp"
+#include "LOOLProtocol.hpp"
+#include "Util.hpp"
+#include "test/helpers.hpp"
+
+#include 
+#include 
+
+/// Stress testing and performance/scalability benchmarking tool.
+
+class Stress: public Poco::Util::Application
+{
+public:
+Stress();
+~Stress() {}
+
+unsigned_numClients;
+std::string _serverURI;
+
+protected:
+void defineOptions(Poco::Util::OptionSet& options) override;
+void handleOption(const std::string& name, const std::string& value) 
override;
+int  main(const std::vector& args) override;
+};
+
+
+using namespace LOOLProtocol;
+
+using Poco::Net::HTTPClientSession;
+using Poco::Net::HTTPRequest;
+using Poco::Net::HTTPResponse;
+using Poco::Runnable;
+using Poco::Thread;
+using Poco::URI;
+using Poco::Util::Application;
+using Poco::Util::HelpFormatter;
+using Poco::Util::Option;
+using Poco::Util::OptionSet;
+
+class Worker: public Runnable
+{
+public:
+
+Worker(Stress& app, const std::string& traceFilePath) :
+_app(app), _traceFilePath(traceFilePath)
+{
+}
+
+void run() override
+{
+std::cerr << "Connecting to server: " << _app._serverURI << "\n";
+
+Poco::URI uri(_app._serverURI);
+
+const auto documentURL = "lool/ws/file://" + 
Poco::Path(_traceFilePath).makeAbsolute().toString();
+
+std::unique_ptr session;
+if (_app._serverURI.compare(0, 5, "https"))
+session.reset(new Poco::Net::HTTPSClientSession(uri.getHost(), 
uri.getPort()));
+else
+session.reset(new Poco::Net::HTTPClientSession(uri.getHost(), 
uri.getPort()));
+
+try
+{
+
+}
+catch (const Poco::Exception )
+{
+std::cerr << "Failed to write data: " << e.name() <<
+  " " << e.message() << "\n";
+return;
+}
+}
+
+private:
+Stress& _app;
+std::string _traceFilePath;
+};
+
+Stress::Stress() :
+_numClients(4),
+#if ENABLE_SSL
+_serverURI("https://127.0.0.1:; + 
std::to_string(DEFAULT_CLIENT_PORT_NUMBER))
+#else
+_serverURI("http://127.0.0.1:; + 
std::to_string(DEFAULT_CLIENT_PORT_NUMBER))
+#endif
+{
+}
+
+void Stress::defineOptions(OptionSet& optionSet)
+{
+Application::defineOptions(optionSet);
+
+optionSet.addOption(Option("help", "", "Display help information on 
command line arguments.")
+.required(false).repeatable(false));
+optionSet.addOption(Option("clientsperdoc", "", "Number of simultaneous 
clients on each doc.")
+.required(false).repeatable(false)
+.argument("concurrency"));
+optionSet.addOption(Option("server", "", "URI of LOOL server")
+.required(false).repeatable(false)
+.argument("uri"));
+}
+
+void Stress::handleOption(const std::string& optionName,
+const std::string& value)
+{
+Application::handleOption(optionName, value);
+
+if (optionName == "help")
+{
+HelpFormatter helpFormatter(options());
+
+helpFormatter.setCommand(commandName());
+helpFormatter.setUsage("OPTIONS");
+helpFormatter.setHeader("LibreOffice On-Line tool.");
+

[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp loolwsd/LOOLWSD.hpp loolwsd/PrisonerSession.cpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/DocumentBroker.cpp  |2 ++
 loolwsd/LOOLWSD.hpp |9 +
 loolwsd/PrisonerSession.cpp |2 ++
 loolwsd/TraceFile.hpp   |   11 +++
 4 files changed, 24 insertions(+)

New commits:
commit 177802154da969a5d48469e934226830cfdf755e
Author: Ashod Nakashian 
Date:   Sun Jul 31 07:54:47 2016 -0400

loolwsd: trace notifications and response messages

Change-Id: I45f69386762d69e2b3960eeb96e591d7c5843b0b
Reviewed-on: https://gerrit.libreoffice.org/27955
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index 7b4640b..f998ab4 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -454,6 +454,8 @@ bool DocumentBroker::handleInput(const std::vector& 
payload)
 Log::trace("DocumentBroker got child message: [" + 
LOOLProtocol::getAbbreviatedMessage(payload) + "].");
 
 const auto command = LOOLProtocol::getFirstToken(payload);
+LOOLWSD::dumpOutgoingTrace(command);
+
 if (command == "tile:")
 {
 handleTileResponse(payload);
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 0b9f6bc..72f3ffe 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -70,6 +70,15 @@ public:
 }
 }
 
+static
+void dumpOutgoingTrace(const std::string& data)
+{
+if (TraceDumper)
+{
+TraceDumper->writeOutgoing(data);
+}
+}
+
 protected:
 void initialize(Poco::Util::Application& self) override;
 void uninitialize() override;
diff --git a/loolwsd/PrisonerSession.cpp b/loolwsd/PrisonerSession.cpp
index 5da9780..2114f5c 100644
--- a/loolwsd/PrisonerSession.cpp
+++ b/loolwsd/PrisonerSession.cpp
@@ -54,6 +54,8 @@ bool PrisonerSession::_handleInput(const char *buffer, int 
length)
 StringTokenizer tokens(firstLine, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
 Log::trace(getName() + ": handling [" + firstLine + "].");
 
+LOOLWSD::dumpOutgoingTrace(firstLine);
+
 if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
 {
 // Keep track of timestamps of incoming client messages that indicate 
user activity.
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index 9b2d3b9..476b409 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -36,6 +36,17 @@ public:
 _stream.write("\n", 1);
 }
 
+void writeOutgoing(const std::string& data)
+{
+std::unique_lock lock(_mutex);
+const Poco::Int64 usec = Poco::Timestamp().epochMicroseconds() - 
_epochStart;
+_stream.write("<", 1);
+_stream << usec;
+_stream.write("<", 1);
+_stream.write(data.c_str(), data.size());
+_stream.write("\n", 1);
+}
+
 private:
 const Poco::Int64 _epochStart;
 std::fstream _stream;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/ClientSession.cpp loolwsd/Log.cpp loolwsd/LOOLWSD.hpp loolwsd/TraceFile.hpp

2016-08-07 Thread Ashod Nakashian
 loolwsd/ClientSession.cpp |2 ++
 loolwsd/LOOLWSD.hpp   |4 ++--
 loolwsd/Log.cpp   |1 +
 loolwsd/TraceFile.hpp |   11 ++-
 4 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 026a22abc36745b9374c7302fc2b27d4ba089cff
Author: Ashod Nakashian 
Date:   Sat Jul 30 23:06:12 2016 -0400

loolwsd: dump incoming commands

Change-Id: I3d77d0c645c0bdd7e9edfbc8d90d5df6cc1b927a
Reviewed-on: https://gerrit.libreoffice.org/27954
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp
index f3c2a00..57da9a6 100644
--- a/loolwsd/ClientSession.cpp
+++ b/loolwsd/ClientSession.cpp
@@ -64,6 +64,8 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 StringTokenizer tokens(firstLine, " ", StringTokenizer::TOK_IGNORE_EMPTY | 
StringTokenizer::TOK_TRIM);
 Log::trace(getName() + ": handling [" + firstLine + "].");
 
+LOOLWSD::dumpIncomingTrace(firstLine);
+
 if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
 {
 // Keep track of timestamps of incoming client messages that indicate 
user activity.
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index eed6b70..0b9f6bc 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -62,11 +62,11 @@ public:
 }
 
 static
-void dumpTrace(const std::string& data)
+void dumpIncomingTrace(const std::string& data)
 {
 if (TraceDumper)
 {
-TraceDumper->write(data);
+TraceDumper->writeIncoming(data);
 }
 }
 
diff --git a/loolwsd/Log.cpp b/loolwsd/Log.cpp
index a6511f0..dc3e0da 100644
--- a/loolwsd/Log.cpp
+++ b/loolwsd/Log.cpp
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "Log.hpp"
 
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
index c1c01d7..9b2d3b9 100644
--- a/loolwsd/TraceFile.hpp
+++ b/loolwsd/TraceFile.hpp
@@ -15,6 +15,7 @@ class TraceFile
 {
 public:
 TraceFile(const std::string& path) :
+_epochStart(Poco::Timestamp().epochMicroseconds()),
 _stream(path, std::ios::out)
 {
 }
@@ -24,13 +25,21 @@ public:
 _stream.close();
 }
 
-void write(const std::string& data)
+void writeIncoming(const std::string& data)
 {
+std::unique_lock lock(_mutex);
+const Poco::Int64 usec = Poco::Timestamp().epochMicroseconds() - 
_epochStart;
+_stream.write(">", 1);
+_stream << usec;
+_stream.write(">", 1);
 _stream.write(data.c_str(), data.size());
+_stream.write("\n", 1);
 }
 
 private:
+const Poco::Int64 _epochStart;
 std::fstream _stream;
+std::mutex _mutex;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp|9 +
 loolwsd/LOOLWSD.hpp|   11 +++
 loolwsd/TraceFile.hpp  |   36 
 loolwsd/loolwsd.xml.in |4 
 4 files changed, 60 insertions(+)

New commits:
commit 8b9b3289556ae2d69bd7f6a6a49f38be0dc90c71
Author: Ashod Nakashian 
Date:   Sat Jul 30 22:22:28 2016 -0400

loolwsd: add support for dumping command trace

Change-Id: I4121ce74653d243149be09de46581cbe0aae0438
Reviewed-on: https://gerrit.libreoffice.org/27953
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 009a34d..cb0cb19 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1265,6 +1265,7 @@ static std::string UnitTestLibrary;
 unsigned int LOOLWSD::NumPreSpawnedChildren = 0;
 std::atomic LOOLWSD::NumDocBrokers;
 std::atomic LOOLWSD::NumConnections;
+std::unique_ptr LOOLWSD::TraceDumper;
 
 class AppConfigMap : public Poco::Util::MapConfiguration
 {
@@ -1393,6 +1394,14 @@ void LOOLWSD::initialize(Application& self)
 
std::to_string(MAX_CONNECTIONS) :
 std::string("unlimited")) 
<< Log::end;
 
+// Command Tracing.
+if (getConfigValue(conf, "trace[@enable]", false))
+{
+const auto& path = getConfigValue(conf, "trace.path", "");
+TraceDumper.reset(new TraceFile(path));
+Log::info("Command trace dumping enabled to file: " + path);
+}
+
 StorageBase::initialize();
 
 ServerApplication::initialize(self);
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 4a3898c..eed6b70 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -23,6 +23,7 @@
 #include "Auth.hpp"
 #include "Common.hpp"
 #include "DocumentBroker.hpp"
+#include "TraceFile.hpp"
 #include "Util.hpp"
 
 class LOOLWSD: public Poco::Util::ServerApplication
@@ -46,6 +47,7 @@ public:
 static std::string LOKitVersion;
 static std::atomic NumDocBrokers;
 static std::atomic NumConnections;
+static std::unique_ptr TraceDumper;
 
 static
 std::string GenSessionId()
@@ -59,6 +61,15 @@ public:
 return LOOLWSD::SSLEnabled.get();
 }
 
+static
+void dumpTrace(const std::string& data)
+{
+if (TraceDumper)
+{
+TraceDumper->write(data);
+}
+}
+
 protected:
 void initialize(Poco::Util::Application& self) override;
 void uninitialize() override;
diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp
new file mode 100644
index 000..c1c01d7
--- /dev/null
+++ b/loolwsd/TraceFile.hpp
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+/// Dumps commands and notification trace.
+class TraceFile
+{
+public:
+TraceFile(const std::string& path) :
+_stream(path, std::ios::out)
+{
+}
+
+~TraceFile()
+{
+_stream.close();
+}
+
+void write(const std::string& data)
+{
+_stream.write(data.c_str(), data.size());
+}
+
+private:
+std::fstream _stream;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/loolwsd/loolwsd.xml.in b/loolwsd/loolwsd.xml.in
index 15153c8..f5916e6 100644
--- a/loolwsd/loolwsd.xml.in
+++ b/loolwsd/loolwsd.xml.in
@@ -23,6 +23,10 @@
 trace
 
 
+
+/tmp/dump
+
+
 
 true
 /etc/loolwsd/cert.pem
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp |   10 +-
 loolwsd/LOOLWSD.hpp |1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit df49c23d239215c98aec9e1922d447cf42464299
Author: Ashod Nakashian 
Date:   Sat Jul 30 22:19:31 2016 -0400

loolwsd: use getConfigValue

Change-Id: Iccd4ea16424cfb6b8977fc70fc4a39e8b97f0b40
Reviewed-on: https://gerrit.libreoffice.org/27952
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index f6425d2..009a34d 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1346,9 +1346,9 @@ void LOOLWSD::initialize(Application& self)
 // Allow UT to manipulate before using configuration values.
 UnitWSD::get().configure(config());
 
-const auto logLevel = config().getString("logging.level", "trace");
+const auto logLevel = getConfigValue(conf, "logging.level", 
"trace");
 setenv("LOOL_LOGLEVEL", logLevel.c_str(), true);
-const auto withColor = config().getBool("logging.color", true);
+const auto withColor = getConfigValue(conf, "logging.color", true);
 if (withColor)
 setenv("LOOL_LOGCOLOR", "1", true);
 Log::initialize("wsd", logLevel, withColor);
@@ -1382,9 +1382,6 @@ void LOOLWSD::initialize(Application& self)
 setenv("MAX_CONCURRENCY", std::to_string(maxConcurrency).c_str(), 1);
 }
 
-Log::warn("Launch this in your browser:");
-Log::warn(lcl_getLaunchURI());
-
 // In Trial Versions we might want to set some limits.
 LOOLWSD::NumDocBrokers = 0;
 LOOLWSD::NumConnections = 0;
@@ -1399,6 +1396,9 @@ void LOOLWSD::initialize(Application& self)
 StorageBase::initialize();
 
 ServerApplication::initialize(self);
+
+Log::warn("Launch this in your browser:");
+Log::warn(lcl_getLaunchURI());
 }
 
 void LOOLWSD::initializeSSL()
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 74fba62..4a3898c 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -88,6 +88,7 @@ private:
 
 void operator()(unsigned int& value) { value = _config.getUInt(_name); 
}
 void operator()(bool& value) { value = _config.getBool(_name); }
+void operator()(std::string& value) { value = 
_config.getString(_name); }
 };
 
 template
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/Log.cpp loolwsd/Log.hpp loolwsd/LOOLForKit.cpp loolwsd/LOOLKit.cpp loolwsd/LOOLWSD.cpp loolwsd/loolwsd.xml.in

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLForKit.cpp |2 +-
 loolwsd/LOOLKit.cpp|2 +-
 loolwsd/LOOLWSD.cpp|9 +++--
 loolwsd/Log.cpp|   13 -
 loolwsd/Log.hpp|2 +-
 loolwsd/loolwsd.xml.in |4 +---
 6 files changed, 15 insertions(+), 17 deletions(-)

New commits:
commit 5b639c3a2dca60d52fcbee32a8d9e7b2d511c13d
Author: Ashod Nakashian 
Date:   Sat Jul 30 11:52:10 2016 -0400

loolwsd: use log settings from the config XML

Change-Id: I0384d97b5411d3ff537b344e67f166daa65630c1
Reviewed-on: https://gerrit.libreoffice.org/27951
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp
index c29de0d..2081a8f 100644
--- a/loolwsd/LOOLForKit.cpp
+++ b/loolwsd/LOOLForKit.cpp
@@ -202,7 +202,7 @@ int main(int argc, char** argv)
 }
 
 // Initialization
-Log::initialize("frk");
+Log::initialize("frk", getenv("LOOL_LOGLEVEL"), getenv("LOOL_LOGCOLOR"));
 
 Util::setTerminationSignals();
 Util::setFatalSignals();
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 9b72946..74c32c9 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1005,7 +1005,7 @@ void lokit_main(const std::string& childRoot,
 bool queryVersion)
 {
 // Reinitialize logging when forked.
-Log::initialize("kit");
+Log::initialize("kit", getenv("LOOL_LOGLEVEL"), getenv("LOOL_LOGCOLOR"));
 Util::rng::reseed();
 
 assert(!childRoot.empty());
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 7d8c61a..f6425d2 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1288,8 +1288,6 @@ LOOLWSD::~LOOLWSD()
 
 void LOOLWSD::initialize(Application& self)
 {
-Log::initialize("wsd");
-
 if (geteuid() == 0)
 {
 throw std::runtime_error("Do not run as root. Please run as lool 
user.");
@@ -1348,6 +1346,13 @@ void LOOLWSD::initialize(Application& self)
 // Allow UT to manipulate before using configuration values.
 UnitWSD::get().configure(config());
 
+const auto logLevel = config().getString("logging.level", "trace");
+setenv("LOOL_LOGLEVEL", logLevel.c_str(), true);
+const auto withColor = config().getBool("logging.color", true);
+if (withColor)
+setenv("LOOL_LOGCOLOR", "1", true);
+Log::initialize("wsd", logLevel, withColor);
+
 #if ENABLE_SSL
 LOOLWSD::SSLEnabled.set(getConfigValue(conf, "ssl.enable", true));
 #else
diff --git a/loolwsd/Log.cpp b/loolwsd/Log.cpp
index 930268b..a6511f0 100644
--- a/loolwsd/Log.cpp
+++ b/loolwsd/Log.cpp
@@ -100,7 +100,7 @@ namespace Log
 signalLog(buffer);
 }
 
-void initialize(const std::string& name)
+void initialize(const std::string& name, const std::string& logLevel, 
const bool withColor)
 {
 Source.name = name;
 std::ostringstream oss;
@@ -110,19 +110,14 @@ namespace Log
 assert (sizeof (LogPrefix) > strlen(oss.str().c_str()) + 1);
 strncpy(LogPrefix, oss.str().c_str(), sizeof(LogPrefix));
 
-auto channel = (isatty(fileno(stderr)) || std::getenv("LOOL_LOGCOLOR")
+// Configure the logger.
+auto channel = (isatty(fileno(stderr)) || withColor
  ? static_cast(new 
Poco::ColorConsoleChannel())
  : static_cast(new 
Poco::ConsoleChannel()));
 auto& logger = Poco::Logger::create(Source.name, channel, 
Poco::Message::PRIO_TRACE);
 channel->release();
 
-// Configure the logger.
-// TODO: This should come from a file.
-// See Poco::Logger::setLevel docs for values.
-// Try: error, information, debug
-char *loglevel = std::getenv("LOOL_LOGLEVEL");
-if (loglevel)
-logger.setLevel(std::string(loglevel));
+logger.setLevel(logLevel.empty() ? std::string("trace") : logLevel);
 
 info("Initializing " + name);
 info("Log level is [" + std::to_string(logger.getLevel()) + "].");
diff --git a/loolwsd/Log.hpp b/loolwsd/Log.hpp
index f474d34..daa02dc 100644
--- a/loolwsd/Log.hpp
+++ b/loolwsd/Log.hpp
@@ -18,7 +18,7 @@
 
 namespace Log
 {
-void initialize(const std::string& name);
+void initialize(const std::string& name, const std::string& logLevel = 
"trace", const bool withColor = true);
 Poco::Logger& logger();
 std::string prefix();
 
diff --git a/loolwsd/loolwsd.xml.in b/loolwsd/loolwsd.xml.in
index 6366dd6..15153c8 100644
--- a/loolwsd/loolwsd.xml.in
+++ b/loolwsd/loolwsd.xml.in
@@ -18,11 +18,9 @@
 
 loleaflet.html
 
-
 
 true
-trace
+trace
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-07 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f81aa9d2af71ec5b833dbaebf976706f8aad373c
Author: Ashod Nakashian 
Date:   Sat Jul 30 10:59:38 2016 -0400

loolwsd: setup signal handling first thing in main

Change-Id: I006dcb5816719bc220409050bf59dd530c46acfd
Reviewed-on: https://gerrit.libreoffice.org/27950
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 8ba1fee..7d8c61a 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1572,6 +1572,9 @@ Process::PID LOOLWSD::createForKit()
 
 int LOOLWSD::main(const std::vector& /*args*/)
 {
+Util::setTerminationSignals();
+Util::setFatalSignals();
+
 if (DisplayVersion)
 {
 std::string version, hash;
@@ -1585,9 +1588,6 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 if (locale == nullptr || std::strcmp(locale, "C") == 0)
 setlocale(LC_ALL, "en_US.utf8");
 
-Util::setTerminationSignals();
-Util::setFatalSignals();
-
 if (access(Cache.c_str(), R_OK | W_OK | X_OK) != 0)
 {
 Log::syserror("Unable to access cache [" + Cache +
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-bugs] [Bug 101100] Impress can not display equations created with Microsoft Equation Editor properly

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101100

--- Comment #7 from General Kutuzov  ---
Created attachment 126658
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126658=edit
MT Extra used by Equation Editor

Microsoft Equation Editor also used MT Extra font to display certain symbol,
which is also has its own character encoding. This font generally installed in
C:\Program Files\Common Files\microsoft shared\EQUATION if you installed
Microsoft Office.

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


[Libreoffice-bugs] [Bug 101100] Impress can not display equations created with Microsoft Equation Editor properly

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101100

--- Comment #6 from General Kutuzov  ---
Created attachment 126657
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126657=edit
This is the “Symbol” font

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


[Libreoffice-bugs] [Bug 101100] Impress can not display equations created with Microsoft Equation Editor properly

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101100

--- Comment #5 from General Kutuzov  ---
Created attachment 126656
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126656=edit
Font setting of Microsoft Equation Editor

On Microsoft Equition Editor the font of Greek letters and mathmatical symbols
are defalting to “Symbol” font, which has own encoding. For example, on LO
Writer, when you input the following letters, switch to “Symbol”, they will
displaying alpha to omega:
A B G D E Z H Q I K L M N X O P R   S T U F C Y W
a b g d e z h q i k l m n x o p r V s t u f c y w

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


[Libreoffice-bugs] [Bug 101320] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101320

--- Comment #2 from Markus Mohrhard  ---
I can reproduce it on windows.

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


[Libreoffice-bugs] [Bug 100870] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=100870

--- Comment #6 from Markus Mohrhard  ---
I can reproduce it on windows.

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


[Libreoffice-bugs] [Bug 99419] Installation fail with error 1335

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=99419

sunfin  changed:

   What|Removed |Added

 Status|NEEDINFO|UNCONFIRMED
 Ever confirmed|1   |0

--- Comment #2 from sunfin  ---
Installation of 5.2.0.4 fails copying files. Error 1335, cabinet file
"libreoffice1.cab" required is corrupt. Installer was downloaded twice - same
error.

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


[Libreoffice-bugs] [Bug 101365] Saving an unchanged File loses very very much time with high cpu-usage

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101365

Joel Madero  changed:

   What|Removed |Added

 Status|NEEDINFO|UNCONFIRMED
 Ever confirmed|1   |0

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


[Libreoffice-bugs] [Bug 101220] FILEOPEN PDF Checkboxes aren't rendered correctly

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101220

V Stuart Foote  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #8 from V Stuart Foote  ---
Needinfo how are Evince, Okular or XPDF handling the test PDF?

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


[Libreoffice-bugs] [Bug 86211] PDF Import: clipping is not implemented

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=86211

V Stuart Foote  changed:

   What|Removed |Added

 CC||ekarist...@gmail.com

--- Comment #9 from V Stuart Foote  ---
*** Bug 101372 has been marked as a duplicate of this bug. ***

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


[Libreoffice-bugs] [Bug 101372] FILEOPEN PDF Rendering of images is wrong

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101372

V Stuart Foote  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||vstuart.fo...@utsa.edu
 Resolution|--- |DUPLICATE

--- Comment #4 from V Stuart Foote  ---


*** This bug has been marked as a duplicate of bug 86211 ***

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


Re: adding bookmark to Help source for index ?

2016-08-07 Thread Olivier Hallot
Hello Cor

The file classificationbar.xhp has more than one bookmark as you show.
Have I missed something?

regards
Olivier

Em 06/08/2016 05:49, Cor Nouws escreveu:
> Hi,
> 
> I've noticed that classificationbar.xhp is not shown in the Help index.
> Looking at another help file, I expect that a bookmark tag is needed.
> That however has some id .. where would that come from? Autogenerated?
> Example:
> 
>   views; defaults
> 
> thanks,
> Cor
> 

-- 
Olivier Hallot
Comunidade LibreOffice
Rio de Janeiro - Brazil - Local time: UTC-03
http://ask.libreoffice.org/pt-br
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-bugs] [Bug 101375] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101375

--- Comment #3 from Aiyub Khan  ---
Detailed scenario as follows:
1. Double click on the file
2. LibreOffice Document Recovery dialog box displays
3. Click OK
4. Crash Report dialog box displays
5. Click Send/Don't Send
6.LibreOffice Document Recovery dialog box displays (This time the file name
displays with the status of 'Not recovered yet'.
7. Click Start Recovery
8. Status changes to Successfully recovered
9. Click Finish
10. Document is opened. Arabic text diacritics positions reversed as in those
that are supposed to be on the top of the letter are at the bottom and vice
versa. Font is KFGQPC Uthman Taha Naskh.

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


[Libreoffice-bugs] [Bug 101375] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101375

--- Comment #2 from Aiyub Khan  ---
The crash occurs when you open the document.

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


[Libreoffice-bugs] [Bug 101375] Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101375

--- Comment #1 from Markus Mohrhard  ---
When did it crash? During opening or during closing the document?

We have a few hundred reports for this crash signature but not yet a picture
when it happens.

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


[Libreoffice-bugs] [Bug 101372] FILEOPEN PDF Rendering of images is wrong

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101372

Aron Budea  changed:

   What|Removed |Added

  Component|Draw|filters and storage

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


[Libreoffice-bugs] [Bug 99153] Unexpectedly slow window re-draw - Ubuntu 16.04 - Unity

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=99153

Aron Budea  changed:

   What|Removed |Added

   Keywords||perf
 CC||ba...@caesar.elte.hu

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


[Libreoffice-bugs] [Bug 101375] New: Crash in: SfxWorkWindow::UpdateChildWindows_Impl()

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101375

Bug ID: 101375
   Summary: Crash in: SfxWorkWindow::UpdateChildWindows_Impl()
   Product: LibreOffice
   Version: unspecified
  Hardware: All
OS: All
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Writer
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: mkhan.ak...@gmail.com

Created attachment 126655
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126655=edit
Writer file, most of which has Arabic text. Also contains tables.

This bug was filed from the crash reporting server and is
br-81a70bb0-b48f-4e63-bd09-4a20b658ea77.
=

When the file is recovered, the second time around, the diacritics on the
Arabic text that is supposed to be on the top of the letters, end up at the
bottom.

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


[Libreoffice-bugs] [Bug 101367] Bad font rendering in window

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101367

Aron Budea  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ba...@caesar.elte.hu
 Resolution|--- |DUPLICATE

--- Comment #4 from Aron Budea  ---
Please update to LibreOffice 5.1.5 or 5.2.0, the bug is fixed there.

*** This bug has been marked as a duplicate of bug 99446 ***

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


[Libreoffice-bugs] [Bug 99446] Garbled text characters / glyphs in some dialogs in Linux

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=99446

Aron Budea  changed:

   What|Removed |Added

 CC||adpint...@gmail.com

--- Comment #24 from Aron Budea  ---
*** Bug 101367 has been marked as a duplicate of this bug. ***

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


[Libreoffice-bugs] [Bug 101373] FILEOPEN PDF Text goes over defining line

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101373

Aron Budea  changed:

   What|Removed |Added

 CC||ba...@caesar.elte.hu

--- Comment #2 from Aron Budea  ---
Not reproduced in v5.1.4.2 and 5.2.0.4 in Windows 7 or Ubuntu 16.04.

Maybe this is an issue with font substitution.
Could you give the font name and size you see in Draw for:
-"29 April 2016",
-"Please contact"?

My observation in Windows is that when first clicking on the text, it says
"Calibri", then after clicking out and back it's Liberation Serif (size is 18
and 12 respectively). In Linux it sometimes shows Calibri in italic (the
missing font), other times Liberation Serif. Size is same as in Windows.

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


[Libreoffice-bugs] [Bug 101365] Saving an unchanged File loses very very much time with high cpu-usage

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101365

--- Comment #2 from Herbert Geiger  ---
Created attachment 126654
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126654=edit
the corpus delicti

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


[Libreoffice-bugs] [Bug 101372] FILEOPEN PDF Rendering of images is wrong

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101372

Aron Budea  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||ba...@caesar.elte.hu
   Hardware|x86-64 (AMD64)  |All
Version|5.1.4.2 release |Inherited From OOo
 Ever confirmed|0   |1
 OS|Linux (All) |All

--- Comment #3 from Aron Budea  ---
Reproduced in v5.2.0.4, v5.1.5.2 and v3.3.0 / Windows 7.

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


[Libreoffice-bugs] [Bug 94323] Adding the "Custom Properties" field: URL Causes LO Writer to Crash with SEH Exception: Access Violation

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=94323

Aron Budea  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ba...@caesar.elte.hu
 Resolution|--- |WORKSFORME
   Assignee|richard416...@yahoo.ca  |libreoffice-b...@lists.free
   ||desktop.org

--- Comment #13 from Aron Budea  ---
SEF exceptions are a very generic category of issues.
It's impossible to say what happened, maybe there was another bug report with
the same cause that got fixed, or the root of the issues was the same. Or a
developer came across such an issue and fixed it (without a bug report existing
for it).

Glad to hear the bug is gone. Closing this as RESOLVED/WORKSFORME.

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


[Libreoffice-bugs] [Bug 87902] Default page margins

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=87902

--- Comment #9 from Regina Henschel  ---
Bugs in OOo about changing the defaults were closed with the hint, that users
can easily set their own default document template.

You have to consider e.g.
* If you will use a loose-leaf binder, you need a larger left margin.
* If you will use a coil binding, you need a smaller left margin.
* If you will follow any of the typographical rules
(https://en.wikipedia.org/wiki/Canons_of_page_construction) you will need
different values on all four edges.
* If you will give readers the optimal line width of 40-60 characters, it
requires a much larger (right) margin.

I think, this demonstrates, that there does not exist a "correct" margin. So
2cm is a neutral start value.

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


[Libreoffice-ux-advise] [Bug 87902] Default page margins

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=87902

--- Comment #9 from Regina Henschel  ---
Bugs in OOo about changing the defaults were closed with the hint, that users
can easily set their own default document template.

You have to consider e.g.
* If you will use a loose-leaf binder, you need a larger left margin.
* If you will use a coil binding, you need a smaller left margin.
* If you will follow any of the typographical rules
(https://en.wikipedia.org/wiki/Canons_of_page_construction) you will need
different values on all four edges.
* If you will give readers the optimal line width of 40-60 characters, it
requires a much larger (right) margin.

I think, this demonstrates, that there does not exist a "correct" margin. So
2cm is a neutral start value.

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


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

2016-08-07 Thread Bartosz Kosiorek
 sc/source/filter/excel/xetable.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 12408dad1b2af4055b91439e3cfbe46e0df52b41
Author: Bartosz Kosiorek 
Date:   Sun Aug 7 13:58:21 2016 +0200

tdf#101363 Fix precision of column width according to MS specification

In MS specification the output value is set with double precision after 
delimiter, according to formula:
 =Truncate(({width in pixels} - 5)/{Maximum Digit Width} * 100 + 0.5)/100

Explanation of magic numbers:
 - 5 number - are 4 pixels of margin padding (two on each side), plus 1 
pixel padding for the gridlines. It is still unknown if it should be applied 
during LibreOffice export
 - 100 number - used to limit precision to 0.01 with formula =Truncate( 
{value} * 100 ) / 100
 - 0.5 number (0.005 to output value) - used to increase value before 
truncating, to avoid situation when 2.997 will be truncated to 2.99 and not to 3

Benefits of limited precision:
- small .xlsx file size
- slightly better performance during .xlsx import
- easier to track column width changes, especially in unit tests
- according to MS Excel specification

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

diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index 81edb36..9cc6552 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -1665,17 +1665,28 @@ void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm )
 if( nLastXclCol == static_cast< sal_uInt16 >( 
rStrm.GetRoot().GetMaxPos().Col() ) )
 ++nLastXclCol;
 
+const double nExcelColumnWidth = mnScWidth  / static_cast< double >( 
sc::TwipsToHMM( GetCharWidth() ) );
+
+// tdf#101363 In MS specification the output value is set with double 
precision after delimiter:
+// =Truncate(({width in pixels} - 5)/{Maximum Digit Width} * 100 + 0.5)/100
+// Explanation of magic numbers:
+// 5 number - are 4 pixels of margin padding (two on each side), plus 1 
pixel padding for the gridlines.
+//It is unknown if it should be applied during LibreOffice 
export
+// 100 number - used to limit precision to 0.01 with formula =Truncate( 
{value}*100+0.5 ) / 100
+// 0.5 number (0.005 to output value) - used to increase value before 
truncating,
+//to avoid situation when 2.997 will be truncated to 2.99 and 
not to 3.00
+const double nTruncatedExcelColumnWidth = std::trunc( nExcelColumnWidth * 
100.0 + 0.5 ) / 100.0;
 rStrm.GetCurrentStream()->singleElement( XML_col,
 // OOXTODO: XML_bestFit,
 XML_collapsed,  XclXmlUtils::ToPsz( ::get_flag( mnFlags, 
EXC_COLINFO_COLLAPSED ) ),
 XML_customWidth,XclXmlUtils::ToPsz( mbCustomWidth ),
 XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, 
EXC_COLINFO_HIDDEN ) ),
 XML_outlineLevel,   OString::number( mnOutlineLevel ).getStr(),
-XML_max,OString::number( (nLastXclCol + 1) ).getStr(),
-XML_min,OString::number( (mnFirstXclCol + 1) 
).getStr(),
+XML_max,OString::number( nLastXclCol + 1 ).getStr(),
+XML_min,OString::number( mnFirstXclCol + 1 ).getStr(),
 // OOXTODO: XML_phonetic,
 XML_style,  lcl_GetStyleId( rStrm, maXFId.mnXFIndex 
).getStr(),
-XML_width,  OString::number( (double) (mnScWidth / 
(double)sc::TwipsToHMM( GetCharWidth() )) ).getStr(),
+XML_width,  OString::number( nTruncatedExcelColumnWidth 
).getStr(),
 FSEND );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-bugs] [Bug 87902] Default page margins

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=87902

--- Comment #8 from Cor Nouws  ---
(In reply to Maxim Monastirsky from comment #6)
> (In reply to Cor Nouws from comment #2)
> > Yes, in the past is was 2.54 cm IIRC. Changed on purpose.
> I tested now with OOo 1.1.5, and it has the same 2cm as default.

So what I remembered was seen in a different word processor :) Apologies!

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


[Libreoffice-ux-advise] [Bug 87902] Default page margins

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=87902

--- Comment #8 from Cor Nouws  ---
(In reply to Maxim Monastirsky from comment #6)
> (In reply to Cor Nouws from comment #2)
> > Yes, in the past is was 2.54 cm IIRC. Changed on purpose.
> I tested now with OOo 1.1.5, and it has the same 2cm as default.

So what I remembered was seen in a different word processor :) Apologies!

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


[Libreoffice-bugs] [Bug 101359] Impossible to insert, delete or rename bookmarks

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101359

--- Comment #3 from stefan_lange...@t-online.de  
---
Addition:
With my example document it is not completely impossible to insert bookmarks:
When one doesn't change the preset bookmark name ("Bookmark 1" etc.), a
bookmark with this preset name will be inserted by pressing the insert button.
The described error occurs when one tries to enter an other bookmark name or to
select a bookmark for deete, rename or go to.

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


[Libreoffice-bugs] [Bug 101374] New: not translated new menu item added in EN language GUI if change GUI language to RU

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101374

Bug ID: 101374
   Summary: not translated new menu item added in EN language GUI
if change GUI language to RU
   Product: LibreOffice
   Version: 4.3.7.2 release
  Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: UI
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: 79045_79...@mail.ru

step to repro (i use Calc with RU locale for example):

1. open new calc document 
2. select Tools-Options-Language settings-Languages -> User Interface ->
English. Press OK. Restart LO to changes take effect
3. select Tools-Customize -> tab Menus
4. Add to menu File (or any other) item Insert-Chart (or any other). Press OK
5. select Tools-Options-Language settings-Languages -> User Interface ->
Russian. Press OK. Restart LO to changes take effect
6. Open menu File. New element that we added to in paragraph 4 not translated
on Russian

If add new item to menu in RU GUI and change language to EN, then menu item
translated correct.

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


[Libreoffice-bugs] [Bug 101057] LO crash when creating database using JDK 1.8.0_102

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101057

--- Comment #23 from Gerhard Schaber  ---
Confirmed, it works on MacOS with LO 5.1.5, if the JDK instead of JRE is
installed. Please ignore my previous comments.

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


[Libreoffice-bugs] [Bug 101373] FILEOPEN PDF Text goes over defining line

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101373

--- Comment #1 from ekari  ---
Created attachment 126653
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126653=edit
Side by side

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


[Libreoffice-bugs] [Bug 101373] FILEOPEN PDF Text goes over defining line

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101373

ekari  changed:

   What|Removed |Added

   Keywords||filter:pdf

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


[Libreoffice-bugs] [Bug 101373] New: FILEOPEN PDF Text goes over defining line

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101373

Bug ID: 101373
   Summary: FILEOPEN PDF Text goes over defining line
   Product: LibreOffice
   Version: 5.1.4.2 release
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Draw
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: ekarist...@gmail.com

Created attachment 126652
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126652=edit
pdf

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


[Libreoffice-bugs] [Bug 101251] File Save as

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101251

pepe.nordb...@gmail.com changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from pepe.nordb...@gmail.com ---
Hi, with new version 5.2... "save as" worked as before. Thanks!

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


[Libreoffice-bugs] [Bug 101372] FILEOPEN PDF Rendering of images is wrong

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101372

ekari  changed:

   What|Removed |Added

   Keywords||filter:pdf

--- Comment #2 from ekari  ---
The problem is on page 15

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


[Libreoffice-bugs] [Bug 101372] FILEOPEN PDF Rendering of images is wrong

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101372

--- Comment #1 from ekari  ---
Created attachment 126651
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126651=edit
Side by side

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


[Libreoffice-bugs] [Bug 101372] New: FILEOPEN PDF Rendering of images is wrong

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101372

Bug ID: 101372
   Summary: FILEOPEN PDF Rendering of images is wrong
   Product: LibreOffice
   Version: 5.1.4.2 release
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Draw
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: ekarist...@gmail.com

Created attachment 126650
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126650=edit
pdf

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


[Libreoffice-bugs] [Bug 101371] New: Start Center (Centre) left panel truncates text with UI scaling > 110%

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101371

Bug ID: 101371
   Summary: Start Center (Centre) left panel truncates text with
UI scaling > 110%
   Product: LibreOffice
   Version: 5.1.4.2 release
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
  Severity: trivial
  Priority: medium
 Component: UI
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: bruceh...@gmail.com

The left panel of the LO Start Center appears to be fixed in size yet the text
grows according to the the 'User Interface Scaling setting at "Tools > Options
> LO > View".  When Scaling is set to >= 110% the longest text (Impress
Presentation) is not fully displayed.  It would be nice if either the left
panel grew according the scaling setting or the left panel text was of fixed
size.

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


[Libreoffice-bugs] [Bug 101367] Bad font rendering in window

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101367

Julien Nabet  changed:

   What|Removed |Added

Version|unspecified |5.1.4.2 release

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


[Libreoffice-bugs] [Bug 101351] Combobox pulldown button is missing in GTK3 RTL UI

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101351

--- Comment #3 from Yotam Benshalom  ---
Also, I saw you use KDE, and this bug may be related to the GTK3 rendering.

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


[Libreoffice-bugs] [Bug 101351] Combobox pulldown button is missing in GTK3 RTL UI

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101351

--- Comment #2 from Yotam Benshalom  ---
I checked this, and using SAL_RTL_ENABLED=1 is not equivalent to actually
running writer in RTL locale and with an RTL UI with regards to the pulldown
buttons. 
To reproduce the bug you need to set the locale and the interface to an rtl
language, such as Hebrew.

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


[Libreoffice-bugs] [Bug 101367] Bad font rendering in window

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101367

--- Comment #3 from adpint...@gmail.com ---
(In reply to thackert from comment #1)

Hello again,
i'm using XFCE (Version 4.12) as DE and xfwm4 as WM. the font i am using is
open Sans 8.
Yes, changing the font in my DM changes the font in the dialog.

more details:
OS: linux 
Kernel: x86_64 Linux 4.6.0-040600-generic



Ad.

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


[Libreoffice-bugs] [Bug 101367] Bad font rendering in window

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101367

--- Comment #2 from adpint...@gmail.com ---
Created attachment 126649
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126649=edit
Another example

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


[Libreoffice-bugs] [Bug 67302] TablesSupplier name clash when dots in schema/table name

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=67302

Prashant  changed:

   What|Removed |Added

   Assignee|lprashan...@gmail.com   |libreoffice-b...@lists.free
   ||desktop.org

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


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

2016-08-07 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx |4 --
 connectivity/source/drivers/postgresql/pq_tools.cxx |   14 
--
 connectivity/source/drivers/postgresql/pq_tools.hxx |1 
 connectivity/source/drivers/postgresql/pq_xtable.cxx|5 +--
 connectivity/source/drivers/postgresql/pq_xtables.cxx   |6 +---
 connectivity/source/drivers/postgresql/pq_xtables.hxx   |2 -
 connectivity/source/drivers/postgresql/pq_xview.cxx |5 +--
 connectivity/source/drivers/postgresql/pq_xviews.cxx|6 +---
 8 files changed, 10 insertions(+), 33 deletions(-)

New commits:
commit b6976604ca15259af3a3ee95e10d24937bd63b9a
Author: Lionel Elie Mamane 
Date:   Thu Jun 23 10:33:38 2016 +

Revert "tdf#67302 Resolving tablesSupplier name clash for postgresql"

As explained in https://bugs.documentfoundation.org/67302
this is the right thing to do in that directory, but cannot
be comitted in isolation. All callers of that function in
all of LibreOffice need to be adapted to the new syntax
of the returned value (that is that the value is now properly escaped). 
This needs to be done at the same time in all drivers and all places that call 
this API (+documented in the release notes).

This reverts commit d43f4390e006716ca538ad92d09bd012179efd66.

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

diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
index cec6070..c2e64df 100644
--- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
@@ -212,9 +212,7 @@ void ResultSetMetaData::checkTable()
 {
 const OUString name   (getTableName ( 1 ));
 const OUString schema (getSchemaName( 1 ));
-const OUString EscapedName (name.replaceAll("\"","\"\"" ));
-const OUString EscapedSchema ( schema.replaceAll("\"","\"\""));
-const OUString composedName( schema.isEmpty() ? name : ("\"" + 
EscapedSchema + "\".\"" + EscapedName + "\"") );
+const OUString composedName( schema.isEmpty() ? name : (schema 
+ "." + name) );
 tables->getByName( composedName ) >>= m_table;
 }
 }
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx 
b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 2d0bc57e..4e6df8b 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -463,20 +463,6 @@ void splitSQL( const OString & sql, OStringVector  )
 
 }
 
-void splitDoubleQuoteEscapedIdentifiers( const OUString & source, OUString 
*first, OUString *second)
-{
-int a = source.indexOf("\".\"");
-OString tempstring = OUStringToOString(source , RTL_TEXTENCODING_UTF8);
-if(a > 0)
-{
-//remove start and end double quote as well as escaped double quotes
-*first =OStringToOUString(OString(()[1],a-2) , 
RTL_TEXTENCODING_UTF8);
-*first=first->replaceAll("\"\"","\"");
-*second 
=OStringToOUString(OString(()[a+2],source.getLength()-a-2) , 
RTL_TEXTENCODING_UTF8);
-*second=second->replaceAll("\"\"","\"");
-}
-}
-
 void tokenizeSQL( const OString & sql, OStringVector   )
 {
 int length = sql.getLength();
diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx 
b/connectivity/source/drivers/postgresql/pq_tools.hxx
index 8c17c28..6ab147c 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.hxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.hxx
@@ -111,7 +111,6 @@ OUString array2String( const css::uno::Sequence< 
css::uno::Any >  );
 css::uno::Reference< css::sdbc::XConnection > extractConnectionFromStatement(
 const css::uno::Reference< css::uno::XInterface > & stmt );
 
-void splitDoubleQuoteEscapedIdentifiers( const OUString & source, OUString 
*first, OUString *second);
 void splitConcatenatedIdentifier( const OUString & source, OUString *first, 
OUString *second);
 
 
diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx 
b/connectivity/source/drivers/postgresql/pq_xtable.cxx
index 8e0ae92..4b8d451 100644
--- a/connectivity/source/drivers/postgresql/pq_xtable.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx
@@ -154,13 +154,12 @@ void Table::rename( const OUString& newName )
 
 OUString newTableName;
 OUString newSchemaName;
-//changing schema + dot + table-name to "schema"."table-name"
 // OOo2.0 passes schema + dot + new-table-name while
 // OO1.1.x passes new Name without schema
 // in case name contains a dot, it is 

[Libreoffice-bugs] [Bug 101057] LO crash when creating database using JDK 1.8.0_102

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101057

--- Comment #22 from Gerhard Schaber  ---
I just realized that this may rather be related to bug 96163.

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


[Libreoffice-bugs] [Bug 93782] Add reversed line endings

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=93782

--- Comment #12 from Regina Henschel  ---
Created attachment 126648
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126648=edit
Comment on CF Zero One

The green circle contains the overlapping. There is nothing, you can do about
it, besides making the stroke of the circle very thick. But that would be ugly.

The red circle contains a problem. I have searched, how others draw this
symbol. It seems to me, that it is common to draw the bar with some distance to
the circle, e.g
http://www.vivekmchawla.com/erd-crows-foot-relationship-symbols-cheat-sheet/.
You should change your symbol.

Using the arc command, is really nice and easier to understand than
Bezier-curves.


Change "Reversed arrow" to "Reversed Arrow".

The markup for the reversed arrow contains the attribute 'fill="none"'. It is
not allowed for the draw:marker element and useless anyway. So remove it.


I have looked again at Calligra. It seems, that Calligra has a problem with
viewBox. I think, your use of viewBox is correct in relation to the
specifications.

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


[Libreoffice-ux-advise] [Bug 93782] Add reversed line endings

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=93782

--- Comment #12 from Regina Henschel  ---
Created attachment 126648
  --> https://bugs.documentfoundation.org/attachment.cgi?id=126648=edit
Comment on CF Zero One

The green circle contains the overlapping. There is nothing, you can do about
it, besides making the stroke of the circle very thick. But that would be ugly.

The red circle contains a problem. I have searched, how others draw this
symbol. It seems to me, that it is common to draw the bar with some distance to
the circle, e.g
http://www.vivekmchawla.com/erd-crows-foot-relationship-symbols-cheat-sheet/.
You should change your symbol.

Using the arc command, is really nice and easier to understand than
Bezier-curves.


Change "Reversed arrow" to "Reversed Arrow".

The markup for the reversed arrow contains the attribute 'fill="none"'. It is
not allowed for the draw:marker element and useless anyway. So remove it.


I have looked again at Calligra. It seems, that Calligra has a problem with
viewBox. I think, your use of viewBox is correct in relation to the
specifications.

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


[Libreoffice-bugs] [Bug 101057] LO crash when creating database using JDK 1.8.0_102

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101057

--- Comment #21 from Gerhard Schaber  ---
Correction, on MacOS I do not seem to be able to select any Java version
anymore. I just tried with Java 8u101 as well.

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


[Libreoffice-bugs] [Bug 101057] LO crash when creating database using JDK 1.8.0_102

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101057

--- Comment #20 from Gerhard Schaber  ---
There is a good chance that this has broken the detection of older Java
versions on MacOS. With 5.0.6, Java 8u91 is detected, with 5.1.5 it is not
anymore.

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


[Libreoffice-bugs] [Bug 101338] Window returns unhandled win32 exception from soffice.bin{10872]

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101338

Buovjaga  changed:

   What|Removed |Added

 Resolution|NOTABUG |WORKSFORME

--- Comment #3 from Buovjaga  ---
Thanks. I'll change the status to WFM as we use it for profile issues
typically.

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


[Libreoffice-bugs] [Bug 101296] Commands .uno:Crop and .uno: GrafAttrCrop have identical text in customize dialog

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101296

Yousuf (Jay) Philips  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||philip...@hotmail.com
 Resolution|--- |DUPLICATE

--- Comment #2 from Yousuf (Jay) Philips  ---
The customize dialog takes the tooltip text, which is being fixed in the bug
92733.

*** This bug has been marked as a duplicate of bug 92733 ***

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


[Libreoffice-bugs] [Bug 53312] Combining diacritics doubling characters

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=53312

--- Comment #17 from Phil Krylov  ---
(In reply to Maroussia73 from comment #16)
> I have this problem since I'm using libreoffice, OR openoffice, on windows
> XP, 7, 10 and the bug IS STILL NOT FIXED !
> 
> It's absolutely critical for me and for many people who need to write
> cyrillic with accents. 
> Please do something...

We are all waiting until Bug 89870 is fixed and merged in release... Hopefully
soon.

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


[Libreoffice-bugs] [Bug 101351] Combobox pulldown button is missing in GTK3 RTL UI

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101351

Buovjaga  changed:

   What|Removed |Added

 CC||todven...@suomi24.fi

--- Comment #1 from Buovjaga  ---
Pulldowns are there for me, tested with SAL_RTL_ENABLED=1
Was the problem already in 5.1.x?
For the alignment issue, check existing ones and then file a new report, if no
report exists.

Version: 5.1.5.2
Build ID: 1:5.1.5~rc2-0ubuntu1~xenial1
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: f3d26af51588af441f62fb69bb7a5432845226ac
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 5th 2016

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


[Libreoffice-bugs] [Bug 101338] Window returns unhandled win32 exception from soffice.bin{10872]

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101338

Earl Hatt  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |NOTABUG

--- Comment #2 from Earl Hatt  ---
Thank You Buovjaga ... Followed the profile reset procedures and the reported
problem disappeared. registrymodifications.xcu turned out to be the problem. 
Also the size of the file was reduced from 1,084KB to 102KB.  I am going to
mark the problem resolved.

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


[Libreoffice-bugs] [Bug 53312] Combining diacritics doubling characters

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=53312

Phil Krylov  changed:

   What|Removed |Added

 Depends on|53245   |89870


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=53245
[Bug 53245] Bad Graphite ligature handling
https://bugs.documentfoundation.org/show_bug.cgi?id=89870
[Bug 89870] Unify text layout to use HarfBuzz on all platforms
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 100365] LibreOffice close when try to create a chart

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=100365

Buovjaga  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEEDINFO
 Ever confirmed|0   |1

--- Comment #17 from Buovjaga  ---
Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED
DUPLICATE of bug 94209, if the problem went away.

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


[Libreoffice-bugs] [Bug 101295] Crop-Handle and Crop-Dialog are hard to distinguish in a toolbar

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101295

Yousuf (Jay) Philips  changed:

   What|Removed |Added

 CC||philip...@hotmail.com

--- Comment #5 from Yousuf (Jay) Philips  ---
(In reply to Regina Henschel from comment #0)
> Make a separate icon for uno.crop, add handles in the icon, for example.

Go for it if you think its important, as the crop dialog is only accessible by
default in the menu as i switched the toolbar and context menus to the
interactive crop.

> Change the tooltips to indicate, that one icon is for the handles and the
> other for the dialog.

Tooltip changed with patch sent in for bug 92733.

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


[Libreoffice-bugs] [Bug 101359] Impossible to insert, delete or rename bookmarks

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101359

Buovjaga  changed:

   What|Removed |Added

   Keywords||bibisectRequest, regression
 CC||todven...@suomi24.fi

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


[Libreoffice-bugs] [Bug 92733] LibO 5: two crop image entries in format image menu; rename non-dialog one to "Interactive Crop" or "Direct Crop"

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=92733

Yousuf (Jay) Philips  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |philip...@hotmail.com
   |desktop.org |

--- Comment #7 from Yousuf (Jay) Philips  ---
Patch is in - https://gerrit.libreoffice.org/27939

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


[Libreoffice-bugs] [Bug 101319] Multiple dictionaries to work simultaneously

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101319

Buovjaga  changed:

   What|Removed |Added

   Keywords||needsUXEval
 CC||todven...@suomi24.fi
Summary|Multiple dictionaries to|Multiple dictionaries to
   |work silmutaneously |work simultaneously
   Severity|normal  |enhancement

--- Comment #1 from Buovjaga  ---
Let's ask design team for their insight.

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


[Libreoffice-bugs] [Bug 101266] Adding or editing comments screws up keyboard editing and navigation

2016-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=101266

Joel Madero  changed:

   What|Removed |Added

 CC||jmadero@gmail.com

--- Comment #2 from Joel Madero  ---
Version: 5.3.0.0.alpha0+
Build ID: fc305bb6d656736bedc2f89789e18d8c9a3bbf2c
CPU Threads: 2; OS Version: Linux 3.16; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

Cannot confirm. Try with a fresh profile.
https://wiki.documentfoundation.org/UserProfile

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


  1   2   3   >