summaryrefslogtreecommitdiff
path: root/vcl/osx
AgeCommit message (Collapse)Author
2017-08-07loplugin:staticmethodsStephan Bergmann
Change-Id: I13fe0b5b77d8d43639afa035f2db6e904cd998be
2017-08-07loplugin:unnecessaryparenStephan Bergmann
Change-Id: I9496cafef840195e3934bf92600d4e8c8edb6c26
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-20SalInstance::DoYield: Don't drop SolarMutex when accessing user event queueStephan Bergmann
<https://ci.libreoffice.org/job/lo_tb_master_linux_dbg/14468/console> fails with the assert in the OSL_DEBUG_LEVEL > 0 test code in Scheduler::ProcessEventsToIdle firing (see below), indicating that (even though the SolarMutex is locked one frame up in VCLXToolkit::processEventsToIdle), when Application::Reschedule(true) returned, there are unprocessed events in the queue. That failure is with the headless plugin, and looking at SvpSalInstance::DoYield, there was a window of time after m_aEventGuard has been released and before the SolarMutex has been re-acquired, where other threads could enqueue events. If Application::Reschedule(true) can thus not guarantee that the queue is empty when it returned, that would mean that the assert in Scheduler::ProcessEventsToIdle (introduced with c0710abfebd320903a3edb23d4b1441ea351b0be "Add some Scheduler unit tests and logging") is bogus. However, at least the two SalInstance::DoYield implementations SvpSalInstance::DoYield and AquaSalInstance::DoYield appear to have no reason in the first place to drop the SolarMutex when accessing the user event queue. So removing that dropping should make the assert in Scheduler::ProcessEventsToIdle faithful, at least for these two implementations. But I have no idea whether the other three implementations (X11SalInstance::DoYield in vcl/unx/generic/app/salinst.cxx, GtkInstance::DoYield in vcl/unx/gtk/gtkinst.cxx, and WinSalInstance::DoYield in vcl/win/app/salinst.cxx) have similar issues---i.e., whether everything is good after this change, whether those other implementations need similar changes, or whether ultimately Application::Reschedule(true) cannot guarantee the queue to be empty upon return (in which case the assert in Scheduler::ProcessEventsToIdle would need to go). > warn:vcl.schedule:27575:54:vcl/source/app/svapp.cxx:535: Unprocessed Idle: vcl::Window maPaintIdle > soffice.bin: /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svapp.cxx:540: static void Scheduler::ProcessEventsToIdle(): Assertion `!bAnyIdle' failed. [...] > Thread 2 (Thread 0x2b12bf1e4a00 (LWP 27575)): > #0 0x00002b12bfb1a69d in poll () at /lib64/libc.so.6 > #1 0x00002b12ca9129e7 in SvpSalInstance::DoReleaseYield(int) (this=0x1be8b40, nTimeoutMS=5) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/headless/svpinst.cxx:392 > aPoll = {fd = 6, events = 1, revents = 0} > nAcquireCount = 1 > #2 0x00002b12ca9128c9 in SvpSalInstance::DoYield(bool, bool, unsigned long) (this=0x1be8b40, bWait=true, bHandleAllCurrentEvents=false, nReleased=0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/headless/svpinst.cxx:375 > nTimeoutMS = 5 > __PRETTY_FUNCTION__ = "virtual bool SvpSalInstance::DoYield(bool, bool, sal_uLong)" > aEvents = empty std::__debug::list > nAcquireCount = 1 > bEvent = false > #3 0x00002b12ca7a98cd in ImplYield(bool, bool, unsigned long) (i_bWait=true, i_bAllEvents=false, nReleased=0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svapp.cxx:484 > pSVData = 0x2b12cb2a9e00 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance> > bProcessedEvent = false > #4 0x00002b12ca7a5796 in Application::Yield() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svapp.cxx:555 > #5 0x00002b12ca7a52f5 in Application::Execute() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svapp.cxx:461 > pSVData = 0x2b12cb2a9e00 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance> > #6 0x00002b12bf69c7e5 in desktop::Desktop::DoExecute() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/desktop/source/app/app.cxx:1350 > #7 0x00002b12bf69d9c4 in desktop::Desktop::Main() (this=0x7fff49ea9ac0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/desktop/source/app/app.cxx:1735 > layer2 = {m_aEnvTypeName = "gcc3", m_xPreviousContext = uno::Reference to (desktop::DesktopContext *) 0x1bebdf8} > rCmdLineArgs = @0x2b12bfa2c6a0: {m_cwdUrl = boost::optional "file:///home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/workdir/JunitTest/sd_unoapi/user", m_minimized = false, m_invisible = false, m_norestore = true, m_headless = true, m_eventtesting = false, m_quickstart = false, m_noquickstart = true, m_terminateafterinit = false, m_nologo = true, m_nolockcheck = false, m_nodefault = false, m_help = false, m_writer = false, m_calc = false, m_draw = false, m_impress = false, m_global = false, m_math = false, m_web = false, m_base = false, m_helpwriter = false, m_helpcalc = false, m_helpdraw = false, m_helpbasic = false, m_helpmath = false, m_helpimpress = false, m_helpbase = false, m_version = false, m_splashpipe = false, m_textcat = false, m_scriptcat = false, m_safemode = false, m_unknown = "", m_bEmpty = false, m_bDocumentArgs = false, m_accept = std::__debug::vector of length 1, capacity 1 = {"pipe,name=oootest16264f8c-0bcc-4a4f-9c1b-52af72b78eb5;urp"}, m_unaccept = std::__debug::vector of length 0, capacity 0, m_openlist = std::__debug::vector of length 0, capacity 0, m_viewlist = std::__debug::vector of length 0, capacity 0, m_startlist = std::__debug::vector of length 0, capacity 0, m_forceopenlist = std::__debug::vector of length 0, capacity 0, m_forcenewlist = std::__debug::vector of length 0, capacity 0, m_printlist = std::__debug::vector of length 0, capacity 0, m_printtolist = std::__debug::vector of length 0, capacity 0, m_printername = "", m_conversionlist = std::__debug::vector of length 0, capacity 0, m_conversionparams = "", m_conversionout = "", m_infilter = std::__debug::vector of length 0, capacity 0, m_language = "", m_pidfile = ""} > xRestartManager = uno::Reference to (comphelper::OOfficeRestartManager *) 0x29a7bf8 > layer = {m_aEnvTypeName = "gcc3", m_xPreviousContext = uno::Reference to (DesktopEnvironmentContext *) 0x1bebc38} > xContext = uno::Reference to (cppu::ComponentContext *) 0x1d200b0 > aOptions = {<utl::detail::Options> = {<utl::ConfigurationBroadcaster> = {_vptr.ConfigurationBroadcaster = 0x2b12c8a3dfb0 <vtable for SvtAccessibilityOptions+16>, mpList = std::unique_ptr<std::__debug::vector<utl::ConfigurationListener*, std::allocator<utl::ConfigurationListener*> >> containing 0x0, m_nBroadcastBlocked = 0, m_nBlockedHint = NONE}, <utl::ConfigurationListener> = {_vptr.ConfigurationListener = 0x2b12c8a3dfe8 <vtable for SvtAccessibilityOptions+72>}, <No data fields>}, <SfxListener> = {_vptr.SfxListener = 0x2b12c8a3e010 <vtable for SvtAccessibilityOptions+112>, mpImpl = std::unique_ptr<SfxListener::Impl> containing 0x2a46530}, static sm_pSingleImplConfig = 0x2a47e60, static sm_nAccessibilityRefCount = 16} > eStatus = desktop::Desktop::BS_OK > aUnknown = "" > inst_fin = desktop::userinstall::EXISTED > xDesktop = uno::Reference to (framework::Desktop *) 0x29cb3a8 > aAppearanceCfg = {<utl::ConfigItem> = {<utl::ConfigurationBroadcaster> = {_vptr.ConfigurationBroadcaster = 0x2b12c8a3e090 <vtable for SvtTabAppearanceCfg+16>, mpList = std::unique_ptr<std::__debug::vector<utl::ConfigurationListener*, std::allocator<utl::ConfigurationListener*> >> containing 0x0, m_nBroadcastBlocked = 0, m_nBlockedHint = NONE}, sSubTree = "Office.Common/View", m_xHierarchyAccess = uno::Reference to (configmgr::RootAccess *) 0x29ca3f8, xChangeLstnr = empty uno::Reference, m_nMode = DelayedUpdate, m_bIsModified = false, m_bEnableInternalNotification = false, m_nInValueChange = 0}, nDragMode = SystemDep, nSnapMode = NONE, nMiddleMouse = (unknown: 2), nAAMinPixelHeight = 8, bMenuMouseFollow = true, bFontAntialiasing = true, static bInitialized = true} > #8 0x00002b12ca7b33d0 in ImplSVMain() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svmain.cxx:194 > pSVData = 0x2b12cb2a9e00 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance> > nReturn = 1 > bInit = true > #9 0x00002b12ca7b3539 in SVMain() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svmain.cxx:232 > nRet = 0 > #10 0x00002b12bf6f1ff1 in soffice_main() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/desktop/source/app/sofficemain.cxx:163 > bSuccess = true > aDesktop = {<Application> = {_vptr.Application = 0x2b12bfa269b0 <vtable for desktop::Desktop+16>}, m_rSplashScreen = empty uno::Reference, m_bCleanedExtensionCache = false, m_bServicesRegistered = true, m_aBootstrapError = desktop::Desktop::BE_OK, m_aBootstrapErrorMessage = "", m_aBootstrapStatus = desktop::Desktop::BS_OK, m_xLockfile = std::unique_ptr<desktop::Lockfile> containing 0x29c9b10, m_firstRunTimer = {<Task> = {_vptr.Task = 0x2b12cb2911b0 <vtable for Timer+16>, mpSchedulerData = 0x0, mpDebugName = 0x2b12bf777570 "desktop::Desktop m_firstRunTimer", mePriority = DEFAULT, mbActive = false}, maInvokeHandler = {function_ = 0x2b12bf6a2c6c <desktop::Desktop::LinkStubAsyncInitFirstRun(void*, Timer*)>, instance_ = 0x7fff49ea9ac0}, mnTimeout = 3000, mbAuto = false}, m_aUpdateThread = {_M_id = {_M_thread = 0}}, static pResMgr = 0x0} > rCmdLineArgs = @0x2b12bfa2c6a0: {m_cwdUrl = boost::optional "file:///home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/workdir/JunitTest/sd_unoapi/user", m_minimized = false, m_invisible = false, m_norestore = true, m_headless = true, m_eventtesting = false, m_quickstart = false, m_noquickstart = true, m_terminateafterinit = false, m_nologo = true, m_nolockcheck = false, m_nodefault = false, m_help = false, m_writer = false, m_calc = false, m_draw = false, m_impress = false, m_global = false, m_math = false, m_web = false, m_base = false, m_helpwriter = false, m_helpcalc = false, m_helpdraw = false, m_helpbasic = false, m_helpmath = false, m_helpimpress = false, m_helpbase = false, m_version = false, m_splashpipe = false, m_textcat = false, m_scriptcat = false, m_safemode = false, m_unknown = "", m_bEmpty = false, m_bDocumentArgs = false, m_accept = std::__debug::vector of length 1, capacity 1 = {"pipe,name=oootest16264f8c-0bcc-4a4f-9c1b-52af72b78eb5;urp"}, m_unaccept = std::__debug::vector of length 0, capacity 0, m_openlist = std::__debug::vector of length 0, capacity 0, m_viewlist = std::__debug::vector of length 0, capacity 0, m_startlist = std::__debug::vector of length 0, capacity 0, m_forceopenlist = std::__debug::vector of length 0, capacity 0, m_forcenewlist = std::__debug::vector of length 0, capacity 0, m_printlist = std::__debug::vector of length 0, capacity 0, m_printtolist = std::__debug::vector of length 0, capacity 0, m_printername = "", m_conversionlist = std::__debug::vector of length 0, capacity 0, m_conversionparams = "", m_conversionout = "", m_infilter = std::__debug::vector of length 0, capacity 0, m_language = "", m_pidfile = ""} > aUnknown = "" > #11 0x0000000000400957 in sal_main () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/desktop/source/app/main.c:48 > ret = 0 > #12 0x000000000040093d in main (argc=8, argv=0x7fff49ea9df8) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/desktop/source/app/main.c:47 > ret = 0 > > Thread 1 (Thread 0x2b12e6862700 (LWP 11663)): > #0 0x00002b12bfa635f7 in raise () at /lib64/libc.so.6 > #1 0x00002b12bfa64ce8 in abort () at /lib64/libc.so.6 > #2 0x00002b12bf406165 in (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) (signal=6, info=0x2b12e68607f0, context=0x2b12e68606c0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sal/osl/unx/signal.cxx:389 > act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0xe6860b90} > i = 5 > #3 0x00002b12bf406472 in (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) (signal=6, info=0x2b12e68607f0, context=0x2b12e68606c0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sal/osl/unx/signal.cxx:486 > act = {__sigaction_handler = {sa_handler = 0x2b12e68607e0, sa_sigaction = 0x2b12e68607e0}, sa_mask = {__val = {0, 18446744069414584320, 0, 0, 61329184, 47360176948768, 47356309405696, 0, 47356309405696, 47356309405696, 4294967295, 47356309405696, 0, 0, 47359528444352, 47360176950400}}, sa_flags = -72537977, sa_restorer = 0x2b12bfdea1c0 <_IO_2_1_stderr_>} > Info = {Signal = osl_Signal_AccessViolation, UserSignal = 6, UserData = 0x0} > #4 0x00002b12bfa63670 in <signal handler called> () at /lib64/libc.so.6 > #5 0x00002b12bfa635f7 in raise () at /lib64/libc.so.6 > #6 0x00002b12bfa64ce8 in abort () at /lib64/libc.so.6 > #7 0x00002b12bfa5c566 in __assert_fail_base () at /lib64/libc.so.6 > #8 0x00002b12bfa5c612 in () at /lib64/libc.so.6 > #9 0x00002b12ca7a56ba in Scheduler::ProcessEventsToIdle() () at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/vcl/source/app/svapp.cxx:540 > pSVData = 0x2b12cb2a9e00 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance> > bAnyIdle = true > __PRETTY_FUNCTION__ = "static void Scheduler::ProcessEventsToIdle()" > nSanity = 1 > pSchedulerData = 0x0 > #10 0x00002b12c8c8c554 in (anonymous namespace)::VCLXToolkit::processEventsToIdle() (this=0x3abc2a0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/toolkit/source/awt/vclxtoolkit.cxx:1897 > aSolarGuard = {m_solarMutex = @0x1be9610} > aZone = {m_sProfileId = 0x2b12c8e672a2 "processEvents", m_aCreateTime = 0} > #11 0x00002b12e317751d in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) (pThis=0x3abc2f0, nVtableIndex=9, pRegisterReturn=0x0, pReturnTypeRef=0x1c07390, bSimpleReturn=true, pStack=0x2b12e6861170, nStack=0, pGPR=0x2b12e68612d0, pFPR=0x2b12e6861300) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:133 > data = {pMethod = 47359678006708, pStack = 0x2b12e6861170, nStack = 0, pGPR = 0x2b12e68612d0, pFPR = 0x2b12e6861300, rax = 0, rdx = 47360176951616, xmm0 = 2.3399007939816937e-310, xmm1 = 3.0079874608688941e-316} > pMethod = 47359683834264 > #12 0x00002b12e317615c in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**) (pThis=0x3ab9a80, aVtableSlot=..., pReturnTypeRef=0x1c07390, nParams=0, pParams=0x0, pUnoReturn=0x0, pUnoArgs=0x0, ppUnoExc=0x2b12e6861488) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:237 > pStack = 0x2b12e6861170 > pFPR = {2.3399036413000935e-310, 2.3399017635979741e-310, 1.9097962118687451e-313, 2.3399036413020203e-310, 2.9003052604790195e-316, -1.3614915359519845e+193, 2.339903641302465e-310, 0} > __PRETTY_FUNCTION__ = "void cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, typelib_TypeDescriptionReference*, sal_Int32, typelib_MethodParameter*, void*, void**, uno_Any**)" > pCppArgs = 0x2b12e6861160 > pStackStart = 0x2b12e6861170 > pGPR = {61588208, 9, 47360176952128, 47360119419570, 0, 58702832} > nTempIndices = 0 > nFPR = 0 > pAdjustedThisPtr = 0x3abc2f0 > ppTempParamTypeDescr = 0x2b12e6861160 > nGPR = 1 > pReturnTypeDescr = 0x1c07390 > pCppReturn = 0x0 > bSimpleReturn = true > pTempIndices = 0x2b12e6861160 > #13 0x00002b12e3176bdb in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) (pUnoI=0x3ab9a80, pMemberDescr=0x37fbbf0, pReturn=0x0, pArgs=0x0, ppException=0x2b12e6861488) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:425 > nMemberPos = 27 > aVtableSlot = {offset = 0, index = 9} > pThis = 0x3ab9a80 > pTypeDescr = 0x2b14740 > __PRETTY_FUNCTION__ = "void bridges::cpp_uno::shared::unoInterfaceProxyDispatch(uno_Interface*, const typelib_TypeDescription*, void*, void**, uno_Any**)" > #14 0x00002b12e441cf28 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const (this=0x3a0fd50, returnValue=0x2b12e68618a0, outArguments=0x2b12e6861920) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/incomingrequest.cxx:242 > exc = <error reading variable: Cannot access memory at address 0x7261686320747376> > pexc = 0x2b12e68614b0 > retType = {_pTypeDescr = 0x1c07390} > nSize = 0 > retBuf = std::__debug::vector of length 0, capacity 0 > outBufs = empty std::__debug::list > args = std::__debug::vector of length 0, capacity 0 > __PRETTY_FUNCTION__ = "bool binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny>*) const" > isExc = false > #15 0x00002b12e441bd16 in binaryurp::IncomingRequest::execute() const (this=0x3a0fd50) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/incomingrequest.cxx:79 > resetCc = true > oldCc = {m_pUnoI = 0x0} > ret = {data_ = _uno_Any(void)} > outArgs = std::__debug::vector of length 0, capacity 0 > isExc = false > #16 0x00002b12e443c7a4 in binaryurp::(anonymous namespace)::request(void*) (pThreadSpecificData=0x3a0fd50) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/reader.cxx:85 > __PRETTY_FUNCTION__ = "void binaryurp::{anonymous}::request(void*)" > #17 0x00002b12c2ce1f5f in cppu_threadpool::JobQueue::enter(long, bool) (this=0x3ab9da0, nDisposeId=61386512, bReturnWhenNoJob=true) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/threadpool/jobqueue.cxx:107 > guard = {pT = 0x3ab9da0} > job = {pThreadSpecificData = 0x3a0fd50, doRequest = 0x2b12e443c73b <binaryurp::(anonymous namespace)::request(void*)>} > pReturn = 0x0 > #18 0x00002b12c2ce6bfd in cppu_threadpool::ORequestThread::run() (this=0x3a8af10) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/threadpool/thread.cxx:172 > #19 0x00002b12c2ce712b in osl::threadFunc(void*) (param=0x3a8af20) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/include/osl/thread.hxx:185 > pObj = 0x3a8af20 > #20 0x00002b12bf40d7bd in osl_thread_start_Impl(void*) (pData=0x3a4c7e0) at /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sal/osl/unx/thread.cxx:237 > terminate = false > pImpl = 0x3a4c7e0 > __PRETTY_FUNCTION__ = "void* osl_thread_start_Impl(void*)" > #21 0x00002b12bfdf7dc5 in start_thread () at /lib64/libpthread.so.0 > #22 0x00002b12bfb24ced in clone () at /lib64/libc.so.6 [...] > make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/workdir/JunitTest/sd_unoapi/done] Error 1 Change-Id: I7d034c02a49d315104d8329a4e1119e14e8e5e40 Reviewed-on: https://gerrit.libreoffice.org/40176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-07-13Reorganize Scheduler priority classesJan-Marek Glogowski
This is based on glibs classification of tasks, but while glib uses an int for more fine grained priority, we stay with our enum. 1. Timers start with DEFAULT priority, which directly corresponds with the previous HIGH priority 2. Idles start with DEFAULT_IDLE priority instead of the previous HIGH priority, so idle default becomes "really run when idle". As RESIZE and REPAINT are special, and the DEFAULTS are set, there is just one primary decision for the programmer: should my idle run before paint (AKA HIGH_IDLE)? If we really need a more fine-grained classification, we can add it later, or also switch to a real int. As a result, this drops many classifications from the code and drastically changes behaviour, AKA a mail merge from KDE is now as fast as Gtk+ again. Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
2017-07-13OSX fix empty message queue handlingJan-Marek Glogowski
For some (unknown) reason [NSApp postEvent: ... atStart: NO] doesn't append the event, if the message queue is empty (AKA [NSApp nextEventMatchingMask .. ] returns nil). Due to nextEventMatchingMask usage, these postEvents have to run in the main thread. Using performSelectorOnMainThread deadlocks, since the calling thread may have locked the Yield mutex, so we simply defer the call using an NSEvent, like the Windows backend. So we have to peek at the queue and if it's empty simply prepend the event using [.. atStart: YES]. In the end this make the vcl_timer unit test pass on OSX. Change-Id: Ib41186425b2f76faa0e9f116f47fdcd60d878099
2017-07-13OSX change to run LO via a single shot timerJan-Marek Glogowski
As all other backends, this runs the LO main loop just via the OSX main loop. Change-Id: Ie7562444951e16ff58edcaf6409f32809314c2fa
2017-07-13Drop special idle handlingJan-Marek Glogowski
Idles are just instant timers, which should most time have a low priority, By dropping most special idle handling we'll just schedule by priority. This also reverts SalYieldResult back to a bool, which just indicates if any event was processed. Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
2017-07-13Refactor Scheduler global dataJan-Marek Glogowski
Move all Scheduler members of ImplSVData into ImplSchedulerContext and make ImplSchedulerContext a member of ImplSVData. Change-Id: I186bebdfb5701543595848968235b5a56b6598e9
2017-07-13Add some Scheduler unit tests and loggingJan-Marek Glogowski
1. calling Start() for invoked tasks 2. correctly schedule by priority 3. self-stopping AutoTimer This also adds SAL_INFO output to Scheduler and Task to log the scheduling processing tasks. Change-Id: I3c8a708d1fd51c550320f8af3f9486c43c32e358
2017-07-12strip some linefeeds from the end of debug outputNoel Grandin
Change-Id: I2821969d86b7f8cee53404e6a0acfbebbe53b3ac Reviewed-on: https://gerrit.libreoffice.org/39824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-30loplugin:oncevarStephan Bergmann
Change-Id: I740ccb3335d602d309422ba26913c4503c6345f0
2017-06-17loplugin:unusedfields in vcl part3Noel Grandin
Change-Id: I5a6319ba1667af6e9b7b92c22f858188c28c4c61 Reviewed-on: https://gerrit.libreoffice.org/38835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17loplugin:unusedfields in vcl part1Noel Grandin
Change-Id: I67d176003f39992cd0ff9271a7d6ce26d2cb6619 Reviewed-on: https://gerrit.libreoffice.org/38828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30loplugin:stringcopy (macOS)Stephan Bergmann
Change-Id: I917982ff7cd6e342125dc4349de7d16e1dad9f22
2017-05-20cleanup unused css/uri/ includesJochen Nitschke
Change-Id: I08c7981ecce45e343ff9e98277dd3aea4ed68ab9 Reviewed-on: https://gerrit.libreoffice.org/37860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-18Clean up a set of RTL-related commentsTor Lillqvist
It is fairly pointless to have a comment like "--- RTL --- (mirror mouse pos)" in front of code that obviously is related to RTL anyway, like "if( AllSettings::GetLayoutRTL() )". Also, the fact that many comment were exactly the same indicates that they has been added as an in-line version control change marker. In other places, comments were informational, but no need for them to include yet another metasyntax, "--- RTL ---". Just "RTL:" works fine. Change-Id: I20feef308ed8ac9d32a8bf440fc20b442753c4ff
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-07revert OSL_ASSERT changesChris Sherlock
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert most of vcl codebase away from OSL_ASSERT to assertChris Sherlock
Change-Id: Ifaae7af7169fe6c24d152f8aba51ba3ff3bdb9f8
2017-05-04Replace all OUString("") with OUString()Arnaud Versini
Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0 Reviewed-on: https://gerrit.libreoffice.org/37146 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: vclStephan Bergmann
Change-Id: I4a982da10ad76f8ae05355cec9629b906c95afdb
2017-04-14remove the remaining unused mouse cursorsCaolán McNamara
which are not used by us directly or aliases of published awt constants Change-Id: Ic4f009715d71a2f986b8ef8d64b4b2e64986bf3b
2017-04-14revert removal of apparently unused mouse cursorsCaolán McNamara
partial revert of... commit 65b7b6322b662785bf032e66c76abc36c9a2bb0e Date: Wed Feb 8 10:40:28 2017 +0200 loplugin:unusedenumconstants read-only constants in vcl because we cast the com::sun::star::awt::SystemPointer values to PointerStyle in VCLXPointer::setType and we've at least lost the PEN as used in the slideshow context menu's pen mode "toolkit/source/awt/vclxpointer.cxx" 74L, 2181C Change-Id: I5ef677f70ebc491b50403de0f92179ea4ae3bb14 Reviewed-on: https://gerrit.libreoffice.org/36526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-06loplugin:redundantcastStephan Bergmann
Change-Id: I925879cf8df630e4e20773c363b9a27a572f3093
2017-04-03use actual UNO enums in vcl..xmlsecurityNoel Grandin
Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc Reviewed-on: https://gerrit.libreoffice.org/36041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-19Fix typos + some German translationsAndrea Gelmini
Change-Id: I1c5bb725ffdf72363279436ad9bbb88064228253 Reviewed-on: https://gerrit.libreoffice.org/35406 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19vcl: have AcquaSalInstance use osl::Condition instead of oslConditionChris Sherlock
Condition is deprecated already, but there is no need for the AcquaSalInstance class to use the low-level C-API, when in fact there is a C++ fascade that calls on this via the C++ abstraction, osl::Condition. This will make it much easier to switch to using std::condition_variable in the future. Change-Id: Ic495c4120a59480bf50a8c5b73608874fc4228ea Reviewed-on: https://gerrit.libreoffice.org/35392 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-13Clean up integer types representing positions in ToolBox's item vectorStephan Bergmann
(vs. uses of sal_uInt16 representing such items' IDs). APPEND and ITEM_NOTFOUND are members of ToolBox now (and have been bumped to the corresponding type's max). The payload of VclEventIds ToolboxButtonStateChanged ToolboxClick ToolboxHighlightOff ToolboxItemAdded ToolboxItemDisabled ToolboxItemEnabled ToolboxItemRemoved ToolboxItemTextChanged ToolboxItemUpdated ToolboxItemWindowChanged ToolboxSelect has been changed too (note that reading/writing of those payloads isn't very consistent, though: for some of these, values are written that are never read, while for some others no values are ever written but the reading code would like to receive some value if the payload wasn't a nullptr). Change-Id: I4856ffb3637404b8d866621a3503d7922b1b8141
2017-02-28loplugin:unoanyStephan Bergmann
Change-Id: I525ba4d7706e6f6a385a0fbf5976d8e9883a40a5
2017-02-20remove unused enumerators from PrinterCapTypeNoel Grandin
Change-Id: Id4f788dfae64e7a9bcde16af2db2ddeafaf6900e Reviewed-on: https://gerrit.libreoffice.org/34468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14Convert WindowType to scoped enumNoel Grandin
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9 Reviewed-on: https://gerrit.libreoffice.org/34219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-12Get rid of "unicodes" in lower-case, tooTor Lillqvist
Instead, use "code points" (if you mean full 21-bit Unicode code points), or "code units" (if you mean the 16-bit units that make up UTF-16). Hopefully I got it right which one was meant in each case here. Change-Id: I8ee7a98996f1cebcfb95cd7d18a56570e48fa390
2017-02-09remove ConnectionIdentifierType enumNoel Grandin
since we only use the AsciiCString enumerator. Consequently simplify the GetConnectionIdentifier method Change-Id: I9e1a1318d2f12bfd18edeb8479e0e7171b22d0f1 Reviewed-on: https://gerrit.libreoffice.org/34026 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08loplugin:unusedenumconstants read-only constants in vclNoel Grandin
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2 Reviewed-on: https://gerrit.libreoffice.org/34018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06Add missing #includesStephan Bergmann
...like 6dce9c6757823b9e89863716ae70ff4e8ddd4e60, for macOS-only code Change-Id: I0b4c0ba12df487107661a6af54fba42122e8f023
2017-02-05sal_uIntPtr to sal_uInt16Matteo Casalin
Change-Id: If463ae457f53a0a8b12cc0748afbc654f54ae3c3
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-20loplugin:dynexcspec (macOS), vclStephan Bergmann
Change-Id: I83dfd406eefe9d50fa382eede45882abe669bc96
2017-01-17Refactor Scheduler to add Task classJan-Marek Glogowski
Moves all the "task-specific" stuff into a Task class and just keeps the "real" static Scheduler functions in the original Scheduler class. Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2017-01-09loplugin:externvarStephan Bergmann
Change-Id: Ie6834e7cb1e65a2e24c6250126c24463e6e49354
2017-01-08Work around -fsanitize=float-cast-overflowStephan Bergmann
...when the value is outside the range of type 'unsigned char'; hopefully it'll always be in the range of type 'long long' Change-Id: I8ec38727648bea20875cb488fe143b4759812b5a
2017-01-08loplugin:salboolStephan Bergmann
Change-Id: I1da621fa46de1ff0c268d10d46a7b5a8bd860623
2016-12-20Update duplicated / outdated NWS documentationJan-Marek Glogowski
Removes the old, copied NWS documentation blocks from all native implementations and update the parent SalGraphics documentation. Change-Id: I0eff8ea0987c5c841e1b023340b1c3787c09e2ca
2016-12-19vcl: separate ImplImageTree - ImageTree singleton and public ifaceTomaž Vajngerl
ImplImageTree was used outside of VCL which is not consistent with the name and the header also contains a lot of implementation detail. This separates the implementation to ImplImageTree and the public interface and singleton to ImageTree only. Change-Id: I3a26444f0f6971a6b1d83472e9cef19c93192d3e Reviewed-on: https://gerrit.libreoffice.org/32134 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-12-13change from glew to epoxyCaolán McNamara
because that works under wayland out of the box and gtk3 uses it already Change-Id: Iefaac31e325534a81a5389f752804af917c1baef Reviewed-on: https://gerrit.libreoffice.org/31213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-07convert VCLEVENT constants to scoped enumNoel Grandin
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06remove some ascii art and demote a SAL_WARNNoel Grandin
Change-Id: Ia4d084a598aca050cda02c17d11ed97eecef7650
2016-12-06OSL_TRACE -> SAL_ in vclNoel Grandin
Change-Id: Icd317671a6b1b5356f0ccc7c59d50952fe20269b Reviewed-on: https://gerrit.libreoffice.org/31667 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>