[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp
loolwsd/LOOLKit.cpp | 38 ++ 1 file changed, 18 insertions(+), 20 deletions(-) New commits: commit 871a67bd98eedf7ccf087b1220fbdc757c314fbc Author: Ashod Nakashian Date: Fri Nov 4 00:55:08 2016 -0400 loolwsd: avoid side bookkeeping Change-Id: I7ad2cbf45c07173447c4e80dcf06f0155de904e9 Reviewed-on: https://gerrit.libreoffice.org/30554 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index cadd10d..acdc2e5 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -290,8 +290,7 @@ public: _docPasswordType(PasswordType::ToView), _stop(false), _mutex(), -_isLoading(0), -_clientViews(0) +_isLoading(0) { Log::info("Document ctor for url [" + _url + "] on child [" + _jailId + "]."); assert(_loKit && _loKit->get()); @@ -301,8 +300,8 @@ public: ~Document() { -Log::info("~Document dtor for url [" + _url + "] on child [" + _jailId + - "]. There are " + std::to_string(_clientViews) + " views."); +LOG_INF("~Document dtor for url [" << _url << "] on child [" << _jailId << + "]. There are " << _sessions.size() << " views."); // Wait for the callback worker to finish. _stop = true; @@ -325,7 +324,7 @@ public: return true; } -LOG_INF("Creating " << (_clientViews ? "new" : "first") << +LOG_INF("Creating " << (_sessions.empty() ? "first" : "new") << " session for url: " << _url << " for sessionId: " << sessionId << " on jailId: " << _jailId); @@ -767,9 +766,11 @@ private: const std::string& renderOpts, const bool haveDocPassword) override { -Log::info("Session " + sessionId + " is loading. " + std::to_string(_clientViews) + " views loaded."); - std::unique_lock lock(_mutex); + +LOG_INF("Loading session [" << sessionId << "] on url [" << uri << +"] is loading. " << _sessions.size() << " views loaded."); + while (_isLoading) { _cvLoading.wait(lock); @@ -796,7 +797,6 @@ private: // Done loading, let the next one in (if any). assert(_loKitDocument && _loKitDocument->get() && "Uninitialized lok::Document instance"); lock.lock(); -++_clientViews; --_isLoading; _cvLoading.notify_one(); @@ -808,7 +808,8 @@ private: const auto& sessionId = session.getId(); LOG_INF("Unloading session [" << sessionId << "] on url [" << _url << "]."); -_tileQueue->removeCursorPosition(session.getViewId()); +const auto viewId = session.getViewId(); +_tileQueue->removeCursorPosition(viewId); if (_loKitDocument == nullptr) { @@ -816,15 +817,8 @@ private: return; } ---_clientViews; -Log::info() << "Document [" << _url << "] session [" -<< sessionId << "] unloaded, " << _clientViews -<< " view" << (_clientViews != 1 ? "s" : "") -<< Log::end; - std::unique_lock lockLokDoc(_loKitDocument->getLock()); -const auto viewId = session.getViewId(); _loKitDocument->setView(viewId); _loKitDocument->registerCallback(nullptr, nullptr); _loKitDocument->destroyView(viewId); @@ -837,6 +831,10 @@ private: std::vector viewIds(viewCount); _loKitDocument->getViewIds(viewIds.data(), viewCount); +LOG_INF("Document [" << _url << "] session [" << +sessionId << "] unloaded. Have " << viewCount << +" view" << (viewCount != 1 ? "s" : "")); + lockLokDoc.unlock(); // Broadcast updated view info @@ -1109,9 +1107,10 @@ private: std::unique_ptr(new CallbackDescriptor({ this, viewId }))); _loKitDocument->registerCallback(ViewCallback, _viewIdToCallbackDescr[viewId].get()); -Log::info() << "Document [" << _url << "] view [" -<< viewId << "] loaded, leaving " -<< (_clientViews + 1) << " views." << Log::end; +const int viewCount = _loKitDocument->getViewsCount(); +LOG_INF("Document [" << _url << "] view [" << + viewId << "] loaded. Have " << viewCount << + " view" << (viewCount != 1 ? "s." : ".")); return _loKitDocument; } @@ -1273,7 +1272,6 @@ private: std::map> _sessions; std::map _oldSessionIds; Poco::Thread _callbackThread; -std::atomic_size_t _clientViews; }; void documentViewCallback(const int nType, const char* pPayload, void* pData) ___ Libreoffice-commits mailing lis
[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp loolwsd/LOOLKit.cpp
loolwsd/DocumentBroker.cpp |9 + loolwsd/LOOLKit.cpp|9 + 2 files changed, 10 insertions(+), 8 deletions(-) New commits: commit d17d148880a4fc4f491b979a2207a05fca18ba8b Author: Ashod Nakashian Date: Fri Nov 4 00:50:51 2016 -0400 loolwsd: logging improvements Change-Id: If291bf20ae59085f2120d4c92a26de6ccddbc98a Reviewed-on: https://gerrit.libreoffice.org/30553 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index cbca3cd..754b836 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -160,16 +160,17 @@ DocumentBroker::DocumentBroker(const Poco::URI& uriPublic, assert(!_docKey.empty()); assert(!_childRoot.empty()); -Log::info("DocumentBroker [" + _uriPublic.toString() + "] created. DocKey: [" + _docKey + "]"); +LOG_INF("DocumentBroker [" << _uriPublic.toString() << +"] created. DocKey: [" << _docKey << "]"); } DocumentBroker::~DocumentBroker() { Admin::instance().rmDoc(_docKey); -Log::info() << "~DocumentBroker [" << _uriPublic.toString() -<< "] destroyed with " << _sessions.size() -<< " sessions left." << Log::end; +LOG_INF("~DocumentBroker [" << _uriPublic.toString() << +"] destroyed with " << _sessions.size() << +" sessions left."); if (!_sessions.empty()) { diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index c257e0b..cadd10d 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -789,7 +789,7 @@ private: } catch (const std::exception& exc) { -Log::error("Exception while loading [" + uri + "] : " + exc.what()); +LOG_ERR("Exception while loading [" << uri << "] : " << exc.what()); return nullptr; } @@ -806,13 +806,13 @@ private: void onUnload(const ChildSession& session) override { const auto& sessionId = session.getId(); -Log::info("Unloading [" + sessionId + "]."); +LOG_INF("Unloading session [" << sessionId << "] on url [" << _url << "]."); _tileQueue->removeCursorPosition(session.getViewId()); if (_loKitDocument == nullptr) { -Log::error("Unloading session [" + sessionId + "] without loKitDocument."); +LOG_ERR("Unloading session [" << sessionId << "] without loKitDocument."); return; } @@ -829,7 +829,8 @@ private: _loKitDocument->registerCallback(nullptr, nullptr); _loKitDocument->destroyView(viewId); _viewIdToCallbackDescr.erase(viewId); -Log::debug("Destroyed view " + std::to_string(viewId)); +LOG_DBG("Destroyed view [" << viewId << "] with session [" << +sessionId << "] on url [" << _url << "]."); // Get the list of view ids from the core const int viewCount = _loKitDocument->getViewsCount(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp
loolwsd/LOOLKit.cpp | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) New commits: commit b6fae38f17078b3e9b1b6dc267e5402ecc5d7b2f Author: Ashod Nakashian Date: Fri Nov 4 00:30:27 2016 -0400 loolwsd: simplified createSession Change-Id: I2ebb37cae61d9625731b48ea6b9ce31646ad3e42 Reviewed-on: https://gerrit.libreoffice.org/30552 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index 66319c3..c257e0b 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -319,29 +319,26 @@ public: try { -const auto& it = _sessions.find(sessionId); -if (it != _sessions.end()) +if (_sessions.find(sessionId) != _sessions.end()) { -Log::warn("Session [" + sessionId + "] is already running."); +LOG_WRN("Session [" << sessionId << "] on url [" << _url << "] already exists."); return true; } -Log::info() << "Creating " << (_clientViews ? "new" : "first") -<< " view for url: " << _url << " for sessionId: " << sessionId -<< " on jailId: " << _jailId << Log::end; +LOG_INF("Creating " << (_clientViews ? "new" : "first") << +" session for url: " << _url << " for sessionId: " << +sessionId << " on jailId: " << _jailId); auto session = std::make_shared(sessionId, _jailId, *this); -if (!_sessions.emplace(sessionId, session).second) -{ -Log::error("Session already exists for child: " + _jailId + ", session: " + sessionId); -} +_sessions.emplace(sessionId, session); -Log::debug("Sessions: " + std::to_string(_sessions.size())); +LOG_DBG("Sessions: " << _sessions.size()); return true; } catch (const std::exception& ex) { -Log::error("Exception while creating session [" + sessionId + "] on url [" + _url + "] - '" + ex.what() + "'."); +LOG_ERR("Exception while creating session [" << sessionId << +"] on url [" << _url << "] - '" << ex.what() << "'."); return false; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp loolwsd/DocumentBroker.hpp
loolwsd/DocumentBroker.cpp |4 +--- loolwsd/DocumentBroker.hpp |1 + 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit 61488cce78baa188e7f53bad352b1d80dcd7be7a Author: Ashod Nakashian Date: Fri Nov 4 00:13:47 2016 -0400 loolwsd: move child communication logging ...and simplify the message (new line not needed). Change-Id: Ic304d39e444b13c140e16dbe232c2cb03659ff99 Reviewed-on: https://gerrit.libreoffice.org/30551 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index d19bfdd..cbca3cd 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -469,14 +469,13 @@ std::string DocumentBroker::getJailRoot() const size_t DocumentBroker::addSession(std::shared_ptr& session) { const auto id = session->getId(); -const std::string aMessage = "session " + id + " " + _docKey + "\n"; +const std::string aMessage = "session " + id + " " + _docKey; try { std::lock_guard lock(_mutex); // Request a new session from the child kit. -Log::debug("DocBroker to Child: " + aMessage.substr(0, aMessage.length() - 1)); _childProcess->sendTextFrame(aMessage); auto ret = _sessions.emplace(id, session); @@ -840,7 +839,6 @@ bool DocumentBroker::forwardToChild(const std::string& viewId, const std::string if (it != _sessions.end()) { const auto msg = "child-" + viewId + ' ' + message; -Log::debug("DocBroker to Child: " + msg); _childProcess->sendTextFrame(msg); return true; } diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp index c1d0936..17de968 100644 --- a/loolwsd/DocumentBroker.hpp +++ b/loolwsd/DocumentBroker.hpp @@ -108,6 +108,7 @@ public: { try { +LOG_TRC("DocBroker to Child: " << data); _ws->sendFrame(data.data(), data.size()); return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp
loolwsd/DocumentBroker.cpp |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 84fb2d43fbc60c19935a6220c3ce615a7f742950 Author: Ashod Nakashian Date: Thu Nov 3 23:05:48 2016 -0400 loolwsd: warn if sessions remain by ~DocumentBroker Change-Id: I03be11b02af7560f934b138e86f8857fd9870a60 Reviewed-on: https://gerrit.libreoffice.org/30550 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index a332af6..d19bfdd 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -171,7 +171,10 @@ DocumentBroker::~DocumentBroker() << "] destroyed with " << _sessions.size() << " sessions left." << Log::end; -//assert(_sessions.empty()); +if (!_sessions.empty()) +{ +LOG_WRN("DocumentBroker still has unremoved sessions."); +} } bool DocumentBroker::load(const std::string& sessionId, const std::string& jailId) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loolwsd/Storage.cpp
loolwsd/Storage.cpp | 59 +--- 1 file changed, 33 insertions(+), 26 deletions(-) New commits: commit 159f055a89c0ad5ec7a9f38bd22539f6497accd9 Author: Ashod Nakashian Date: Thu Nov 3 20:26:40 2016 -0400 loolwsd: Storage logs updated Change-Id: I1e78371d03c6d5734e60fb843e9f0e9d15db6fa7 Reviewed-on: https://gerrit.libreoffice.org/30549 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp index 4b3f31c..ef21a8d 100644 --- a/loolwsd/Storage.cpp +++ b/loolwsd/Storage.cpp @@ -76,12 +76,12 @@ void StorageBase::initialize() { if (app.config().getBool(path + "[@allow]", false)) { -Log::info("Adding trusted WOPI host: [" + host + "]."); +LOG_INF("Adding trusted WOPI host: [" << host << "]."); WopiHosts.allow(host); } else { -Log::info("Adding blocked WOPI host: [" + host + "]."); +LOG_INF("Adding blocked WOPI host: [" << host << "]."); WopiHosts.deny(host); } } @@ -120,11 +120,14 @@ bool isLocalhost(const std::string& targetHost) address = address.substr(0, address.find('%', 0)); if (address == targetAddress) { -Log::info("WOPI host is on the same host as the WOPI client: \"" + targetAddress + "\". Connection is allowed."); +LOG_INF("WOPI host is on the same host as the WOPI client: \"" << +targetAddress << "\". Connection is allowed."); return true; } } -Log::info("WOPI host is not on the same host as the WOPI client: \"" + targetAddress + "\". Connection is not allowed."); + +LOG_INF("WOPI host is not on the same host as the WOPI client: \"" << +targetAddress << "\". Connection is not allowed."); return false; } @@ -139,17 +142,20 @@ std::unique_ptr StorageBase::create(const Poco::URI& uri, const std if (UnitWSD::get().createStorage(uri, jailRoot, jailPath, storage)) { -Log::info("Storage load hooked."); +LOG_INF("Storage load hooked."); if (storage) +{ return storage; +} } else if (uri.isRelative() || uri.getScheme() == "file") { -Log::info("Public URI [" + uri.toString() + "] is a file."); +LOG_INF("Public URI [" << uri.toString() << "] is a file."); + #if ENABLE_DEBUG if (std::getenv("FAKE_UNAUTHORIZED")) { -Log::fatal("Faking an UnauthorizedRequestException"); +LOG_FTL("Faking an UnauthorizedRequestException"); throw UnauthorizedRequestException("No acceptable WOPI hosts found matching the target host in config."); } #endif @@ -158,11 +164,11 @@ std::unique_ptr StorageBase::create(const Poco::URI& uri, const std return std::unique_ptr(new LocalStorage(uri, jailRoot, jailPath)); } -Log::error("Local Storage is disabled by default. Enable in the config file or on the command-line to enable."); +LOG_ERR("Local Storage is disabled by default. Enable in the config file or on the command-line to enable."); } else if (WopiEnabled) { -Log::info("Public URI [" + uri.toString() + "] considered WOPI."); +LOG_INF("Public URI [" << uri.toString() << "] considered WOPI."); const auto& targetHost = uri.getHost(); if (WopiHosts.match(targetHost) || isLocalhost(targetHost)) { @@ -203,18 +209,18 @@ std::string LocalStorage::loadStorageFileToLocal() // /chroot/jailId/user/doc/childId/file.ext const auto filename = Poco::Path(_uri.getPath()).getFileName(); _jailedFilePath = Poco::Path(rootPath, filename).toString(); - -Log::info("Public URI [" + _uri.getPath() + - "] jailed to [" + _jailedFilePath + "]."); +LOG_INF("Public URI [" << _uri.getPath() << +"] jailed to [" + _jailedFilePath + "]."); // Despite the talk about URIs it seems that _uri is actually just a pathname here - const auto publicFilePath = _uri.getPath(); if (!Util::checkDiskSpace(publicFilePath)) +{ throw StorageSpaceLowException("Low disk space for " + publicFilePath); +} -Log::info("Linking " + publicFilePath + " to " + _jailedFilePath); +LOG_INF("Linking " << publicFilePath << " to " << _jailedFilePath); if (!Poco::File(_jailedFilePath).exists() && link(publicFilePath.c_str(), _jailedFilePath.c_str()) == -1) { // Failed @@ -226,7 +232,7 @@ std::string LocalStorage::loadStorageFileToLocal() // Fallback to copying. if (!Poco::File(_jailedFilePath).exists()) { -Log::info("Copying " + publicFilePath + " to " + _jailedFilePath); +LO
[Libreoffice-commits] online.git: loolwsd/Log.hpp
loolwsd/Log.hpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit b9b69e9534ff9e8521d77f206c7d960580b25c3a Author: Ashod Nakashian Date: Thu Nov 3 20:27:28 2016 -0400 loolwsd: rename LOG_XXX internal variable to minimize conflicts Change-Id: I82e98b38a0ac6a5e821148f213aa1b15827e23df Reviewed-on: https://gerrit.libreoffice.org/30548 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/Log.hpp b/loolwsd/Log.hpp index 64634c7..f52973a 100644 --- a/loolwsd/Log.hpp +++ b/loolwsd/Log.hpp @@ -170,13 +170,13 @@ namespace Log } } -#define LOG_BODY(LVL, X) std::ostringstream oss; oss << Log::prefix("TRC") << X << "| " << __FILE__ << ':' << __LINE__ -#define LOG_TRC(X) if (Log::traceEnabled()) { LOG_BODY("TRC", X); Log::logger().trace(oss.str()); } -#define LOG_DBG(X) if (Log::debugEnabled()) { LOG_BODY("DBG", X); Log::logger().debug(oss.str()); } -#define LOG_INF(X) if (Log::infoEnabled()) { LOG_BODY("INF", X); Log::logger().information(oss.str()); } -#define LOG_WRN(X) if (Log::warnEnabled()) { LOG_BODY("WRN", X); Log::logger().warning(oss.str()); } -#define LOG_ERR(X) if (Log::errorEnabled()) { LOG_BODY("ERR", X); Log::logger().error(oss.str()); } -#define LOG_FTL(X) if (Log::fatalEnabled()) { LOG_BODY("FTL", X); Log::logger().fatal(oss.str()); } +#define LOG_BODY(LVL, X) std::ostringstream oss_; oss_ << Log::prefix("TRC") << X << "| " << __FILE__ << ':' << __LINE__ +#define LOG_TRC(X) if (Log::traceEnabled()) { LOG_BODY("TRC", X); Log::logger().trace(oss_.str()); } +#define LOG_DBG(X) if (Log::debugEnabled()) { LOG_BODY("DBG", X); Log::logger().debug(oss_.str()); } +#define LOG_INF(X) if (Log::infoEnabled()) { LOG_BODY("INF", X); Log::logger().information(oss_.str()); } +#define LOG_WRN(X) if (Log::warnEnabled()) { LOG_BODY("WRN", X); Log::logger().warning(oss_.str()); } +#define LOG_ERR(X) if (Log::errorEnabled()) { LOG_BODY("ERR", X); Log::logger().error(oss_.str()); } +#define LOG_FTL(X) if (Log::fatalEnabled()) { LOG_BODY("FTL", X); Log::logger().fatal(oss_.str()); } #endif ___ 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.cpp | 50 -- 1 file changed, 24 insertions(+), 26 deletions(-) New commits: commit 4a74d4978065aa93f49e1c3ca75dada6d0afed0f Author: Ashod Nakashian Date: Thu Nov 3 19:57:41 2016 -0400 loolwsd: logs updated Change-Id: I87ad4979c789ec1933ecdf39bd81dabce95ef9bb Reviewed-on: https://gerrit.libreoffice.org/30547 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 4d32905..d67a5a0 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -221,7 +221,7 @@ void shutdownLimitReached(WebSocket& ws) } catch (const std::exception& ex) { -Log::error("Error while shuting down socket on reaching limit: " + std::string(ex.what())); +LOG_ERR("Error while shuting down socket on reaching limit: " << ex.what()); } } @@ -239,7 +239,7 @@ bool cleanupDocBrokers() // Cleanup used and dead entries. if (it->second->isLoaded() && !it->second->isAlive()) { -Log::debug("Removing dead DocBroker [" + it->first + "]."); +LOG_DBG("Removing dead DocBroker [" << it->first << "]."); it = DocBrokers.erase(it); } else @@ -259,7 +259,7 @@ static void forkChildren(const int number) { Util::checkDiskSpaceOnRegisteredFileSystems(); const std::string aMessage = "spawn " + std::to_string(number) + "\n"; -Log::debug("MasterToForKit: " + aMessage.substr(0, aMessage.length() - 1)); +LOG_DBG("MasterToForKit: " << aMessage.substr(0, aMessage.length() - 1)); ++OutstandingForks; IoUtil::writeToPipe(LOOLWSD::ForKitWritePipe, aMessage); @@ -276,8 +276,7 @@ static bool cleanupChildren() { if (!NewChildren[i]->isAlive()) { -Log::warn() << "Removing unused dead child [" << NewChildren[i]->getPid() -<< "]." << Log::end; +LOG_WRN("Removing unused dead child [" << NewChildren[i]->getPid() << "]."); NewChildren.erase(NewChildren.begin() + i); removed = true; } @@ -345,9 +344,8 @@ static size_t addNewChild(const std::shared_ptr& child) --OutstandingForks; NewChildren.emplace_back(child); const auto count = NewChildren.size(); -Log::info() << "Have " << count << " " -<< (count == 1 ? "child." : "children.") -<< Log::end; +LOG_INF("Have " << count << " " << +(count == 1 ? "child." : "children.")); NewChildrenCV.notify_one(); return count; @@ -368,7 +366,7 @@ static std::shared_ptr getNewChild() int balance = LOOLWSD::NumPreSpawnedChildren; if (available == 0) { -Log::error("getNewChild: No available child. Sending spawn request to forkit and failing."); +LOG_WRN("getNewChild: No available child. Sending spawn request to forkit and failing."); } else { @@ -376,7 +374,7 @@ static std::shared_ptr getNewChild() balance = std::max(balance, 0); } -Log::debug("getNewChild: Have " + std::to_string(available) + " children, forking " + std::to_string(balance)); +LOG_DBG("getNewChild: Have " << available << " children, forking " << balance); forkChildren(balance); const auto timeout = chrono::milliseconds(CHILD_TIMEOUT_MS); @@ -388,17 +386,17 @@ static std::shared_ptr getNewChild() // Validate before returning. if (child && child->isAlive()) { -Log::debug("getNewChild: Returning new child [" + std::to_string(child->getPid()) + "]."); +LOG_DBG("getNewChild: Returning new child [" << child->getPid() << "]."); return child; } } -Log::debug("getNewChild: No live child, forking more."); +LOG_DBG("getNewChild: No live child, forking more."); } while (chrono::duration_cast(chrono::steady_clock::now() - startTime).count() < CHILD_TIMEOUT_MS * 4); -Log::debug("getNewChild: Timed out while waiting for new child."); +LOG_DBG("getNewChild: Timed out while waiting for new child."); return nullptr; } @@ -473,7 +471,7 @@ private: /// Returns true if a response has been sent. static bool handlePostRequest(HTTPServerRequest& request, HTTPServerResponse& response, const std::string& id) { -Log::info("Post request: [" + request.getURI() + "]"); +LOG_INF("Post request: [" << request.getURI() << "]"); StringTokenizer tokens(request.getURI(), "/?"); if (tokens.count() >= 3 && tokens[2] == "convert-to") { @@ -487,7 +485,7 @@ private: { if (!format.empty()) { -Log::info("Conversion request for URI [" + fromPath + "]."); +
[Libreoffice-commits] core.git: vcl/inc vcl/source vcl/unx vcl/win
vcl/inc/fontselect.hxx |3 +++ vcl/inc/graphite_features.hxx |2 -- vcl/source/font/PhysicalFontCollection.cxx | 21 ++--- vcl/source/font/fontcache.cxx | 11 ++- vcl/source/font/fontselect.cxx | 11 --- vcl/source/gdi/CommonSalLayout.cxx | 10 ++ vcl/source/glyphs/graphite_features.cxx|8 +++- vcl/unx/generic/glyphs/glyphcache.cxx | 20 ++-- vcl/unx/generic/glyphs/graphite_serverfont.cxx |2 +- vcl/win/gdi/winlayout.cxx |2 +- 10 files changed, 32 insertions(+), 58 deletions(-) New commits: commit fb823544468150a2ef660095a511636be1bf6f9e Author: Khaled Hosny Date: Fri Nov 4 05:06:54 2016 +0200 Font features are not a Graphite-only feature We parse features appended to font names in CommonSalLayout as well, so code that takes care of their presence (striping them when searching, hashing, etc.) should not be dependent on the old Graphite support or it will not work when old Graphite is disabled (e.g. on macOS). Change-Id: If040782a86ec76d3743baf4d2b1d7a194e8e13f2 diff --git a/vcl/inc/fontselect.hxx b/vcl/inc/fontselect.hxx index 57f1815..dec5990 100644 --- a/vcl/inc/fontselect.hxx +++ b/vcl/inc/fontselect.hxx @@ -49,6 +49,9 @@ public: return !(*this == rOther); } +static const char FEAT_PREFIX; +static const char FEAT_SEPARATOR; + public: OUStringmaTargetName; // name of the font name token that is chosen OUStringmaSearchName; // name of the font that matches best diff --git a/vcl/inc/graphite_features.hxx b/vcl/inc/graphite_features.hxx index 1ce5cb0..3caa3ec 100644 --- a/vcl/inc/graphite_features.hxx +++ b/vcl/inc/graphite_features.hxx @@ -42,8 +42,6 @@ namespace grutils { public: enum { MAX_FEATURES = 64 }; -static const char FEAT_PREFIX; -static const char FEAT_SEPARATOR; static const char FEAT_ID_VALUE_SEPARATOR; GrFeatureParser(const gr_face * face, const OString& features, const OString& lang); GrFeatureParser(const gr_face * face, const OString& lang); diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 0f744971..716811b 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -18,9 +18,6 @@ */ #include -#if ENABLE_GRAPHITE -#include "graphite_features.hxx" -#endif #include #include #include @@ -989,22 +986,18 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r rFSD.maTargetName = GetNextFontToken( rFSD.GetFamilyName(), nTokenPos ); aSearchName = rFSD.maTargetName; -#if ENABLE_GRAPHITE // Until features are properly supported, they are appended to the // font name, so we need to strip them off so the font is found. -sal_Int32 nFeat = aSearchName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX); +sal_Int32 nFeat = aSearchName.indexOf(FontSelectPatternAttributes::FEAT_PREFIX); OUString aOrigName = rFSD.maTargetName; OUString aBaseFontName = aSearchName.copy( 0, (nFeat != -1) ? nFeat : aSearchName.getLength() ); -if (nFeat != -1 && --1 != aSearchName.indexOf(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat)) +if (nFeat != -1) { aSearchName = aBaseFontName; rFSD.maTargetName = aBaseFontName; } -#endif - aSearchName = GetEnglishSearchFontName( aSearchName ); ImplFontSubstitute( aSearchName ); // #114999# special emboldening for Ricoh fonts @@ -1035,10 +1028,9 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r } } -#if ENABLE_GRAPHITE // restore the features to make the font selection data unique rFSD.maTargetName = aOrigName; -#endif + // check if the current font name token or its substitute is valid PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName( aSearchName ); if( pFoundData ) @@ -1047,10 +1039,9 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r // some systems provide special customization // e.g. they suggest "serif" as UI-font, but this name cannot be used directly // because the system wants to map it to another font first, e.g. "Helvetica" -#if ENABLE_GRAPHITE + // use the target name to search in the prematch hook rFSD.maTargetName = aBaseFontName; -#endif // Related: fdo#49271 RTF files often contain weird-ass // Win 3.1/Win95 style fontnames which attempt to put the @@ -1071,11 +1062,11 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontF
[Libreoffice-commits] core.git: vcl/inc
vcl/inc/win/winlayout.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a6ce5d391476e4b6a2cb2d92ff45548c1d75684b Author: Khaled Hosny Date: Fri Nov 4 01:26:50 2016 +0200 Misplaced #endif Change-Id: I199cf879c13cdd65ec9b6f1dbfef9b615bf8cefc diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index c025351..84b27d5 100755 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -413,8 +413,6 @@ public: #endif // ENABLE_GRAPHITE -#endif - class TextOutRenderer { protected: @@ -514,4 +512,6 @@ private: HDC mhDC; }; +#endif // INCLUDED_VCL_INC_WIN_WINLAYOUT_HXX + /* 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] core.git: Branch 'feature/pivot_median' - 3 commits - sc/inc sc/source
sc/inc/dpglobal.hxx|2 - sc/inc/globstr.hrc | 11 -- sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 30 ++--- sc/source/ui/src/globstr.src | 44 - 4 files changed, 18 insertions(+), 69 deletions(-) New commits: commit e80451233e87c18c8f4d47b50355fc156a9bf4f6 Author: Tamás Zolnai Date: Thu Nov 3 11:33:24 2016 +0100 Display localized function names in Pivot Layout dialog Same names which are displayed for pivot table placed on a sheet. Change-Id: Ic05d0dddea7d17101f253874dff15b8a49b87287 diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index dc24b80..71e48c1 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -16,6 +16,7 @@ #include #include "pivot.hxx" #include "scabstdlg.hxx" +#include "globstr.hrc" using namespace std; @@ -28,23 +29,28 @@ namespace OUString lclGetFunctionMaskName(const PivotFunc nFunctionMask) { +sal_uInt16 nStrId = 0; switch (nFunctionMask) { -case PivotFunc::Sum: return OUString("Sum"); -case PivotFunc::Count: return OUString("Count"); -case PivotFunc::Average: return OUString("Mean"); -case PivotFunc::Max: return OUString("Max"); -case PivotFunc::Min: return OUString("Min"); -case PivotFunc::Product: return OUString("Product"); -case PivotFunc::CountNum: return OUString("Count"); -case PivotFunc::StdDev: return OUString("StDev"); -case PivotFunc::StdDevP: return OUString("StDevP"); -case PivotFunc::StdVar: return OUString("Var"); -case PivotFunc::StdVarP: return OUString("VarP"); +case PivotFunc::Sum:nStrId = STR_FUN_TEXT_SUM; break; +case PivotFunc::Count: nStrId = STR_FUN_TEXT_COUNT;break; +case PivotFunc::Average:nStrId = STR_FUN_TEXT_AVG; break; +case PivotFunc::Max:nStrId = STR_FUN_TEXT_MAX; break; +case PivotFunc::Min:nStrId = STR_FUN_TEXT_MIN; break; +case PivotFunc::Product:nStrId = STR_FUN_TEXT_PRODUCT; break; +case PivotFunc::CountNum: nStrId = STR_FUN_TEXT_COUNT;break; +case PivotFunc::StdDev: nStrId = STR_FUN_TEXT_STDDEV; break; +case PivotFunc::StdDevP:nStrId = STR_FUN_TEXT_STDDEV; break; +case PivotFunc::StdVar: nStrId = STR_FUN_TEXT_VAR; break; +case PivotFunc::StdVarP:nStrId = STR_FUN_TEXT_VAR; break; default: +assert(false); break; } -return OUString(); +if (nStrId != 0) +return ScGlobal::GetRscString(nStrId); +else +return OUString(); } OUString lclCreateDataItemName(const PivotFunc nFunctionMask, const OUString& rName, const sal_uInt8 nDuplicationCount) commit f9e88b916701e78556ffc3271eb2a54ada972b36 Author: Tamás Zolnai Date: Thu Nov 3 11:32:25 2016 +0100 Remove some unused resource strings Change-Id: I8529aa491d37aef5e732909357ddf93372dde6d2 diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index 9c94a7c..5833436 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -106,17 +106,6 @@ #define STR_BOX_YNI 66 #define STR_NO_REF_TABLE67 -#define STR_PIVOTFUNC_SUM 68 // pivot.cxx -#define STR_PIVOTFUNC_COUNT 69 -#define STR_PIVOTFUNC_AVG 70 -#define STR_PIVOTFUNC_MAX 71 -#define STR_PIVOTFUNC_MIN 72 -#define STR_PIVOTFUNC_PROD 73 -#define STR_PIVOTFUNC_COUNT274 -#define STR_PIVOTFUNC_STDDEV75 -#define STR_PIVOTFUNC_STDDEV2 76 -#define STR_PIVOTFUNC_VAR 77 -#define STR_PIVOTFUNC_VAR2 78 #define STR_PIVOT_TOTAL 79 #define STR_PIVOT_DATA 80 diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src index 27ef036..241254b 100644 --- a/sc/source/ui/src/globstr.src +++ b/sc/source/ui/src/globstr.src @@ -533,50 +533,6 @@ Resource RID_GLOBSTR { Text [ en-US ] = "Group" ; }; -String STR_PIVOTFUNC_SUM -{ -Text [ en-US ] = "SUM" ; -}; -String STR_PIVOTFUNC_COUNT -{ -Text [ en-US ] = "COUNT" ; -}; -String STR_PIVOTFUNC_AVG -{ -Text [ en-US ] = "AVERAGE" ; -}; -String STR_PIVOTFUNC_MAX -{ -Text [ en-US ] = "MAX" ; -}; -String STR_PIVOTFUNC_MIN -{ -Text [ en-US ] = "MIN" ; -}; -String STR_PIVOTFUNC_PROD -{ -Text [ en-US ] = "PRODUCT" ; -}; -String STR_PIVOTFUNC_COUNT2 -{ -Text [ en-US ] = "COUNTA" ; -}; -String STR_PIVOTFUNC_STDDEV -{ -Text [ en-US ] = "STDEV" ; -}; -String STR_PIVOTFUNC_STDDEV2 -{ -Text [ en-US ] = "
[Libreoffice-commits] core.git: Branch 'feature/fixes36' - 4 commits - include/vcl vcl/opengl vcl/win
include/vcl/opengl/OpenGLContext.hxx| 16 ++ vcl/opengl/areaScaleFragmentShader.glsl | 176 +--- vcl/opengl/gdiimpl.cxx | 16 ++ vcl/opengl/salbmp.cxx | 40 --- vcl/opengl/scale.cxx| 10 + vcl/opengl/win/gdiimpl.cxx |5 vcl/win/gdi/salgdi2.cxx | 67 +++- 7 files changed, 244 insertions(+), 86 deletions(-) New commits: commit 8b03d8e70edcd8176f61a9ac0bb2c0a3d179bfb1 Author: Tomaž Vajngerl Date: Thu Nov 3 23:11:18 2016 +0100 opengl: reduced register areaScale shader and detection for intel Some intel drivers crash when areaScale shader with "large" array is used. This adds a "reduced register" version of the areaScale shader. We still use the first version of the shader for other drivers and switch between the 2 implementations with a runtime detection. Change-Id: I1860f898c03b40a600eb1b41f7262719382a7171 diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 6863467..a7cc2d6 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -52,6 +52,15 @@ struct VCL_DLLPUBLIC GLWindow virtual ~GLWindow(); }; +struct VCL_DLLPUBLIC OpenGLCapabilitySwitch +{ +bool mbLimitedShaderRegisters; + +OpenGLCapabilitySwitch() +: mbLimitedShaderRegisters(false) +{} +}; + class VCL_DLLPUBLIC OpenGLContext { friend class OpenGLTests; @@ -94,6 +103,11 @@ public: return mpRenderState; } +OpenGLCapabilitySwitch& getOpenGLCapabilitySwitch() +{ +return maOpenGLCapabilitySwitch; +} + /// Is this GL context the current context ? virtual bool isCurrent(); /// Is any GL context the current context ? @@ -165,6 +179,8 @@ protected: OpenGLFramebuffer* mpFirstFramebuffer; OpenGLFramebuffer* mpLastFramebuffer; +OpenGLCapabilitySwitch maOpenGLCapabilitySwitch; + private: struct ProgramHash { diff --git a/vcl/opengl/areaScaleFragmentShader.glsl b/vcl/opengl/areaScaleFragmentShader.glsl index c83c5e0..e161336 100644 --- a/vcl/opengl/areaScaleFragmentShader.glsl +++ b/vcl/opengl/areaScaleFragmentShader.glsl @@ -7,13 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#version 120 -#if __VERSION__ < 130 -int min( int a, int b ) { return a < b ? a : b; } -float min( float a, float b ) { return a < b ? a : b; } -#endif - -/* TODO Use textureOffset for newest version of GLSL */ +#version 130 uniform sampler2D sampler; uniform int swidth; @@ -34,23 +28,108 @@ varying vec2 mask_coord; uniform sampler2D mask; #endif +vec4 getTexel(int x, int y) +{ +vec2 offset = vec2(x * xsrcconvert, y * ysrcconvert); +vec4 texel = texture2D(sampler, offset); +#ifdef MASKED +texel.a = 1.0 - texture2D(mask, offset).r; +#endif +return texel; +} + +#ifdef USE_REDUCED_REGISTER_VARIANT + +void main(void) +{ +// Convert to pixel coordinates again. +int dx = int(tex_coord.s * xdestconvert); +int dy = int(tex_coord.t * ydestconvert); + +// Compute the range of source pixels which will make up this destination pixel. +float fsx1 = min(dx * xscale, float(swidth - 1)); +float fsx2 = min(fsx1 + xscale, float(swidth - 1)); + +float fsy1 = min(dy * yscale, float(sheight - 1)); +float fsy2 = min(fsy1 + yscale, float(sheight - 1)); + +// To whole pixel coordinates. +int xstart = int(floor(fsx1)); +int xend = int(floor(fsx2)); + +int ystart = int(floor(fsy1)); +int yend = int(floor(fsy2)); + +float xlength = fsx2 - fsx1; +float ylength = fsy2 - fsy1; + +float xContribution[3]; +xContribution[0] = (1.0 - max(0.0, fsx1 - xstart)) / xlength; +xContribution[1] = 1.0 / xlength; +xContribution[2] = (1.0 - max(0.0, (xend + 1) - fsx2)) / xlength; + +float yContribution[3]; +yContribution[0] = (1.0 - max(0.0, fsy1 - ystart)) / ylength; +yContribution[1] = 1.0 / ylength; +yContribution[2] = (1.0 - max(0.0, (yend + 1) - fsy2)) / ylength; + +vec4 sumAll = vec4(0.0, 0.0, 0.0, 0.0); +vec4 texel; +// First Y pass +{ +vec4 sumX = vec4(0.0, 0.0, 0.0, 0.0); + +sumX += getTexel(xstart, ystart) * xContribution[0]; +for (int x = xstart + 1; x < xend; ++x) +{ + sumX += getTexel(x, ystart) * xContribution[1]; +} +sumX += getTexel(xend, ystart) * xContribution[2]; + +sumAll += sumX * yContribution[0]; +} + +// Middle Y Passes +for (int y = ystart + 1; y < yend; ++y) +{ +vec4 sumX = vec4(0.0, 0.0, 0.0, 0.0); + +sumX += getTexel(xstart, y) * xContribution[0]; +for (int x = xstart + 1; x < xend; ++x) +{ +sumX += getTexel(x, y) * xContribution[1]; +} +sumX += getTexel(xend, y) * xContribution[2]; + +sumAll += sumX * yCo
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/markdata.hxx | 13 - sc/source/core/data/markdata.cxx | 25 + sc/source/core/data/table3.cxx |2 +- sc/source/ui/view/tabcont.cxx|3 +++ 4 files changed, 37 insertions(+), 6 deletions(-) New commits: commit 8d777f85eaff6af8896942590316b7cd9f2c3e75 Author: Eike Rathke Date: Thu Nov 3 23:20:44 2016 +0100 Resolves: tdf#103684 calculate status bar functions across sheets Also trigger recalculation when additional sheets are selected or deselected. Change-Id: I259396a3e30c5653ac252b7bb2eb6a0a9405d6cc diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx index 60c04d0..d11173c 100644 --- a/sc/inc/markdata.hxx +++ b/sc/inc/markdata.hxx @@ -108,10 +108,21 @@ public: ScMarkArray GetMarkArray( SCCOL nCol ) const; boolIsCellMarked( SCCOL nCol, SCROW nRow, bool bNoSimple = false ) const; -voidFillRangeListWithMarks( ScRangeList* pList, bool bClear ) const; + +/** Create a range list of marks. +@param nForTab +If -1, use start-sheet-tab of the multi-area in ranges. +If >= 0, use given sheet-tab in ranges. + */ +voidFillRangeListWithMarks( ScRangeList* pList, bool bClear, SCTAB nForTab = -1 ) const; voidExtendRangeListTables( ScRangeList* pList ) const; ScRangeList GetMarkedRanges() const; +/** Get marked ranges with sheet-tab set to nTab. +Marks are stored for the currently active sheet respectively the +multi-area start-sheet-tab, update ranges with the sheet for which this +is called. */ +ScRangeList GetMarkedRangesForTab( SCTAB nTab ) const; voidMarkFromRangeList( const ScRangeList& rList, bool bReset ); diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 70ec2c1..40e6ff4 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -355,7 +355,7 @@ void ScMarkData::MarkFromRangeList( const ScRangeList& rList, bool bReset ) } } -void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, bool bClear ) const +void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, bool bClear, SCTAB nForTab ) const { if (!pList) return; @@ -367,7 +367,7 @@ void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, bool bClear ) const if ( bMultiMarked ) { -SCTAB nTab = aMultiRange.aStart.Tab(); +SCTAB nTab = (nForTab < 0 ? aMultiRange.aStart.Tab() : nForTab); SCCOL nStartCol = aMultiRange.aStart.Col(); SCCOL nEndCol = aMultiRange.aEnd.Col(); @@ -402,7 +402,17 @@ void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, bool bClear ) const } if ( bMarked ) -pList->Append( aMarkRange ); +{ +if (nForTab < 0) +pList->Append( aMarkRange ); +else +{ +ScRange aRange( aMarkRange ); +aRange.aStart.SetTab( nForTab ); +aRange.aEnd.SetTab( nForTab ); +pList->Append( aRange ); +} +} } void ScMarkData::ExtendRangeListTables( ScRangeList* pList ) const @@ -427,7 +437,14 @@ void ScMarkData::ExtendRangeListTables( ScRangeList* pList ) const ScRangeList ScMarkData::GetMarkedRanges() const { ScRangeList aRet; -FillRangeListWithMarks(&aRet, false); +FillRangeListWithMarks(&aRet, false, -1); +return aRet; +} + +ScRangeList ScMarkData::GetMarkedRangesForTab( SCTAB nTab ) const +{ +ScRangeList aRet; +FillRangeListWithMarks(&aRet, false, nTab); return aRet; } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 2674f3f..311ac02 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -3403,7 +3403,7 @@ sal_Int32 ScTable::GetMaxNumberStringLen( void ScTable::UpdateSelectionFunction( ScFunctionData& rData, const ScMarkData& rMark ) { -ScRangeList aRanges = rMark.GetMarkedRanges(); +ScRangeList aRanges = rMark.GetMarkedRangesForTab( nTab ); for (SCCOL nCol = 0; nCol <= MAXCOL && !rData.bError; ++nCol) { if (pColFlags && ColHidden(nCol)) diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 50cbec9..6061efc 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -297,6 +297,9 @@ void ScTabControl::Select() rBind.Invalidate( FID_TABLE_HIDE ); rBind.Invalidate( FID_TAB_SET_TAB_BG_COLOR ); +// Recalculate status bar functions. +rBind.Invalidate( SID_TABLE_CELL ); + // SetReference onlw when the consolidate dialog is open // (for referenzes over multiple sheets) // for others this is only needed fidgeting ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - include/svtools sc/qa svtools/source
include/svtools/htmlkywd.hxx |1 + include/svtools/htmltokn.h |1 + sc/qa/unit/bugfix-test.cxx | 25 + sc/qa/unit/data/html/tdf88821-2.html | 19 +++ sc/qa/unit/data/html/tdf88821.html | 23 +++ svtools/source/svhtml/htmlkywd.cxx |1 + svtools/source/svhtml/parhtml.cxx|5 - svtools/source/svrtf/svparser.cxx|7 +++ 8 files changed, 77 insertions(+), 5 deletions(-) New commits: commit 84400eae86d7ae8e66f8247f4c4f3a717d90f8c0 Author: Jan Holesovsky Date: Thu Nov 3 22:27:12 2016 +0100 tdf#88821: Implement support for for HTML import. The editengine HTML import was not handling it at all, and consequently not setting the right encoding when importing HTML in Calc. Change-Id: I3ca3dd20f36cfb579fb7ae4cd3da63a69d97601e diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 54309a7..4cc2494 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -422,6 +422,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_alt "alt" #define OOO_STRING_SVTOOLS_HTML_O_axis "axis" #define OOO_STRING_SVTOOLS_HTML_O_char "char" +#define OOO_STRING_SVTOOLS_HTML_O_charset "charset" #define OOO_STRING_SVTOOLS_HTML_O_class "class" #define OOO_STRING_SVTOOLS_HTML_O_code "code" #define OOO_STRING_SVTOOLS_HTML_O_codetype "codetype" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index eeea777..37ca30e 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -308,6 +308,7 @@ HTML_OPTION_STRING_START= HTML_OPTION_BOOL_END, HTML_O_ALT, HTML_O_AXIS, HTML_O_CHAR, // HTML3 Table Model Draft +HTML_O_CHARSET, HTML_O_CLASS, HTML_O_CODE, // HotJava HTML_O_CODETYPE, diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx index 3968d38..2cf5b12 100644 --- a/sc/qa/unit/bugfix-test.cxx +++ b/sc/qa/unit/bugfix-test.cxx @@ -88,6 +88,7 @@ public: // void testTdf40110(); void testTdf98657(); void testTdf88821(); +void testTdf88821_2(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testTdf64229); @@ -98,6 +99,7 @@ public: // CPPUNIT_TEST(testTdf40110); CPPUNIT_TEST(testTdf98657); CPPUNIT_TEST(testTdf88821); +CPPUNIT_TEST(testTdf88821_2); CPPUNIT_TEST_SUITE_END(); private: uno::Reference m_xCalcComponent; @@ -256,6 +258,17 @@ void ScFiltersTest::testTdf88821() xDocSh->DoClose(); } +void ScFiltersTest::testTdf88821_2() +{ +ScDocShellRef xDocSh = loadDoc("tdf88821-2.", FORMAT_HTML); +ScDocument& rDoc = xDocSh->GetDocument(); + +// A2 should be 'ABCabcÄŠŽÄšž', not 'ABCabcÃÅà  à ½Ãï¾Ã ¡à ¾' + CPPUNIT_ASSERT_EQUAL(OStringToOUString("ABCabc\xC4\x8C\xC5\xA0\xC5\xBD\xC4\x8D\xC5\xA1\xC5\xBE", RTL_TEXTENCODING_UTF8), rDoc.GetString(0, 1, 0)); + +xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) { diff --git a/sc/qa/unit/data/html/tdf88821-2.html b/sc/qa/unit/data/html/tdf88821-2.html new file mode 100644 index 000..e71094a --- /dev/null +++ b/sc/qa/unit/data/html/tdf88821-2.html @@ -0,0 +1,19 @@ + + + + + + + +Text +Decimal +Date + + +ABCabcÄŠŽÄšž +10,50 +30.1.2015 + + + + diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 6034082..2cc0a9e 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -576,6 +576,7 @@ static HTML_TokenEntry aHTMLOptionTab[] = { {{OOO_STRING_SVTOOLS_HTML_O_alt}, HTML_O_ALT}, {{OOO_STRING_SVTOOLS_HTML_O_axis}, HTML_O_AXIS}, {{OOO_STRING_SVTOOLS_HTML_O_char}, HTML_O_CHAR}, // HTML 3 Table Model Draft +{{OOO_STRING_SVTOOLS_HTML_O_charset}, HTML_O_CHARSET}, {{OOO_STRING_SVTOOLS_HTML_O_class}, HTML_O_CLASS}, {{OOO_STRING_SVTOOLS_HTML_O_code}, HTML_O_CODE}, // HotJava {{OOO_STRING_SVTOOLS_HTML_O_codetype}, HTML_O_CODETYPE}, diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index a47b4e4..c09ecc5 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1928,6 +1928,10 @@ bool HTMLParser::ParseMetaOptionsImpl( case HTML_O_CONTENT: aContent = aOption.GetString(); break; +case HTML_O_CHARSET: +OString sValue(OUStringToOString(aOption.GetString(), RTL_TEXTENCODING_ASCII_US)); +o_rEnc = GetExtendedCompatibilityTextEncoding(rtl_getTextEncodingFromMimeCharset(sValue.getStr())); +break; } } @@ -1942,7 +1946,6 @@ bool HTMLParser::ParseMetaOptionsImpl( aContent = convertLineEnd(aContent, GetSystemLineEnd()); } - if ( bHTTPEquiv && i_pHT
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source
sc/source/core/tool/interpr1.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit bd47f43ce56639c891beda40d9070591b8df5ccf Author: Eike Rathke Date: Mon Oct 31 23:40:24 2016 +0100 Resolves: tdf#99291 empty array element should not match empty cell As weird as it is, but an empty cell is only to be matched by an empty string, not another empty cell. Affects spreadsheet functions SUMIF, AVERAGEIF, COUNTIF, SUMIFS, AVERAGEIFS and COUNTIFS. (cherry picked from commit 33090865c494618f4e528bf5a10aae8c4fc443d1) Conflicts: sc/source/core/tool/interpr1.cxx Change-Id: Ib33402e8c93f26cd8e2648426a5bde6b267c55ab Reviewed-on: https://gerrit.libreoffice.org/30451 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index f540da9..8d7313d 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4814,7 +4814,7 @@ double ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc ) case svExternalDoubleRef: { ScMatValType nType = GetDoubleOrStringFromMatrix( fVal, aString); -bIsString = ScMatrix::IsNonValueType( nType); +bIsString = ScMatrix::IsRealStringType( nType); } break; case svExternalSingleRef: @@ -5170,7 +5170,7 @@ void ScInterpreter::ScCountIf() case svExternalDoubleRef: { ScMatValType nType = GetDoubleOrStringFromMatrix(fVal, aString); -bIsString = ScMatrix::IsNonValueType( nType); +bIsString = ScMatrix::IsRealStringType( nType); } break; case svString: @@ -5391,7 +5391,7 @@ double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc ) case svExternalDoubleRef: { ScMatValType nType = GetDoubleOrStringFromMatrix( fVal, aString); -bIsString = ScMatrix::IsNonValueType( nType); +bIsString = ScMatrix::IsRealStringType( nType); } break; case svExternalSingleRef: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf95031.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport7.cxx|7 +++ writerfilter/source/dmapper/DomainMapper.cxx |6 ++ 3 files changed, 13 insertions(+) New commits: commit 806e323271982c8975ec2904219c6f136aa20eea Author: Miklos Vajna Date: Tue Oct 18 09:19:50 2016 +0200 tdf#95031 DOCX import: auto spacing inside numbering means no spacing The WW8 import has code for this in SwWW8ImplReader::AppendTextNode(), with lots of corner-cases. Not all of that is implemented here yet, but the bullet list in the bugdoc already looks correct now. (cherry picked from commit c486e875de7c8e845594f5043a37ee8800865782) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Change-Id: I9499bfa4d8d7fcc425d7b95e64987258c099f7f2 Reviewed-on: https://gerrit.libreoffice.org/30291 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/qa/extras/ooxmlexport/data/tdf95031.docx b/sw/qa/extras/ooxmlexport/data/tdf95031.docx new file mode 100644 index 000..ef082f7 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf95031.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 42f6474..0e81597 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -1137,6 +1137,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103389, "tdf103389.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp/wps:spPr/a:prstGeom", "prst", "rect"); } +DECLARE_OOXMLEXPORT_TEST(testTdf95031, "tdf95031.docx") +{ +// This was 494, in-numbering paragraph's automating spacing was handled as visible spacing, while it should not. +CPPUNIT_ASSERT_EQUAL(static_cast(0), getProperty(getParagraph(2), "ParaBottomMargin")); +CPPUNIT_ASSERT_EQUAL(static_cast(0), getProperty(getParagraph(3), "ParaTopMargin")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index af0ae0a..c39208b 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -613,6 +613,9 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) } if (nIntValue) // If auto spacing is set, then only store set value in InteropGrabBag { +if (m_pImpl->GetTopContext()->isSet(PROP_NUMBERING_RULES)) +// Numbering is set -> auto space is 0. +default_spacing = 0; m_pImpl->GetTopContext()->Insert( PROP_PARA_TOP_MARGIN, uno::makeAny( ConversionHelper::convertTwipToMM100(default_spacing) ) ); } else @@ -635,6 +638,9 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) } if (nIntValue) // If auto spacing is set, then only store set value in InteropGrabBag { +if (m_pImpl->GetTopContext()->isSet(PROP_NUMBERING_RULES)) +// Numbering is set -> auto space is 0. +default_spacing = 0; m_pImpl->GetTopContext()->Insert( PROP_PARA_BOTTOM_MARGIN, uno::makeAny( ConversionHelper::convertTwipToMM100(default_spacing) ) ); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/inc sc/source
sc/inc/markdata.hxx |2 sc/source/core/data/markdata.cxx |5 + sc/source/ui/docshell/docfunc.cxx | 54 --- sc/source/ui/inc/docfunc.hxx |5 + sc/source/ui/inc/undoblk.hxx | 10 ++- sc/source/ui/undo/undoblk.cxx | 105 +++--- sc/source/ui/unoobj/cellsuno.cxx |2 sc/source/ui/view/viewfun2.cxx|2 sc/source/ui/view/viewfun3.cxx|4 - 9 files changed, 131 insertions(+), 58 deletions(-) New commits: commit cd998b587f9956c1f4292d4db3200cc6c9320001 Author: Eike Rathke Date: Wed Oct 26 14:50:43 2016 +0200 Resolves: tdf#92117 create only one Undo for all UnmergeCells() calls ... during DeleteCells() and InsertCells(), instead of one Undo per UnmergeCells() call. And actually create Undo only if bRecord requested. (cherry picked from commit 647e860435c781fbb111ae59bc70dc8e6776fed5) Conflicts: sc/source/ui/docshell/docfunc.cxx sc/source/ui/inc/docfunc.hxx sc/source/ui/inc/undoblk.hxx sc/source/ui/undo/undoblk.cxx init ScUndoRemoveMerge with range, tdf#92117 follow-up So the original selection is restored after Undo. (cherry picked from commit 0ebe9fab18e732468d2b9d53dddf9f266411a0e5) e549a0b62da469ee38270ae089ea5abf9a6868e3 Change-Id: I4f1747c3f42f36e16be81f989f0af5d048ba9d9f Reviewed-on: https://gerrit.libreoffice.org/30297 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx index 0392971..60c04d0 100644 --- a/sc/inc/markdata.hxx +++ b/sc/inc/markdata.hxx @@ -143,10 +143,12 @@ public: // iterators for table access typedef std::set::iterator iterator; typedef std::set::const_iterator const_iterator; +typedef std::set::const_reverse_iterator const_reverse_iterator; iterator begin(); iterator end(); const_iterator begin() const; const_iterator end() const; +const_reverse_iterator rbegin() const; }; #endif diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 9cb5329..defbef2 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -814,4 +814,9 @@ ScMarkData::const_iterator ScMarkData::end() const return maTabMarked.end(); } +ScMarkData::const_reverse_iterator ScMarkData::rbegin() const +{ +return maTabMarked.rbegin(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 6fe32df..8aacaad 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1790,6 +1790,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, OUString aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTCELLS ); if (bRecord) rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo ); +std::unique_ptr pUndoRemoveMerge; itr = aMark.begin(); for (; itr != itrEnd && nTabCount; ++itr) @@ -1897,12 +1898,19 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if( !qIncreaseRange.empty() ) { +if (bRecord && !pUndoRemoveMerge) +{ +ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); +pUndoDoc->InitUndo( &rDoc, *aMark.begin(), *aMark.rbegin()); +pUndoRemoveMerge.reset( new ScUndoRemoveMerge( &rDocShell, rRange, pUndoDoc )); +} + for( ::std::vector::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter ) { ScRange aRange( *iIter ); if( rDoc.HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { -UnmergeCells( aRange, true ); +UnmergeCells( aRange, bRecord, pUndoRemoveMerge.get() ); } } } @@ -1918,6 +1926,11 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, } } +if (bRecord && pUndoRemoveMerge) +{ +rDocShell.GetUndoManager()->AddUndoAction( pUndoRemoveMerge.release()); +} + switch (eCmd) { case INS_CELLSDOWN: @@ -2218,6 +2231,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, OUString aUndo = ScGlobal::GetRscString( STR_UNDO_DELETECELLS ); if (bRecord) rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo ); +std::unique_ptr pUndoRemoveMerge; itr = aMark.begin(); for (; itr != itrEnd && *itr < nTabCount; ++itr) @@ -2327,12 +2341,19 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source
sc/source/ui/view/tabvwsh2.cxx | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) New commits: commit e40275ae189fd0dd7fd962fa86d45808abe9fa8c Author: Maxim Monastirsky Date: Sun Oct 23 01:02:19 2016 +0300 tdf#103178 Final SID can differ from the original one e.g. if the same one is passed twice to deactivate the current function. So the assumption of commit 11d605cc5a0c221d2423b6e63f502db660d085d2 that if we don't use enum slots then we always use the original one is wrong. (cherry picked from commit d5eabed46ef3bc6754d381a0551ce070df933894) Conflicts: sc/source/ui/view/tabvwsh2.cxx Change-Id: Ib22fa88c958e5af85333cb8fa287f65f92b30e08 Reviewed-on: https://gerrit.libreoffice.org/30171 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index b81fc42..4c750ea 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -207,6 +207,9 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) pTabView->SetDrawFuncPtr(nullptr); } +SfxRequest aNewReq(rReq); +aNewReq.SetSlot(nDrawSfxId); + assert(nNewId != SID_DRAW_CHART); //#i71254# handled already above switch (nNewId) @@ -214,18 +217,18 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) case SID_OBJECT_SELECT: // Nicht immer zurueckschalten if(pView->GetMarkedObjectList().GetMarkCount() == 0) SetDrawShell(bEx); -pTabView->SetDrawFuncPtr(new FuSelection(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuSelection(this, pWin, pView, pDoc, aNewReq)); break; case SID_DRAW_LINE: case SID_DRAW_RECT: case SID_DRAW_ELLIPSE: -pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq)); break; case SID_DRAW_CAPTION: case SID_DRAW_CAPTION_VERTICAL: -pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq)); pView->SetFrameDragSingles( false ); rBindings.Invalidate( SID_BEZIER_EDIT ); break; @@ -238,25 +241,25 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) case SID_DRAW_BEZIER_FILL: case SID_DRAW_FREELINE: case SID_DRAW_FREELINE_NOFILL: -pTabView->SetDrawFuncPtr(new FuConstPolygon(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuConstPolygon(this, pWin, pView, pDoc, aNewReq)); break; case SID_DRAW_ARC: case SID_DRAW_PIE: case SID_DRAW_CIRCLECUT: -pTabView->SetDrawFuncPtr(new FuConstArc(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuConstArc(this, pWin, pView, pDoc, aNewReq)); break; case SID_DRAW_TEXT: case SID_DRAW_TEXT_VERTICAL: case SID_DRAW_TEXT_MARQUEE: case SID_DRAW_NOTEEDIT: -pTabView->SetDrawFuncPtr(new FuText(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuText(this, pWin, pView, pDoc, aNewReq)); break; case SID_FM_CREATE_CONTROL: SetDrawFormShell(true); -pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, rReq)); +pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq)); nFormSfxId = nNewFormId; break; @@ -268,7 +271,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) case SID_DRAWTBX_CS_STAR : case SID_DRAW_CS_ID : { -pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, rReq )); +pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, aNewReq )); if ( nNewId != SID_DRAW_CS_ID ) { const SfxStringItem* pEnumCommand = rReq.GetArg(nNewId); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svx/source
svx/source/sidebar/tools/Popup.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ae8226a2166d6a25dd5b711b0f004ad5da1ba90e Author: Maxim Monastirsky Date: Wed Oct 19 16:27:26 2016 +0300 tdf#76002 Grab focus to sidebar dropdowns Change-Id: I640cbcdcf08c34c06f0c787594e29f8e38407ece Reviewed-on: https://gerrit.libreoffice.org/30059 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx index eb1f3da..df064d8 100644 --- a/svx/source/sidebar/tools/Popup.cxx +++ b/svx/source/sidebar/tools/Popup.cxx @@ -74,7 +74,7 @@ void Popup::Show (ToolBox& rToolBox) mxContainer->StartPopupMode( aRect, -FloatWinPopupFlags::NoFocusClose|FloatWinPopupFlags::Down); +FloatWinPopupFlags::GrabFocus|FloatWinPopupFlags::Down); mxContainer->SetPopupModeFlags( mxContainer->GetPopupModeFlags() | FloatWinPopupFlags::NoAppFocusClose); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - RepositoryExternal.mk
RepositoryExternal.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 47fbca7e9f0c0eeab0b71fa7a8a60536c40a28d2 Author: Jan-Marek Glogowski Date: Thu Nov 3 13:14:42 2016 +0100 Fix external libjpeg build (cherry picked from commit f144d319d58cbb0d358250540cd666d9644f5fa5) RepositoryExternal.mk: really fix jpeg build (cherry picked from commit 8d1c80e2633b8a63050cdd81b7e089f27b996c0f) Change-Id: I1969db554d156e6af0975d03013ea4f7c10d839f Reviewed-on: https://gerrit.libreoffice.org/30527 Reviewed-by: Jean-Baptiste Faure Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index da99332..24bbab7 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -464,13 +464,13 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\ jpeg \ ) +endef + define gb_ExternalProject__use_jpeg $(call gb_ExternalProject_use_static_libraries,$(1),jpeg) endef -endef - endif # SYSTEM_JPEG ifneq ($(SYSTEM_MYTHES),) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - configure.ac
configure.ac | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 7b764b3da768c9d4db0624f4d1bf4b1e239f489d Author: Michael Stahl Date: Thu Nov 3 11:48:07 2016 +0100 configure: fix LIBJPEG_LIBS, jpeg-turbo can also be used on Linux Change-Id: I710f8ba31b6f780e3fb1d174d9ea21f270f55264 (cherry picked from commit 6a866f99ecf21f6ebdbb7f00d3c72677a1361e74) Reviewed-on: https://gerrit.libreoffice.org/30526 Reviewed-by: Jean-Baptiste Faure Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/configure.ac b/configure.ac index 66a830c..7b96f85f 100644 --- a/configure.ac +++ b/configure.ac @@ -7689,12 +7689,20 @@ _EOS AC_MSG_ERROR([no nasm (Netwide Assembler) found]) fi LIBJPEG_CFLAGS="-I${WORKDIR}/UnpackedTarball/jpeg-turbo" -LIBJPEG_LIBS="${WORKDIR}/UnpackedTarball/jpeg-turbo/.libs/libjpeg.lib" +if test "$COM" = "MSC"; then + LIBJPEG_LIBS="${WORKDIR}/UnpackedTarball/jpeg-turbo/.libs/libjpeg.lib" +else +LIBJPEG_LIBS="-L${WORKDIR}/UnpackedTarball/jpeg-turbo/.libs -ljpeg" +fi else AC_MSG_RESULT([internal, jpeg]) BUILD_TYPE="$BUILD_TYPE JPEG" LIBJPEG_CFLAGS="-I${WORKDIR}/UnpackedTarball/jpeg" -LIBJPEG_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -ljpeg" +if test "$COM" = "MSC"; then +LIBJPEG_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/libjpeg.lib" +else +LIBJPEG_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -ljpeg" +fi fi fi AC_SUBST(NASM) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - RepositoryExternal.mk
RepositoryExternal.mk |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 1a41a31af9fb15aac14c829b10db6dc99ba40557 Author: Michael Stahl Date: Thu Nov 3 15:58:08 2016 +0100 RepositoryExternal.mk: fix poppler linking on Ubuntu need to link poppler static library *before* jpeg Change-Id: I0fd2abc12c93432715a02a3a567349abda4f990b (cherry picked from commit 43532a0944b0ee4727ea2ae480e54687e41d9201) Reviewed-on: https://gerrit.libreoffice.org/30533 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index ece2bd7..da99332 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -2684,7 +2684,6 @@ endef else # !SYSTEM_POPPLER define gb_LinkTarget__use_poppler -$(call gb_LinkTarget_use_external,$(1),jpeg) $(call gb_LinkTarget_use_external_project,$(1),poppler,full) $(call gb_LinkTarget_set_include,$(1),\ @@ -2700,6 +2699,8 @@ $(call gb_LinkTarget_add_libs,$(1),\ $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \ ) +$(call gb_LinkTarget_use_external,$(1),jpeg) + ifeq ($(OS),MACOSX) $(call gb_LinkTarget_add_libs,$(1),\ -lobjc \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/unx
vcl/unx/gtk/a11y/atklistener.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 1e98bd4b6f65f7e098879852dd9d9e41c224b83e Author: Tamás Zolnai Date: Thu Nov 3 17:22:12 2016 + tdf#93825: Missing accessibility events when selecting/deselecting cells Change-Id: I407f585354e78fb47a76561455ac67bb567c2771 (cherry picked from commit 2a818a0aafac218ca09bb079d7f2cf0879385e4a) Reviewed-on: https://gerrit.libreoffice.org/30541 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx index 3e6e169..0b6c739 100644 --- a/vcl/unx/gtk/a11y/atklistener.cxx +++ b/vcl/unx/gtk/a11y/atklistener.cxx @@ -557,6 +557,9 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven break; case accessibility::AccessibleEventId::SELECTION_CHANGED: +case accessibility::AccessibleEventId::SELECTION_CHANGED_ADD: +case accessibility::AccessibleEventId::SELECTION_CHANGED_REMOVE: +case accessibility::AccessibleEventId::SELECTION_CHANGED_WITHIN: g_signal_emit_by_name( G_OBJECT( atk_obj ), "selection_changed"); break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/frmtool.cxx | 16 1 file changed, 4 insertions(+), 12 deletions(-) New commits: commit 5d9d0f3c979732ade57b9c4c4960dd030ffdc9f9 Author: Justin Luth Date: Wed Nov 2 15:15:55 2016 +0300 there is a function for that: CalcLineSpace(xx, bEvenIfNoLine) Change-Id: Ideeb031f20611bd9d2a01343bc75e1d0510ad6e9 Reviewed-on: https://gerrit.libreoffice.org/30513 Reviewed-by: Justin Luth Tested-by: Justin Luth diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index a3635bc..5149cb6 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1961,36 +1961,28 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const void SwBorderAttrs::CalcTopLine_() { -m_nTopLine = (m_bBorderDist && !m_rBox.GetTop()) -? m_rBox.GetDistance (SvxBoxItemLine::TOP) -: m_rBox.CalcLineSpace(SvxBoxItemLine::TOP); +m_nTopLine = m_rBox.CalcLineSpace( SvxBoxItemLine::TOP, /*bEvenIfNoLine*/true ); m_nTopLine = m_nTopLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::TOP); m_bTopLine = false; } void SwBorderAttrs::CalcBottomLine_() { -m_nBottomLine = (m_bBorderDist && !m_rBox.GetBottom()) -? m_rBox.GetDistance (SvxBoxItemLine::BOTTOM) -: m_rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); +m_nBottomLine = m_rBox.CalcLineSpace( SvxBoxItemLine::BOTTOM, true ); m_nBottomLine = m_nBottomLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM); m_bBottomLine = false; } void SwBorderAttrs::CalcLeftLine_() { -m_nLeftLine = (m_bBorderDist && !m_rBox.GetLeft()) -? m_rBox.GetDistance (SvxBoxItemLine::LEFT) -: m_rBox.CalcLineSpace(SvxBoxItemLine::LEFT); +m_nLeftLine = m_rBox.CalcLineSpace( SvxBoxItemLine::LEFT, true ); m_nLeftLine = m_nLeftLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT); m_bLeftLine = false; } void SwBorderAttrs::CalcRightLine_() { -m_nRightLine = (m_bBorderDist && !m_rBox.GetRight()) -? m_rBox.GetDistance (SvxBoxItemLine::RIGHT) -: m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT); +m_nRightLine = m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT, true ); m_nRightLine = m_nRightLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::RIGHT); m_bRightLine = false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - svx/source sw/qa
svx/source/items/pageitem.cxx |2 +- sw/qa/extras/uiwriter/uiwriter.cxx | 22 ++ 2 files changed, 23 insertions(+), 1 deletion(-) New commits: commit 219b16cffdd1661886fa1e00d3503c42b270a825 Author: Miklos Vajna Date: Thu Nov 3 12:32:03 2016 +0100 svx: add missing ~CONVERT_TWIPS mask in SvxPageItem::PutValue() With this, it's possible to use AttributePage.* keys in macros. (cherry picked from commit a30f969432a451ade87b93e3077836a849b8f11b) Change-Id: I3f0b1ea8fb6274e7c18511c2e80774205206a2ba diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index c6de545..d553c25 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -177,7 +177,7 @@ bool SvxPageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool SvxPageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { -switch( nMemberId ) +switch( nMemberId & ~CONVERT_TWIPS ) { case MID_PAGE_NUMTYPE: { diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index f2c4263..531d15e 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -91,6 +91,7 @@ #include #include #include +#include static const char* DATA_DIRECTORY = "/sw/qa/extras/uiwriter/data/"; @@ -196,6 +197,7 @@ public: void testRedlineViewAuthor(); void testRedlineTimestamp(); void testCursorWindows(); +void testLandscape(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -294,6 +296,7 @@ public: CPPUNIT_TEST(testRedlineViewAuthor); CPPUNIT_TEST(testRedlineTimestamp); CPPUNIT_TEST(testCursorWindows); +CPPUNIT_TEST(testLandscape); CPPUNIT_TEST_SUITE_END(); private: @@ -3442,6 +3445,25 @@ void SwUiWriterTest::testCursorWindows() CPPUNIT_ASSERT_EQUAL(aText.getLength(), pShellCursor2->Start()->nContent.GetIndex()); } +void SwUiWriterTest::testLandscape() +{ +// Set page orientation to landscape. +SwDoc* pDoc = createDoc(); +uno::Sequence aPropertyValues = +{ +comphelper::makePropertyValue("AttributePage.Landscape", true), +}; +lcl_dispatchCommand(mxComponent, ".uno:AttributePage", aPropertyValues); +Scheduler::ProcessEventsToIdle(); + +// Assert that the document model was modified. +SwDocShell* pDocShell = pDoc->GetDocShell(); +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); +size_t nPageDesc = pWrtShell->GetCurPageDesc(); +// This failed, page was still portrait. +CPPUNIT_ASSERT(pWrtShell->GetPageDesc(nPageDesc).GetLandscape()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js | 36 +++ 1 file changed, 32 insertions(+), 4 deletions(-) New commits: commit f96ef2c4f3bf9951eca0104a1d036db25688ca12 Author: Andras Timar Date: Thu Nov 3 19:40:27 2016 +0100 loleaflet: page orientation in Writer's Format menu diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index c44f6cd..b0c70dc 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -120,10 +120,14 @@ L.Control.Menubar = L.Control.extend({ {name: _('Continue previous numbering'), type: 'unocommand', uno: '.uno:ContinueNumbering'}]}, {name: _('Clear direct formatting'), type: 'unocommand', uno: '.uno:ResetAttributes'}, {name: _('Page'), type: 'menu', menu: [ - {name: 'A4', type: 'unocommand', uno: '.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21000"},"AttributePageSize.Height":{"type":"long", "value": "29700"}}'}, - {name: 'A5', type: 'unocommand', uno: '.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "14800"},"AttributePageSize.Height":{"type":"long", "value": "21000"}}'}, - {name: 'Letter', type: 'unocommand', uno: '.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21590"},"AttributePageSize.Height":{"type":"long", "value": "27940"}}'}, - {name: 'Legal', type: 'unocommand', uno: '.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21590"},"AttributePageSize.Height":{"type":"long", "value": "35560"}}'}]} + {name: 'A4, ' + _('Portrait'), type: 'action', id: 'a4portrait'}, + {name: 'A4, ' + _('Landscape'), type: 'action', id: 'a4landscape'}, + {name: 'A5, ' + _('Portrait'), type: 'action', id: 'a5portrait'}, + {name: 'A5, ' + _('Landscape'), type: 'action', id: 'a5landscape'}, + {name: 'Letter, ' + _('Portrait'), type: 'action', id: 'letterportrait'}, + {name: 'Letter, ' + _('Landscape'), type: 'action', id: 'letterlandscape'}, + {name: 'Legal, ' + _('Portrait'), type: 'action', id: 'legalportrait'}, + {name: 'Legal, ' + _('Landscape'), type: 'action', id: 'legallandscape'}]} ]}, {name: _('Tables'), type: 'menu', menu: [{name: _('Insert'), type: 'menu', menu: [{name: _('Rows before'), type: 'unocommand', uno: '.uno:InsertRowsBefore'}, {name: _('Rows after'), type: 'unocommand', uno: '.uno:InsertRowsAfter'}, @@ -404,6 +408,30 @@ L.Control.Menubar = L.Control.extend({ map.WOPIPostMessage('rev-history'); } else if (id === 'repair') { map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); + } else if (id === 'a4portrait') { + map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "21000"},"AttributePageSize.Height":{"type":"long", "value": "29700"}}'); + map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "false"}}'); + } else if (id === 'a4landscape') { + map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Height":{"type":"long", "value": "21000"},"AttributePageSize.Width":{"type":"long", "value": "29700"}}'); + map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "true"}}'); + } else if (id === 'a5portrait') { + map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Width":{"type":"long", "value": "14800"},"AttributePageSize.Height":{"type":"long", "value": "21000"}}'); + map.sendUnoCommand('.uno:AttributePage {"AttributePage.Landscape":{"type":"boolean", "value": "false"}}'); + } else if (id === 'a5landscape') { + map.sendUnoCommand('.uno:AttributePageSize {"AttributePageSize.Height":{"type":"long", "value": "14800"},"AttributePageSize.Width":{"type":"long", "value": "21000"}}'); + map.sendUnoCommand('.
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk/a11y/atklistener.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit 2a818a0aafac218ca09bb079d7f2cf0879385e4a Author: Tamás Zolnai Date: Thu Nov 3 17:22:12 2016 + tdf#93825: Missing accessibility events when selecting/deselecting cells Change-Id: I407f585354e78fb47a76561455ac67bb567c2771 diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx index e222466..9dfa668 100644 --- a/vcl/unx/gtk/a11y/atklistener.cxx +++ b/vcl/unx/gtk/a11y/atklistener.cxx @@ -563,6 +563,9 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven break; case accessibility::AccessibleEventId::SELECTION_CHANGED: +case accessibility::AccessibleEventId::SELECTION_CHANGED_ADD: +case accessibility::AccessibleEventId::SELECTION_CHANGED_REMOVE: +case accessibility::AccessibleEventId::SELECTION_CHANGED_WITHIN: g_signal_emit_by_name( G_OBJECT( atk_obj ), "selection_changed"); break; @@ -589,10 +592,6 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven break; } -case accessibility::AccessibleEventId::SELECTION_CHANGED_REMOVE: -/* unknown what to do with this */ -break; - default: SAL_WARN("vcl.gtk", "Unknown event notification: " << aEvent.EventId); break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry vcl/source
officecfg/registry/schema/org/openoffice/Office/Common.xcs |7 +++ vcl/source/gdi/sallayout.cxx |5 - 2 files changed, 11 insertions(+), 1 deletion(-) New commits: commit 6324efd70dfa8c6be84cba1fa29658e3373cbbe3 Author: Khaled Hosny Date: Thu Nov 3 19:21:01 2016 +0200 tdf#89870: Add config option for layout engine The env variable takes precedence. Change-Id: I273ec867725dd012b005d49fbfaa1dc27203c021 diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index e8a9fae..0e645ad 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -851,6 +851,13 @@ Contains settings for VCL. + + + Specifies which text layout engine should be use. Possible +values are ("old", "new"). + +new + Specifies if OpenGL rendering should be used in VCL backends diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 2e09aaf..ef9bbc0 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -34,6 +34,8 @@ #include +#include + #include #include @@ -770,7 +772,8 @@ bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph ) bool SalLayout::UseCommonLayout() { -static bool bUse = getenv("SAL_NO_COMMON_LAYOUT") == nullptr; +static bool bUse = (getenv("SAL_NO_COMMON_LAYOUT") == nullptr) && + (officecfg::Office::Common::VCL::TextLayoutEngine::get() == "new"); return bUse; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/new-vcl-scheduler' - vcl/README.scheduler
vcl/README.scheduler | 47 +-- 1 file changed, 45 insertions(+), 2 deletions(-) New commits: commit 58daed5d2c7f0f374e2bf11c547792380bc595e1 Author: Jan-Marek Glogowski Date: Thu Nov 3 17:32:10 2016 +0100 WIP: updated docs Change-Id: Id19f98303b8bef597bd62ac89cbadeaa15520db8 diff --git a/vcl/README.scheduler b/vcl/README.scheduler index b99fe8f..7556a9b 100644 --- a/vcl/README.scheduler +++ b/vcl/README.scheduler @@ -1,7 +1,9 @@ = Introduction = The VCL scheduler handles LOs primary event queue. -It is simple by design, currently just a single-linked list, and has the following behaviour: +It is simple by design, currently just a single-linked list. + +The scheduler has the following behaviour: B.1. Tasks are scheduled just priority based B.2. Implicitly cooperative AKA non-preemptive @@ -24,6 +26,47 @@ C.3. This is not an OS scheduler OS schedulers need to be "fair". There are complex approaches, like RCU, priority inversion, priority inheritance, etc. to fix C.1., but most aren't useable in userspace (there even is a userspace RCU library, FWIW). += Driving the scheduler AKA the system timer = + +Scheduling is done using a single system timer + + 1. There is just one system timer, which drives LO event loop + 2. The timer has to run in the main window thread + 3. Messages are processed in order, so there is no real need for calling SendMessageW instead of PostMessageW + 4. LO event loop is supposed to be processed in the main window thread with the Solar mutex acquired + 5. The system timer is a single-shot timer + + += Locking (mp-sc) = + +Locking is implemented for multiple producers and a single consumer. + +While the consumer can process any task in the list, a producer is just allowed to append a task (like a queue). + +The scheduler is implicitly deinitialized, when VCL start deinitialization starts setting ImplSVData::mbDeInit to true. +At this point no more tasks can be scheduled. + +The scheduler have to handle locking for the following situations: + + 1. when changing the last element +1.1 when adding an element +1.2 when removing the last element + 2. when changing the list of freed scheduler objects + 3. when invoking a task +3.1 prevent dispose of Scheduler while invoked +3.2 prevent detaching ImplSchedulerData from the Scheduler object + +Stop is handled by invalidating (nullptr) the ImplSchedulerData::mpScheduler, but keeping the Scheduler::mpSchedulerData pointer valid. +The scheduler must always only run in the main thread. + + += Lifecycle / thread-safety of Scheduler-based objects = + +A scheduler object it thread-safe in the way, that it can be associated to any thread and any thread is free to call any functions on it. The owner must guarantee that the Invoke() function can be called, while the Scheduler object exists / is not disposed. + +The Dispose() function should be called before the object destruction or the destruction of any prerequisites of Invoke(). It'll block until the object can be freed securely, which means it is currently not invoked. Calls done on the object after Dispose() will do nothing. + + = Anti-pattern: Dependencies via (fine grained) priorities = "Idle 1" should run before "Idle 2", therefore give "Idle 1" a higher priority then "Idle 2". @@ -57,7 +100,7 @@ The downside of this approach: Insert / Start / Reschedule(for "auto" tasks) now Currently Application::Reschedule() processes a single event or "all" events, with "all" defined as "100" events in most backends. This already is "ignored" by the KDE4 backend, as Qt defines its ProcessPendingEvents() as always processing all pending events (there are ways to skip event classes, but no easy but one hard way to process just a single event). -== Convert Scheduler from single-linked list to queue == +== Convert Scheduler from single-linked list to a kind of "queue" == Keep a pointer to the last list element to speed up adding new events. This is a prerequisite to implement I.2 of the "Thread-safe scheduler". ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/new-vcl-scheduler' - 297 commits - accessibility/inc accessibility/source avmedia/source basctl/source basic/source chart2/source comphelper/source comp
Rebased ref, commits from common ancestor: commit 4d170198eaba05448bf5db47d4e07e2bba853069 Author: Jan-Marek Glogowski Date: Wed Nov 2 12:33:51 2016 +0100 Temporary workaround for AppIcon recursion @quikee Change-Id: I6d39d719ad0afb593fec15c9213cc5906c711cbc diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 9f3f6f6..65a1d85 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -250,6 +250,7 @@ static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXScreen sal_uInt16 nIcon, sal_uInt16 iconSize, Pixmap& icon_pixmap, Pixmap& icon_mask, NetWmIconData& netwm_icon) { +return true; if( ! ImplGetResMgr() ) return false; commit 60c0ae120dc7b77e6c73a74337ed0bafa53790e3 Author: Jan-Marek Glogowski Date: Wed Nov 2 16:47:29 2016 +0100 Add VCL AutoTimer::Stop() test Ensure we can stop a timer inside Invoke(). Change-Id: I6162b32b8d1cab8a017abc112feb4b31a9600d17 diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx index 8fe634d..fe171db 100644 --- a/vcl/qa/cppunit/timer.cxx +++ b/vcl/qa/cppunit/timer.cxx @@ -64,6 +64,7 @@ public: void testAutoTimer(); void testMultiAutoTimers(); #endif +void testAutoTimerStop(); void testRecursiveTimer(); void testSlowTimerCallback(); void testInvokedDisposed(); @@ -79,6 +80,7 @@ public: CPPUNIT_TEST(testAutoTimer); CPPUNIT_TEST(testMultiAutoTimers); #endif +CPPUNIT_TEST(testAutoTimerStop); CPPUNIT_TEST(testRecursiveTimer); CPPUNIT_TEST(testSlowTimerCallback); CPPUNIT_TEST(testInvokedDisposed); @@ -181,17 +183,23 @@ void TimerTest::testDurations() class AutoTimerCount : public AutoTimer { sal_Int32 &mrCount; +const sal_Int32 mnMaxCount; + public: -AutoTimerCount( sal_uLong nMS, sal_Int32 &rCount ) : -AutoTimer(), mrCount( rCount ) +AutoTimerCount( sal_uLong nMS, sal_Int32 &rCount, +const sal_Int32 nMaxCount = -1 ) +: AutoTimer(), mrCount( rCount ), mnMaxCount( nMaxCount ) { SetTimeout( nMS ); Start(); mrCount = 0; } + virtual void Invoke() override { -mrCount++; +++mrCount; +if ( mrCount == mnMaxCount ) +Stop(); } }; @@ -297,6 +305,17 @@ void TimerTest::testMultiAutoTimers() } #endif // TEST_TIMERPRECISION +void TimerTest::testAutoTimerStop() +{ +sal_Int32 nProcessCount = 0, nTimerCount = 0; +const sal_Int32 nMaxCount = 100; +AutoTimerCount aAutoTimer( 0, nTimerCount, nMaxCount ); +while ( Scheduler::ProcessTaskScheduling( IdleRunPolicy::IDLE_VIA_LOOP ) ) +++nProcessCount; +CPPUNIT_ASSERT_EQUAL( nProcessCount, nMaxCount ); +CPPUNIT_ASSERT_EQUAL( nTimerCount, nMaxCount ); +} + class YieldTimer : public Timer { commit 4ab482dfb0492b9b76824d9c505937e1d803c269 Author: Jan-Marek Glogowski Date: Wed Nov 2 16:43:02 2016 +0100 A sensible timer handling for Calc input There is no need to destroy and recreate the timer object. Simply stop and start the timer as required. Change-Id: I2885fef8bdb90c379dc2e9b9caf986d250face5c diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index e0712c4..47585b9 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -644,6 +644,10 @@ ScInputHandler::ScInputHandler() pActiveViewSh = nullptr; // Bindings (only still used for Invalidate) are retrieved if needed on demand + +pDelayTimer = new Timer( "ScInputHandlerDelay timer" ); +pDelayTimer->SetTimeout( 500 ); // 500 ms delay +pDelayTimer->SetTimeoutHdl( LINK( this, ScInputHandler, DelayTimer ) ); } ScInputHandler::~ScInputHandler() @@ -3714,36 +3718,23 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, { if ( !pInputWin->IsEnabled()) { +pDelayTimer->Stop(); pInputWin->Enable(); -if(pDelayTimer ) -{ -DELETEZ( pDelayTimer ); -} } } else if(pScMod->IsRefDialogOpen()) { // Because every document has its own InputWin, // we should start Timer again, because the input line may // still be active -if ( !pDelayTimer ) -{ -pDelayTimer = new Timer("Restart ScInputHandlerDelay timer"); -pDelayTimer->SetTimeout( 500 ); // 500 ms delay -pDelayTimer->SetTimeoutHdl( LINK( this, ScInputHandler, DelayTimer ) ); +if ( !pDelayTimer->IsActive() ) pDelayTimer->Start(); -} } }
minutes of ESC call ...
* Present: + Norbert, Sophie, Eike, Heiko, Kendy, JanI, Miklos, Olivier, Stephan, Xisco, Michael M, Thorsten, Jan-Marek, Bubli, Michael S, Lionel * Completed Action Items: + create a meta-bug for idle handling issues (Michael) [ more bugs going there, reviewed branch too - have concerns about the scheduler changes ] + provide ssh key for access to vm174 (Heiko) access given and tested (janI) + Sent Heiko a script to process needUXEval bugs (Xisco) * Pending Action Items: + dig out tooling on license verification for JanI (Michael) + poke at MSDN licenses (Michael) [ still not a sausage of a response ] + tweak Xisco's script into some UX form (Heiko) [ AI: send JanI ask for what output should look like (Heiko) AI: create secript for Heiko (JanI) ] * Release Engineering update (JanI) + sadly no Cloph. + 5.2.3 RC3 created + announced today. + 5.1.6 - any retrospectives ? + 5.2.4 RC1 status + 5.3.0 Beta1 & branch - Nov 21st + Android & iOS Remote (Cloph) * Documentation (Olivier) + Investigating bubli's patches for screenshots in helpcontents + should help simplify the process of updating screenshots. + couple of patches need approving - bottom of the list in gerrit + in there for two months needing review since Brno. https://gerrit.libreoffice.org/#/c/28513/ waiting for bubli to merge (janI) https://gerrit.libreoffice.org/#/c/28499/ waiting for bubli to merge (janI) + Discussions with UX on help menu entries + Updated chapter for books. + new help entries with corrections on contents. + XHP JS progress ? (Kendy) + last week / Monday needed to report - nothing since. + will ping him (Olivier) * UX Update (Heiko) + needsUXEval 472 (+2) + Writer +1 + UI +1 + re-visit: how to put stats into the wiki. + keyword added: 'NEW': 2, 'RESOLVED_INVALID': 1 ('103616', '103579', '103399') + keyword removed: 'NEW': 1 + should we credit people ? + those who close bugs are the good guys (Kendy) + people who add keyword are often QA guys + list of tasks with some easy hacks is going to be up'ed to the wiki + will up-load in the next few days - will be a table in the wiki. + easy for people wanting a GSOC task. + OO custom shapes experts joins in order to improve gallery + progress with expanding custom shape palette. + would like a different way to design shapes too if possible. * Crashtest update (Caolan) + in another meeting, due to timezone change. + 1 import failure, 1 export failures + 24 coverity. * Ladies who FOSS, Berlin update (Heiko) + unfortunately, couldn't go - no backup childcare (Bubli) + three participants assigned to LibreOffice, one cancelled + 5 projects there eg. Nextcloud, total 20-30 people (Heiko) + one interest, another one with issues - both running 4.2 (Ubuntu repo) + an old Ubuntu PPA repository ... can we do something ? + hard to remove old repos, and add new ones + AI: thoughts on that (Bjoern) + showed how to download/run nighlty build + did an intro to notebookbar hacking - fun. + would take the whole day to compile the code. + we had dev machines from Cloph for that (Bubli) * Hackfests (Bjoern) + next venues / suggestions + Hackfest Turin, Italy (janI) + LibreItalia conference is saturday this weekend In the afternoon, there will be a presentation for developers followed by a hackfest. Invited by LibreItalia + According to Marina, 25 people will participate + 33c3 CfP open: https://events.ccc.de/2016/09/01/call-for-participation-33rd-chaos-communication-congress-en/ (Bjoern) + FSFE will be there, we can meet up with them. + opportunity to do workshops there + poke Bjoern if you want to show up. + FOSDEM - confirmed dev-room (Michael) + CfP going out at some stage. + collect talks nearer the event. * Mentoring / easyhack update (janI) + legend: contributors are not-yet-committers, numbers in () are +/- compared to last week + openhub statistics based on analysis from 2016-09-28 totals: 1573(0) people did 440976(0) commits in 8110794(0) lines of code 12 month: 282(0) people did 16464(0) commits + gerrit/git statistics committer open, reviews, merged, abandoned, git_commits 1year 85(6) 17523(5) 8146(40)644(1) 16173(-30561) 3month 85(6)3951(-120) 1972(-33) 132(0) 3752(-7353) 1month 81(6)1396(-5) 786(6) 38(-7) 1499(-2380) 1week 36(-9)347(-41)150(-64) 6(-7) 283(-121) contrib
[Libreoffice-commits] core.git: RepositoryExternal.mk
RepositoryExternal.mk |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 43532a0944b0ee4727ea2ae480e54687e41d9201 Author: Michael Stahl Date: Thu Nov 3 15:58:08 2016 +0100 RepositoryExternal.mk: fix poppler linking on Ubuntu need to link poppler static library *before* jpeg Change-Id: I0fd2abc12c93432715a02a3a567349abda4f990b diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index b3fbeba..e4f592d 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -2771,7 +2771,6 @@ endef else # !SYSTEM_POPPLER define gb_LinkTarget__use_poppler -$(call gb_LinkTarget_use_external,$(1),jpeg) $(call gb_LinkTarget_use_external_project,$(1),poppler,full) $(call gb_LinkTarget_set_include,$(1),\ @@ -2787,6 +2786,8 @@ $(call gb_LinkTarget_add_libs,$(1),\ $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \ ) +$(call gb_LinkTarget_use_external,$(1),jpeg) + ifeq ($(OS),MACOSX) $(call gb_LinkTarget_add_libs,$(1),\ -lobjc \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Add include in Visual Basic file.
> > The new file is testAsserts.vb so I tried : include testAsserts.vb. Did you google that, I can see there are solutions, but do not have knowledge in this field. > > > I'm new to the project and I'm not sure if it's the good place to ask for my > question. If it's not the good place, I'm sorry for the trouble and I would > be happy that you tell me the appropriate place to ask. You are asking in the right place, and I am sure someone has some good answers, if not then I will dig a bit. rgds jan I. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: A proposal for standardizing TSV files
Hi Piotr, On Thursday, 2016-11-03 08:08:23 -0400, Piotr Mitros wrote: > I do a fair bit of work where I move data between LibreOffice, MySQL, > Vertica, Google Docs, Hadoop, Python, and a few other systems. The > formatting of TSV files is ad-hoc. Each system has little differences in > how strings are escaped, and similar. In addition, there is no way to > preserve metadata. > > I drafted a modest proposed spec for standardizing TSV files by > standardizing types, and adding metadata, and was hoping to solicit > feedback on that proposal: > > http://www.tsvx.org/ It seems to me you're attempting to reinvent a wheel. I suggest you take a look at https://www.w3.org/standards/techs/csv and maybe https://www.w3.org/community/csvw/ Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/ Care about Free Software, support the FSFE https://fsfe.org/support/?erack signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: svx/source sw/qa
svx/source/items/pageitem.cxx |2 +- sw/qa/extras/uiwriter/uiwriter.cxx | 22 ++ 2 files changed, 23 insertions(+), 1 deletion(-) New commits: commit a30f969432a451ade87b93e3077836a849b8f11b Author: Miklos Vajna Date: Thu Nov 3 12:32:03 2016 +0100 svx: add missing ~CONVERT_TWIPS mask in SvxPageItem::PutValue() With this, it's possible to use AttributePage.* keys in macros. Change-Id: I3f0b1ea8fb6274e7c18511c2e80774205206a2ba diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 7371ef1..53c01c1 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -180,7 +180,7 @@ bool SvxPageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool SvxPageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { -switch( nMemberId ) +switch( nMemberId & ~CONVERT_TWIPS ) { case MID_PAGE_NUMTYPE: { diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index b37a6c4..e58093f 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -94,6 +94,7 @@ #include #include #include +#include #include static const char* DATA_DIRECTORY = "/sw/qa/extras/uiwriter/data/"; @@ -211,6 +212,7 @@ public: void testTdf78727(); void testRedlineTimestamp(); void testCursorWindows(); +void testLandscape(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -320,6 +322,7 @@ public: CPPUNIT_TEST(testTdf78727); CPPUNIT_TEST(testRedlineTimestamp); CPPUNIT_TEST(testCursorWindows); +CPPUNIT_TEST(testLandscape); CPPUNIT_TEST_SUITE_END(); private: @@ -4027,6 +4030,25 @@ void SwUiWriterTest::testCursorWindows() CPPUNIT_ASSERT_EQUAL(aText.getLength(), pShellCursor2->Start()->nContent.GetIndex()); } +void SwUiWriterTest::testLandscape() +{ +// Set page orientation to landscape. +SwDoc* pDoc = createDoc(); +uno::Sequence aPropertyValues = +{ +comphelper::makePropertyValue("AttributePage.Landscape", true), +}; +lcl_dispatchCommand(mxComponent, ".uno:AttributePage", aPropertyValues); +Scheduler::ProcessEventsToIdle(); + +// Assert that the document model was modified. +SwDocShell* pDocShell = pDoc->GetDocShell(); +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); +size_t nPageDesc = pWrtShell->GetCurPageDesc(); +// This failed, page was still portrait. +CPPUNIT_ASSERT(pWrtShell->GetPageDesc(nPageDesc).GetLandscape()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Add include in Visual Basic file.
Hi, I'm working on this issue https://bugs.documentfoundation.org/show_bug.cgi?id=84098 and the goals is do remove the duplication in specific visual basic files. I did remove those duplications in the file and create a new file to add the function that was in the duplication. After that I did try to include the new file in the file that I remove the duplication. This is where I got the problem. Like I'm new to VB I don't know where the problem come. Is it the way I include the file or is it just impossible to include file in VB. The new file is testAsserts.vb so I tried : include testAsserts.vb. I'm new to the project and I'm not sure if it's the good place to ask for my question. If it's not the good place, I'm sorry for the trouble and I would be happy that you tell me the appropriate place to ask. Thank you -- *Marc Antoine Dumont* Étudiant au baccalauréat en génie logiciel ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: 3 commits - svx/source svx/uiconfig
svx/source/dialog/SafeModeDialog.cxx |5 +++-- svx/uiconfig/ui/safemodedialog.ui|6 -- 2 files changed, 7 insertions(+), 4 deletions(-) New commits: commit b75468d7439e66b70d2a1ab2e3f77f5c46af7be3 Author: Samuel Mehrbrodt Date: Thu Nov 3 14:24:09 2016 +0100 SafeModeDialog: Adapt label to reality Change-Id: I649b1f1f9b8f5c50e69f2cd4228394cfa4d2974a diff --git a/svx/uiconfig/ui/safemodedialog.ui b/svx/uiconfig/ui/safemodedialog.ui index 91d2373..aa08341 100644 --- a/svx/uiconfig/ui/safemodedialog.ui +++ b/svx/uiconfig/ui/safemodedialog.ui @@ -299,7 +299,7 @@ The offered possible changes get more radical from top to bottom, so it is recom vertical -Reset user customizations (settings, user interface modifications, AutoCorrect, AutoText, etc.) +Reset settings and user interface modifications True True False commit 3d75d65526dd5515b781e0d587cfb8df702e320d Author: Samuel Mehrbrodt Date: Thu Nov 3 14:24:00 2016 +0100 Fix some comments Change-Id: Ie74eaead67620decf9c9b954be1d13a8e5f400c6 diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 6403154..0909470 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -205,7 +205,7 @@ bool SafeModeDialog::Close() void SafeModeDialog::applyChanges() { -/// Restore +// Restore if (mpRadioRestore->IsChecked()) { if (mpCBCheckProfilesafeConfig->IsChecked()) @@ -238,6 +238,7 @@ void SafeModeDialog::applyChanges() } } +// Deinstall if (mpRadioDeinstall->IsChecked()) { if (mpCBDeinstallUserExtensions->IsChecked()) @@ -269,7 +270,7 @@ void SafeModeDialog::applyChanges() } } -// Then restart +// finally, restart css::task::OfficeRestartManager::get(comphelper::getProcessComponentContext())->requestRestart( css::uno::Reference< css::task::XInteractionHandler >()); } commit 2569c33f4a46240c9339c7b08568cbf4f1f3bfea Author: Samuel Mehrbrodt Date: Thu Nov 3 12:21:37 2016 +0100 SafeModeDialog: Improve description Change-Id: I86f4a322f3d68caafcfe206e2d0f2164bc789bd8 diff --git a/svx/uiconfig/ui/safemodedialog.ui b/svx/uiconfig/ui/safemodedialog.ui index fd6577c..91d2373 100644 --- a/svx/uiconfig/ui/safemodedialog.ui +++ b/svx/uiconfig/ui/safemodedialog.ui @@ -72,7 +72,9 @@ True False -%PRODUCTNAME is now running in Safe Mode. You can make one or more of the following changes to return to a working state. +%PRODUCTNAME is now running in Safe Mode wich temporarily disables your configuration and extensions. + +You can make one or more of the following changes to return to a working state. The offered possible changes get more radical from top to bottom, so it is recommended to try them thoroughly one after the other. True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: solenv/Module_solenv.mk
solenv/Module_solenv.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5072e6667f9eaa3b172cdf69ce33cc224d12b174 Author: Tor Lillqvist Date: Thu Nov 3 10:56:36 2016 +0200 Disable gbuildtoide test on macOS, too Change-Id: I630fd447992ada459190acd1ee310bd2d38820b9 diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk index 4f29231..229ee58 100644 --- a/solenv/Module_solenv.mk +++ b/solenv/Module_solenv.mk @@ -24,11 +24,13 @@ endif ifneq ($(DISABLE_PYTHON),TRUE) ifneq ($(OS),WNT) # disable on Windows for now, causes gerrit/jenkins failures +ifneq ($(OS),MACOSX) # disable on macOS too, fails at least for me and would be pointless anyway surely $(eval $(call gb_Module_add_subsequentcheck_targets,solenv,\ CustomTarget_gbuildtesttools \ PythonTest_solenv_python \ )) endif endif +endif # vim: set shiftwidth=4 tabstop=4 noexpandtab: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: external/libzmf RepositoryExternal.mk
RepositoryExternal.mk |9 + external/libzmf/ExternalProject_libzmf.mk |2 ++ 2 files changed, 11 insertions(+) New commits: commit 5955e7bf5e4c8dcc13a7eee383dbc4d6dfcdab0f Author: David Tardon Date: Thu Nov 3 13:58:29 2016 +0100 update deps for libzmf Change-Id: I627b3037d7e2dcecfed496068abf697c3258480d diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index f93c819..b3fbeba 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -2665,6 +2665,8 @@ $(call gb_LinkTarget_add_libs,$(1),\ endef +gb_ExternalProject__use_png := + else # !SYSTEM_LIBPNG define gb_LinkTarget__use_png @@ -2679,6 +2681,13 @@ $(call gb_LinkTarget__use_zlib,$(1)) endef +define gb_ExternalProject__use_png +$(call gb_ExternalProject_use_static_libraries,$(1),\ + png \ +) + +endef + endif # !SYSTEM_LIBPNG diff --git a/external/libzmf/ExternalProject_libzmf.mk b/external/libzmf/ExternalProject_libzmf.mk index 87e6693..da720fb 100644 --- a/external/libzmf/ExternalProject_libzmf.mk +++ b/external/libzmf/ExternalProject_libzmf.mk @@ -18,7 +18,9 @@ $(eval $(call gb_ExternalProject_register_targets,libzmf,\ $(eval $(call gb_ExternalProject_use_externals,libzmf,\ boost_headers \ icu \ + png \ revenge \ + zlib \ )) $(call gb_ExternalProject_get_state_target,libzmf,build) : ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/qa xmlsecurity/source
xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx | 39 +- xmlsecurity/qa/unit/signing/signing.cxx |6 xmlsecurity/source/pdfio/pdfdocument.cxx |4 +- 3 files changed, 16 insertions(+), 33 deletions(-) New commits: commit a8aab44d75e4704327b4330b532883b59380b7d3 Author: Miklos Vajna Date: Thu Nov 3 11:43:59 2016 +0100 xmlsecurity PDF sign: enable unit tests on Windows Now that the mscrypto part of PDFDocument::ValidateSignature() is implemented it's possible to run these tests on Windows as well, provided the machine has at least one signing certificate installed. Also fix a race, where the workdir of the signing test was used by the pdfsigning test. Change-Id: I80bbfbb5dc4baa400f9a6b85961883a247b0f22b diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index 2f7ef57..49da58a 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -20,12 +20,10 @@ using namespace com::sun::star; -#if !defined _WIN32 namespace { const char* DATA_DIRECTORY = "/xmlsecurity/qa/unit/pdfsigning/data/"; } -#endif /// Testsuite for the PDF signing feature. class PDFSigningTest : public test::BootstrapFixture @@ -36,7 +34,7 @@ class PDFSigningTest : public test::BootstrapFixture * Sign rInURL once and save the result as rOutURL, asserting that rInURL * had nOriginalSignatureCount signatures. */ -void sign(const OUString& rInURL, const OUString& rOutURL, size_t nOriginalSignatureCount); +bool sign(const OUString& rInURL, const OUString& rOutURL, size_t nOriginalSignatureCount); /** * Read a pdf and make sure that it has the expected number of valid * signatures. @@ -84,7 +82,7 @@ void PDFSigningTest::setUp() // Set up cert8.db and key3.db in workdir/CppunitTest/ OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY); OUString aTargetDir = m_directories.getURLFromWorkdir( - "/CppunitTest/xmlsecurity_signing.test.user/"); + "/CppunitTest/xmlsecurity_pdfsigning.test.user/"); osl::File::copy(aSourceDir + "cert8.db", aTargetDir + "cert8.db"); osl::File::copy(aSourceDir + "key3.db", aTargetDir + "key3.db"); OUString aTargetPath; @@ -115,7 +113,7 @@ std::vector PDFSigningTest::verify(const OUString& rURL, s return aRet; } -void PDFSigningTest::sign(const OUString& rInURL, const OUString& rOutURL, size_t nOriginalSignatureCount) +bool PDFSigningTest::sign(const OUString& rInURL, const OUString& rOutURL, size_t nOriginalSignatureCount) { // Make sure that input has nOriginalSignatureCount signatures. uno::Reference xSEInitializer = xml::crypto::SEInitializer::create(mxComponentContext); @@ -134,8 +132,8 @@ void PDFSigningTest::sign(const OUString& rInURL, const OUString& rOutURL, size_ uno::Sequence> aCertificates = xSecurityEnvironment->getPersonalCertificates(); if (!aCertificates.hasElements()) { -// NSS failed to parse it's own profile. -return; +// NSS failed to parse it's own profile or Windows has no certificates installed. +return false; } CPPUNIT_ASSERT(aDocument.Sign(aCertificates[0], "test")); SvFileStream aOutStream(rOutURL, StreamMode::WRITE | StreamMode::TRUNC); @@ -144,41 +142,39 @@ void PDFSigningTest::sign(const OUString& rInURL, const OUString& rOutURL, size_ // This was nOriginalSignatureCount when PDFDocument::Sign() silently returned success, without doing anything. verify(rOutURL, nOriginalSignatureCount + 1); + +return true; } void PDFSigningTest::testPDFAdd() { -#ifndef _WIN32 OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY); OUString aInURL = aSourceDir + "no.pdf"; -OUString aTargetDir = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_signing.test.user/"); +OUString aTargetDir = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/"); OUString aOutURL = aTargetDir + "add.pdf"; sign(aInURL, aOutURL, 0); -#endif } void PDFSigningTest::testPDFAdd2() { -#ifndef _WIN32 // Sign. OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY); OUString aInURL = aSourceDir + "no.pdf"; -OUString aTargetDir = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_signing.test.user/"); +OUString aTargetDir = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/"); OUString aOutURL = aTargetDir + "add.pdf"; -sign(aInURL, aOutURL, 0); +bool bHadCertificates = sign(aInURL, aOutURL, 0); // Sign again. aInURL = aTargetDir + "add.pdf"; aOutURL = aTargetDir + "add2.pdf"; // This failed with "second range end is not the end of the file" for the
[Libreoffice-commits] core.git: starmath/source
starmath/source/unomodel.cxx | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit 1fa19c73859804ca42e479e50eb7dbcb94f9c5e9 Author: Stephan Bergmann Date: Thu Nov 3 12:28:46 2016 +0100 Use a single method of converting between points and 100th mm in starmath The SmFormat ctor (starmath/source/format.cxx) uses SmPtsTo100th_mm(12) to initialize aBaseSize, resulting in a height of 422 100th mm. Getting that value (and writing it out to a file) through SmModel::_getPropertyValues mapped back to 12 point, but in turn setting that value (as read from a file) through SmModel::_setPropertyValues resulted in a height of 423 100th mm. That, in turn, caused SmDocShell::GetSize (starmath/source/document.cxx) to compute diverging sizes, so e.g. clicking into an OLE-embedded formula in a Writer document caused the Writer document to be marked as modified (as the embedded formula's size had changed). Change-Id: Ia90654aeaaf779690997b5c3bb868b193eaf46c6 diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index fdc6f51..63f5651 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -496,9 +496,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if(nVal < 1) throw IllegalArgumentException(); Size aSize = aFormat.GetBaseSize(); -nVal *= 20; -nVal = static_cast < sal_Int16 > ( convertTwipToMm100(nVal) ); -aSize.Height() = nVal; +aSize.Height() = SmPtsTo100th_mm(nVal); aFormat.SetBaseSize(aSize); // apply base size to fonts @@ -749,10 +747,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu case HANDLE_BASE_FONT_HEIGHT : { // Point! -sal_Int16 nVal = static_cast < sal_Int16 > (aFormat.GetBaseSize().Height()); -nVal = static_cast < sal_Int16 > (convertMm100ToTwip(nVal)); -nVal = (nVal + 10) / 20; -*pValue <<= nVal; +*pValue <<= sal_Int16( +SmRoundFraction( +Sm100th_mmToPts(aFormat.GetBaseSize().Height(; } break; case HANDLE_RELATIVE_FONT_HEIGHT_TEXT : ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: RepositoryExternal.mk
RepositoryExternal.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 8d1c80e2633b8a63050cdd81b7e089f27b996c0f Author: Michael Stahl Date: Thu Nov 3 13:23:45 2016 +0100 RepositoryExternal.mk: really fix jpeg build Change-Id: I1969db554d156e6af0975d03013ea4f7c10d839f diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 5dbde22..f93c819 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -459,12 +459,12 @@ $(call gb_LinkTarget_set_include,$(1),\ $$(INCLUDE) \ ) -endef - $(call gb_LinkTarget_use_static_libraries,$(1),\ jpeg \ ) +endef + define gb_ExternalProject__use_jpeg $(call gb_ExternalProject_use_static_libraries,$(1),jpeg) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source svx/uiconfig
svx/source/dialog/SafeModeDialog.cxx | 48 ++--- svx/source/dialog/SafeModeDialog.hxx |2 + svx/uiconfig/ui/safemodedialog.ui| 57 +-- 3 files changed, 80 insertions(+), 27 deletions(-) New commits: commit 16881e76fe0b318c7498f28ebfc81d65825d4830 Author: Samuel Mehrbrodt Date: Thu Nov 3 12:11:12 2016 +0100 SafeModeDialog: Better grouping of options Disable/Deinstall extensions are mutually exclusive, so group them appropriately Change-Id: I6dc9c53ef4c18103c7521d494a769d522b0412dd Reviewed-on: https://gerrit.libreoffice.org/30522 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 1a39d38..6403154 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -42,10 +42,12 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) mpBoxRestore(), mpBoxConfigure(), +mpBoxDeinstall(), mpBoxReset(), mpRadioRestore(), mpRadioConfigure(), +mpRadioDeinstall(), mpRadioReset(), mpCBCheckProfilesafeConfig(), @@ -65,10 +67,12 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) get(mpBoxRestore, "group_restore"); get(mpBoxConfigure, "group_configure"); +get(mpBoxDeinstall, "group_deinstall"); get(mpBoxReset, "group_reset"); get(mpRadioRestore, "radio_restore"); get(mpRadioConfigure, "radio_configure"); +get(mpRadioDeinstall, "radio_deinstall"); get(mpRadioReset, "radio_reset"); get(mpCBCheckProfilesafeConfig, "check_profilesafe_config"); @@ -109,6 +113,7 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) // Check the first radio button and disable the other parts mpRadioRestore->Check(); mpBoxConfigure->Disable(); +mpBoxDeinstall->Disable(); mpBoxReset->Disable(); // Set URL for help button (module=safemode) @@ -128,10 +133,12 @@ void SafeModeDialog::dispose() { mpRadioRestore.clear(); mpRadioConfigure.clear(); +mpRadioDeinstall.clear(); mpRadioReset.clear(); mpBoxRestore.clear(); mpBoxConfigure.clear(); +mpBoxDeinstall.clear(); mpBoxReset.clear(); mpBtnContinue.clear(); @@ -225,6 +232,14 @@ void SafeModeDialog::applyChanges() comphelper::BackupFileHelper::tryDisableAllExtensions(); } +if (mpCBDisableHWAcceleration->IsChecked()) +{ +comphelper::BackupFileHelper::tryDisableHWAcceleration(); +} +} + +if (mpRadioDeinstall->IsChecked()) +{ if (mpCBDeinstallUserExtensions->IsChecked()) { // Deinstall all User Extensions (installed for User only) @@ -236,11 +251,6 @@ void SafeModeDialog::applyChanges() // Deinstall all Extensions (user|shared|bundled) comphelper::BackupFileHelper::tryDeinstallAllExtensions(); } - -if (mpCBDisableHWAcceleration->IsChecked()) -{ -comphelper::BackupFileHelper::tryDisableHWAcceleration(); -} } // Reset @@ -266,7 +276,18 @@ void SafeModeDialog::applyChanges() IMPL_LINK(SafeModeDialog, RadioBtnHdl, Button*, pBtn, void) { -if (pBtn == mpRadioConfigure.get()) +if (pBtn == mpRadioRestore.get()) +{ +// Enable the currently selected box +mpBoxRestore->Enable(); +// Make sure only possible choices are active +enableDisableWidgets(); +// Disable the unselected boxes +mpBoxReset->Disable(); +mpBoxConfigure->Disable(); +mpBoxDeinstall->Disable(); +} +else if (pBtn == mpRadioConfigure.get()) { // Enable the currently selected box mpBoxConfigure->Enable(); @@ -275,27 +296,30 @@ IMPL_LINK(SafeModeDialog, RadioBtnHdl, Button*, pBtn, void) // Disable the unselected boxes mpBoxRestore->Disable(); mpBoxReset->Disable(); +mpBoxDeinstall->Disable(); } -else if (pBtn == mpRadioReset.get()) +else if (pBtn == mpRadioDeinstall.get()) { // Enable the currently selected box -mpBoxReset->Enable(); +mpBoxDeinstall->Enable(); // Make sure only possible choices are active enableDisableWidgets(); // Disable the unselected boxes -mpBoxConfigure->Disable(); mpBoxRestore->Disable(); +mpBoxConfigure->Disable(); +mpBoxReset->Disable(); } -else if (pBtn == mpRadioRestore.get()) +else if (pBtn == mpRadioReset.get()) { // Enable the currently selected box -mpBoxRestore->Enable(); +mpBoxReset->Enable(); // Make sure only possible choices are active enableDisableWidgets(); // Disable the unselected boxes -mpBoxReset->Disable(); mpBoxConfigure->Disable(); +mpBoxRestore->Disable(); +m
[Libreoffice-commits] core.git: svx/uiconfig
svx/uiconfig/ui/safemodedialog.ui | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit da0a98fa6dcc11302ef8b1e04742c12d44baf54b Author: Samuel Mehrbrodt Date: Thu Nov 3 11:54:53 2016 +0100 SafeModeDialog: Improve labels Change-Id: If90b25e569a8feaa86e5c43da5966d5314cf0f14 Reviewed-on: https://gerrit.libreoffice.org/30521 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/svx/uiconfig/ui/safemodedialog.ui b/svx/uiconfig/ui/safemodedialog.ui index 43989aa..68b35ff 100644 --- a/svx/uiconfig/ui/safemodedialog.ui +++ b/svx/uiconfig/ui/safemodedialog.ui @@ -92,7 +92,7 @@ The offered possible changes get more radical from top to bottom, so it is recom vertical -Restore +Restore from backup True True False @@ -117,7 +117,7 @@ The offered possible changes get more radical from top to bottom, so it is recom vertical -Restore UserConfiguration to last known working state from backup +Restore user configuration to last known working state True True False @@ -132,7 +132,7 @@ The offered possible changes get more radical from top to bottom, so it is recom -Restore enable/disable State of installed User Extensions to last known working state +Restore enabled/disabled state of installed user extensions to last known working state True True False @@ -179,7 +179,7 @@ The offered possible changes get more radical from top to bottom, so it is recom vertical -Disable all User Extensions +Disable all user extensions True True False @@ -194,7 +194,7 @@ The offered possible changes get more radical from top to bottom, so it is recom -Deinstall all User Extensions +Deinstall all user extensions True True False @@ -209,7 +209,7 @@ The offered possible changes get more radical from top to bottom, so it is recom -Deinstall all Extensions (including shared and bundled) +Deinstall all extensions (including shared and bundled) True True False @@ -246,7 +246,7 @@ The offered possible changes get more radical from top to bottom, so it is recom -Reset +Reset to factory settings True True False @@ -270,7 +270,7 @@ The offered possible changes get more radical from top to bottom, so it is recom vertical -Reset User Customizations (Settings, User Interface modifications, AutoCorrect, AutoText, etc.) +Reset user customizations (settings, user interface modifications, AutoCorrect, AutoText, etc.) True True False @@ -285,7 +285,7 @@ The offered possible changes get more radical from top to bottom, so it is recom -Reset the whole User Profile to initial state after Installation +Reset the whole user profile True True False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/SafeModeDialog.cxx | 78 +-- svx/source/dialog/SafeModeDialog.hxx |1 2 files changed, 48 insertions(+), 31 deletions(-) New commits: commit 00e48a2ea00e973ae6e29950ca7c6846cfeabff4 Author: Samuel Mehrbrodt Date: Thu Nov 3 11:33:47 2016 +0100 SafeModeDialog: Fix enabling/disabling of widgets Change-Id: I7133b64f975fa8e68550d41056b689dfc18cf172 Reviewed-on: https://gerrit.libreoffice.org/30520 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 35b135b..1a39d38 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -106,37 +106,6 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) // Disable restart btn until some checkbox is active mpBtnRestart->Disable(); -if (!maBackupFileHelper.isPopPossible()) -{ -mpCBCheckProfilesafeConfig->Disable(); -} - -if (!maBackupFileHelper.isPopPossibleExtensionInfo()) -{ -mpCBCheckProfilesafeExtensions->Disable(); -} - -if (!comphelper::BackupFileHelper::isTryDisableAllExtensionsPossible()) -{ -mpCBDisableAllExtensions->Disable(); -} - -if (!comphelper::BackupFileHelper::isTryDeinstallUserExtensionsPossible()) -{ -mpCBDeinstallUserExtensions->Disable(); -} - -if (!comphelper::BackupFileHelper::isTryDeinstallAllExtensionsPossible()) -{ -mpCBDeinstallAllExtensions->Disable(); -} - -if (!comphelper::BackupFileHelper::isTryResetCustomizationsPossible()) -{ -mpCBResetCustomizations->Disable(); -} -// no disabe of mpCBResetWholeUserProfile, always possible (as last choice) - // Check the first radio button and disable the other parts mpRadioRestore->Check(); mpBoxConfigure->Disable(); @@ -185,6 +154,40 @@ void SafeModeDialog::dispose() Dialog::dispose(); } +void SafeModeDialog::enableDisableWidgets() +{ +if (!maBackupFileHelper.isPopPossible()) +{ +mpCBCheckProfilesafeConfig->Disable(); +} + +if (!maBackupFileHelper.isPopPossibleExtensionInfo()) +{ +mpCBCheckProfilesafeExtensions->Disable(); +} + +if (!comphelper::BackupFileHelper::isTryDisableAllExtensionsPossible()) +{ +mpCBDisableAllExtensions->Disable(); +} + +if (!comphelper::BackupFileHelper::isTryDeinstallUserExtensionsPossible()) +{ +mpCBDeinstallUserExtensions->Disable(); +} + +if (!comphelper::BackupFileHelper::isTryDeinstallAllExtensionsPossible()) +{ +mpCBDeinstallAllExtensions->Disable(); +} + +if (!comphelper::BackupFileHelper::isTryResetCustomizationsPossible()) +{ +mpCBResetCustomizations->Disable(); +} +// no disabe of mpCBResetWholeUserProfile, always possible (as last choice) +} + bool SafeModeDialog::Close() { // Remove the safe mode flag before exiting this dialog @@ -265,19 +268,32 @@ IMPL_LINK(SafeModeDialog, RadioBtnHdl, Button*, pBtn, void) { if (pBtn == mpRadioConfigure.get()) { +// Enable the currently selected box mpBoxConfigure->Enable(); +// Make sure only possible choices are active +enableDisableWidgets(); +// Disable the unselected boxes mpBoxRestore->Disable(); mpBoxReset->Disable(); + } else if (pBtn == mpRadioReset.get()) { +// Enable the currently selected box mpBoxReset->Enable(); +// Make sure only possible choices are active +enableDisableWidgets(); +// Disable the unselected boxes mpBoxConfigure->Disable(); mpBoxRestore->Disable(); } else if (pBtn == mpRadioRestore.get()) { +// Enable the currently selected box mpBoxRestore->Enable(); +// Make sure only possible choices are active +enableDisableWidgets(); +// Disable the unselected boxes mpBoxReset->Disable(); mpBoxConfigure->Disable(); } diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index 9bc5d91..692242c 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -61,6 +61,7 @@ private: // local BackupFileHelper for handling possible restores comphelper::BackupFileHelper maBackupFileHelper; +void enableDisableWidgets(); void applyChanges(); static void openWebBrowser(const OUString & sURL, const OUString &sTitle); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/inc framework/source include/framework
framework/inc/classes/resource.hrc |1 + framework/source/classes/resource.src |5 + framework/source/fwe/helper/titlehelper.cxx |8 include/framework/titlehelper.hxx |1 + 4 files changed, 15 insertions(+) New commits: commit 291d8d4f9460f8d5292cab2ef706fd8b501641b4 Author: Samuel Mehrbrodt Date: Thu Nov 3 09:26:02 2016 +0100 SafeMode: Add indicator to window title when in Safe Mode Change-Id: I1d8350315768093b4c4af1cd8b732602c5217edb Reviewed-on: https://gerrit.libreoffice.org/30518 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc index 49c051c..f3ad7e6 100644 --- a/framework/inc/classes/resource.hrc +++ b/framework/inc/classes/resource.hrc @@ -51,6 +51,7 @@ #define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24) #define STR_LANGSTATUS_HINT (RID_STR_START+25) #define STR_REMOTE_TITLE(RID_STR_START+26) +#define STR_SAFEMODE_TITLE (RID_STR_START+27) #define IMG_SAVEMODIFIED_SMALL (RID_IMAGE_START+0) #define IMG_SAVEMODIFIED_LARGE (RID_IMAGE_START+1) diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index dd5d877..a95149f 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -118,6 +118,11 @@ String STR_REMOTE_TITLE Text [ en-US ] = " (Remote)"; }; +String STR_SAFEMODE_TITLE +{ +Text [ en-US ] = " (Safe Mode)"; +}; + String STR_TOOLBAR_TITLE_ADDON { Text [ en-US ] = "Add-On %num%"; diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index cbd18f9..1e7e797 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -37,6 +37,7 @@ #include #include #include +#include namespace framework{ @@ -492,6 +493,7 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram impl_appendModuleName (sTitle); impl_appendDebugVersion (sTitle); #endif +impl_appendSafeMode (sTitle); // SYNCHRONIZED -> aLock.reset (); @@ -579,6 +581,12 @@ void TitleHelper::impl_appendDebugVersion (OUStringBuffer&) } #endif +void TitleHelper::impl_appendSafeMode (OUStringBuffer& sTitle) +{ +if (Application::IsSafeModeEnabled()) +sTitle.append(FwkResId (STR_SAFEMODE_TITLE)); +} + void TitleHelper::impl_startListeningForModel (const css::uno::Reference< css::frame::XModel >& xModel) { css::uno::Reference< css::document::XDocumentEventBroadcaster > xBroadcaster(xModel, css::uno::UNO_QUERY); diff --git a/include/framework/titlehelper.hxx b/include/framework/titlehelper.hxx index 48c05c9..5fe23b7 100644 --- a/include/framework/titlehelper.hxx +++ b/include/framework/titlehelper.hxx @@ -160,6 +160,7 @@ class FWE_DLLPUBLIC TitleHelper : private ::cppu::BaseMutex void impl_appendProductName (OUStringBuffer& sTitle); void impl_appendModuleName (OUStringBuffer& sTitle); void impl_appendDebugVersion (OUStringBuffer& sTitle); +void impl_appendSafeMode (OUStringBuffer& sTitle); void impl_setSubTitle (const css::uno::Reference< css::frame::XTitle >& xSubTitle); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: comphelper/source include/comphelper include/svx svx/AllLangResTarget_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk
comphelper/source/misc/backupfilehelper.cxx |5 + include/comphelper/backupfilehelper.hxx |3 include/comphelper/package/ZipPackageHelper.hxx | 57 include/svx/dialogs.hrc |6 + svx/AllLangResTarget_svx.mk |1 svx/UIConfig_svx.mk |1 svx/source/dialog/SafeMode.src | 17 svx/source/dialog/SafeModeDialog.cxx| 65 +- svx/source/dialog/SafeModeDialog.hxx|4 - svx/uiconfig/ui/profileexporteddialog.ui| 84 svx/uiconfig/ui/safemodedialog.ui | 40 +-- 11 files changed, 269 insertions(+), 14 deletions(-) New commits: commit e509c22863b5184421e710cf8ae81e2ddc961623 Author: Samuel Mehrbrodt Date: Wed Nov 2 10:26:39 2016 +0100 SafeModeDialog: Allow to create zip file from profile Change-Id: I4296d1cf5058be359ffed46745673cf26eba3375 Reviewed-on: https://gerrit.libreoffice.org/30479 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index de03b0b..6432010 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -2207,6 +2207,11 @@ namespace comphelper return maUserConfigBaseURL; } +const OUString& BackupFileHelper::getUserProfileWorkURL() +{ +return maUserConfigWorkURL; +} + /// helpers /// const rtl::OUString BackupFileHelper::getPackURL() diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx index 07cfb61..d11208a 100644 --- a/include/comphelper/backupfilehelper.hxx +++ b/include/comphelper/backupfilehelper.hxx @@ -182,6 +182,9 @@ namespace comphelper /** Return the profile url */ static const OUString& getUserProfileURL(); +/** Return the url of the backed up profile (when in safe mode) */ +static const OUString& getUserProfileWorkURL(); + private: // internal helper methods static const rtl::OUString getPackURL(); diff --git a/include/comphelper/package/ZipPackageHelper.hxx b/include/comphelper/package/ZipPackageHelper.hxx new file mode 100644 index 000..2cdd5db --- /dev/null +++ b/include/comphelper/package/ZipPackageHelper.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_COMPHELPER_PACKAGE_ZIPPACKAGEHELPER_HXX +#define INCLUDED_COMPHELPER_PACKAGE_ZIPPACKAGEHELPER_HXX + +#include +#include +#include +#include +#include + + +class ZipPackageHelper +{ +public: +ZipPackageHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, +const OUString& sPackageURL); + +void savePackage(); + +void addFile( const OUString& rSourceFile ) +throw( css::uno::Exception, std::exception ); + +void addStream( css::uno::Reference< css::io::XInputStream > const & xInput, +const OUString& aName ) throw( css::uno::Exception ); + +css::uno::Reference< css::uno::XInterface > addFolder( const OUString& rName ) +throw( css::uno::Exception, std::exception ); + +void addFolderWithContent( const OUString& rDirURL ); + +private: +css::uno::Reference< css::uno::XComponentContext > mxContext; +css::uno::Reference< css::container::XHierarchicalNameAccess > mxHNameAccess; +css::uno::Reference< css::lang::XSingleServiceFactory > mxFactory; +css::uno::Reference< css::uno::XInterface > mxRootFolder; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index aba0095..3ccea55 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -1080,8 +1080,12 @@ #define RID_SVXSTRARY_SPACING(RID_SVX_START + 1398) #define RID_SVXSTRARY_SAMECONTENT(RID_SVX_START + 1399) +// Strings for SafeModeDialog +#define RID_SVXSTR_SAFEMO
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/helper/xsecctl.cxx |2 -- xmlsecurity/source/helper/xsecctl.hxx | 13 - xmlsecurity/source/helper/xsecsign.cxx | 24 3 files changed, 39 deletions(-) New commits: commit 954f721ad59e52f039154cb01490e068cc0f0ce5 Author: Tor Lillqvist Date: Thu Nov 3 14:11:29 2016 +0200 Bin the XSecController::m_pErrorMessage field as it was never used It was only assigned to. Some follow-up simplification. Change-Id: I3b522064e946667d3a4c8fb82ee40bd0d44dd569 diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 92a26c4..d4467a9 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -63,7 +63,6 @@ XSecController::XSecController( const cssu::Reference& , m_bIsBlocking(false) , m_eStatusOfSecurityComponents(InitializationState::UNINITIALIZED) , m_bIsSAXEventKeeperSticky(false) -, m_pErrorMessage(nullptr) , m_nReservedSignatureId(0) , m_bVerifyCurrentSignature(false) { @@ -457,7 +456,6 @@ void XSecController::startMission( m_eStatusOfSecurityComponents = InitializationState::UNINITIALIZED; m_xSecurityContext = xSecurityContext; -m_pErrorMessage = nullptr; m_vInternalSignatureInformations.clear(); diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx index 86dbec0..a2dc326 100644 --- a/xmlsecurity/source/helper/xsecctl.hxx +++ b/xmlsecurity/source/helper/xsecctl.hxx @@ -47,14 +47,6 @@ #include -/* - * all error information - */ -#define ERROR_CANNOTCREATEXMLSECURITYCOMPONENT"Can't create XML security components." -#define ERROR_SAXEXCEPTIONDURINGCREATION "A SAX exception is throwed during signature creation." -#define ERROR_IOEXCEPTIONDURINGCREATION "An IO exception is throwed during signature creation." -#define ERROR_EXCEPTIONDURINGCREATION "An exception is throwed during signature creation." - #define NS_XMLDSIG "http://www.w3.org/2000/09/xmldsig#"; #define NS_DC "http://purl.org/dc/elements/1.1/"; #define NS_XD "http://uri.etsi.org/01903/v1.3.2#"; @@ -248,11 +240,6 @@ private: bool m_bIsSAXEventKeeperSticky; /* - * error message pointer - */ -const char *m_pErrorMessage; - -/* * the XSecParser which is used to parse the signature stream */ css::uno::Reference m_xSecParser; diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index 4a5fb3d..5b27c13 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -350,26 +350,13 @@ bool XSecController::WriteSignature( rc = true; } -catch( cssxs::SAXException& ) -{ -m_pErrorMessage = ERROR_SAXEXCEPTIONDURINGCREATION; -} -catch( css::io::IOException& ) -{ -m_pErrorMessage = ERROR_IOEXCEPTIONDURINGCREATION; -} catch( cssu::Exception& ) { -m_pErrorMessage = ERROR_EXCEPTIONDURINGCREATION; } m_xSAXEventKeeper->setNextHandler( nullptr ); m_bIsSAXEventKeeperSticky = false; } -else -{ -m_pErrorMessage = ERROR_CANNOTCREATEXMLSECURITYCOMPONENT; -} return rc; } @@ -406,24 +393,13 @@ bool XSecController::WriteOOXMLSignature(const uno::Reference& bRet = true; } -catch (const xml::sax::SAXException&) -{ -m_pErrorMessage = ERROR_SAXEXCEPTIONDURINGCREATION; -} -catch(const io::IOException&) -{ -m_pErrorMessage = ERROR_IOEXCEPTIONDURINGCREATION; -} catch(const uno::Exception&) { -m_pErrorMessage = ERROR_EXCEPTIONDURINGCREATION; } m_xSAXEventKeeper->setNextHandler(nullptr); m_bIsSAXEventKeeperSticky = false; } -else -m_pErrorMessage = ERROR_CANNOTCREATEXMLSECURITYCOMPONENT; return bRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: RepositoryExternal.mk
RepositoryExternal.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit f144d319d58cbb0d358250540cd666d9644f5fa5 Author: Jan-Marek Glogowski Date: Thu Nov 3 13:14:42 2016 +0100 Fix external libjpeg build Change-Id: I952dd39559cff18dc7850b62915405954eac2fd7 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 1f891d5..5dbde22 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -459,6 +459,8 @@ $(call gb_LinkTarget_set_include,$(1),\ $$(INCLUDE) \ ) +endef + $(call gb_LinkTarget_use_static_libraries,$(1),\ jpeg \ ) @@ -468,8 +470,6 @@ $(call gb_ExternalProject_use_static_libraries,$(1),jpeg) endef -endef - endif # SYSTEM_JPEG ifneq ($(SYSTEM_MYTHES),) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
A proposal for standardizing TSV files
Hello, I do a fair bit of work where I move data between LibreOffice, MySQL, Vertica, Google Docs, Hadoop, Python, and a few other systems. The formatting of TSV files is ad-hoc. Each system has little differences in how strings are escaped, and similar. In addition, there is no way to preserve metadata. I drafted a modest proposed spec for standardizing TSV files by standardizing types, and adding metadata, and was hoping to solicit feedback on that proposal: http://www.tsvx.org/ I'm trying to maintain the parts of TSV which make it great -- simplicity, human-readability, and rapid single-pass parsing, but add enough structure to eliminate all the scripting that goes on when moving data between systems, as well as to eliminate some of the brittleness (TSV files break if a column is added, and one-pass parsing breaks if an unexpected type is found 10GB down). Since this touches closely on LibreOffice, and if it becomes standards, it's something we'd all have to live with, I was hoping to solicit some feedback on this from LibreOffice developers. github issues (https://github.com/pmitros/tsvx/issues) are the preferred way of communicating, but I'll monitor this thread, and personal email is okay as well. Piotr ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/helper/xmlsignaturehelper.cxx | 15 --- 1 file changed, 15 deletions(-) New commits: commit c2cdf08171a84a2897dcfeee22667d2e18b48b3d Author: Tor Lillqvist Date: Thu Nov 3 13:52:18 2016 +0200 Bin some useless comments No need to have a comment saying 'write signatures' when calling a function that is called WriteSignature(). (Actually, the function name is slightly misleading, as it says 'signature' in singular while what it actually does is write multiple signatures, if present.) Also drop some leftover comments that were related to code that was commented out already in 2004 or 2007 and removed completely in 2010. Change-Id: I7a53b3eabb81fc03c66e746f78267be4c1751b0f diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 08ac25f..7267e5f 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -225,26 +225,11 @@ bool XMLSignatureHelper::CreateAndWriteSignature( const uno::Reference< xml::sax { mbError = false; -/* - * create a signature listener - */ - -/* - * configure the signature creation listener - */ - -/* - * write signatures - */ if ( !mpXSecController->WriteSignature( xDocumentHandler ) ) { mbError = true; } -/* - * clear up the signature creation listener - */ - return !mbError; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cppcanvas/source formula/source include/cppcanvas include/vcl sd/source vcl/null vcl/unx
cppcanvas/source/wrapper/implsprite.cxx|5 -- cppcanvas/source/wrapper/implsprite.hxx|3 - formula/source/ui/dlg/formula.cxx | 43 - include/cppcanvas/sprite.hxx |3 - include/vcl/printerinfomanager.hxx |4 -- sd/source/ui/sidebar/PanelFactory.hxx |3 - vcl/null/printerinfomanager.cxx|5 -- vcl/unx/generic/printer/printerinfomanager.cxx | 21 8 files changed, 28 insertions(+), 59 deletions(-) New commits: commit b01c5ae95683aa4c059048eac3b3eb55cc256be4 Author: Noel Grandin Date: Thu Nov 3 11:07:20 2016 +0200 loplugin:unusedmethods unused return types Change-Id: I88204bca60dd1e299b040c52bc87e500cbfaa930 Reviewed-on: https://gerrit.libreoffice.org/30519 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cppcanvas/source/wrapper/implsprite.cxx b/cppcanvas/source/wrapper/implsprite.cxx index 889b061..e292178 100644 --- a/cppcanvas/source/wrapper/implsprite.cxx +++ b/cppcanvas/source/wrapper/implsprite.cxx @@ -190,11 +190,6 @@ namespace cppcanvas if( mxSprite.is() ) mxSprite->setPriority(fPriority); } - -uno::Reference< rendering::XSprite > ImplSprite::getUNOSprite() const -{ -return mxSprite; -} } } diff --git a/cppcanvas/source/wrapper/implsprite.hxx b/cppcanvas/source/wrapper/implsprite.hxx index 82011e7..d9aa069 100644 --- a/cppcanvas/source/wrapper/implsprite.hxx +++ b/cppcanvas/source/wrapper/implsprite.hxx @@ -53,9 +53,6 @@ namespace cppcanvas virtual void setPriority( double fPriority ) override; -virtual css::uno::Reference< -css::rendering::XSprite > getUNOSprite() const override; - private: ImplSprite(const ImplSprite&) = delete; ImplSprite& operator=( const ImplSprite& ) = delete; diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 4947a36..f745cbc 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -121,7 +121,7 @@ public: RefEdit*GetCurrRefEdit(); const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;} -uno::Reference< sheet::XFormulaOpCodeMapper > const & GetFormulaOpCodeMapper() const; +void InitFormulaOpCodeMapper(); DECL_LINK( ModifyHdl, ParaWin&, void ); DECL_LINK( FxHdl, ParaWin&, void ); @@ -403,30 +403,29 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt ) pData->SetFocusWindow(pWin); } -uno::Reference< sheet::XFormulaOpCodeMapper > const & FormulaDlg_Impl::GetFormulaOpCodeMapper() const +void FormulaDlg_Impl::InitFormulaOpCodeMapper() { -if ( !m_xOpCodeMapper.is() ) -{ -m_xOpCodeMapper = m_pHelper->getFormulaOpCodeMapper(); -m_aFunctionOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::FUNCTIONS); -m_pFunctionOpCodesEnd = m_aFunctionOpCodes.getConstArray() + m_aFunctionOpCodes.getLength(); +if ( m_xOpCodeMapper.is() ) +return; + +m_xOpCodeMapper = m_pHelper->getFormulaOpCodeMapper(); +m_aFunctionOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::FUNCTIONS); +m_pFunctionOpCodesEnd = m_aFunctionOpCodes.getConstArray() + m_aFunctionOpCodes.getLength(); -m_aUnaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::UNARY_OPERATORS); -m_pUnaryOpCodesEnd = m_aUnaryOpCodes.getConstArray() + m_aUnaryOpCodes.getLength(); +m_aUnaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::UNARY_OPERATORS); +m_pUnaryOpCodesEnd = m_aUnaryOpCodes.getConstArray() + m_aUnaryOpCodes.getLength(); -m_aBinaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::BINARY_OPERATORS); -m_pBinaryOpCodesEnd = m_aBinaryOpCodes.getConstArray() + m_aBinaryOpCodes.getLength(); +m_aBinaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::BINARY_OPERATORS); +m_pBinaryOpCodesEnd = m_aBinaryOpCodes.getConstArray() + m_aBinaryOpCodes.getLength(); -uno::Sequence< OUString > aArgs(3); -aArgs[TOKEN_OPEN] = "("; -aArgs[TOKEN_CLOSE] = ")"; -aArgs[TOKEN_SEP]= ";"; -m_aSeparatorsOpCodes = m_xOpCodeMapper->getMappings(aArgs,sheet::FormulaLanguage::ODFF); +uno::Sequence< OUString > aArgs(3); +aArgs[TOKEN_OPEN] = "("; +aArgs[TOKEN_CLOSE] = ")"; +aArgs[TOKEN_SEP]= ";"; +m_aSeparatorsOpCodes = m_xOpCodeMapper->getMappings(aArgs,sheet::FormulaLanguage::ODFF); -m_aSpecialOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::F
[Libreoffice-commits] core.git: include/unotools unotools/Library_utl.mk unotools/source
include/unotools/ZipPackageHelper.hxx | 65 + unotools/Library_utl.mk |1 unotools/source/misc/ZipPackageHelper.cxx | 199 ++ 3 files changed, 265 insertions(+) New commits: commit b3a229ad0d35b2364cc485a0dd1a5b5510fb40c3 Author: Samuel Mehrbrodt Date: Wed Nov 2 10:26:23 2016 +0100 Add helper for creating zip files Change-Id: I8b49b74622bf4d671d640e4cd06dc2da348ee222 Reviewed-on: https://gerrit.libreoffice.org/30478 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/include/unotools/ZipPackageHelper.hxx b/include/unotools/ZipPackageHelper.hxx new file mode 100644 index 000..77c8b91 --- /dev/null +++ b/include/unotools/ZipPackageHelper.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_UNOTOOLS_ZIPPACKAGEHELPER_HXX +#define INCLUDED_UNOTOOLS_ZIPPACKAGEHELPER_HXX + +#include + +#include +#include +#include +#include +#include +#include + +namespace utl { + +class UNOTOOLS_DLLPUBLIC ZipPackageHelper +{ +public: +ZipPackageHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, +const OUString& sPackageURL); + +void savePackage(); + +void addFile( css::uno::Reference< css::uno::XInterface >& xRootFolder, + const OUString& rSourceFile ) +throw( css::uno::Exception, std::exception ); + +css::uno::Reference< css::uno::XInterface > addFolder( css::uno::Reference< css::uno::XInterface >& xRootFolder, + const OUString& rName ) +throw( css::uno::Exception, std::exception ); + +void addFolderWithContent( css::uno::Reference< css::uno::XInterface >& xRootFolder, + const OUString& rDirURL ); + +css::uno::Reference< css::uno::XInterface >& getRootFolder(); + +private: +css::uno::Reference< css::uno::XComponentContext > mxContext; +css::uno::Reference< css::container::XHierarchicalNameAccess > mxHNameAccess; +css::uno::Reference< css::lang::XSingleServiceFactory > mxFactory; +css::uno::Reference< css::uno::XInterface > mxRootFolder; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk index 3853dbf..237a188 100644 --- a/unotools/Library_utl.mk +++ b/unotools/Library_utl.mk @@ -104,6 +104,7 @@ $(eval $(call gb_Library_add_exception_objects,utl,\ unotools/source/misc/unotoolsservices \ unotools/source/misc/wincodepage \ unotools/source/misc/ServiceDocumenter \ +unotools/source/misc/ZipPackageHelper \ unotools/source/streaming/streamhelper \ unotools/source/streaming/streamwrap \ unotools/source/ucbhelper/localfilehelper \ diff --git a/unotools/source/misc/ZipPackageHelper.cxx b/unotools/source/misc/ZipPackageHelper.cxx new file mode 100644 index 000..0656c45 --- /dev/null +++ b/unotools/source/misc/ZipPackageHelper.cxx @@ -0,0 +1,199 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#includ
[Libreoffice-commits] core.git: include/unotools unotools/source
include/unotools/confignode.hxx |3 ++ unotools/source/config/confignode.cxx | 46 -- 2 files changed, 42 insertions(+), 7 deletions(-) New commits: commit 11a1b70da2f8d788f18cd0c4b8a4c5d0386aa72e Author: Caolán McNamara Date: Thu Nov 3 10:38:22 2016 + coverity#1371313 Missing move assignment operator Change-Id: I07a9d7fe837c18e66b4a2a57186f1f9b0d44daee diff --git a/include/unotools/confignode.hxx b/include/unotools/confignode.hxx index cae0bd9..83f3ee5 100644 --- a/include/unotools/confignode.hxx +++ b/include/unotools/confignode.hxx @@ -74,9 +74,12 @@ namespace utl OConfigurationNode() :m_bEscapeNames(false) { } /// copy ctor OConfigurationNode(const OConfigurationNode& _rSource); +/// move ctor +OConfigurationNode(OConfigurationNode&& _rSource); /// assigment OConfigurationNode& operator=(const OConfigurationNode& _rSource); +OConfigurationNode& operator=(OConfigurationNode&& _rSource); /// dtor virtual ~OConfigurationNode() override {} diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 4d0eec9..9342658 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -78,13 +78,27 @@ namespace utl } OConfigurationNode::OConfigurationNode(const OConfigurationNode& _rSource) -:OEventListenerAdapter() -,m_xHierarchyAccess(_rSource.m_xHierarchyAccess) -,m_xDirectAccess(_rSource.m_xDirectAccess) -,m_xReplaceAccess(_rSource.m_xReplaceAccess) -,m_xContainerAccess(_rSource.m_xContainerAccess) -,m_bEscapeNames(_rSource.m_bEscapeNames) -,m_sCompletePath(_rSource.m_sCompletePath) +: OEventListenerAdapter() +, m_xHierarchyAccess(_rSource.m_xHierarchyAccess) +, m_xDirectAccess(_rSource.m_xDirectAccess) +, m_xReplaceAccess(_rSource.m_xReplaceAccess) +, m_xContainerAccess(_rSource.m_xContainerAccess) +, m_bEscapeNames(_rSource.m_bEscapeNames) +, m_sCompletePath(_rSource.m_sCompletePath) +{ +Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY); +if (xConfigNodeComp.is()) +startComponentListening(xConfigNodeComp); +} + +OConfigurationNode::OConfigurationNode(OConfigurationNode&& _rSource) +: OEventListenerAdapter() +, m_xHierarchyAccess(std::move(_rSource.m_xHierarchyAccess)) +, m_xDirectAccess(std::move(_rSource.m_xDirectAccess)) +, m_xReplaceAccess(std::move(_rSource.m_xReplaceAccess)) +, m_xContainerAccess(std::move(_rSource.m_xContainerAccess)) +, m_bEscapeNames(std::move(_rSource.m_bEscapeNames)) +, m_sCompletePath(std::move(_rSource.m_sCompletePath)) { Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY); if (xConfigNodeComp.is()) @@ -109,6 +123,24 @@ namespace utl return *this; } +OConfigurationNode& OConfigurationNode::operator=(OConfigurationNode&& _rSource) +{ +stopAllComponentListening(); + +m_xHierarchyAccess = std::move(_rSource.m_xHierarchyAccess); +m_xDirectAccess = std::move(_rSource.m_xDirectAccess); +m_xContainerAccess = std::move(_rSource.m_xContainerAccess); +m_xReplaceAccess = std::move(_rSource.m_xReplaceAccess); +m_bEscapeNames = std::move(_rSource.m_bEscapeNames); +m_sCompletePath = std::move(_rSource.m_sCompletePath); + +Reference< XComponent > xConfigNodeComp(m_xDirectAccess, UNO_QUERY); +if (xConfigNodeComp.is()) +startComponentListening(xConfigNodeComp); + +return *this; +} + void OConfigurationNode::_disposing( const EventObject& _rSource ) { Reference< XComponent > xDisposingSource(_rSource.Source, UNO_QUERY); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] website.git: Branch 'update' - check.php
check.php | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit ce9ff72306661a3f51155ab54aced8ec9f54bb2f Author: Christian Lohmaier Date: Thu Nov 3 12:09:25 2016 +0100 enable update to 5.1.6 diff --git a/check.php b/check.php index f5eb0f4..3c360d2 100644 --- a/check.php +++ b/check.php @@ -425,6 +425,9 @@ $build_hash_to_version = array( # 5.1.5 'bb431b2be5fb7772067efc27a3cc98b6927c7b4c' => '5.1.5.1', '7a864d8825610a8c07cfc3bc01dd4fce6a9447e5' => '5.1.5.2', # Final +# 5.1.6 +'f3e25ec0581f5012f54d8810dcddd5824f4ee374' => '5.1.6.1', +'07ac168c60a517dba0f0d7bc7540f5afa45f0909' => '5.1.6.2', # Final ## # 5.2.0 versions @@ -454,11 +457,11 @@ $build_hash_to_version = array( # where '' and '' will be substitued with the right value # NOTE: '&' in the URL has to be escaped as & $update_map = array( -'stable' => array('gitid' => '7a864d8825610a8c07cfc3bc01dd4fce6a9447e5', - 'id' => 'LibreOffice 5.1.5', - 'version' => '5.1.5', +'stable' => array('gitid' => '07ac168c60a517dba0f0d7bc7540f5afa45f0909', + 'id' => 'LibreOffice 5.1.6', + 'version' => '5.1.6', 'update_type' => 'text/html', - 'update_src' => 'http://www.libreoffice.org/download/libreoffice-still/?type=&lang=&version=5.1.5', + 'update_src' => 'http://www.libreoffice.org/download/libreoffice-still/?type=&lang=&version=5.1.6', 'substitute' => true ), 'latest' => array('gitid' => '8f96e87c890bf8fa77463cd4b640a2312823f3ad', 'id' => 'LibreOffice 5.2.2', ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: configure.ac
configure.ac | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 6a866f99ecf21f6ebdbb7f00d3c72677a1361e74 Author: Michael Stahl Date: Thu Nov 3 11:48:07 2016 +0100 configure: fix LIBJPEG_LIBS, jpeg-turbo can also be used on Linux Change-Id: I710f8ba31b6f780e3fb1d174d9ea21f270f55264 diff --git a/configure.ac b/configure.ac index 18f0efa..0d6329e 100644 --- a/configure.ac +++ b/configure.ac @@ -7769,12 +7769,20 @@ _EOS AC_MSG_ERROR([no nasm (Netwide Assembler) found]) fi LIBJPEG_CFLAGS="-I${WORKDIR}/UnpackedTarball/jpeg-turbo" -LIBJPEG_LIBS="${WORKDIR}/UnpackedTarball/jpeg-turbo/.libs/libjpeg.lib" +if test "$COM" = "MSC"; then + LIBJPEG_LIBS="${WORKDIR}/UnpackedTarball/jpeg-turbo/.libs/libjpeg.lib" +else +LIBJPEG_LIBS="-L${WORKDIR}/UnpackedTarball/jpeg-turbo/.libs -ljpeg" +fi else AC_MSG_RESULT([internal, jpeg]) BUILD_TYPE="$BUILD_TYPE JPEG" LIBJPEG_CFLAGS="-I${WORKDIR}/UnpackedTarball/jpeg" -LIBJPEG_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -ljpeg" +if test "$COM" = "MSC"; then +LIBJPEG_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/libjpeg.lib" +else +LIBJPEG_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -ljpeg" +fi fi fi AC_SUBST(NASM) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: configure.ac
configure.ac |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 8b694333949b51a646c3ef3bec9e985b48b7e51a Author: Tor Lillqvist Date: Thu Nov 3 12:34:02 2016 +0200 Clarify comment to mention also HAVE_FEATURE_OPENCL Change-Id: Ibca8ceedd8c01b4d12ccd9c29838f545fc234347 diff --git a/configure.ac b/configure.ac index 9c24cbb..18f0efa 100644 --- a/configure.ac +++ b/configure.ac @@ -10546,8 +10546,8 @@ dnl Check whether to build with OpenCL support. dnl = if test $_os != iOS -a $_os != Android; then -# OPENCL in BUILD_TYPE tells that OpenCL is potentially available on the platform (optional at run-time, -# used through clew). +# OPENCL in BUILD_TYPE and HAVE_FEATURE_OPENCL tell that OpenCL is potentially available on the +# platform (optional at run-time, used through clew). BUILD_TYPE="$BUILD_TYPE OPENCL" AC_DEFINE(HAVE_FEATURE_OPENCL) fi ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: external/poppler
external/poppler/ubsan.patch.0 | 37 - 1 file changed, 37 deletions(-) New commits: commit 21ca0db5ec27662a3e047d7547eae9beb87b0b01 Author: Michael Stahl Date: Thu Nov 3 11:13:29 2016 +0100 poppler: remove obsolete ubsan patch hunk With eea709f67d91e271e3df37e6c6724b7b5870b1ee "poppler: build against libjpeg" the poppler internal JPEG code is no longer used. Change-Id: I018a53a495ec505af92bb9b1c1a0c42e0a4f35b8 diff --git a/external/poppler/ubsan.patch.0 b/external/poppler/ubsan.patch.0 index 575cb47..6767525 100644 --- a/external/poppler/ubsan.patch.0 +++ b/external/poppler/ubsan.patch.0 @@ -216,43 +216,6 @@ SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation); poppler/Stream.cc -+++ poppler/Stream.cc -@@ -2966,12 +2966,12 @@ - } else { - amp = 0; - } -- data[0] += (*prevDC += amp) << scanInfo.al; -+ data[0] += (int) ((unsigned) (*prevDC += amp) << scanInfo.al); - } else { - if ((bit = readBit()) == ) { - return gFalse; - } -- data[0] += bit << scanInfo.al; -+ data[0] += (unsigned) bit << scanInfo.al; - } - ++i; - } -@@ -3064,7 +3064,7 @@ - j = dctZigZag[i++]; - } - } -- data[j] = amp << scanInfo.al; -+ data[j] = (unsigned) amp << scanInfo.al; - } - } - -@@ -3251,8 +3251,8 @@ - v3 = p[6]; - v4 = (dctSqrt1d2 * (p[1] - p[7]) + 128) >> 8; - v7 = (dctSqrt1d2 * (p[1] + p[7]) + 128) >> 8; --v5 = p[3] << 4; --v6 = p[5] << 4; -+v5 = (unsigned) p[3] << 4; -+v6 = (unsigned) p[5] << 4; - - // stage 3 - t = (v0 - v1+ 1) >> 1; --- poppler/XRef.cc +++ poppler/XRef.cc @@ -293,6 +293,7 @@ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtk3gtkframe.cxx | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) New commits: commit 69d79abb583fa20e7bc2d3a217f870ec750609be Author: Caolán McNamara Date: Thu Nov 3 09:41:54 2016 + Related: rhbz#1390607 our side of per-monitor fullscreen on wayland keep the move window to monitor code, so under X, gnome#773857 isn't a problem when gnome#772525 fix is available this presumably will then work under wayland Change-Id: I50cfe7ede8a4f1404c26d174ef3c5bb920eb5044 diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index d377f32..9c647cb 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1809,7 +1809,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle * bool bSpanAllScreens = nNewScreen == (unsigned int)-1; m_bSpanMonitorsWhenFullscreen = bSpanAllScreens && getDisplay()->getSystem()->GetDisplayScreenCount() > 1; - +gint nMonitor = -1; if (m_bSpanMonitorsWhenFullscreen) //span all screens { pScreen = gtk_widget_get_screen( m_pWindow ); @@ -1820,7 +1820,6 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle * } else { -gint nMonitor; bool bSameMonitor = false; if (!bSpanAllScreens) @@ -1906,7 +1905,19 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle * ? GDK_FULLSCREEN_ON_ALL_MONITORS : GDK_FULLSCREEN_ON_CURRENT_MONITOR ); #endif if( eType == SetType::Fullscreen ) -gtk_window_fullscreen( GTK_WINDOW( m_pWindow ) ); +{ +if (m_bSpanMonitorsWhenFullscreen) +gtk_window_fullscreen(GTK_WINDOW(m_pWindow)); +else +{ +#if GTK_CHECK_VERSION(3,18,0) +gtk_window_fullscreen_on_monitor(GTK_WINDOW(m_pWindow), pScreen, nMonitor); +#else +gtk_window_fullscreen(GTK_WINDOW(m_pWindow)); +#endif +} + +} else if( eType == SetType::UnFullscreen ) gtk_window_unfullscreen( GTK_WINDOW( m_pWindow ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - download.lst external/curl
download.lst |4 +- external/curl/ExternalPackage_curl.mk |2 - external/curl/ExternalProject_curl.mk |2 - external/curl/UnpackedTarball_curl.mk |3 -- external/curl/curl-7.26.0_win-proxy.patch | 45 +++--- external/curl/curl-freebsd.patch.1| 32 - external/curl/curl-msvc-schannel.patch.1 |4 +- external/curl/curl-msvc.patch.1 | 12 ++-- 8 files changed, 40 insertions(+), 64 deletions(-) New commits: commit dc15bcd80569fd6cf7b286addf5b72823ca117c7 Author: Caolán McNamara Date: Fri Jul 29 09:02:58 2016 +0100 curl: upgrade to version 7.51.0 bump curl to 7.50.0 Reviewed-on: https://gerrit.libreoffice.org/27671 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit c772c8fd273d73af4734ce0ed1b4bb082dc1886c) bump curl to 7.50.1 Reviewed-on: https://gerrit.libreoffice.org/28157 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 102815fe38dfdc2786bd5cf7a5acee564c912775) curl: upgrade to version 7.51.0 - fixes about a dozen CVEs - tweak curl-7.26.0_win-proxy.patch: there is a "checksrc" thing now in curl that fails the build with: warning: use of strtok is banned (BANNEDFUNC) so use strtok_s instead (which is MSVC's name for standard strtok_r) - use Makefile.vc12 instead of Makefile.vc10 - remove strequal.obj from Makefile.vc12, it does not actually exist Reviewed-on: https://gerrit.libreoffice.org/30484 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 3edb365f2651848ae8bc3b85bf0b56bd00d93270) Change-Id: Ie2da64980d88c72b0c902376ffc01abf97a7bc91 Reviewed-on: https://gerrit.libreoffice.org/30503 Tested-by: Jenkins Reviewed-by: David Tardon diff --git a/download.lst b/download.lst index e3ddb12..700c4dd 100644 --- a/download.lst +++ b/download.lst @@ -24,8 +24,8 @@ export COLLADA2GLTF_TARBALL := 4b87018f7fff1d054939d19920b751a0-collada2gltf-mas export CPPUNIT_MD5SUM := d1c6bdd5a76c66d2c38331e2d287bc01 export CPPUNIT_TARBALL := cppunit-1.13.2.tar.gz export CT2N_TARBALL := 1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt -export CURL_MD5SUM := 11bddbb452a8b766b932f859aaeeed39 -export CURL_TARBALL := curl-7.43.0.tar.bz2 +export CURL_MD5SUM := 490e19a8ccd1f4a244b50338a0eb9456 +export CURL_TARBALL := curl-7.51.0.tar.gz export DBGHELP_DLL := 13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll export EBOOK_MD5SUM := 6b48eda57914e6343efebc9381027b78 export EBOOK_TARBALL := libe-book-0.1.2.tar.bz2 diff --git a/external/curl/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk index ed55892..2de52db 100644 --- a/external/curl/ExternalPackage_curl.mk +++ b/external/curl/ExternalPackage_curl.mk @@ -22,7 +22,7 @@ $(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dyli else ifeq ($(OS),AIX) $(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4)) else -$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.3.0)) +$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.4.0)) endif endif # $(DISABLE_DYNLOADING) diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk index 8fd8289..d1ddf7f 100644 --- a/external/curl/ExternalProject_curl.mk +++ b/external/curl/ExternalProject_curl.mk @@ -79,7 +79,7 @@ else ifeq ($(COM),MSC) $(call gb_ExternalProject_get_state_target,curl,build): $(call gb_ExternalProject_run,build,\ - MAKEFLAGS= LIB="$(ILIB)" nmake -f Makefile.vc10 \ + MAKEFLAGS= LIB="$(ILIB)" nmake -f Makefile.vc12 \ cfg=$(if $(MSVC_USE_DEBUG_RUNTIME),debug-dll,release-dll) \ EXCFLAGS="/EHa /D_CRT_SECURE_NO_DEPRECATE /DUSE_WINDOWS_SSPI /D_USING_V110_SDK71_ $(SOLARINC)" $(if $(filter X86_64,$(CPUNAME)),MACHINE=X64) \ ,lib) diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk index 154263c..6a5720d 100644 --- a/external/curl/UnpackedTarball_curl.mk +++ b/external/curl/UnpackedTarball_curl.mk @@ -14,11 +14,10 @@ $(eval $(call gb_UnpackedTarball_set_tarball,curl,$(CURL_TARBALL),,curl)) $(eval $(call gb_UnpackedTarball_set_patchlevel,curl,1)) $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\ - lib/Makefile.vc10 \ + lib/Makefile.vc12 \ )) $(eval $(call gb_UnpackedTarball_add_patches,curl,\ - external/curl/curl-freebsd.patch.1 \ external/curl/curl-msvc.patch.1 \ external/curl/curl-msvc-schannel.patch.1 \ external/curl/curl-7.26.0_mingw.patch \ diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - config_host.mk.in configure.ac external/jpeg-turbo external/poppler RepositoryExternal.mk
RepositoryExternal.mk| 23 +- config_host.mk.in|2 + configure.ac | 12 +++-- external/jpeg-turbo/jpeg-turbo.win_build.patch.1 | 28 +++ external/poppler/ExternalProject_poppler.mk |2 - external/poppler/UnpackedTarball_poppler.mk |1 external/poppler/poppler-libjpeg.patch.1 | 23 ++ 7 files changed, 81 insertions(+), 10 deletions(-) New commits: commit 206554422b9163fce76c8f44ec8be6c0de230685 Author: Michael Stahl Date: Wed Nov 2 14:13:54 2016 +0100 poppler: build against libjpeg Albert Astals Cid points out that --disable-libjpeg causes poppler to use internal JPEG code instead, which is not actively maintained. Add LIBJPEG_CFLAGS / LIBJPEG_LIBS to config_host.mk and patch poppler to respect LIBJPEG_LIBS. Reviewed-on: https://gerrit.libreoffice.org/30496 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit eea709f67d91e271e3df37e6c6724b7b5870b1ee) jpeg-turbo: resolve some conflicts to fix poppler build poppler uses both windows.h and jpeg headers, so runs into the conflict between Win32 definitions of boolean, INT16, INT32, and jpeg's. Tweak jpeg-turbo headers so it uses the Win32 definitions. (cherry picked from commit f2761b62b3d0b45a3e57781a16c8c5c6ee94ded0) Change-Id: Id19a62a9bd9dc41fee5e8e43e2798e515aacc299 Reviewed-on: https://gerrit.libreoffice.org/30506 Tested-by: Jenkins Reviewed-by: David Tardon diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 0fc7d25..ece2bd7 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -426,32 +426,37 @@ endif # SYSTEM_ZLIB ifneq ($(SYSTEM_JPEG),) define gb_LinkTarget__use_jpeg -$(call gb_LinkTarget_add_libs,$(1),-ljpeg) +$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS)) $(call gb_LinkTarget_set_ldflags,$(1),\ $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \ ) endef +gb_ExternalProject__use_jpeg := + else ifneq ($(filter JPEG_TURBO,$(BUILD_TYPE)),) define gb_LinkTarget__use_jpeg $(call gb_LinkTarget_set_include,$(1),\ - -I$(call gb_UnpackedTarball_get_dir,jpeg-turbo) \ + $(LIBJPEG_CFLAGS) \ $$(INCLUDE) \ ) -$(call gb_LinkTarget_add_libs,$(1),\ - $(call gb_UnpackedTarball_get_dir,jpeg-turbo)/.libs/libjpeg$(gb_StaticLibrary_PLAINEXT) \ -) +$(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS)) $(call gb_LinkTarget_use_external_project,$(1),jpeg-turbo,full) endef +define gb_ExternalProject__use_jpeg +$(call gb_ExternalProject_use_external_project,$(1),jpeg-turbo) + +endef + else # !SYSTEM_JPEG define gb_LinkTarget__use_jpeg $(call gb_LinkTarget_set_include,$(1),\ - -I$(call gb_UnpackedTarball_get_dir,jpeg) \ + $(LIBJPEG_CFLAGS) \ $$(INCLUDE) \ ) @@ -459,6 +464,11 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\ jpeg \ ) +define gb_ExternalProject__use_jpeg +$(call gb_ExternalProject_use_static_libraries,$(1),jpeg) + +endef + endef endif # SYSTEM_JPEG @@ -2674,6 +2684,7 @@ endef else # !SYSTEM_POPPLER define gb_LinkTarget__use_poppler +$(call gb_LinkTarget_use_external,$(1),jpeg) $(call gb_LinkTarget_use_external_project,$(1),poppler,full) $(call gb_LinkTarget_set_include,$(1),\ diff --git a/config_host.mk.in b/config_host.mk.in index ddd144e..04fc400 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -328,6 +328,8 @@ export LIBFONTS_JAR=@LIBFONTS_JAR@ export LIBFORMULA_JAR=@LIBFORMULA_JAR@ export LIBGCRYPT_CFLAGS=@LIBGCRYPT_CFLAGS@ export LIBGCRYPT_LIBS=@LIBGCRYPT_LIBS@ +export LIBJPEG_CFLAGS=$(gb_SPACE)@LIBJPEG_CFLAGS@ +export LIBJPEG_LIBS=$(gb_SPACE)@LIBJPEG_LIBS@ export LIBLANGTAG_CFLAGS=$(gb_SPACE)@LIBLANGTAG_CFLAGS@ export LIBLANGTAG_LIBS=$(gb_SPACE)@LIBLANGTAG_LIBS@ export LIBLAYOUT_JAR=@LIBLAYOUT_JAR@ diff --git a/configure.ac b/configure.ac index 3862386..66a830c 100644 --- a/configure.ac +++ b/configure.ac @@ -7636,10 +7636,10 @@ fi if test "$with_system_jpeg" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_JPEG=TRUE -AC_CHECK_HEADER(jpeglib.h, [], +AC_CHECK_HEADER(jpeglib.h, [ LIBJPEG_CFLAGS= ], [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], []) -AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ], -[AC_MSG_CHECKING(jpeg library not found or fuctional)], []) +AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ LIBJPEG_LIBS="-ljpeg" ], +[AC_MSG_ERROR(jpeg library not found or fuctional)], []) libo_MINGW_CHECK_DLL([libjpeg]) else SYSTEM_JPEG= @@ -7688,12 +7688,18 @@ Alternatively, you can install the 'new' nasm where ever you want and make sure _EOS AC_MSG_ERROR([no nasm (Netwide Assembler) found]) fi +LIBJPEG_CFLAGS="-I${WORKDIR}/UnpackedTarball/jpeg-turbo" +LIBJPEG_LIBS="${WORKDIR}/Unpa
[Libreoffice-commits] core.git: offapi/com xmlsecurity/source
offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl | 13 --- xmlsecurity/source/framework/saxeventkeeperimpl.cxx| 34 -- xmlsecurity/source/framework/saxeventkeeperimpl.hxx|4 - 3 files changed, 51 deletions(-) New commits: commit 38dc4ea8992f74e15951cc0bc7e378fe1857c604 Author: Tor Lillqvist Date: Thu Nov 3 10:46:24 2016 +0200 Bin unused XSecuritySAXEventKeeper::cloneElementCollector Change-Id: Icc0ead769fa0a052f7d4dfbc825c96dbb513b33f diff --git a/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl b/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl index c408907..94d2e9e 100644 --- a/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl +++ b/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl @@ -53,19 +53,6 @@ interface XSecuritySAXEventKeeper : XSAXEventKeeper [in] boolean modifyElement); /** - * Clones an element collector. - * - * @param referenceIdthe keeper id of the element collector to - * be cloned - * @param priority the priority of new element collector. See - * ConstOfPriority - * @return the keeper id of the new element collector - */ -long cloneElementCollector( -[in] long referenceId, -[in] ElementMarkPriority priority); - -/** * Sets security id for an element mark. * * @param id the keeper id of the element collector to be set diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index 2c616c9..ebe6823 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -983,40 +983,6 @@ sal_Int32 SAL_CALL SAXEventKeeperImpl::addSecurityElementCollector( nullptr); } -sal_Int32 SAL_CALL SAXEventKeeperImpl::cloneElementCollector( -sal_Int32 referenceId, -cssxc::sax::ElementMarkPriority priority ) -throw (cssu::RuntimeException, std::exception) -{ -sal_Int32 nId = -1; - -ElementCollector* pElementCollector = static_cast(findElementMarkBuffer(referenceId)); -if (pElementCollector != nullptr) -{ -nId = m_nNextElementMarkId; -m_nNextElementMarkId ++; - -ElementCollector* pClonedOne -= pElementCollector->clone(nId, priority); - -/* - * add this EC into the security data buffer array. - */ -m_vElementMarkBuffers.push_back(pClonedOne); - -/* - * If the reference EC is still in initial EC array, add - * this cloned one into the initial EC array too. - */ -if (pElementCollector->getBufferNode() == nullptr) -{ -m_vNewElementCollectors.push_back(pClonedOne); -} -} - -return nId; -} - void SAL_CALL SAXEventKeeperImpl::setSecurityId( sal_Int32 id, sal_Int32 securityId ) throw (cssu::RuntimeException, std::exception) { diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.hxx b/xmlsecurity/source/framework/saxeventkeeperimpl.hxx index f70e5ca..214575d 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.hxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.hxx @@ -247,10 +247,6 @@ public: css::xml::crypto::sax::ElementMarkPriority priority, sal_Bool modifyElement ) throw (css::uno::RuntimeException, std::exception) override; -virtual sal_Int32 SAL_CALL cloneElementCollector( -sal_Int32 referenceId, -css::xml::crypto::sax::ElementMarkPriority priority ) -throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL setSecurityId( sal_Int32 id, sal_Int32 securityId ) throw (css::uno::RuntimeException, std::exception) override; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/editeng include/sfx2 include/svl include/svx include/vcl sc/source sfx2/source vcl/source
include/editeng/numitem.hxx|2 +- include/sfx2/childwin.hxx |1 - include/sfx2/navigat.hxx |1 - include/sfx2/objsh.hxx |2 +- include/svl/itempool.hxx |2 +- include/svx/svdmrkv.hxx|2 +- include/svx/svdobj.hxx |2 +- include/svx/svdotext.hxx |2 +- include/vcl/syswin.hxx |2 -- sc/source/ui/inc/fupoor.hxx|2 +- sfx2/source/appl/childwin.cxx |4 sfx2/source/dialog/navigat.cxx | 10 -- vcl/source/window/brdwin.cxx |3 --- vcl/source/window/syswin.cxx |8 14 files changed, 7 insertions(+), 36 deletions(-) New commits: commit 880bcf9ed8c54f53d9fb631b9e064a468a9d02da Author: Noel Grandin Date: Wed Nov 2 16:35:25 2016 +0200 loplugin:unnecessaryvirtual Change-Id: I572b83949c7e643536b7d62567760546509e4d9f Reviewed-on: https://gerrit.libreoffice.org/30514 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index e687246..5466ae8 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -181,7 +181,7 @@ public: virtual voidSetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = nullptr, const sal_Int16* pOrient = nullptr); const SvxBrushItem* GetBrush() const {return pGraphicBrush;} voidSetGraphic( const OUString& rName ); -virtual sal_Int16 GetVertOrient() const; +sal_Int16 GetVertOrient() const; voidSetGraphicSize(const Size& rSet) {aGraphicSize = rSet;} const Size& GetGraphicSize() const {return aGraphicSize;} diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 8a77f2e..3068d00 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -137,7 +137,6 @@ public: FloatingWindow* GetFloatingWindow() const; -virtual voidResizing( Size& rSize ); static void RegisterChildWindowContext(SfxModule*, sal_uInt16, SfxChildWinContextFactory*); }; diff --git a/include/sfx2/navigat.hxx b/include/sfx2/navigat.hxx index 749adbf..8ba2193 100644 --- a/include/sfx2/navigat.hxx +++ b/include/sfx2/navigat.hxx @@ -46,7 +46,6 @@ public: WinBits nBits ); virtual voidResize() override; -virtual voidResizing( Size& rSize ) override; virtual boolClose() override; }; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 20ec6e3..fe72c66 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -433,7 +433,7 @@ public: boolIsSecurityOptOpenReadOnly() const; voidSetSecurityOptOpenReadOnly( bool bOpenReadOnly = true ); -virtual SizeGetFirstPageSize(); +SizeGetFirstPageSize(); boolDoClose(); virtual voidPrepareReload(); std::shared_ptr GetPreviewMetaFile( bool bFullContent = false ) const; diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx index 624ef08..e15bf82 100644 --- a/include/svl/itempool.hxx +++ b/include/svl/itempool.hxx @@ -146,7 +146,7 @@ public: const OUString& GetName() const; virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 ); -virtual voidRemove( const SfxPoolItem& ); +voidRemove( const SfxPoolItem& ); const SfxPoolItem& GetDefaultItem( sal_uInt16 nWhich ) const; const SfxPoolItem* LoadItem( SvStream &rStream, diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index bb187a8..2213699 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -182,7 +182,7 @@ public: virtual void ClearPageView() override; virtual void HideSdrPage() override; -virtual bool IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const; +bool IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const; // Returns sal_True if objects, points or glue points are selected by drawing a frame // (as long as the frame is drawn). diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 266f289..4855868 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -636,7 +636,7 @@ public: void ImpSetAnchorPos(const Point& rPnt); virtual void NbcSetAnchorPos(const Point& rPnt); virtual void SetAnchorPos(const Point& rPnt); -virtual const Point& GetAnchorPos() const; +const Point& GetAnchorPos() const; /// Snap is not done on the BoundRect but if possible on logic coordinates /// (i.e. without considering stroke width, ...) diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index ec316e9..ee5a393 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -490,7 +490,7 @@ public: virtual voi
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/utlui/uitool.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ea6b378221efea0392c5085d621ff38a612ade3e Author: Miklos Vajna Date: Thu Nov 3 09:16:09 2016 +0100 tdf#102308 sw redline tooltip: show seconds Commit d9dca1eef91faa710112ffd20a2b2d36b48a9287 (tdf#102308 sw: improve redline timestamp precision) improved the manage changes dialog to show seconds of the redline timestamps, do the same with tooltips, when the mouse is hovered over a redline portion. Change-Id: I6ec42db49cb93d8bce0cdee02e37d871f8e7e2ce Reviewed-on: https://gerrit.libreoffice.org/30515 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index a6be386e0..d40e71c 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -787,7 +787,7 @@ OUString GetAppLangDateTimeString( const DateTime& rDT ) { const SvtSysLocale aSysLocale; const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData(); -OUString sRet = rAppLclData.getDate( rDT ) + " " + rAppLclData.getTime( rDT, false ); +OUString sRet = rAppLclData.getDate( rDT ) + " " + rAppLclData.getTime( rDT ); return sRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/Accessibility/AccessibleDocument.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 4a83464f718ba8534a738178670077d5636ad051 Author: David Tardon Date: Thu Nov 3 09:54:29 2016 +0100 tdf#103633 avoid segfault in a11y This partially reverts commit 8e8a88ec1ad02c153ae3c7653edc81716dc91b7a "loplugin:unusedfields". Change-Id: Id95a46374ed2b35e05dc32a8759e5db01829f050 diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index f6bcddd..8fdbd07 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -453,7 +453,7 @@ bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurrentC { // create the new child rtl::Reference< ::accessibility::AccessibleShape > pReplacement(::accessibility::ShapeTypeHandler::Instance().CreateAccessibleObject ( -::accessibility::AccessibleShapeInfo ( _rxShape, pCurrentChild->getAccessibleParent() ), +::accessibility::AccessibleShapeInfo ( _rxShape, pCurrentChild->getAccessibleParent(), this ), _rShapeTreeInfo )); if ( pReplacement.is() ) @@ -558,7 +558,7 @@ uno::Reference< XAccessible > ScChildrenShapes::Get(const ScAccessibleShapeData* if (!pData->pAccShape.is()) { ::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance(); -::accessibility::AccessibleShapeInfo aShapeInfo(pData->xShape, mpAccessibleDocument); +::accessibility::AccessibleShapeInfo aShapeInfo(pData->xShape, mpAccessibleDocument, const_cast(this)); pData->pAccShape = rShapeHandler.CreateAccessibleObject( aShapeInfo, maShapeTreeInfo); if (pData->pAccShape.is()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source
sc/source/core/data/table4.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit f748f8173c0a7f539a174a09a141e58b468bf92c Author: Eike Rathke Date: Mon Oct 31 16:26:14 2016 +0100 don't loop uint16 against size Theoretically selecting over 64k rows with a series sequence and calling Fill could had looped endless. Change-Id: I1740b674638eb90d51808e619c562cf8064f4888 (cherry picked from commit 4f30849f07ea446cc58236e348737897adbbd016) Reviewed-on: https://gerrit.libreoffice.org/30446 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 016b8e6..19c537e 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -294,7 +294,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); bool bVal = true; -for (sal_uInt16 i=1; i( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); bool bVal = true; -for (sal_uInt16 i=1; iGetSubIndex(aStr, rListIndex, bMatchCase); nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); -for (sal_uInt16 i=1; iGetSubIndex(aStr, rListIndex, bMatchCase)) @@ -426,7 +426,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); bool bVal = true; -for (sal_uInt16 i=1; ihttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/helper/xmlsignaturehelper.cxx | 12 1 file changed, 12 deletions(-) New commits: commit a90bf85ae6bf2ef3b9d79bfe8e76ce052b17ce35 Author: Tor Lillqvist Date: Thu Nov 3 10:35:54 2016 +0200 Bin pointless differentiated exception handling All the catch blocks for classes derivved from uno::Exception contained the same single statement as the catch block for uno::Exception itself. Change-Id: Ic33b432416abfda7557862d25237dc7221585327 diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index a944f6f..08ac25f 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -297,18 +297,6 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const css::uno::Reference< css: { xParser->parseStream( aParserInput ); } -catch( xml::sax::SAXParseException& ) -{ -mbError = true; -} -catch( xml::sax::SAXException& ) -{ -mbError = true; -} -catch( css::io::IOException& ) -{ -mbError = true; -} catch( uno::Exception& ) { mbError = true; ___ 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 xmlsecurity/source
xmlsecurity/Library_xmlsecurity.mk |3 xmlsecurity/source/pdfio/pdfdocument.cxx | 121 +++ 2 files changed, 124 insertions(+) New commits: commit 8d1fb35f5cd05fcbb2aae4d793b17ee4083c9b5e Author: Miklos Vajna Date: Wed Nov 2 17:57:25 2016 +0100 xmlsecurity PDF verify: initial Windows support The timestamp isn't extracted yet, but the digest match is already checked correctly and the certificate is exposed. Change-Id: Ieca002a5c4ca0b96f4dc397c460adb7f88f5ffc7 Reviewed-on: https://gerrit.libreoffice.org/30499 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk index c5e8d68..487011f 100644 --- a/xmlsecurity/Library_xmlsecurity.mk +++ b/xmlsecurity/Library_xmlsecurity.mk @@ -71,6 +71,9 @@ ifeq ($(OS)-$(COM),WNT-MSC) $(eval $(call gb_Library_add_defs,xmlsecurity,\ -DXMLSEC_CRYPTO_MSCRYPTO \ )) +$(eval $(call gb_Library_use_system_win32_libs,xmlsecurity,\ +crypt32 \ +)) else ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) $(eval $(call gb_Library_add_defs,xmlsecurity,\ diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 894247f..ac75059 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -37,6 +37,13 @@ #include #endif +#ifdef XMLSEC_CRYPTO_MSCRYPTO +#include +#include +#include +#include +#endif + using namespace com::sun::star; namespace xmlsecurity @@ -1864,6 +1871,120 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, PDFObjectElement* pSignat CERT_DestroyCertificate(pDocumentCertificate); return true; +#elif defined XMLSEC_CRYPTO_MSCRYPTO +// Open a message for decoding. +HCRYPTMSG hMsg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, + CMSG_DETACHED_FLAG, + 0, + NULL, + nullptr, + nullptr); +if (!hMsg) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: CryptMsgOpenToDecode() failed"); +return false; +} + +// Update the message with the encoded header blob. +if (!CryptMsgUpdate(hMsg, aSignature.data(), aSignature.size(), TRUE)) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature, CryptMsgUpdate() for the header failed: " << WindowsErrorString(GetLastError())); +return false; +} + +// Update the message with the content blob. +for (const auto& rByteRange : aByteRanges) +{ +rStream.Seek(rByteRange.first); + +const int nChunkLen = 4096; +std::vector aBuffer(nChunkLen); +for (size_t nByte = 0; nByte < rByteRange.second;) +{ +size_t nRemainingSize = rByteRange.second - nByte; +if (nRemainingSize < nChunkLen) +{ +rStream.ReadBytes(aBuffer.data(), nRemainingSize); +if (!CryptMsgUpdate(hMsg, aBuffer.data(), nRemainingSize, FALSE)) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature, CryptMsgUpdate() for the content failed: " << WindowsErrorString(GetLastError())); +return false; +} +nByte = rByteRange.second; +} +else +{ +rStream.ReadBytes(aBuffer.data(), nChunkLen); +if (!CryptMsgUpdate(hMsg, aBuffer.data(), nChunkLen, FALSE)) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature, CryptMsgUpdate() for the content failed: " << WindowsErrorString(GetLastError())); +return false; +} +nByte += nChunkLen; +} +} +} +if (!CryptMsgUpdate(hMsg, nullptr, 0, TRUE)) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature, CryptMsgUpdate() for the last content failed: " << WindowsErrorString(GetLastError())); +return false; +} + +// Get the signer CERT_INFO from the message. +DWORD nSignerCertInfo = 0; +if (!CryptMsgGetParam(hMsg, CMSG_SIGNER_CERT_INFO_PARAM, 0, nullptr, &nSignerCertInfo)) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: CryptMsgGetParam() failed"); +return false; +} +std::unique_ptr pSignerCertInfoBuf(new BYTE[nSignerCertInfo]); +if (!CryptMsgGetParam(hMsg, CMSG_SIGNER_CERT_INFO_PARAM, 0, pSignerCertInfoBuf.get(), &nSignerCertInfo)) +{ +SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: CryptMsgGetParam() failed"); +return false; +} +PCERT_INFO pSignerCertInfo = reinterpret_cast(pSignerCertInfoBuf.get()); + +// Open a certi
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/helper/xmlsignaturehelper2.hxx |4 1 file changed, 4 insertions(+) New commits: commit 47521b5816c425497dd0fc5f91dc3e744abdecc1 Author: Tor Lillqvist Date: Thu Nov 3 10:01:17 2016 +0200 Add FIXME Change-Id: I4ebdca6a7d09a228122842a79b217ac2611a7c06 diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx index e07af2e..7c76a9a 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx @@ -40,6 +40,10 @@ namespace embed { // MT: Not needed any more, remove later... +// FIXME: I certainly would love to remove as much as possible of this steaming pile of +// over-engineering, but I wonder what exactly the above comment means. Certainly it is not +// straightforward to remove this class, it is used. + class ImplXMLSignatureListener : public cppu::WeakImplHelper < css::xml::crypto::sax::XSignatureCreationResultListener, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/menufloatingwindow.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e4669faa6835796267490efe906f0bd8355f6a50 Author: Xisco Fauli Date: Fri Sep 2 13:52:23 2016 +0200 tdf#95341: Make last item of menus clickable again Regression from 4f1dca5083c5a301181786b563b165f19a9dec7f Change-Id: I7b7f3594499cd049ae59064da244e3f82dff7757 Reviewed-on: https://gerrit.libreoffice.org/28617 Tested-by: Jenkins Reviewed-by: jan iversen diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 643aeb7..83854a6 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -197,7 +197,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow long nY = GetInitialItemY(); long nMouseY = rMEvt.GetPosPixel().Y(); Size aOutSz = GetOutputSizePixel(); -if ( ( nMouseY >= nY ) && ( nMouseY < ( aOutSz.Height() - nY ) ) ) +if ( ( nMouseY >= nY ) && ( nMouseY < aOutSz.Height() ) ) { bool bHighlighted = false; size_t nCount = pMenu->pItemList->size(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/classification
sfx2/classification/example_fr-FR.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f2bc1a61f6df66848ecb073a97b6b22fa469ef4d Author: Laurent Balland-Poirier Date: Sun Oct 23 18:08:02 2016 +0200 tdf#100352 Classification: Update French translation Change-Id: Ie5efebfe4df73adca51638c85ba52e7901eac139 Reviewed-on: https://gerrit.libreoffice.org/30182 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sfx2/classification/example_fr-FR.xml b/sfx2/classification/example_fr-FR.xml index eb551ac..4e0ab99 100644 --- a/sfx2/classification/example_fr-FR.xml +++ b/sfx2/classification/example_fr-FR.xml @@ -3,7 +3,7 @@ Exemple d'autorité TSCP -Exemple de police TSCP +Exemple de stratégie TSCP urn:example:tscp:1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits