CppCheck Report Update

2017-03-04 Thread cppcheck.libreoff...@gmail.com

A new cppcheck report is available at : 
http://dev-builds.libreoffice.org/cppcheck_reports/master/


Note:
The script generating this report was run at :
2017-05-03_02:33:25 with user buildslave at host vm140 as 
/home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s 
/home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w 
/home/buildslave/tmp/www

It can be found and improved here:

https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=cppcheck/cppcheck-report.sh


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


[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - wsd/LOOLWSD.cpp

2017-03-04 Thread Michael Meeks
 wsd/LOOLWSD.cpp |   39 ++-
 1 file changed, 22 insertions(+), 17 deletions(-)

New commits:
commit 2dbc5ddf4f6988e27241b04f7c55e519221d7c3a
Author: Michael Meeks 
Date:   Sat Mar 4 23:40:07 2017 +

Rename members: accept and webserver pieces have cleaner names.

As distinct from the websocket poll per DocumentBroker.

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 755991f..cf9dc33 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1771,7 +1771,7 @@ private:
 }
 else if (reqPathTokens.count() > 2 && reqPathTokens[0] == 
"lool" && reqPathTokens[2] == "ws")
 {
-handleClientWsRequest(request, reqPathTokens[1]);
+handleClientWsUpgrade(request, reqPathTokens[1]);
 }
 else
 {
@@ -2163,7 +2163,7 @@ private:
 throw BadRequestException("Invalid or unknown request.");
 }
 
-void handleClientWsRequest(const Poco::Net::HTTPRequest& request, const 
std::string& url)
+void handleClientWsUpgrade(const Poco::Net::HTTPRequest& request, const 
std::string& url)
 {
 // requestHandler = new ClientRequestHandler();
 LOG_INF("Client WS request" << request.getURI() << ", url: " << url);
@@ -2209,7 +2209,9 @@ private:
 {
 _clientSession = createNewClientSession(ws, _id, uriPublic, 
docBroker, isReadOnly);
 if (_clientSession)
+{
 _clientSession->onConnect(_socket);
+}
 }
 if (!docBroker || !_clientSession)
 LOG_WRN("Failed to connect DocBroker and Client Session.");
@@ -2348,22 +2350,22 @@ public:
 ~LOOLWSDServer()
 {
 stop();
-if (_serverThread.joinable())
-_serverThread.join();
-if (_documentThread.joinable())
-_documentThread.join();
+if (_acceptThread.joinable())
+_acceptThread.join();
+if (_webServerThread.joinable())
+_webServerThread.join();
 }
 
 void start(const int port)
 {
 std::shared_ptr serverSocket = findServerPort(port);
 
-_serverPoll.insertNewSocket(serverSocket);
+_acceptPoll.insertNewSocket(serverSocket);
 
-_serverThread = std::thread(runServer, std::ref(_stop), 
std::ref(_serverPoll));
+_acceptThread = std::thread(runServer, std::ref(_stop), 
std::ref(_acceptPoll));
 
 // TODO loolnb - we need a documentThread per document
-_documentThread = std::thread(runDocument, std::ref(_stop), 
std::ref(_documentPoll));
+_webServerThread = std::thread(runDocument, std::ref(_stop), 
std::ref(_webServerPoll));
 }
 
 void stop()
@@ -2379,21 +2381,24 @@ public:
   << "  isShuttingDown: " << ShutdownRequestFlag << "\n";
 
 std::cerr << "Server poll:\n";
-_serverPoll.dumpState();
+_acceptPoll.dumpState();
 
 std::cerr << "Document poll:\n";
-_documentPoll.dumpState();
+_webServerPoll.dumpState();
 }
 
 private:
 std::atomic _stop;
 
-SocketPoll _serverPoll;
-std::thread _serverThread;
+/// This thread & poll accepts incoming connections.
+SocketPoll _acceptPoll;
+std::thread _acceptThread;
 
