Stephan Bergmann 5b0c551b9b Avoid deadlock between sd::ToolBarManager::Implementation::maMutex...
...and SolarMutex, when e.g. during JunitTest_framework_complex the main thread
has the SolarMutex locked and tries to lock

> osl_acquireMutex(oslMutexImpl*)
> osl::Mutex::acquire()
> osl::Guard<osl::Mutex>::Guard(osl::Mutex&)
> sd::ToolBarManager::Implementation::LockUpdate()
> sd::ToolBarManager::LockUpdate()
> sd::ToolBarManager::UpdateLock::UpdateLock(std::shared_ptr<sd::ToolBarManager> const&)
> sd::framework::ToolBarModule::HandleUpdateStart()
> sd::framework::ToolBarModule::notifyConfigurationChange(com::sun::drawing::framework::ConfigurationChangeEvent const&)
> sd::framework::ConfigurationControllerBroadcaster::NotifyListeners(std::__debug::vector<sd::framework::ConfigurationControllerBroadcaster::ListenerDescriptor, std::allocator<sd::framework::ConfigurationControllerBroadcaster::ListenerDescriptor> > const&, com::sun::drawing::framework::ConfigurationChangeEvent const&)
> sd::framework::ConfigurationControllerBroadcaster::NotifyListeners(com::sun::drawing::framework::ConfigurationChangeEvent const&)
> sd::framework::ConfigurationUpdater::UpdateConfiguration()
> sd::framework::ConfigurationUpdater::RequestUpdate(com::sun::uno::Reference<com::sun::drawing::framework::XConfiguration> const&)
> sd::framework::ChangeRequestQueueProcessor::ProcessOneEvent()
> sd::framework::ChangeRequestQueueProcessor::ProcessEvent(void*)
> sd::framework::ChangeRequestQueueProcessor::LinkStubProcessEvent(void*, void*)
> Link<void*, void>::Call(void*)
> ImplHandleUserEvent(ImplSVEvent*)
> ImplWindowFrameProc(vcl::Window*, unsigned short, void const*)
> SalFrame::CallCallback(unsigned short, void const*)
> SvpSalInstance::DoYield(bool, bool, unsigned long)
> ImplYield(bool, bool, unsigned long)
> Application::Yield()
> Application::Execute()
> desktop::Desktop::DoExecute()
> desktop::Desktop::Main()
> ImplSVMain()
> SVMain()
> soffice_main()
> main()

while some URP worker thread has sd::ToolBarManager::Implementation::maMutex
locked and tries to lock

> osl_acquireMutex(oslMutexImpl*)
> osl::Mutex::acquire()
> SalYieldMutex::acquire()
> SolarMutexGuard::SolarMutexGuard()
> framework::ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn(int, int, framework::ToolbarLayoutManager::SingleRowColumnWindowData&, Size const&)
> framework::ToolbarLayoutManager::doLayout(Size const&)
> framework::LayoutManager::implts_doLayout(bool, bool)
> framework::LayoutManager::implts_doLayout_notify(bool)
> framework::LayoutManager::unlock() (this=0x2b0d9ff633e8)
> (anonymous namespace)::LayouterLock::~LayouterLock()
> std::default_delete<(anonymous namespace)::LayouterLock>::operator()((anonymous namespace)::LayouterLock*) const
> std::unique_ptr<(anonymous namespace)::LayouterLock, std::default_delete<(anonymous namespace)::LayouterLock> >::reset((anonymous namespace)::LayouterLock*)
> sd::ToolBarManager::Implementation::Update(std::unique_ptr<(anonymous namespace)::LayouterLock, std::default_delete<(anonymous namespace)::LayouterLock> >)
> sd::ToolBarManager::Implementation::UnlockUpdate()
> sd::ToolBarManager::Implementation::UpdateLockImplementation::~UpdateLockImplementation()
> sd::ToolBarManager::Implementation::SetValid(bool)
> sd::ToolBarManager::Implementation::EventMultiplexerCallback(sd::tools::EventMultiplexerEvent&)
> sd::ToolBarManager::Implementation::LinkStubEventMultiplexerCallback(void*, sd::tools::EventMultiplexerEvent&)
> Link<sd::tools::EventMultiplexerEvent&, void>::Call(sd::tools::EventMultiplexerEvent&) const
> sd::tools::EventMultiplexer::Implementation::CallListeners(sd::tools::EventMultiplexerEvent&)
> sd::tools::EventMultiplexer::Implementation::CallListeners(unsigned int, void*)
> sd::tools::EventMultiplexer::Implementation::frameAction(com::sun::frame::FrameActionEvent const&)
> (anonymous namespace)::Frame::implts_sendFrameActionEvent(com::sun::frame::FrameAction const&)
> (anonymous namespace)::Frame::setComponent(com::sun::uno::Reference<com::sun::awt::XWindow> const&, com::sun::uno::Reference<com::sun::frame::XController> const&)
> (anonymous namespace)::Frame::close(unsigned char)
> gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*)
> cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**)
> bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**)
> binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const
> binaryurp::IncomingRequest::execute() const
> request(void*)
> cppu_threadpool::JobQueue::enter(long, bool)
> cppu_threadpool::ORequestThread::run()
> threadFunc(void*) (param=0x2b0db00019e0)
> osl_thread_start_Impl(void*)
> start_thread

Change-Id: Ie846bd95944680160eebc93b904875142723ac70
2016-02-15 15:09:00 +01:00
2016-02-09 08:18:05 +00:00
2016-02-08 06:53:49 +00:00
2016-02-09 08:18:05 +00:00
2016-02-15 11:45:53 +00:00
2016-02-05 06:48:38 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-01-21 21:02:17 +00:00
2016-02-09 08:18:05 +00:00
2016-02-12 06:14:02 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-11 09:43:49 +00:00
2016-02-05 06:48:38 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-15 10:59:13 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-14 03:36:12 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-01-22 12:47:47 +01:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-04 06:28:52 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 12:45:25 +00:00
2016-02-08 06:53:49 +00:00
2016-02-10 20:45:24 +01:00
2016-02-12 06:14:02 +00:00
2016-02-09 08:18:05 +00:00
2016-02-05 06:48:38 +00:00
2016-02-05 06:48:38 +00:00
2016-02-09 08:18:05 +00:00
2016-02-15 15:01:56 +01:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-08 06:53:49 +00:00
2016-02-09 08:18:05 +00:00
2016-02-12 15:29:25 +00:00
2016-02-12 15:29:25 +00:00
2016-02-09 08:18:05 +00:00
2016-02-10 19:28:49 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 17:05:21 +01:00
2016-02-06 08:51:42 +01:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-09 08:18:05 +00:00
2016-02-15 10:59:13 +00:00
2016-02-15 10:59:13 +00:00

LibreOffice

Coverity Scan Build Status

LibreOffice is an integrated office suite based on copyleft licenses and compatible with most document formats and standards. Libreoffice is backed by The Document Foundation, which represents a large independent community of enterprises, developers and other volunteers moved by the common goal of bringing to the market the best software for personal productivity. LibreOffice is open source, and free to download, use and distribute.

A quick overview of the LibreOffice code structure.

Overview

You can develop for LibreOffice in one of two ways, one recommended and one much less so. First the somewhat less recommended way: it is possible to use the SDK to develop an extension, for which you can read the API docs here and here. This re-uses the (extremely generic) UNO APIs that are also used by macro scripting in StarBasic.

The best way to add a generally useful feature to LibreOffice is to work on the code base however. Overall this way makes it easier to compile and build your code, it avoids any arbitrary limitations of our scripting APIs, and in general is far more simple and intuitive - if you are a reasonably able C++ programmer.

The important bits of code

Each module should have a README file inside it which has some degree of documentation for that module; patches are most welcome to improve those. We have those turned into a web page here:

http://docs.libreoffice.org/

However, there are two hundred modules, many of them of only peripheral interest for a specialist audience. So - where is the good stuff, the code that is most useful. Here is a quick overview of the most important ones:

Module Description
sal/ this provides a simple System Abstraction Layer
tools/ this provides basic internal types: 'Rectangle', 'Color' etc.
vcl/ this is the widget toolkit library and one rendering abstraction
framework UNO framework, responsible for building toolbars, menus, status bars, and the chrome around the document using widgets from VCL, and XML descriptions from /uiconfig/ files
sfx2/ legacy core framework used by Writer/Calc/Draw: document model / load/save / signals for actions etc.
svx/ drawing model related helper code, including much of Draw/Impress

Then applications

Module Description
desktop/ this is where the 'main' for the application lives, init / bootstrap. the name dates back to an ancient StarOffice that also drew a desktop
sw/ Writer
sc/ Calc
sd/ Draw / Impress

There are several other libraries that are helpful from a graphical perspective:

Module Description
basegfx/ algorithms and data-types for graphics as used in the canvas
canvas/ new (UNO) canvas rendering model with various backends
cppcanvas/ C++ helper classes for using the UNO canvas
drawinglayer/ View code to render drawable objects and break them down into primitives we can render more easily.

Finding out more

Beyond this, you can read the README files, send us patches, ask on the mailing list libreoffice@lists.freedesktop.org (no subscription required) or poke people on IRC #libreoffice-dev on irc.freenode.net - we're a friendly and generally helpful mob. We know the code can be hard to get into at first, and so there are no silly questions.

Description
LibreOffice mirror (not auto-updating).
Readme 1.9 GiB
Languages
C++ 82.4%
Java 5.3%
Rich Text Format 2.3%
PostScript 1.9%
Python 1.9%
Other 5.7%