-// TODO loolnb - we need a documentThread per document
-SocketPoll _documentPoll;
-std::thread _documentThread;
+/// This thread polls basic web serving, and handling of
+/// websockets before upgrade: when upgraded they go to the
+/// relevant DocumentBroker poll instead.
+SocketPoll _webServerPoll;
+std::thread _webServerThread;
 
 static void runServer(std::atomic& stop, SocketPoll& serverPoll) {
 LOG_INF("Starting master server thread.");
@@ -2418,7 +2423,7 @@ private:
 
 std::shared_ptr getServerSocket(const 
Poco::Net::SocketAddress& addr)
 {
-std::shared_ptr serverSocket = 
std::make_shared(_documentPoll,
+std::shared_ptr serverSocket = 
std::make_shared(_webServerPoll,
 #if ENABLE_SSL
 LOOLWSD::isSSLEnabled() ? std::unique_ptr{ new 
SslSocketFactory() } :
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp

2017-03-04 Thread Michael Meeks
 wsd/ClientSession.cpp  |1 
 wsd/DocumentBroker.cpp |   58 ++
 wsd/DocumentBroker.hpp |   21 
 wsd/LOOLWSD.cpp| 1213 +++--
 wsd/LOOLWSD.hpp|3 
 5 files changed, 176 insertions(+), 1120 deletions(-)

New commits:
commit c53ea05f7ee8a03fa6752797d4b2d1e651a09300
Author: Michael Meeks 
Date:   Sat Mar 4 23:07:17 2017 +

Setup a poll per DocumentBroker with thread to go with that.

Also dung out a chunk of older code.

FIXME: websocket / ClientSession needs to associate itself with the
DocumentBroker poll loop in place of the original loop.

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 140ea77..edcf34c 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -40,6 +40,7 @@ ClientSession::ClientSession(const std::string& id,
 {
 LOG_INF("ClientSession ctor [" << getName() << "].");
 
+// FIXME: one thread per client session [!?].
 _senderThread = std::thread([this]{ senderThread(); });
 }
 
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 5cd7fb3..8f72e21 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -147,14 +147,12 @@ std::string DocumentBroker::getDocKey(const Poco::URI& 
uri)
 DocumentBroker::DocumentBroker(const std::string& uri,
const Poco::URI& uriPublic,
const std::string& docKey,
-   const std::string& childRoot,
-   const std::shared_ptr& 
childProcess) :
+   const std::string& childRoot) :
 _uriOrig(uri),
 _uriPublic(uriPublic),
 _docKey(docKey),
 _childRoot(childRoot),
 _cacheRoot(getCachePath(uriPublic.toString())),
-_childProcess(childProcess),
 _lastSaveTime(std::chrono::steady_clock::now()),
 _markToDestroy(false),
 _lastEditableSession(false),
@@ -171,6 +169,57 @@ DocumentBroker::DocumentBroker(const std::string& uri,
 assert(!_childRoot.empty());
 
 LOG_INF("DocumentBroker [" << _uriPublic.toString() << "] created. DocKey: 
[" << _docKey << "]");
+
+_stop = false;
+}
+
+std::shared_ptr DocumentBroker::create(
+const std::string& uri,
+const Poco::URI& uriPublic,
+const std::string& docKey,
+const std::string& childRoot)
+{
+std::shared_ptr docBroker = 
std::make_shared(uri, uriPublic, docKey, childRoot);
+docBroker->_thread = std::thread(pollThread, docBroker);
+return docBroker;
+}
+
+void DocumentBroker::pollThread(std::shared_ptr docBroker)
+{
+// Request a kit process for this doc.
+docBroker->_childProcess = getNewChild_Blocks();
+if (!docBroker->_childProcess)
+{
+// Let the client know we can't serve now.
+LOG_ERR("Failed to get new child.");
+
+// FIXME: need to notify all clients and shut this down ...
+#if 0
+const std::string msg = SERVICE_UNAVAILABLE_INTERNAL_ERROR;
+ws.sendFrame(msg);
+// abnormal close frame handshake
+ws.shutdown(WebSocketHandler::StatusCodes::ENDPOINT_GOING_AWAY);
+#endif
+// FIXME: return something good down the websocket ...
+docBroker->_stop = true;
+}
+docBroker->_childProcess->setDocumentBroker(docBroker);
+
+// Main polling loop goodness.
+while (!docBroker->_stop && !TerminationFlag && !ShutdownRequestFlag)
+{
+docBroker->_poll.poll(5000);
+}
+}
+
+bool DocumentBroker::isAlive() const
+{
+if (!_childProcess)
+return true; // waiting to get a child.
+if (_stop) // we're dead.
+return false;
+
+return _childProcess->isAlive();
 }
 
 DocumentBroker::~DocumentBroker()
@@ -188,6 +237,9 @@ DocumentBroker::~DocumentBroker()
 // Need to first make sure the child exited, socket closed,
 // and thread finished before we are destroyed.
 _childProcess.reset();
+
+if (_thread.joinable())
+_thread.join();
 }
 
 bool DocumentBroker::load(std::shared_ptr& session, const 
std::string& jailId)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 2c0122d..a2d23a6 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -28,6 +28,7 @@
 #include "LOOLWebSocket.hpp"
 #include "TileDesc.hpp"
 #include "Util.hpp"
+#include "net/Socket.hpp"
 
 #include "common/SigUtil.hpp"
 
@@ -207,11 +208,18 @@ public:
 /// Dummy document broker that is marked to destroy.
 DocumentBroker();
 
+/// Use create - not this constructor ...
+/// FIXME: friend with make_shared etc.
 DocumentBroker(const std::string& uri,
const Poco::URI& uriPublic,
const std::string& docKey,
-   const std::string& childRoot,
-   const std::shared_ptr& childProcess);
+   const std::string& childRoot);
+public:
+static std::shared_ptr create(
+   const std::string& uri,
+   const Poco::URI& ur

Re: Improving comments support

2017-03-04 Thread Heiko Tietze
Hi Pranav,

I doubt that we can modify the format- those changes are handled by OASIS 
(http://opendocumentformat.org/, https://www.oasis-open.org/). But there are 
more experience people around, and maybe your idea is being discussed as a 
future enhancement.

From the UX and RE point of view we have a large number of tickets regarding 
comments in Writer (meta is tdf#106179). Users requests or have trouble with 

* direct formatting (61242,62150,81458,89741,90401,102950,106149)
  and styles (103064)
* threads and long comments (64181,91519,95759,106227)
* insert comments for objects (60976,86387)
* issues with the reference (64731,81018)
* search for/in comments (96474,101936)
* placement (86188, 97487)
* look and feel (38295,95329, 95759,97341,101714)
* accessibility (102950,106180)
* confusion with track changes (90725)

This list is likely not complete, and all the bugs are not listed. But a 
solution could start with a separate deck for comments (tdf#106316). It would 
support a11y, allow normal threads in a tree, supports quick access (which 
should be the fact today but the Navigator has serious limitations), and could 
offer more interactions.

So far as a quick, though late (sorry) reply. If you want support by the design 
team we could make a proposal of a future UI. Don't hesitate to ask.

Cheers,
Heiko

On 03/02/2017 11:38 AM, Pranav Kant wrote:
> Hi all,
> 
> I have been looking into improving the comments support in LO, mainly
> bringing the feature of marking comments as resolved[1], other things
> being better root-reply comments relationship, ability to reply to
> comments in spreadsheets and presentations.
> 
> I have done some research around comments in OOXML, ODF for text
> documents, spreadsheets and presentations and there were couple of
> changes I have in mind that we would need to make to ODF (introduce
> LO extensions). Please let me know if there are any
> concerns/thoughts/ideas that come to your mind.
> 
> Firstly, talking about proper root-reply comment relationship for
> writer (because we support reply comments in writer only), the
> current situation is that if you have a comment thread (one root and
> several reply comments) and you put the visible cursor around the
> anchor position and press enter or any other key, the comment thread
> breaks (c.f [2]). This is because the current code assumes that
> root-reply comments are the ones which have same anchor position.
> This is wrong in my opinion, and doesn't just give rise to [2], but
> also prevents starting another comment thread at same anchor position
> which maybe be required in some situations.
> 
> To deal with it, my plan is to use 'office:name' attribute with each
> and every  element corresponding to a comment. ODF
> spec already allows a office:name attribute but currently, this
> attribute is used only when the comment has a text range associated
> with it. In addition to using office:name attribute, we would need to
> introduce an attribute, say loext:parent-annotations-name, which
> would point to their parent comments.
> 
> Changing the application logic from interpreting root-reply comment
> relationship from anchor positions to interpreting it from their
> explicit mapping with help of office:name,
> loext:parent-annotation-name attribute should address all existing
> problems as mentioned above.
> 
> We don't have any ability to reply to comments for spreadsheets and
> presentations as of now, but the above approach would also help
> whenever we would introduce reply comments in them.
> 
> Now talking about adding the ability to mark comments as resolved, an
> attribute like, office:resolved='true/false' to each
>  element should do.
> 
> An office:resolved=false will mean that comment is in opened state
> and an office:resolved=true means that comment has been resolved.
> Whenever a comment thread is marked as resolved, we would add a new
> annotation with text '' with its
> office:resolved='true'. Applications can find out if a comment thread
> is resolved or not by just checking the office:resolved state of the
> last comment in the thread. Reopening a comment would be possible by
> just adding another annotation with office:resolved=false to our
> annotation chain.
> 
> Summarizing, these are the LO extensions that we would end up with - 
> a) loext:annotation-parent-name attribute in 
> element b) loext:resolved=true/false attribute in 
> element
> 
> Let me know what you think.
> 
> [1] https://bugs.documentfoundation.org/show_bug.cgi?id=106126 [2]
> https://bugs.documentfoundation.org/show_bug.cgi?id=106227
> 

-- 
Dr. Heiko Tietze
UX Designer
Tel. +49 (0)179/1268509



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Repository.mk

2017-03-04 Thread Thorsten Behrens
 Repository.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9ec55a085277e7ae98857edf64c425e35b73eab8
Author: Thorsten Behrens 
Date:   Sat Mar 4 23:39:42 2017 +0100

Fix build for mobile

Change-Id: I134ad487e417264c66d135a4b037f22033804c28

diff --git a/Repository.mk b/Repository.mk
index 6b169bf..b626223 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -624,7 +624,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
xmlsecurity \
xsec_fw \
xsec_xmlsec \
-   $(if $(filter-out MACOSX WNT,$(OS)),xsec_gpg) \
+   $(if $(filter-out WNT MACOSX ANDROID IOS,$(OS)),xsec_gpg) \
xstor \
$(if $(filter $(OS),MACOSX), \
macab1 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-04 Thread Stephan Bergmann
 xmlsecurity/source/gpg/SecurityEnvironment.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 6117ae2bd3e75df84a052f48cd5ca501f0e3be3e
Author: Stephan Bergmann 
Date:   Sat Mar 4 23:09:13 2017 +0100

-Werror,-Wunused-private-field

Change-Id: I8e39763e781121932a0200e59760b49d7edcbfdd

diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.hxx 
b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
index db778ab..04d05c1 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
@@ -31,9 +31,6 @@ class SecurityEnvironmentGpg : public cppu::WeakImplHelper< 
css::xml::crypto::XS
 
css::lang::XServiceInfo,
 
css::lang::XUnoTunnel >
 {
-private:
-osl::Mutex m_mutex;
-
 public:
 SecurityEnvironmentGpg();
 virtual ~SecurityEnvironmentGpg() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-04 Thread Khaled Hosny
 vcl/inc/CommonSalLayout.hxx|2 -
 vcl/source/gdi/CommonSalLayout.cxx |   57 +
 2 files changed, 41 insertions(+), 18 deletions(-)

New commits:
commit 5c617a811724a45dd8688869eeafac4c44f6a8aa
Author: Khaled Hosny 
Date:   Sun Mar 5 00:04:35 2017 +0200

Handle Tr vertical orientation before shaping

See https://github.com/behdad/harfbuzz/issues/355

Change-Id: Ic82d74046980fae3e7a973fee90fe5bb4f2b8588

diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx
index 591cb78..a33e68c 100644
--- a/vcl/inc/CommonSalLayout.hxx
+++ b/vcl/inc/CommonSalLayout.hxx
@@ -60,7 +60,7 @@ class CommonSalLayout : public GenericSalLayout
 voidgetScale(double* nXScale, double* nYScale);
 
 hb_set_t*   mpVertGlyphs;
-boolIsVerticalAlternate(hb_codepoint_t nGlyphIndex);
+boolHasVerticalAlternate(sal_UCS4 aChar, sal_UCS4 
aNextChar);
 
 voidSetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);
 
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 13665f7..c61fea0 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -384,12 +384,16 @@ void CommonSalLayout::DrawText(SalGraphics& rSalGraphics) 
const
 rSalGraphics.DrawTextLayout( *this );
 }
 
-// Find if the given glyph index can result from applying “vert” feature.
+// Find if the nominal glyph of the character is an input to “vert” 
feature.
 // We don’t check for a specific script or language as it shouldn’t matter
 // here; if the glyph would be the result from applying “vert” for any
 // script/language then we want to always treat it as upright glyph.
-bool CommonSalLayout::IsVerticalAlternate(hb_codepoint_t nGlyphIndex)
+bool CommonSalLayout::HasVerticalAlternate(sal_UCS4 aChar, sal_UCS4 
aVariationSelector)
 {
+hb_codepoint_t nGlyphIndex = 0;
+if (!hb_font_get_glyph(mpHbFont, aChar, aVariationSelector, &nGlyphIndex))
+return false;
+
 if (!mpVertGlyphs)
 {
 hb_face_t* pHbFace = hb_font_get_face(mpHbFont);
@@ -407,7 +411,11 @@ bool CommonSalLayout::IsVerticalAlternate(hb_codepoint_t 
nGlyphIndex)
 while (hb_set_next(pLookups, &nIdx))
 {
 hb_set_t* pGlyphs = hb_set_create();
-hb_ot_layout_lookup_collect_glyphs(pHbFace, HB_OT_TAG_GSUB, 
nIdx, nullptr, nullptr, nullptr, pGlyphs);
+hb_ot_layout_lookup_collect_glyphs(pHbFace, HB_OT_TAG_GSUB, 
nIdx,
+nullptr,  // glyphs before
+pGlyphs,  // glyphs input
+nullptr,  // glyphs after
+nullptr); // glyphs out
 hb_set_union(mpVertGlyphs, pGlyphs);
 }
 }
@@ -491,16 +499,37 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
 {
 sal_Int32 nPrevIdx = nIdx;
 sal_UCS4 aChar = rArgs.mrStr.iterateCodePoints(&nIdx);
-switch (vcl::GetVerticalOrientation(aChar))
+VerticalOrientation aVo = 
vcl::GetVerticalOrientation(aChar);
+
+sal_UCS4 aVariationSelector = 0;
+if (nIdx < nEndRunPos)
+{
+sal_Int32 nNextIdx = nIdx;
+sal_UCS4 aNextChar = 
rArgs.mrStr.iterateCodePoints(&nNextIdx);
+if (u_hasBinaryProperty(aNextChar, 
UCHAR_VARIATION_SELECTOR))
+{
+nIdx = nNextIdx;
+aVariationSelector = aNextChar;
+}
+}
+
+// Charters with U and Tu vertical orientation should
+// be shaped in vertical direction. But characters
+// with Tr should be shaped in vertical direction
+// only if they have vertical alternates, otherwise
+// they should be shaped in horizontal direction
+// and then rotated.
+// See http://unicode.org/reports/tr50/#vo
+if (aVo == VerticalOrientation::Upright ||
+aVo == VerticalOrientation::TransformedUpright ||
+(aVo == VerticalOrientation::TransformedRotated &&
+ HasVerticalAlternate(aChar, aVariationSelector)))
 {
-case VerticalOrientation::Upright:
-case VerticalOrientation::TransformedUpright:
-case VerticalOrientation::TransformedRotated:
 aDirection = HB_DIRECTION_TTB;
-break;
-default:
+}
+else
+{
 aDirection = b

Re: Function to scroll to a certain position

2017-03-04 Thread Heiko Tietze
How about using bookmarks? Insert > bookmark... adds a node to the Navigator 
(F5) under bookmarks. Might be easier to handle than cursor positions. 
Unfortunately I cannot help with actual code ;-).

On 03/04/2017 10:21 PM, jan wrote:
> I’m looking for a function to scroll to a certain (cursor?) position in
> a Writer Document and could not find it yet.



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - wsd/LOOLWSD.cpp

2017-03-04 Thread Michael Meeks
 wsd/LOOLWSD.cpp |   76 ++--
 1 file changed, 42 insertions(+), 34 deletions(-)

New commits:
commit b892d0c41f12a6866b6aefa1716a37dd1f742361
Author: Michael Meeks 
Date:   Sat Mar 4 21:37:10 2017 +

Annotate some blocking methods - ugly, but necessary.

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 8fdf280..ce39f25 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -463,7 +463,7 @@ static size_t addNewChild(const 
std::shared_ptr& child)
 return count;
 }
 
-static std::shared_ptr getNewChild()
+static std::shared_ptr getNewChild_Blocks()
 {
 Util::assertIsLocked(DocBrokersMutex);
 std::unique_lock lock(NewChildrenMutex);
@@ -490,6 +490,7 @@ static std::shared_ptr getNewChild()
 #endif
 LOG_TRC("Waiting for a new child for a max of " << timeoutMs << " 
ms.");
 const auto timeout = chrono::milliseconds(timeoutMs);
+// FIXME: blocks ...
 if (NewChildrenCV.wait_for(lock, timeout, []() { return 
!NewChildren.empty(); }))
 {
 auto child = NewChildren.back();
@@ -589,7 +590,7 @@ private:
 /// Handle POST requests.
 /// Always throw on error, do not set response status here.
 /// Returns true if a response has been sent.
-static bool handlePostRequest(HTTPServerRequest& request, 
HTTPServerResponse& response, const std::string& id)
+static bool handlePostRequest_Blocks(HTTPServerRequest& request, 
HTTPServerResponse& response, const std::string& id)
 {
 LOG_INF("Post request: [" << request.getURI() << "]");
 StringTokenizer tokens(request.getURI(), "/?");
@@ -615,7 +616,7 @@ private:
 std::unique_lock 
docBrokersLock(DocBrokersMutex);
 
 // Request a kit process for this doc.
-auto child = getNewChild();
+auto child = getNewChild_Blocks();
 if (!child)
 {
 // Let the client know we can't serve now.
@@ -827,7 +828,7 @@ private:
 }
 
 /// Handle GET requests.
-static void handleGetRequest(const std::string& uri, 
std::shared_ptr& ws, const std::string& id)
+static void handleGetRequest_Blocks(const std::string& uri, 
std::shared_ptr& ws, const std::string& id)
 {
 LOG_INF("Starting GET request handler for session [" << id << "] on 
url [" << uri << "].");
 try
@@ -864,7 +865,7 @@ private:
 int retry = 3;
 while (retry-- > 0)
 {
-auto docBroker = findOrCreateDocBroker(uri, docKey, ws, id, 
uriPublic);
+auto docBroker = findOrCreateDocBroker_Blocks(uri, docKey, ws, 
id, uriPublic);
 if (docBroker)
 {
 auto session = createNewClientSession(ws, id, uriPublic, 
docBroker, isReadOnly);
@@ -913,11 +914,11 @@ private:
 /// Otherwise, creates and adds a new one to DocBrokers.
 /// May return null if terminating or MaxDocuments limit is reached.
 /// After returning a valid instance DocBrokers must be cleaned up after 
exceptions.
-static std::shared_ptr findOrCreateDocBroker(const 
std::string& uri,
- const 
std::string& docKey,
- 
std::shared_ptr& ws,
- const 
std::string& id,
- const 
Poco::URI& uriPublic)
+static std::shared_ptr findOrCreateDocBroker_Blocks(const 
std::string& uri,
+const 
std::string& docKey,
+
std::shared_ptr& ws,
+const 
std::string& id,
+const 
Poco::URI& uriPublic)
 {
 LOG_INF("Find or create DocBroker for docKey [" << docKey <<
 "] for session [" << id << "] on url [" << 
uriPublic.toString() << "].");
@@ -1025,10 +1026,10 @@ private:
 return docBroker;
 }
 
-static std::shared_ptr createNewDocBroker(const 
std::string& uri,
-  const 
std::string& docKey,
-  
std::shared_ptr& ws,
-  const Poco::URI& 
uriPublic)
+static std::shared_ptr createNewDocBroker_Blocks(const 
std::string& uri,
+ const 
std::string& docKey,
+ 
std::shared_ptr& ws,
+ const 
Poco::URI

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

2017-03-04 Thread Caolán McNamara
 lotuswordpro/source/filter/tocread.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 0d1813cdaf44e3a8ae8878d6d87c28300451beb2
Author: Caolán McNamara 
Date:   Sat Mar 4 21:20:48 2017 +

fail on unknown version flags

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

diff --git a/lotuswordpro/source/filter/tocread.cxx 
b/lotuswordpro/source/filter/tocread.cxx
index 0b0a32e..ce03e03 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -109,13 +109,12 @@ CBenTOCReader::ReadLabel(unsigned long * pTOCOffset, 
unsigned long * pTOCSize)
 
 BenByte * pCurrLabel = Label + BEN_MAGIC_BYTES_SIZE;
 
-#ifndef NDEBUG
 BenWord Flags =
-#endif
 UtGetIntelWord(pCurrLabel); pCurrLabel += 2; // Flags
 // Newer files are 0x0101--indicates if big or little endian.  Older
 // files are 0x0 for flags
-assert(Flags == 0x0101 || Flags == 0x0);
+if (Flags != 0x0101 && Flags != 0x0)
+return BenErr_UnknownBentoFormatVersion;
 
 cBlockSize = UtGetIntelWord(pCurrLabel) * 1024; pCurrLabel += 2;
 if (cBlockSize == 0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Function to scroll to a certain position

2017-03-04 Thread jan
Hello Libreoffice Devs,

I’m looking for a function to scroll to a certain (cursor?) position in
a Writer Document and could not find it yet.


What I already did:

- Reading the UNO API docs (it is probably in there, but I did not find it)
- Looked at https://github.com/XRoemer/Organon source, which certainly
has such a function, but I was not able to locate it, either.

Dos anybody know how to jump to a position (ideally with an example for it)?

Kind Regards,
 Jan
_

PS.: I am new to the list and extensions dev, so my questions may be a
bit noob-ish. I’m UX desiger/researcher and code in Python and
Javascript (and a bit R, but that does not bind to UNO).

PPS: What this is for:
I’d like to write an extension which allows to jump to positions in a
document where a certain character+[some text] appears – like a #hashtag.
The extensions purpose would be easing the tagging (also called
"coding") of text snippets by providing an overview where such tags (in
for of a "hashtag" are set. In the document, it would look like:

  Participant 1: "I love working with libreoffice and zotero" #love
#extension #bibliography

The extension would list the quote and the tag (in the sidebar,
probably) and would allow to jump to its position on click (like in a
list of search results).
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-03-04 Thread Stephan Bergmann
 xmlsecurity/inc/certificatechooser.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 1d88c20fd03e753928df209fa5a640bb078afc9a
Author: Stephan Bergmann 
Date:   Sat Mar 4 22:14:59 2017 +0100

-Werror,-Wunused-private-field

Change-Id: Id846ace3c16719b4ce5f1c9e24b7f76cc7753683

diff --git a/xmlsecurity/inc/certificatechooser.hxx 
b/xmlsecurity/inc/certificatechooser.hxx
index efe1f40..d5881eb 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -51,7 +51,6 @@ class CertificateChooser : public ModalDialog
 private:
 css::uno::Reference< css::uno::XComponentContext > mxCtx;
 std::vector< css::uno::Reference< css::xml::crypto::XSecurityEnvironment > 
> mxSecurityEnvironments;
-css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > 
maCerts;
 std::vector> mvUserData;
 
 VclPtr   m_pCertLB;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Libre Office 3 and 3.1 - bug text orientation in Calc

2017-03-04 Thread Andrzej Kamiński
Hi1. Open new sheet in Calc2. Type any content in a 
cell3. Click the right mouse button with the 
cell content-> format 
cells-> tab Alignment-> text 
orientation-> set 90 degrees-- Best regardsAndrzej Kamiński___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Applying as a participant in Google Summer of code

2017-03-04 Thread Shoaib Noor
Dear All concern

Hope you are best of health
With due respect i am stating that i want to apply for the Google Summers of 
Code. I am a citizen of Pakistan and a student of BS(CS) in Iqra University 
besides it i am also learning Certified Mobile Application development and Full 
stack web development from a local organization which is affiliated from 
Microsoft and many other organization. I have good programming

skills in java currently making a professional restaurant management system in 
java and learning ASP.net and react.
I want to apply for the gsoc as a part of your organization and it is very kind 
of you if you suggest any project keeping in view the above mentioned expertise 
as per my point of view i might be good for the Libre office for android 
because i have the knowledge on both Java and C++ (console based).
Best Regards:

Shoaib Noor

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


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

2017-03-04 Thread Caolán McNamara
 hwpfilter/source/hbox.cxx|2 --
 hwpfilter/source/hbox.h  |3 +--
 hwpfilter/source/hwpread.cxx |3 +--
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit db86b38c54baae620cd3074e70d99b08a7592a57
Author: Caolán McNamara 
Date:   Sat Mar 4 20:42:13 2017 +

bin is unused

Change-Id: I5168b18898cff023ab014a86e7afc82d7b69f363

diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index 950fc91..4977e6d 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -95,7 +95,6 @@ FieldCode::FieldCode()
 , str1(nullptr)
 , str2(nullptr)
 , str3(nullptr)
-, bin(nullptr)
 , m_pDate(nullptr)
 {
 reserved1 = new char[4];
@@ -107,7 +106,6 @@ FieldCode::~FieldCode()
 delete[] str1;
 delete[] str2;
 delete[] str3;
-delete[] bin;
 delete[] reserved1;
 delete[] reserved2;
 delete m_pDate;
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 78325a5..979d8a0 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -90,9 +90,8 @@ struct FieldCode : public HBox
 hchar *str1;
 hchar *str2;
 hchar *str3;
-char *bin;
 
- DateCode *m_pDate;
+DateCode *m_pDate;
 
 FieldCode();
 virtual ~FieldCode() override;
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index aefb97a..2cc6d31 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -86,7 +86,6 @@ bool FieldCode::Read(HWPFile & hwpf)
 str1 = new hchar[len1_ ? len1_ : 1];
 str2 = new hchar[len2_ ? len2_ : 1];
 str3 = new hchar[len3_ ? len3_ : 1];
-bin = new char[binlen];
 
 hwpf.Read2b(str1, len1_);
 hwpf.SkipBlock(len1 - (len1_ * sizeof(hchar)));
@@ -98,7 +97,7 @@ bool FieldCode::Read(HWPFile & hwpf)
 hwpf.SkipBlock(len3 - (len3_ * sizeof(hchar)));
 str3[len3_ ? (len3_ - 1) : 0] = 0;
 
-hwpf.ReadBlock(bin, binlen);
+hwpf.SkipBlock(binlen);
 
  if( type[0] == 3 && type[1] == 2 ){ /* It must create a format as created 
date. */
   DateCode *pDate = new DateCode;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_svg

2017-03-04 Thread andreas kainz
 icon-themes/breeze/cmd/32/bibliographycomponent.png  |binary
 icon-themes/breeze/cmd/32/browseview.png |binary
 icon-themes/breeze/cmd/32/hidewhitespace.png |binary
 icon-themes/breeze/cmd/32/mergedocuments.png |binary
 icon-themes/breeze/cmd/32/printlayout.png|binary
 icon-themes/breeze/cmd/32/signature.png  |binary
 icon-themes/breeze/cmd/lc_bibliographycomponent.png  |binary
 icon-themes/breeze/cmd/lc_insertbreak.png|binary
 icon-themes/breeze/cmd/lc_linenumberingdialog.png|binary
 icon-themes/breeze/cmd/lc_ruler.png  |binary
 icon-themes/breeze/cmd/lc_signature.png  |binary
 icon-themes/breeze/cmd/sc_bibliographycomponent.png  |binary
 icon-themes/breeze/cmd/sc_insertbreak.png|binary
 icon-themes/breeze/cmd/sc_linenumberdialog.png   |binary
 icon-themes/breeze/cmd/sc_ruler.png  |binary
 icon-themes/breeze/cmd/sc_signature.png  |binary
 icon-themes/breeze/links.txt |   12 +
 icon-themes/breeze_dark/cmd/32/bibliographycomponent.png |binary
 icon-themes/breeze_dark/cmd/32/browseview.png|binary
 icon-themes/breeze_dark/cmd/32/hidewhitespace.png|binary
 icon-themes/breeze_dark/cmd/32/mergedocuments.png|binary
 icon-themes/breeze_dark/cmd/32/printlayout.png   |binary
 icon-themes/breeze_dark/cmd/32/signature.png |binary
 icon-themes/breeze_dark/cmd/lc_bibliographycomponent.png |binary
 icon-themes/breeze_dark/cmd/lc_insertbreak.png   |binary
 icon-themes/breeze_dark/cmd/lc_linenumberingdialog.png   |binary
 icon-themes/breeze_dark/cmd/lc_ruler.png |binary
 icon-themes/breeze_dark/cmd/lc_signature.png |binary
 icon-themes/breeze_dark/cmd/sc_bibliographycomponent.png |binary
 icon-themes/breeze_dark/cmd/sc_insertbreak.png   |binary
 icon-themes/breeze_dark/cmd/sc_linenumberdialog.svg  |  115 +
 icon-themes/breeze_dark/cmd/sc_ruler.png |binary
 icon-themes/breeze_dark/cmd/sc_signature.png |binary
 icon-themes/breeze_dark/links.txt|   21 +
 icon-themes/breeze_svg/cmd/32/bibliographycomponent.svg  |  119 ++
 icon-themes/breeze_svg/cmd/32/browseview.svg |   93 +++
 icon-themes/breeze_svg/cmd/32/hidewhitespace.svg |  138 +++
 icon-themes/breeze_svg/cmd/32/mergedocuments.svg |   94 +---
 icon-themes/breeze_svg/cmd/32/printlayout.svg|   92 +++
 icon-themes/breeze_svg/cmd/32/signature.svg  |  101 
 icon-themes/breeze_svg/cmd/32/wordcountdialog.svg|  107 +
 icon-themes/breeze_svg/cmd/lc_bibliographycomponent.svg  |  162 +
 icon-themes/breeze_svg/cmd/lc_insertbreak.svg|  176 +++
 icon-themes/breeze_svg/cmd/lc_linenumberingdialog.svg|  163 +
 icon-themes/breeze_svg/cmd/lc_ruler.svg  |   13 +
 icon-themes/breeze_svg/cmd/lc_signature.svg  |  147 
 icon-themes/breeze_svg/cmd/lc_wordcountdialog.svg|  165 ++
 icon-themes/breeze_svg/cmd/sc_bibliographycomponent.svg  |  116 +
 icon-themes/breeze_svg/cmd/sc_insertbreak.svg|  126 ++
 icon-themes/breeze_svg/cmd/sc_linenumberdialog.svg   |  115 +
 icon-themes/breeze_svg/cmd/sc_ruler.svg  |   68 +
 icon-themes/breeze_svg/cmd/sc_signature.svg  |  101 
 icon-themes/breeze_svg/cmd/sc_wordcountdialog.svg|  115 +
 icon-themes/breeze_svg/links.txt |   87 ++-
 54 files changed, 2403 insertions(+), 43 deletions(-)

New commits:
commit 06cdf92ccfbb1fb1654199835f2e37c79443e393
Author: andreas kainz 
Date:   Tue Feb 28 00:37:43 2017 +0100

add missing Breeze-icons for tabed toolbar

Change-Id: I64d1bbbeec1a08ad5da042425d12ebbbae8153d2
Reviewed-on: https://gerrit.libreoffice.org/34706
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 

diff --git a/icon-themes/breeze/cmd/32/bibliographycomponent.png 
b/icon-themes/breeze/cmd/32/bibliographycomponent.png
new file mode 100644
index 000..6fe8cd5
Binary files /dev/null and 
b/icon-themes/breeze/cmd/32/bibliographycomponent.png differ
diff --git a/icon-themes/breeze/cmd/32/browseview.png 
b/icon-themes/breeze/cmd/32/browseview.png
index c4138c0..e99f56b 100644
Binary files a/icon-themes/breeze/cmd/32/browseview.png and 
b/icon-themes/breeze/cmd/32/browseview.png differ
diff --git a/icon-themes/breeze/cmd/32/hidewhitespace.png 
b/icon-themes/breeze/cmd/32/hidewhitespace.png
new file mode 100644
index 000..659390f
Binary files /dev/null and b/icon-themes/breeze/cmd/32/hidewhitespace.png differ
diff --git a/icon-themes/breeze/cmd/32/mergedocuments.png 
b/icon-themes/breeze/cmd/32/mergedocuments.png
index be58c

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

2017-03-04 Thread Michael Stahl
 sw/inc/hintids.hxx  |1 
 sw/source/core/txtnode/atrfld.cxx   |   33 +---
 sw/source/core/txtnode/atrftn.cxx   |   49 
 sw/source/core/txtnode/atrref.cxx   |2 -
 sw/source/core/txtnode/atrtox.cxx   |6 +---
 sw/source/core/txtnode/fntcap.cxx   |   15 +--
 sw/source/core/txtnode/ndhints.cxx  |   30 +++---
 sw/source/core/txtnode/swfntcch.cxx |5 +--
 sw/source/core/txtnode/swfont.cxx   |   42 +++---
 sw/source/core/txtnode/txtatr2.cxx  |1 
 sw/source/core/txtnode/txtedt.cxx   |   42 ++
 11 files changed, 97 insertions(+), 129 deletions(-)

New commits:
commit d83329300a7781af23138347cc939d0977df5635
Author: Michael Stahl 
Date:   Sat Mar 4 20:12:52 2017 +0100

sw: translate german comments in atrftn.cxx

Change-Id: I004dc0a28df0d5565e5096cf404584e6ea4e2925

diff --git a/sw/source/core/txtnode/atrftn.cxx 
b/sw/source/core/txtnode/atrftn.cxx
index 260adc0..5c8aa1e 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -197,14 +197,13 @@ void SwFormatFootnote::GetFootnoteText( OUString& rStr ) 
const
 }
 }
 
-// returnt den anzuzeigenden String der Fuss-/Endnote
+/// return the view string of the foot/endnote
 OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings 
) const
 {
 OUString sRet( GetNumStr() );
 if( sRet.isEmpty() )
 {
-// dann ist die Nummer von Interesse, also ueber die Info diese
-// besorgen.
+// in this case the number is needed, get it via SwDoc's FootnoteInfo
 bool bMakeNum = true;
 const SwSectionNode* pSectNd = m_pTextAttr
 ? SwUpdFootnoteEndNtAtEnd::FindSectNdWithEndAttr( 
*m_pTextAttr )
@@ -276,9 +275,9 @@ void SwTextFootnote::SetStartNode( const SwNodeIndex 
*pNewNode, bool bDelNode )
 }
 else if ( m_pStartNode )
 {
-// Zwei Dinge muessen erledigt werden:
-// 1) Die Fussnoten muessen bei ihren Seiten abgemeldet werden
-// 2) Die Fussnoten-Sektion in den Inserts muss geloescht werden.
+// need to do 2 things:
+// 1) unregister footnotes at their pages
+// 2) delete the footnote section in the Inserts of the nodes-array
 SwDoc* pDoc;
 if ( m_pTextNode )
 {
@@ -286,39 +285,37 @@ void SwTextFootnote::SetStartNode( const SwNodeIndex 
*pNewNode, bool bDelNode )
 }
 else
 {
-//JP 27.01.97: der sw3-Reader setzt einen StartNode aber das
-//  Attribut ist noch nicht im TextNode verankert.
-//  Wird es geloescht (z.B. bei Datei einfuegen mit
-//  Footnote in einen Rahmen), muss auch der Inhalt
-//  geloescht werden
+//JP 27.01.97: the sw3-Reader creates a StartNode but the
+// attribute isn't anchored in the TextNode yet.
+// If it is deleted (e.g. Insert File with footnote
+// inside fly frame), the content must also be deleted.
 pDoc = m_pStartNode->GetNodes().GetDoc();
 }
 
-// Wir duerfen die Fussnotennodes nicht loeschen
-// und brauchen die Fussnotenframes nicht loeschen, wenn
-// wir im ~SwDoc() stehen.
+// If called from ~SwDoc(), must not delete the footnote nodes,
+// and not necessary to delete the footnote frames.
 if( !pDoc->IsInDtor() )
 {
 if( bDelNode )
 {
-// 1) Die Section fuer die Fussnote wird beseitigt
-// Es kann sein, dass die Inserts schon geloescht wurden.
+// 2) delete the section for the footnote nodes
+// it's possible that the Inserts have already been deleted 
(how???)
 pDoc->getIDocumentContentOperations().DeleteSection( 
&m_pStartNode->GetNode() );
 }
 else
-// Werden die Nodes nicht geloescht mussen sie bei den Seiten
-// abmeldet (Frames loeschen) werden, denn sonst bleiben sie
-// stehen (Undo loescht sie nicht!)
+// If the nodes are not deleted, their frames must be removed
+// from the page (deleted), there is nothing else that deletes
+// them (particularly not Undo)
 DelFrames( nullptr );
 }
 DELETEZ( m_pStartNode );
 
-// loesche die Fussnote noch aus dem Array am Dokument
+// remove the footnote from the SwDoc's array
 for( size_t n = 0; n < pDoc->GetFootnoteIdxs().size(); ++n )
 if( this == pDoc->GetFootnoteIdxs()[n] )
 {
 pDoc->GetFootnoteIdxs().erase( pDoc->GetFootnoteIdxs().begin() 
+ n );
-// gibt noch weitere Fussnoten
+// if 

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

2017-03-04 Thread Stephan Bergmann
 sal/osl/w32/dllentry.cxx|6 +-
 sal/osl/w32/file.cxx|4 -
 sal/osl/w32/file_dirvol.cxx |6 +-
 sal/osl/w32/file_error.cxx  |4 -
 sal/osl/w32/file_error.h|   37 -
 sal/osl/w32/file_error.hxx  |   29 +
 sal/osl/w32/file_url.cxx|6 +-
 sal/osl/w32/file_url.h  |   93 
 sal/osl/w32/file_url.hxx|   85 
 sal/osl/w32/filetime.h  |   50 ---
 sal/osl/w32/filetime.hxx|   38 +
 sal/osl/w32/gmutex.h|   39 --
 sal/osl/w32/gmutex.hxx  |   31 ++
 sal/osl/w32/module.cxx  |2 
 sal/osl/w32/mutex.cxx   |2 
 sal/osl/w32/nlsupport.cxx   |2 
 sal/osl/w32/nlsupport.h |   29 -
 sal/osl/w32/nlsupport.hxx   |   21 +
 sal/osl/w32/path_helper.cxx |4 -
 sal/osl/w32/path_helper.h   |   65 --
 sal/osl/w32/path_helper.hxx |   33 +++
 sal/osl/w32/process.cxx |   10 ++--
 sal/osl/w32/procimpl.cxx|4 -
 sal/osl/w32/procimpl.h  |   40 --
 sal/osl/w32/procimpl.hxx|   32 +++
 sal/osl/w32/profile.cxx |2 
 sal/osl/w32/salinit.cxx |2 
 sal/osl/w32/secimpl.h   |   47 --
 sal/osl/w32/secimpl.hxx |   39 ++
 sal/osl/w32/security.cxx|2 
 sal/osl/w32/signal.cxx  |2 
 sal/osl/w32/socket.cxx  |6 --
 sal/osl/w32/sockimpl.h  |   56 --
 sal/osl/w32/sockimpl.hxx|   48 ++
 sal/osl/w32/tempfile.cxx|4 -
 sal/osl/w32/thread.cxx  |2 
 sal/osl/w32/thread.h|   33 ---
 sal/osl/w32/thread.hxx  |   25 +++
 sal/osl/w32/time.cxx|4 -
 sal/osl/w32/time.h  |   27 
 sal/osl/w32/time.hxx|   19 
 41 files changed, 434 insertions(+), 556 deletions(-)

New commits:
commit 8fdf363f598ef45e49ada9d5a2d5747189ea401c
Author: Stephan Bergmann 
Date:   Fri Mar 3 15:00:33 2017 +0100

Change sal/osl/w32/*.h -> *.hxx

...which are now only ever included from C++ code.  Drop extern "C" where
appropriate (i.e., generally everywhere) and fix the occasional ensuing 
loplugin
warning.  (But no further C++'ification for now.)

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

diff --git a/sal/osl/w32/dllentry.cxx b/sal/osl/w32/dllentry.cxx
index 5158979..0bce302 100644
--- a/sal/osl/w32/dllentry.cxx
+++ b/sal/osl/w32/dllentry.cxx
@@ -37,11 +37,11 @@
 #include 
 #include 
 
-#include "file_url.h"
-#include "gmutex.h"
+#include "file_url.hxx"
+#include "gmutex.hxx"
 #include "rtllifecycle.h"
 
-#include 
+#include 
 
 /*
 This is needed because DllMain is called after static constructors. A DLL's
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index bb5df99..dd052f9 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -24,8 +24,8 @@
 #include "osl/file.hxx"
 
 #include 
-#include "file_url.h"
-#include "file_error.h"
+#include "file_url.hxx"
+#include "file_error.hxx"
 
 #include "osl/diagnose.h"
 #include "rtl/alloc.h"
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 1f50617..4351ba0 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -23,10 +23,10 @@
 
 #include "osl/file.h"
 
-#include "file_url.h"
-#include 
+#include "file_url.hxx"
+#include 
 #include 
-#include "file_error.h"
+#include "file_error.hxx"
 
 #include "path_helper.hxx"
 
diff --git a/sal/osl/w32/file_error.cxx b/sal/osl/w32/file_error.cxx
index cdb8571..520fad5 100644
--- a/sal/osl/w32/file_error.cxx
+++ b/sal/osl/w32/file_error.cxx
@@ -21,10 +21,10 @@
 #define _UNICODE
 #include "systools/win32/uwinapi.h"
 
-#include "file_error.h"
+#include "file_error.hxx"
 
 #include "osl/diagnose.h"
-#include "osl/thread.h"
+#include "osl/thread.hxx"
 #include 
 
 /* OS error to oslFileError values mapping table */
diff --git a/sal/osl/w32/file_error.h b/sal/osl/w32/file_error.hxx
similarity index 84%
rename from sal/osl/w32/file_error.h
rename to sal/osl/w32/file_error.hxx
index 483b966..57d825b 100644
--- a/sal/osl/w32/file_error.h
+++ b/sal/osl/w32/file_error.hxx
@@ -17,21 +17,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SAL_OSL_W32_FILE_ERROR_H
-#define INCLUDED_SAL_OSL_W32_FILE_ERROR_H
+#ifndef INCLUDED_SAL_OSL_W32_FILE_ERROR_HXX
+#define INCLUDED_SAL_OSL_W32_FILE_ERROR_HXX
 
 #include "osl/file.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 oslFileError oslTranslateFileError (/*DWORD*/ unsigned long dwError);
 
-#ifdef __cplusplus
-}
 #endif
 
-#endif // INCLUDED_SAL_OSL_W32_FILE_ERROR_H
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/w32/f

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

2017-03-04 Thread Stephan Bergmann
 sal/Library_sal.mk   |4 
 sal/osl/w32/dllentry.c   |  255 ---
 sal/osl/w32/dllentry.cxx |  255 +++
 3 files changed, 256 insertions(+), 258 deletions(-)

New commits:
commit 798dbea63a9ef060eb2ddcf69307eb1a666daae7
Author: Stephan Bergmann 
Date:   Fri Mar 3 14:22:56 2017 +0100

Change sal/osl/w32/dllentry.c -> .cxx

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

diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index e5585b9..4c04707 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -226,6 +226,7 @@ else # $(OS) == WNT
 $(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/w32/backtrace \
sal/osl/w32/conditn \
+   sal/osl/w32/dllentry \
sal/osl/w32/file \
sal/osl/w32/file_dirvol \
sal/osl/w32/file_error \
@@ -249,9 +250,6 @@ $(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/w32/thread \
sal/osl/w32/time \
 ))
-$(eval $(call gb_Library_add_cobjects,sal,\
-   sal/osl/w32/dllentry \
-))
 
 endif # ifneq ($(OS),WNT)
 
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.cxx
similarity index 93%
rename from sal/osl/w32/dllentry.c
rename to sal/osl/w32/dllentry.cxx
index 6cb8669..5158979 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.cxx
@@ -57,14 +57,15 @@ _pRawDllMain()
 
 */
 
+extern "C" {
+
 static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID 
lpvReserved );
 BOOL (WINAPI *_pRawDllMain)(HINSTANCE, DWORD, LPVOID) = RawDllMain;
 
-static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID 
lpvReserved )
-{
-(void)hinstDLL; /* avoid warnings */
-(void)lpvReserved; /* avoid warnings */
+}
 
+static BOOL WINAPI RawDllMain( HINSTANCE, DWORD fdwReason, LPVOID )
+{
 switch (fdwReason)
 {
 case DLL_PROCESS_ATTACH:
@@ -184,7 +185,7 @@ static DWORD GetParentProcessId()
 
 static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam )
 {
-DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam;
+DWORD_PTR dwParentProcessId = reinterpret_cast(lpParam);
 
 HANDLE  hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, 
dwParentProcessId );
 
@@ -201,10 +202,9 @@ static DWORD WINAPI ParentMonitorThreadProc( LPVOID 
lpParam )
 return 0;
 }
 
-BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
+extern "C"
+BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
 {
-(void)hinstDLL; /* avoid warning */
-(void)lpvReserved; /* avoid warning */
 switch (fdwReason)
 {
 case DLL_PROCESS_ATTACH:
@@ -228,7 +228,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, 
LPVOID lpvReserved )
 {
 // No error check, it works or it does not
 // Thread should only be started for headless mode, see 
desktop/win32/source/officeloader.cxx
-CreateThread( NULL, 0, ParentMonitorThreadProc, 
(LPVOID)dwParentProcessId, 0, &dwThreadId );
+CreateThread( nullptr, 0, ParentMonitorThreadProc, 
reinterpret_cast(dwParentProcessId), 0, &dwThreadId );
 // Note: calling CreateThread in DllMain is discouraged
 // but this is only done in the headless mode and in
 // that case no other threads should be running at startup
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - common/SigUtil.cpp common/SigUtil.hpp wsd/Admin.cpp wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp

2017-03-04 Thread Michael Meeks
 common/SigUtil.cpp |   77 +++--
 common/SigUtil.hpp |   12 ++--
 wsd/Admin.cpp  |3 +-
 wsd/LOOLWSD.cpp|   33 +++---
 wsd/LOOLWSD.hpp|   10 ++
 5 files changed, 67 insertions(+), 68 deletions(-)

New commits:
commit d20c3a2db8c2b2e5550292fc9511c8e731793e84
Author: Michael Meeks 
Date:   Sat Mar 4 17:33:46 2017 +

Cleanup shutdown flag handling.

Pull the notification pieces out of SigUtil.cpp - not signal safe,
and invoked only from LOOLWSD anyway.

In a non-blocking world, the socket close notification sends are
instant - so more work required to count-down / timeout remaining
clients.

diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp
index 0be2b70..5de5721 100644
--- a/common/SigUtil.cpp
+++ b/common/SigUtil.cpp
@@ -36,17 +36,15 @@
 #include "Socket.hpp"
 #include "Common.hpp"
 #include "Log.hpp"
-#include "Util.hpp"
 
+/// Flag to request hard termination.
 std::atomic TerminationFlag(false);
+/// Flag to request dumping of all internal state
 std::atomic DumpGlobalState(false);
-std::mutex SigHandlerTrap;
-
-/// Flag to shutdown the server.
-std::atomic ShutdownFlag;
-
 /// Flag to request WSD to notify clients and shutdown.
-static std::atomic ShutdownRequestFlag(false);
+std::atomic ShutdownRequestFlag(false);
+
+std::mutex SigHandlerTrap;
 
 namespace SigUtil
 {
@@ -113,36 +111,43 @@ namespace SigUtil
 static
 void handleTerminationSignal(const int signal)
 {
-// FIXME: would love a socket in all SocketPolls to handle shutdown
-if (!ShutdownFlag && signal == SIGINT)
+bool hardExit = false;
+const char *domain;
+if (!ShutdownRequestFlag && signal == SIGINT)
 {
-Log::signalLogPrefix();
-Log::signalLog(" Shutdown signal received: ");
-Log::signalLog(signalName(signal));
-Log::signalLog("\n");
-SigUtil::requestShutdown();
-SocketPoll::wakeupWorld();
+domain = " Shutdown signal received: ";
+ShutdownRequestFlag = true;
 }
 else if (!TerminationFlag)
 {
-Log::signalLogPrefix();
-Log::signalLog(" Forced-Termination signal received: ");
-Log::signalLog(signalName(signal));
-Log::signalLog("\n");
+domain = " Forced-Termination signal received: ";
 TerminationFlag = true;
-SocketPoll::wakeupWorld();
 }
 else
 {
-Log::signalLogPrefix();
-Log::signalLog(" ok, ok - hard-termination signal received: ");
-Log::signalLog(signalName(signal));
-Log::signalLog("\n");
+domain = " ok, ok - hard-termination signal received: ";
+hardExit = true;
+}
+Log::signalLogPrefix();
+Log::signalLog(domain);
+Log::signalLog(signalName(signal));
+Log::signalLog("\n");
+
+if (!hardExit)
+SocketPoll::wakeupWorld();
+else
+{
 ::signal (signal, SIG_DFL);
 ::raise (signal);
 }
 }
 
+void requestShutdown()
+{
+ShutdownRequestFlag = true;
+SocketPoll::wakeupWorld();
+}
+
 void setTerminationSignals()
 {
 struct sigaction action;
@@ -273,30 +278,6 @@ namespace SigUtil
 sigaction(SIGUSR1, &action, nullptr);
 }
 
-
-void requestShutdown()
-{
-ShutdownRequestFlag = true;
-}
-
-bool handleShutdownRequest()
-{
-if (ShutdownRequestFlag)
-{
-LOG_INF("Shutdown requested. Initiating WSD shutdown.");
-Util::alertAllUsers("close: shuttingdown");
-ShutdownFlag = true;
-return true;
-}
-
-return false;
-}
-
-bool isShuttingDown()
-{
-return ShutdownFlag;
-}
-
 bool killChild(const int pid)
 {
 LOG_DBG("Killing PID: " << pid);
diff --git a/common/SigUtil.hpp b/common/SigUtil.hpp
index 9dabcfc..2b69578 100644
--- a/common/SigUtil.hpp
+++ b/common/SigUtil.hpp
@@ -13,6 +13,9 @@
 #include 
 #include 
 
+/// Flag to commence clean shutdown
+extern std::atomic ShutdownRequestFlag;
+
 /// Flag to stop pump loops.
 extern std::atomic TerminationFlag;
 
@@ -48,15 +51,6 @@ namespace SigUtil
 /// then flags for shutdown.
 void requestShutdown();
 
-/// Checks for shutdown request and,
-/// after notifying clients, flags for
-/// shutting down.
-/// Returns true if shutdown is requested.
-bool handleShutdownRequest();
-
-/// Returns true if Shutdown is in progress.
-bool isShuttingDown();
-
 /// Kills a child process and returns true when
 /// child pid is removed from the process table
 /// after a certain (short) timeout.
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index b1e8c11..636c403 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.

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

2017-03-04 Thread Stephan Bergmann
 sal/Library_sal.mk  |   22 
 sal/inc/pch/precompiled_sal.hxx |4 
 sal/osl/w32/conditn.c   |  134 --
 sal/osl/w32/conditn.cxx |  134 ++
 sal/osl/w32/dllentry.c  |6 
 sal/osl/w32/file_error.c|  128 -
 sal/osl/w32/file_error.cxx  |  128 +
 sal/osl/w32/gmutex.h|   39 +
 sal/osl/w32/interlck.c  |   35 -
 sal/osl/w32/interlck.cxx|   35 +
 sal/osl/w32/memory.c|   24 -
 sal/osl/w32/memory.cxx  |   24 +
 sal/osl/w32/mutex.c |  113 -
 sal/osl/w32/mutex.cxx   |  116 +
 sal/osl/w32/nlsupport.c |  237 --
 sal/osl/w32/nlsupport.cxx   |  237 ++
 sal/osl/w32/pipe.c  |  508 --
 sal/osl/w32/pipe.cxx|  508 ++
 sal/osl/w32/random.c|   64 --
 sal/osl/w32/random.cxx  |   66 ++
 sal/osl/w32/security.c  |  891 
 sal/osl/w32/security.cxx|  891 
 sal/osl/w32/thread.c|  614 ---
 sal/osl/w32/thread.cxx  |  614 +++
 sal/osl/w32/thread.h|2 
 sal/osl/w32/time.c  |  213 -
 sal/osl/w32/time.cxx|  213 +
 27 files changed, 3023 insertions(+), 2977 deletions(-)

New commits:
commit 4af9612f2be9e023e762831207cbdb1d5f25906f
Author: Stephan Bergmann 
Date:   Fri Mar 3 13:52:45 2017 +0100

Change sal/osl/w32/*.c -> *.cxx

...and fix any ensuing errors/warnings, but no further C++'ification.  Not 
sure
whether any parts of dllentry.c would need to be extern "C", so leaving 
that one
alone for now.

TODO: Put definition of _CRT_RAND_S into bin/update_pch, so it doesn't get
removed again from sal/inc/pch/precompiled_sal.hxx.  (For the surrounding 
#ifndef
see 244d22a3d27b303d44f59296a19dc4cb31fd429d "Work around 
-Werror,-Wunused-macros
with clang-cl".)

Change-Id: I2ada3717845eb0be0c559465d68e00e3a7720156
Reviewed-on: https://gerrit.libreoffice.org/34860
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index ac254d1..e5585b9 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -225,32 +225,32 @@ else # $(OS) == WNT
 
 $(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/w32/backtrace \
+   sal/osl/w32/conditn \
sal/osl/w32/file \
sal/osl/w32/file_dirvol \
+   sal/osl/w32/file_error \
sal/osl/w32/file_url \
+   sal/osl/w32/interlck \
+   sal/osl/w32/memory \
sal/osl/w32/module \
+   sal/osl/w32/mutex \
+   sal/osl/w32/nlsupport \
sal/osl/w32/path_helper \
+   sal/osl/w32/pipe \
sal/osl/w32/process \
sal/osl/w32/procimpl \
sal/osl/w32/profile \
+   sal/osl/w32/random \
sal/osl/w32/salinit \
+   sal/osl/w32/security \
sal/osl/w32/signal \
sal/osl/w32/socket \
sal/osl/w32/tempfile \
+   sal/osl/w32/thread \
+   sal/osl/w32/time \
 ))
 $(eval $(call gb_Library_add_cobjects,sal,\
-   sal/osl/w32/conditn \
sal/osl/w32/dllentry \
-   sal/osl/w32/file_error \
-   sal/osl/w32/interlck \
-   sal/osl/w32/memory \
-   sal/osl/w32/mutex \
-   sal/osl/w32/nlsupport \
-   sal/osl/w32/pipe \
-   sal/osl/w32/random \
-   sal/osl/w32/security \
-   sal/osl/w32/thread \
-   sal/osl/w32/time \
 ))
 
 endif # ifneq ($(OS),WNT)
diff --git a/sal/inc/pch/precompiled_sal.hxx b/sal/inc/pch/precompiled_sal.hxx
index 5f94a26..8699e20 100644
--- a/sal/inc/pch/precompiled_sal.hxx
+++ b/sal/inc/pch/precompiled_sal.hxx
@@ -20,6 +20,10 @@
  ./bin/update_pch_bisect ./sal/inc/pch/precompiled_sal.hxx "make sal.build" 
--find-conflicts
 */
 
+#if !defined _CRT_RAND_S
+#define _CRT_RAND_S
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sal/osl/w32/conditn.c b/sal/osl/w32/conditn.cxx
similarity index 83%
rename from sal/osl/w32/conditn.c
rename to sal/osl/w32/conditn.cxx
index 6f90e50..a6a5496 100644
--- a/sal/osl/w32/conditn.c
+++ b/sal/osl/w32/conditn.cxx
@@ -35,10 +35,10 @@ oslCondition SAL_CALL osl_createCondition(void)
 {
 oslCondition Condition;
 
-Condition= (oslCondition)CreateEvent(NULL,  /* no security */
- sal_True,  /* manual reset */
- sal_False, /* initial state not 
signaled */
- NULL); /* automatic name */
+Condition= reinterpret_cast(CreateEvent(nullptr,  /* 
no security */
+ true,  /* manual reset */
+ false, /* initial state not 
signaled */
+ nullptr)); /* aut

[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - 3 commits - net/ServerSocket.hpp net/Socket.hpp net/SslSocket.hpp wsd/LOOLWSD.cpp

2017-03-04 Thread Ashod Nakashian
 net/ServerSocket.hpp |   12 ++-
 net/Socket.hpp   |6 -
 net/SslSocket.hpp|   12 ---
 wsd/LOOLWSD.cpp  |   55 ---
 4 files changed, 60 insertions(+), 25 deletions(-)

New commits:
commit 9384a405fd8762afcd0004a571657e58d806c06a
Author: Ashod Nakashian 
Date:   Sat Mar 4 12:08:02 2017 -0500

nb: ReadOrWrite -> Neither

SSL only requests what to poll for next.
So it's more accurate to rename ReadOrWrite
to Neither, since in that case SSL really
isn't blocked on either read or write.

Change-Id: I62dd4f94730d51666a7661b10a9d582d69fbf45e

diff --git a/net/SslSocket.hpp b/net/SslSocket.hpp
index 4b01398..54e7be7 100644
--- a/net/SslSocket.hpp
+++ b/net/SslSocket.hpp
@@ -24,7 +24,7 @@ public:
 SslStreamSocket(const int fd, std::unique_ptr 
responseClient) :
 StreamSocket(fd, std::move(responseClient)),
 _ssl(nullptr),
-_sslWantsTo(SslWantsTo::ReadOrWrite),
+_sslWantsTo(SslWantsTo::Neither),
 _doHandshake(true)
 {
 LOG_DBG("SslStreamSocket ctor #" << fd);
@@ -125,7 +125,7 @@ private:
 /// The possible next I/O operation that SSL want to do.
 enum class SslWantsTo
 {
-ReadOrWrite,
+Neither,
 Read,
 Write
 };
@@ -163,7 +163,7 @@ private:
 if (rc > 0)
 {
 // Success: Reset so we can do either.
-_sslWantsTo = SslWantsTo::ReadOrWrite;
+_sslWantsTo = SslWantsTo::Neither;
 return rc;
 }
 
commit af1dc47a158859a72cd22e09b952b828d2a264f3
Author: Ashod Nakashian 
Date:   Sat Mar 4 12:06:23 2017 -0500

nb: log more socket activity

Change-Id: Ibcdf5abc3054691c93382c00bb8a9ecc4b882652

diff --git a/net/ServerSocket.hpp b/net/ServerSocket.hpp
index d831172..881a685 100644
--- a/net/ServerSocket.hpp
+++ b/net/ServerSocket.hpp
@@ -66,7 +66,17 @@ public:
 // Accept a connection (if any) and set it to non-blocking.
 // We don't care about the client's address, so ignored.
 const int rc = ::accept4(getFD(), nullptr, nullptr, SOCK_NONBLOCK);
-return (rc != -1 ? _sockFactory->create(rc) : 
std::shared_ptr(nullptr));
+LOG_DBG("Accepted socket #" << rc << ", creating socket object.");
+try
+{
+return (rc != -1 ? _sockFactory->create(rc) : 
std::shared_ptr(nullptr));
+}
+catch (const std::exception& ex)
+{
+LOG_SYS("Failed to create client socket #" << rc << ". Error: " << 
ex.what());
+}
+
+return nullptr;
 }
 
 int getPollEvents() override
diff --git a/net/Socket.hpp b/net/Socket.hpp
index ab077dc..a601cb1 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -370,13 +370,17 @@ public:
 _socketHandler(std::move(socketHandler)),
 _closed(false)
 {
-// Without a handler we make no sense.
+LOG_DBG("StreamSocket ctor #" << fd);
+
+// Without a handler we make no sense object.
 if (!_socketHandler)
 throw std::runtime_error("StreamSocket expects a valid 
SocketHandler instance.");
 }
 
 ~StreamSocket()
 {
+LOG_DBG("StreamSocket dtor #" << getFD());
+
 if (!_closed)
 _socketHandler->onDisconnect();
 }
diff --git a/net/SslSocket.hpp b/net/SslSocket.hpp
index ada6568..4b01398 100644
--- a/net/SslSocket.hpp
+++ b/net/SslSocket.hpp
@@ -27,6 +27,8 @@ public:
 _sslWantsTo(SslWantsTo::ReadOrWrite),
 _doHandshake(true)
 {
+LOG_DBG("SslStreamSocket ctor #" << fd);
+
 BIO* bio = BIO_new(BIO_s_socket());
 if (bio == nullptr)
 {
@@ -50,6 +52,8 @@ public:
 
 ~SslStreamSocket()
 {
+LOG_DBG("SslStreamSocket dtor #" << getFD());
+
 shutdown();
 SSL_free(_ssl);
 }
@@ -166,6 +170,7 @@ private:
 // Last operation failed. Find out if SSL was trying
 // to do something different that failed, or not.
 const int sslError = SSL_get_error(_ssl, rc);
+LOG_TRC("SSL error: " << sslError);
 switch (sslError)
 {
 case SSL_ERROR_ZERO_RETURN:
@@ -198,6 +203,7 @@ private:
 {
 // The error is comming from BIO. Find out what happened.
 const long bioError = ERR_get_error();
+LOG_TRC("BIO error: " << bioError);
 if (bioError == 0)
 {
 if (rc == 0)
commit abcaf06b4196b40334c3964988850b359bebcd65
Author: Ashod Nakashian 
Date:   Thu Mar 2 22:55:52 2017 -0500

nb: search for free client port

Change-Id: I33238e83756481267c222b3cd3b9d30f4fcd3d48

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 5996e79..8d9a3a4 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3339,25 +3339,9 @@ public:
 _documentThread.join();
 }
 
-void start(const Poco::Net::SocketAddress& 

[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - wsd/LOOLWSD.cpp

2017-03-04 Thread Michael Meeks
 wsd/LOOLWSD.cpp |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 85d18db512fc7c100e5a8743c919cbce18d58198
Author: Michael Meeks 
Date:   Sat Mar 4 16:54:13 2017 +

Cleanup shutdown.

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 4ae5516..5996e79 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3335,6 +3335,8 @@ public:
 stop();
 if (_serverThread.joinable())
 _serverThread.join();
+if (_documentThread.joinable())
+_documentThread.join();
 }
 
 void start(const Poco::Net::SocketAddress& addr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmlsecurity/Library_xmlsecurity.mk

2017-03-04 Thread Thorsten Behrens
 xmlsecurity/Library_xmlsecurity.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d35c25ee8f2e3125ddcd48b4fae75359a5b0ab8f
Author: Thorsten Behrens 
Date:   Sat Mar 4 16:34:04 2017 +0100

Fix build for mobile

Change-Id: I2f133306b57798e2e828c4bd504a795331bdaf34

diff --git a/xmlsecurity/Library_xmlsecurity.mk 
b/xmlsecurity/Library_xmlsecurity.mk
index 3add46f..c3e42e0 100644
--- a/xmlsecurity/Library_xmlsecurity.mk
+++ b/xmlsecurity/Library_xmlsecurity.mk
@@ -46,7 +46,7 @@ $(eval $(call gb_Library_use_libraries,xmlsecurity,\
$(gb_UWINAPI) \
 ))
 
-ifneq ($(filter-out WNT MACOSX,$(OS)),)
+ifneq ($(filter-out WNT MACOSX ANDROID IOS,$(OS)),)
 $(eval $(call gb_Library_use_libraries,xmlsecurity,\
xsec_gpg \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-04 Thread Tor Lillqvist
 include/oox/export/drawingml.hxx  |9 ++---
 oox/source/export/chartexport.cxx |   11 ---
 oox/source/export/drawingml.cxx   |   35 +--
 3 files changed, 39 insertions(+), 16 deletions(-)

New commits:
commit 6f93eeb0ba8c4af5c96d1db36f184ffbc71c67ba
Author: Tor Lillqvist 
Date:   Fri Mar 3 21:06:32 2017 +0200

tdf#106304: Don't unnecessarily use bogus default char size for a:endParaRPr

Instead use the size last used for an a:rPr below the same WriteText()
call. I am not exactly sure about how this hangs together, but this
has the desired effect on the exported .pptx.

Change-Id: Ie03dcd0b31c15cff8488b22d7423c9f9ad1e2d68

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index e9dc0a3..97d8dff 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -194,12 +194,15 @@ public:
   sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = 
false, sal_Int32 nRotation = 0 );
 
 void WriteText( const css::uno::Reference< css::uno::XInterface >& 
rXIface, const OUString& presetWarp, bool bBodyPr = true, bool bText = true, 
sal_Int32 nXmlNamespace = 0);
-void WriteParagraph( const css::uno::Reference< css::text::XTextContent >& 
rParagraph );
+void WriteParagraph( const css::uno::Reference< css::text::XTextContent >& 
rParagraph,
+ bool& rbOverridingCharHeight, sal_Int32& rnCharHeight 
);
 void WriteParagraphProperties( const css::uno::Reference< 
css::text::XTextContent >& rParagraph );
 void WriteParagraphNumbering( const css::uno::Reference< 
css::beans::XPropertySet >& rXPropSet,
   sal_Int16 nLevel );
-void WriteRun( const css::uno::Reference< css::text::XTextRange >& rRun );
-void WriteRunProperties( const css::uno::Reference< 
css::beans::XPropertySet >& rRun, bool bIsField, sal_Int32 nElement = XML_rPr 
,bool bCheckDirect = true);
+void WriteRun( const css::uno::Reference< css::text::XTextRange >& rRun,
+   bool& rbOverridingCharHeight, sal_Int32& rnCharHeight );
+void WriteRunProperties( const css::uno::Reference< 
css::beans::XPropertySet >& rRun, bool bIsField, sal_Int32 nElement, bool 
bCheckDirect,
+ bool& rbOverridingCharHeight, sal_Int32& 
rnCharHeight );
 
 void WritePresetShape( const char* pShape , std::vector< 
std::pair> & rAvList );
 void WritePresetShape( const char* pShape );
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index c42f496..a6f3b17 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1105,13 +1105,16 @@ void ChartExport::exportTitle( const Reference< XShape 
>& xShape )
 pFS->startElement( FSNS( XML_a, XML_pPr ),
 FSEND );
 
-WriteRunProperties(xPropSet, false, XML_defRPr);
+bool bDummy = false;
+sal_Int32 nDummy;
+WriteRunProperties(xPropSet, false, XML_defRPr, true, bDummy, nDummy );
 
 pFS->endElement( FSNS( XML_a, XML_pPr ) );
 
 pFS->startElement( FSNS( XML_a, XML_r ),
 FSEND );
-WriteRunProperties( xPropSet, false );
+bDummy = false;
+WriteRunProperties( xPropSet, false, XML_rPr, true, bDummy, nDummy );
 pFS->startElement( FSNS( XML_a, XML_t ),
 FSEND );
 pFS->writeEscaped( sText );
@@ -2429,7 +2432,9 @@ void ChartExport::exportTextProps(const 
Reference& xPropSet)
 pFS->startElement(FSNS(XML_a, XML_p), FSEND);
 pFS->startElement(FSNS(XML_a, XML_pPr), FSEND);
 
-WriteRunProperties(xPropSet, false, XML_defRPr);
+bool bDummy = false;
+sal_Int32 nDummy;
+WriteRunProperties(xPropSet, false, XML_defRPr, true, bDummy, nDummy);
 
 pFS->endElement(FSNS(XML_a, XML_pPr));
 pFS->endElement(FSNS(XML_a, XML_p));
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 3a57532..ce48bdd 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1217,7 +1217,8 @@ void DrawingML::WriteShapeTransformation( const 
Reference< XShape >& rXShape, sa
 WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( 
aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, 
OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) );
 }
 
-void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, 
bool bIsField, sal_Int32 nElement /*= XML_rPr*/, bool bCheckDirect/* = true */)
+void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, 
bool bIsField, sal_Int32 nElement, bool bCheckDirect,
+bool& rbOverridingCharHeight, sal_Int32& 
rnCharHeight )
 {
 Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
 Reference< XPropertyState > rXPropState( rRun, UNO_QUERY );
@@ -1234,8 +1235,19 @@ void DrawingML::WriteRunProperties( const Reference< 
XPropertySet >& rRun, bool
 sal_Int32 nCh

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

2017-03-04 Thread Tor Lillqvist
 oox/source/export/drawingml.cxx|   42 ++---
 sd/qa/unit/export-tests-ooxml1.cxx |6 ++---
 2 files changed, 28 insertions(+), 20 deletions(-)

New commits:
commit 1154cda87d518156d1e52dfb81d5e23b32ab23d5
Author: Tor Lillqvist 
Date:   Wed Feb 15 19:21:06 2017 +0200

tdf#106304: Output  instead of 
 for hard newlines

This fixes the problem that the line before the hard newline in the
.pptx export is not centred.

The fix for the sd_export_ooxml1 test is a bit hacky, but then so is
the code in question.

Change-Id: I4f89e9d0177ab3b16e8ec624a99fce9e2f8ef730

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 36c460a..3a57532 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1631,29 +1631,37 @@ void DrawingML::WriteRun( const Reference< XTextRange 
>& rRun )
 }
 }
 
-if( ( bWriteField ) )
+if (sText == "\n")
 {
-OString sUUID(GetUUID());
-mpFS->startElementNS( XML_a, XML_fld,
-  XML_id, sUUID.getStr(),
-  XML_type, OUStringToOString( sFieldValue, 
RTL_TEXTENCODING_UTF8 ).getStr(),
-  FSEND );
+mpFS->singleElementNS( XML_a, XML_br,
+   FSEND );
 }
 else
 {
-mpFS->startElementNS( XML_a, XML_r, FSEND );
-}
+if( ( bWriteField ) )
+{
+OString sUUID(GetUUID());
+mpFS->startElementNS( XML_a, XML_fld,
+  XML_id, sUUID.getStr(),
+  XML_type, OUStringToOString( sFieldValue, 
RTL_TEXTENCODING_UTF8 ).getStr(),
+  FSEND );
+}
+else
+{
+mpFS->startElementNS( XML_a, XML_r, FSEND );
+}
 
-Reference< XPropertySet > xPropSet( rRun, uno::UNO_QUERY );
-WriteRunProperties( xPropSet, bIsURLField );
-mpFS->startElementNS( XML_a, XML_t, FSEND );
-mpFS->writeEscaped( sText );
-mpFS->endElementNS( XML_a, XML_t );
+Reference< XPropertySet > xPropSet( rRun, uno::UNO_QUERY );
+WriteRunProperties( xPropSet, bIsURLField );
+mpFS->startElementNS( XML_a, XML_t, FSEND );
+mpFS->writeEscaped( sText );
+mpFS->endElementNS( XML_a, XML_t );
 
-if( bWriteField )
-mpFS->endElementNS( XML_a, XML_fld );
-else
-mpFS->endElementNS( XML_a, XML_r );
+if( bWriteField )
+mpFS->endElementNS( XML_a, XML_fld );
+else
+mpFS->endElementNS( XML_a, XML_r );
+}
 }
 
 OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBehind, 
bool bPBoth)
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 8f2ef49..2fc233b 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -254,11 +254,11 @@ void SdOOXMLExportTest1::testN828390_4()
 SdrTextObj *pTxtObj = dynamic_cast( pObj );
 CPPUNIT_ASSERT( pTxtObj );
 const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
-aEdit.GetCharAttribs(1, rLst);
+aEdit.GetCharAttribs(0, rLst);
 for( std::vector::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
 {
 const SvxFontHeightItem * pFontHeight = dynamic_cast((*it).pAttr);
-if( pFontHeight )
+if( pFontHeight && (*it).nStart == 18 )
 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font height is wrong", 
static_cast(1129), pFontHeight->GetHeight() );
 const SvxFontItem *pFont = dynamic_cast((*it).pAttr);
 if( pFont )
@@ -267,7 +267,7 @@ void SdOOXMLExportTest1::testN828390_4()
 bPassed = true;
 }
 const SvxWeightItem *pWeight = dynamic_cast((*it).pAttr);
-if( pWeight )
+if( pWeight && (*it).nStart == 18 )
 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font Weight is wrong", 
WEIGHT_BOLD, pWeight->GetWeight() );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-04 Thread Khaled Hosny
 vcl/inc/win/winlayout.hxx |   12 +++-
 vcl/win/gdi/winlayout.cxx |   39 +--
 2 files changed, 20 insertions(+), 31 deletions(-)

New commits:
commit 7453cb58df4ce434a1252567f961cfe497064aca
Author: Khaled Hosny 
Date:   Sat Mar 4 05:40:39 2017 +0200

pPos and pGetNextGlypInfo always have the same value

Change-Id: Iec46e0aefff71cbeb2face4f55e5c3a4d6698995

diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx
index 2c6cc26..bc1890b 100644
--- a/vcl/inc/win/winlayout.hxx
+++ b/vcl/inc/win/winlayout.hxx
@@ -179,8 +179,7 @@ public:
 
 virtual bool operator ()(CommonSalLayout const &rLayout,
 SalGraphics &rGraphics,
-HDC hDC,
-Point* pPos, int* pGetNextGlypInfo) = 0;
+HDC hDC) = 0;
 };
 
 class ExTextOutRenderer : public TextOutRenderer
@@ -193,8 +192,7 @@ public:
 
 bool operator ()(CommonSalLayout const &rLayout,
 SalGraphics &rGraphics,
-HDC hDC,
-Point* pPos, int* pGetNextGlypInfo) override;
+HDC hDC) override;
 };
 
 class D2DWriteTextOutRenderer : public TextOutRenderer
@@ -217,8 +215,7 @@ public:
 
 bool operator ()(CommonSalLayout const &rLayout,
 SalGraphics &rGraphics,
-HDC hDC,
-Point* pPos, int* pGetNextGlypInfo) override;
+HDC hDC) override;
 
 inline bool BindDC(HDC hDC, Rectangle const & rRect = Rectangle(0, 0, 0, 
0)) {
 RECT const rc = { rRect.Left(), rRect.Top(), rRect.Right(), 
rRect.Bottom() };
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 21116d3..cf555de 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -264,10 +264,8 @@ TextOutRenderer & TextOutRenderer::get(bool bUseDWrite)
 
 bool ExTextOutRenderer::operator ()(CommonSalLayout const &rLayout,
 SalGraphics & /*rGraphics*/,
-HDC hDC,
-Point* pPos, int* pGetNextGlypInfo)
+HDC hDC)
 {
-const GlyphItem* pGlyph;
 HFONT hFont = static_cast(GetCurrentObject( hDC, OBJ_FONT ));
 HFONT hAltFont = nullptr;
 bool bUseAltFont = false;
@@ -282,7 +280,11 @@ bool ExTextOutRenderer::operator ()(CommonSalLayout const 
&rLayout,
 hAltFont = CreateFontIndirectW(&aLogFont);
 }
 }
-while (rLayout.GetNextGlyphs(1, &pGlyph, *pPos, *pGetNextGlypInfo))
+
+int nStart = 0;
+Point aPos(0, 0);
+const GlyphItem* pGlyph;
+while (rLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart))
 {
 WORD glyphWStr[] = { pGlyph->maGlyphId };
 if (hAltFont && pGlyph->IsVertical() == bUseAltFont)
@@ -290,7 +292,7 @@ bool ExTextOutRenderer::operator ()(CommonSalLayout const 
&rLayout,
 bUseAltFont = !bUseAltFont;
 SelectFont(hDC, bUseAltFont ? hAltFont : hFont);
 }
-ExtTextOutW(hDC, pPos->X(), pPos->Y(), ETO_GLYPH_INDEX, nullptr, 
LPCWSTR(&glyphWStr), 1, nullptr);
+ExtTextOutW(hDC, aPos.X(), aPos.Y(), ETO_GLYPH_INDEX, nullptr, 
LPCWSTR(&glyphWStr), 1, nullptr);
 }
 if (hAltFont)
 {
@@ -340,8 +342,7 @@ D2DWriteTextOutRenderer::~D2DWriteTextOutRenderer()
 
 bool D2DWriteTextOutRenderer::operator ()(CommonSalLayout const &rLayout,
 SalGraphics &rGraphics,
-HDC hDC,
-Point* pPos, int* pGetNextGlypInfo)
+HDC hDC)
 {
 if (!Ready())
 return false;
@@ -349,7 +350,7 @@ bool D2DWriteTextOutRenderer::operator ()(CommonSalLayout 
const &rLayout,
 if (!BindFont(hDC))
 {
 // If for any reason we can't bind fallback to legacy APIs.
-return ExTextOutRenderer()(rLayout, rGraphics, hDC, pPos, 
pGetNextGlypInfo);
+return ExTextOutRenderer()(rLayout, rGraphics, hDC);
 }
 
 Rectangle bounds;
@@ -365,13 +366,15 @@ bool D2DWriteTextOutRenderer::operator ()(CommonSalLayout 
const &rLayout,
 {
 mpRT->BeginDraw();
 
+int nStart = 0;
+Point aPos(0, 0);
 const GlyphItem* pGlyph;
-while (rLayout.GetNextGlyphs(1, &pGlyph, *pPos, *pGetNextGlypInfo))
+while (rLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart))
 {
 UINT16 glyphIndices[] = { pGlyph->maGlyphId };
 FLOAT glyphAdvances[] = { pGlyph->mnNewWidth };
 DWRITE_GLYPH_OFFSET glyphOffsets[] = { { 0.0f, 0.0f }, };
-D2D1_POINT_2F baseline = { pPos->X() - bounds.Left(), pPos->Y() - 
bounds.Top() };
+D2D1_POINT_2F baseline = { aPos.X() - bounds.Left(), aPos.Y() - 
bounds.Top() };
 DWRITE_GLYPH_RUN glyphs = {
 mpFontFace,
 mlfEmHeight,
@@ -600,10 +603,8 @@ bool WinSalGraphics::DrawCachedGlyphs(const 
CommonSalLayout& rLayout)
 
 void WinSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout, HDC hDC, 
bool bUseDWrite)
 {
-Point aPos(0, 0);
-int nGlyphCount(0);
 TextOutRenderer &render = TextOutRenderer::get(bUseDWrite);
-bool result = render(rLayout, *this, hDC, &aPos, &nGlyphCount);
+bool result = render(rLayout, *this, hDC);
 asser

[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk

2017-03-04 Thread Thorsten Behrens
 xmlsecurity/Module_xmlsecurity.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59460acff8a8cad0569fb4955945258ca1d5e3f2
Author: Thorsten Behrens 
Date:   Sat Mar 4 12:15:09 2017 +0100

Fix build for mobile

Change-Id: I420035cec4f3d5f56363eab1fabff5c053c60cd6

diff --git a/xmlsecurity/Module_xmlsecurity.mk 
b/xmlsecurity/Module_xmlsecurity.mk
index d1642b95..cb68c59 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\
Library_xsec_xmlsec \
 ))
 
-ifneq ($(filter-out WNT MACOSX,$(OS)),)
+ifneq ($(filter-out WNT MACOSX ANDROID IOS,$(OS)),)
 $(eval $(call gb_Module_add_targets,xmlsecurity,\
Library_xsec_gpg \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Jeevan Surya - license statement

2017-03-04 Thread Jan Iversen
WELCOME
Thanks for your license statement.

We suggest you add yourself to our wiki (remark this is not a demand)
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


[Libreoffice-commits] core.git: bin/update_pch compilerplugins/clang offapi/com offapi/UnoApi_offapi.mk postprocess/Rdb_services.mk Repository.mk xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xml

2017-03-04 Thread Samuel Mehrbrodt
 Repository.mk |1 
 bin/update_pch|1 
 compilerplugins/clang/plugin.cxx  |3 
 offapi/UnoApi_offapi.mk   |7 
 offapi/com/sun/star/xml/crypto/gpg/GpgSEInitializer.idl   |   28 +
 offapi/com/sun/star/xml/crypto/gpg/GpgSecurityEnvironment.idl |   28 +
 offapi/com/sun/star/xml/crypto/gpg/GpgXMLEncryption.idl   |   34 +
 offapi/com/sun/star/xml/crypto/gpg/GpgXMLSecurityContext.idl  |   28 +
 offapi/com/sun/star/xml/crypto/gpg/GpgXMLSignature.idl|   34 +
 postprocess/Rdb_services.mk   |1 
 xmlsecurity/Library_xmlsecurity.mk|8 
 xmlsecurity/Library_xsec_gpg.mk   |   58 ++
 xmlsecurity/Module_xmlsecurity.mk |6 
 xmlsecurity/README|2 
 xmlsecurity/inc/certificatechooser.hxx|   15 
 xmlsecurity/inc/documentsignaturemanager.hxx  |3 
 xmlsecurity/inc/pch/precompiled_xsec_gpg.cxx  |   13 
 xmlsecurity/inc/pch/precompiled_xsec_gpg.hxx  |   35 +
 xmlsecurity/source/component/documentdigitalsignatures.cxx|   10 
 xmlsecurity/source/dialogs/certificatechooser.cxx |  110 ++---
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx|6 
 xmlsecurity/source/dialogs/resourcemanager.cxx|   16 
 xmlsecurity/source/gpg/CertificateImpl.cxx|  191 +
 xmlsecurity/source/gpg/CertificateImpl.hxx|  107 +
 xmlsecurity/source/gpg/CipherContext.cxx  |   30 +
 xmlsecurity/source/gpg/CipherContext.hxx  |   33 +
 xmlsecurity/source/gpg/DigestContext.cxx  |   30 +
 xmlsecurity/source/gpg/DigestContext.hxx  |   31 +
 xmlsecurity/source/gpg/GpgComponentFactory.cxx|   70 +++
 xmlsecurity/source/gpg/SEInitializer.cxx  |   99 +
 xmlsecurity/source/gpg/SEInitializer.hxx  |   68 +++
 xmlsecurity/source/gpg/SecurityEnvironment.cxx|  198 ++
 xmlsecurity/source/gpg/SecurityEnvironment.hxx|  108 +
 xmlsecurity/source/gpg/XMLEncryption.cxx  |   86 
 xmlsecurity/source/gpg/XMLEncryption.hxx  |   77 +++
 xmlsecurity/source/gpg/XMLSecurityContext.cxx |  122 ++
 xmlsecurity/source/gpg/XMLSecurityContext.hxx |   88 
 xmlsecurity/source/gpg/XMLSignature.cxx   |   89 
 xmlsecurity/source/gpg/XMLSignature.hxx   |   77 +++
 xmlsecurity/source/helper/documentsignaturemanager.cxx|   21 -
 xmlsecurity/util/xsec_gpg.component   |   36 +
 41 files changed, 1940 insertions(+), 68 deletions(-)

New commits:
commit 88ac77c0bc21accfd6f5c404217c3c2aaef2d674
Author: Samuel Mehrbrodt 
Date:   Thu Feb 2 17:33:30 2017 +0100

gpg4libre: List and view GPG keys

* Add GPG implementation of css::xml::crypto UNO interfaces (part of that 
is only stub atm)
* List gpg keys along with other certificates
* Viewing gpg certificates: Not all properties are implemented yet

Change-Id: I7f60b26efe949a94bf8fe1b8d4d428002c2995b1
Reviewed-on: https://gerrit.libreoffice.org/33843
Tested-by: Jenkins 
Reviewed-by: Siegmund Gorr 
Reviewed-by: Thorsten Behrens 

diff --git a/Repository.mk b/Repository.mk
index bf5f9a8..6b169bf 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -624,6 +624,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
xmlsecurity \
xsec_fw \
xsec_xmlsec \
+   $(if $(filter-out MACOSX WNT,$(OS)),xsec_gpg) \
xstor \
$(if $(filter $(OS),MACOSX), \
macab1 \
diff --git a/bin/update_pch b/bin/update_pch
index aba7b24..7e789c1 100755
--- a/bin/update_pch
+++ b/bin/update_pch
@@ -124,6 +124,7 @@ DEFAULTS = \
 'xmlsecurity.xmlsecurity'   : ( 6, EXCLUDE, INCLUDE, INCLUDE), #   
5.1
 'xmlsecurity.xsec_fw'   : ( 2, EXCLUDE, INCLUDE, EXCLUDE), #   
2.7
 'xmlsecurity.xsec_xmlsec'   : ( 2, EXCLUDE, INCLUDE, INCLUDE), #   
4.4
+'xmlsecurity.xsec_gpg'  : ( 2, EXCLUDE, INCLUDE, INCLUDE), #   
?
 }
 
 def remove_rare(raw, min_use=-1):
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index d5b2401..85d76cc 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -43,7 +43,8 @@ bool Plugin::ignoreLocation( SourceLocation loc )
 const char* bufferName = compiler.getSourceManager().getPresumedLoc( 
expansionLoc ).getFilename();
 if (bufferName == NULL
 || strncmp( bufferN

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

2017-03-04 Thread Zdeněk Crhonek
 basic/qa/cppunit/test_vba.cxx |2 +
 basic/qa/vba_tests/cdate.vb   |   70 +++
 basic/qa/vba_tests/cdbl.vb|   75 ++
 3 files changed, 147 insertions(+)

New commits:
commit ed0e8f970ff552e75222dc92ed2879aa3b3e5851
Author: Zdeněk Crhonek 
Date:   Fri Mar 3 15:54:01 2017 +0100

VBA test CDATE, CDBL function

Change-Id: Id45930e6d329a0b1142bfde612c1a089390e4817
Reviewed-on: https://gerrit.libreoffice.org/34868
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 94371ff..5a44f9c 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -61,6 +61,8 @@ void VBATest::testMiscVBAFunctions()
 "asc.vb",
 "atn.vb",
 "cbool.vb",
+"cdate.vb",
+"cdbl.vb",
 #ifndef WIN32 // missing 64bit Currency marshalling.
 "win32compat.vb", // windows compatibility hooks.
 #endif
diff --git a/basic/qa/vba_tests/cdate.vb b/basic/qa/vba_tests/cdate.vb
new file mode 100644
index 000..d3af4db
--- /dev/null
+++ b/basic/qa/vba_tests/cdate.vb
@@ -0,0 +1,70 @@
+Option VBASupport 1
+Option Explicit
+Dim passCount As Integer
+Dim failCount As Integer
+Dim result As String
+
+Function doUnitTest() As String
+result = verify_testCDate()
+If failCount <> 0 And passCount > 0 Then
+doUnitTest = result
+Else
+doUnitTest = "OK"
+End If
+End Function
+
+
+
+Function verify_testCDate() As String
+
+passCount = 0
+failCount = 0
+
+result = "Test Results" & Chr$(10) & "" & Chr$(10)
+
+Dim testName As String
+Dim TestDateTime As Date
+Dim TestStr As String
+Dim date1, date2 As Date   'variables for test
+testName = "Test CDate function"
+On Error GoTo errorHandler
+
+date2 = 25246
+date1 = CDate("12.2.1969") '2/12/1969
+TestLog_ASSERT date1 = date2, "the return CDate is: " & date1
+
+date2 = 28313
+date1 = CDate("07/07/1977")
+TestLog_ASSERT date1 = date2, "the return CDate is: " & date1
+
+date2 = 28313
+date1 = CDate(#7/7/1977#)
+TestLog_ASSERT date1 = date2, "the return CDate is: " & date1
+
+result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & 
"Tests failed: " & failCount & Chr$(10)
+verify_testCDate = result
+
+Exit Function
+errorHandler:
+TestLog_ASSERT (False), testName & ": hit error handler"
+End Function
+
+Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional 
testComment As String)
+
+If assertion = True Then
+passCount = passCount + 1
+Else
+Dim testMsg As String
+If Not IsMissing(testId) Then
+testMsg = testMsg + " : " + testId
+End If
+If Not IsMissing(testComment) And Not (testComment = "") Then
+testMsg = testMsg + " (" + testComment + ")"
+End If
+
+result = result & Chr$(10) & " Failed: " & testMsg
+failCount = failCount + 1
+End If
+
+End Sub
+
diff --git a/basic/qa/vba_tests/cdbl.vb b/basic/qa/vba_tests/cdbl.vb
new file mode 100644
index 000..34cb10a
--- /dev/null
+++ b/basic/qa/vba_tests/cdbl.vb
@@ -0,0 +1,75 @@
+Option VBASupport 1
+Option Explicit
+Dim passCount As Integer
+Dim failCount As Integer
+Dim result As String
+
+Function doUnitTest() As String
+result = verify_testCdbl()
+If failCount <> 0 And passCount > 0 Then
+doUnitTest = result
+Else
+doUnitTest = "OK"
+End If
+End Function
+
+
+
+Function verify_testCdbl() As String
+
+passCount = 0
+failCount = 0
+
+result = "Test Results" & Chr$(10) & "" & Chr$(10)
+
+Dim testName As String
+Dim TestDateTime As Date
+Dim TestStr As String
+Dim nr1, nr2 As Double   'variables for test
+testName = "Test Cdbl function"
+On Error GoTo errorHandler
+
+nr2 = 0
+nr1 = CDbl(0)
+TestLog_ASSERT nr1 = nr2, "the return Cdbl is: " & nr1
+
+nr2 = 10.1234567890123
+nr1 = CDbl(10.1234567890123)
+TestLog_ASSERT nr1 = nr2, "the return Cdbl is: " & nr1
+
+nr2 = 0.5
+nr1 = CDbl(0.005 * 0.01)
+TestLog_ASSERT nr1 = nr2, "the return Cdbl is: " & nr1
+
+nr2 = 20
+nr1 = CDbl("20")
+TestLog_ASSERT nr1 = nr2, "the return Cdbl is: " & nr1
+
+
+result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & 
"Tests failed: " & failCount & Chr$(10)
+verify_testCdbl = result
+
+Exit Function
+errorHandler:
+TestLog_ASSERT (False), testName & ": hit error handler"
+End Function
+
+Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional 
testComment As String)
+
+If assertion = True Then
+passCount = passCount + 1
+Else
+Dim testMsg As String
+If Not IsMissing(testId) Then
+testMsg = testMsg + " : " + testId
+End If
+If Not IsMissing(testComment) And Not (testComment = "") Then
+