[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/view/ipclient.cxx |3 ++- vcl/source/window/window.cxx |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit 9e88172d28edf315676f52ed9a99077e95cd9628 Author: Szymon Kłos AuthorDate: Wed Mar 24 11:45:51 2021 +0100 Commit: Szymon Kłos CommitDate: Thu Apr 8 15:45:53 2021 +0200 SfxInPlaceClient: avoid crash when chart deleted by other view Be sure m_pClient still is valid. In case when one view was in the chart editing mode and other view deleted the slide, m_pClient was cleared in the meantime what caused a crash Change-Id: Ie433946799abef4c75af7b96f3e5cf9ba0e7ec47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113032 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113786 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 1d3c375b6eb4..3c40c7bdf4a6 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -308,7 +308,8 @@ void SAL_CALL SfxInPlaceClient_Impl::visibilityChanged( sal_Bool bVisible ) throw uno::RuntimeException(); m_pClient->GetViewShell()->OutplaceActivated( bVisible ); -m_pClient->Invalidate(); +if (m_pClient) // it can change in the above code +m_pClient->Invalidate(); } commit 3889d15537ad1cc3db9dce6f410dc42265d873b9 Author: Szymon Kłos AuthorDate: Wed Mar 24 11:10:18 2021 +0100 Commit: Szymon Kłos CommitDate: Thu Apr 8 15:45:41 2021 +0200 ImplNewInputContext: check pointer before use Change-Id: Id98cc2037f6cfb9c5468d67b00595d940aa88946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113030 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113785 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4c1b8c72d699..08b07aadbd17 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1729,7 +1729,7 @@ void Window::ImplNewInputContext() { ImplSVData* pSVData = ImplGetSVData(); vcl::Window* pFocusWin = pSVData->mpWinData->mpFocusWin; -if ( !pFocusWin || pFocusWin->IsDisposed() ) +if ( !pFocusWin || !pFocusWin->mpWindowImpl || pFocusWin->IsDisposed() ) return; // Is InputContext changed? ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |7 +++ vcl/source/app/help.cxx| 29 ++--- 2 files changed, 21 insertions(+), 15 deletions(-) New commits: commit 5006e4fe6bd5e5a176e2e1837e826a0b67da08e7 Author: Szymon Kłos AuthorDate: Mon Oct 5 16:38:15 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Nov 12 13:30:31 2020 +0100 Don't reuse tooltip window in different context This causes interference to other views due to usage of global references in Online. Change-Id: Ib9346881d4e48ac1ce3456d386806582ade82255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103994 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105593 Tested-by: Jenkins diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 7f16b6a0a699..4785b47aca3a 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -498,21 +498,10 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe { SAL_WARN_IF( pHelpWin == pParent, "vcl", "HelpInHelp ?!" ); -if ( ( rHelpText.isEmpty() -|| ( pHelpWin->GetWinStyle() != nHelpWinStyle ) -) -&& aHelpData.mbRequestingHelp -) -{ -// remove help window if no HelpText or -// other help mode. but keep it if we are scrolling, ie not requesting help -bool bWasVisible = pHelpWin->IsVisible(); -if ( bWasVisible ) -bNoDelay = true; // display it quickly if we were already in quick help mode -pHelpWin = nullptr; -ImplDestroyHelpWindow( bWasVisible ); -} -else +bool bRemoveHelp = (rHelpText.isEmpty() || (pHelpWin->GetWinStyle() != nHelpWinStyle)) +&& aHelpData.mbRequestingHelp; + +if (!bRemoveHelp && pHelpWin->GetParent() == pParent) { bool const bUpdate = (pHelpWin->GetHelpText() != rHelpText) || ((pHelpWin->GetHelpArea() != rHelpArea) && aHelpData.mbRequestingHelp); @@ -525,6 +514,16 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe pHelpWin->Invalidate(); } } +else +{ +// remove help window if no HelpText or +// other help mode. but keep it if we are scrolling, ie not requesting help +bool bWasVisible = pHelpWin->IsVisible(); +if ( bWasVisible ) +bNoDelay = true; // display it quickly if we were already in quick help mode +pHelpWin = nullptr; +ImplDestroyHelpWindow( bWasVisible ); +} } if (pHelpWin || rHelpText.isEmpty()) commit 92b88e0cc7e3d432acc9ec5a894451018fbf7b95 Author: Szymon Kłos AuthorDate: Mon Oct 12 14:19:54 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Nov 12 13:30:24 2020 +0100 notebookbar: set language before creating Change-Id: I04243667b564670096d2c8db0352ab179e1b0151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104212 Tested-by: Andras Timar Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105595 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 4c5ccbe8a063..39e60f61dfe9 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -380,6 +380,13 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, aNotebookBarAddonsItem.aImageValues = aImageValues; // setup if necessary +if (comphelper::LibreOfficeKit::isActive()) +{ +// update the current LOK language and locale for the dialog tunneling + comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag()); + comphelper::LibreOfficeKit::setLocale(pViewShell->GetLOKLocale()); +} + pSysWindow->SetNotebookBar(aBuf, xFrame, aNotebookBarAddonsItem , bReloadNotebookbar); pNotebookBar = pSysWindow->GetNotebookBar(); pNotebookBar->Show(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/sidebar/SidebarChildWindow.cxx |8 ++-- sfx2/source/sidebar/SidebarController.cxx|4 sfx2/source/sidebar/SidebarDockingWindow.cxx |2 +- vcl/source/window/window.cxx |2 ++ 4 files changed, 13 insertions(+), 3 deletions(-) New commits: commit e6c62ff1361ac5b9b430ddd5dae729a8b10aadff Author: Ashod Nakashian AuthorDate: Tue Nov 20 12:04:58 2018 -0500 Commit: Noel Grandin CommitDate: Fri Jul 26 11:46:26 2019 +0200 LOK: sidebar: start collapsed Change-Id: I589fce5ee207da0e0ac113b7ccc1ed1edd06c5da Reviewed-on: https://gerrit.libreoffice.org/73513 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx index e84d2fb4b379..ac0a68852ea9 100644 --- a/sfx2/source/sidebar/SidebarChildWindow.cxx +++ b/sfx2/source/sidebar/SidebarChildWindow.cxx @@ -62,8 +62,12 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n if (comphelper::LibreOfficeKit::isActive()) { -// Undock for Lok. -pDockingParent->SetFloatingSize(Size(400, 600)); +// Undock sidebar in LOK to allow for resizing freely +// (i.e. when the client window is resized) and collapse +// it so the client can open it on demand. +pDockingParent->SetFloatingSize( +Size(TabBar::GetDefaultWidth() * GetWindow()->GetDPIScaleFactor(), + pDockingParent->GetSizePixel().Height())); pDockingParent->SetFloatingMode(true); } } commit a1b718044dadc46388bff0e20a7e50bf9d514596 Author: Ashod Nakashian AuthorDate: Sun Nov 11 16:51:05 2018 -0500 Commit: Noel Grandin CommitDate: Fri Jul 26 11:46:14 2019 +0200 LOK: sidebar: release LOKNotifier on destruction And enable sidebar routing only while we have a valid SidebarController instance (i.e. not disposed). Change-Id: I665f934f762c0ce9efdce5489ec9babe006376a8 Reviewed-on: https://gerrit.libreoffice.org/73512 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 6b3bcc025e0d..bbdb1a4c8c67 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -205,6 +205,10 @@ void SidebarController::unregisterSidebarForFrame(SidebarController* pController void SidebarController::disposeDecks() { SolarMutexGuard aSolarMutexGuard; + +if (comphelper::LibreOfficeKit::isActive()) +mpParentWindow->ReleaseLOKNotifier(); + mpCurrentDeck.clear(); maFocusManager.Clear(); mpResourceManager->disposeDecks(); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 834bb59f26bb..a12bb6f4d12e 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -113,7 +113,7 @@ void SidebarDockingWindow::NotifyResize() { if (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && mbSidebarVisibleInLOK) { -if (!GetLOKNotifier()) +if (mpSidebarController.is() && !GetLOKNotifier()) SetLOKNotifier(SfxViewShell::Current()); if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 3b26f70d7040..2ac475725996 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3173,6 +3173,8 @@ void Window::SetLOKNotifier(const vcl::ILibreOfficeKitNotifier* pNotifier, bool // don't allow setting this twice assert(mpWindowImpl->mpLOKNotifier == nullptr); assert(pNotifier); +// never use this in the desktop case +assert(comphelper::LibreOfficeKit::isActive()); if (!bParent) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/dialog/splitwin.cxx |5 ++--- vcl/source/window/accel.cxx | 39 --- 2 files changed, 18 insertions(+), 26 deletions(-) New commits: commit 7b8e5bbfb5819ee6fec544792c14e91bc6075d29 Author: Noel Grandin AuthorDate: Tue Oct 30 11:14:42 2018 +0200 Commit: Noel Grandin CommitDate: Wed Oct 31 07:33:23 2018 +0100 loplugin:useuniqueptr in SfxSplitWindow Change-Id: I30ece3781df9f705c96f9fc69e2b2a943625f6b3 Reviewed-on: https://gerrit.libreoffice.org/62659 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 36302fb5957f..9dd57d90615a 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -243,7 +243,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, sal_uInt16 nCount = static_cast(aWinData.getToken(i++, ',').toInt32()); for ( sal_uInt16 n=0; n pDock(new SfxDock_Impl); pDock->pWin = nullptr; pDock->bNewLine = false; pDock->bHide = true; @@ -255,14 +255,13 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, if ( !pDock->nType ) { // Read error -delete pDock; break; } else pDock->bNewLine = true; } -maDockArr.insert(maDockArr.begin() + n, std::unique_ptr(pDock)); +maDockArr.insert(maDockArr.begin() + n, std::move(pDock)); } } } commit ea277ae70ee7f676ffa21fc1e7dd06ce06616d27 Author: Noel Grandin AuthorDate: Mon Oct 29 14:39:45 2018 +0200 Commit: Noel Grandin CommitDate: Wed Oct 31 07:33:07 2018 +0100 loplugin:useuniqueptr in Accelerator Change-Id: I4dbca6a57ea150067f734b2edb79e750b3ff9745 Reviewed-on: https://gerrit.libreoffice.org/62656 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 7ba39842a2af..7222111e883d 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -26,7 +26,7 @@ #include typedef ::std::map< sal_uLong, ImplAccelEntry* > ImplAccelMap; -typedef ::std::vector< ImplAccelEntry* > ImplAccelList; +typedef ::std::vector< std::unique_ptr > ImplAccelList; #define ACCELENTRY_NOTFOUND (sal_uInt16(0x)) @@ -84,7 +84,7 @@ static sal_uInt16 ImplAccelEntryGetIndex( ImplAccelList* pList, sal_uInt16 nId, return ACCELENTRY_NOTFOUND; } -static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry ) +static void ImplAccelEntryInsert( ImplAccelList* pList, std::unique_ptr pEntry ) { sal_uInt16 nInsIndex(0); std::vector::size_type nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, ); @@ -96,27 +96,23 @@ static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry ) nIndex++; ImplAccelEntry* pTempEntry = nullptr; if ( nIndex < pList->size() ) -pTempEntry = (*pList)[ nIndex ]; +pTempEntry = (*pList)[ nIndex ].get(); if ( !pTempEntry || (pTempEntry->mnId != pEntry->mnId) ) break; } while ( nIndex < pList->size() ); if ( nIndex < pList->size() ) { -ImplAccelList::iterator it = pList->begin(); -::std::advance( it, nIndex ); -pList->insert( it, pEntry ); +pList->insert( pList->begin() + nIndex, std::move(pEntry) ); } else { -pList->push_back( pEntry ); +pList->push_back( std::move(pEntry) ); } } else { if ( nInsIndex < pList->size() ) { -ImplAccelList::iterator it = pList->begin(); -::std::advance( it, nInsIndex ); -pList->insert( it, pEntry ); +pList->insert( pList->begin() + nInsIndex, std::move(pEntry) ); } else { -pList->push_back( pEntry ); +pList->push_back( std::move(pEntry) ); } } } @@ -139,9 +135,9 @@ ImplAccelEntry* Accelerator::ImplGetAccelData( const vcl::KeyCode& rKeyCode ) co void Accelerator::ImplCopyData( ImplAccelData& rAccelData ) { // copy table -for (ImplAccelEntry* i : rAccelData.maIdList) +for (std::unique_ptr& i : rAccelData.maIdList) { -ImplAccelEntry* pEntry = new ImplAccelEntry( *i ); +std::unique_ptr pEntry(new ImplAccelEntry( *i )); // sequence accelerator, then copy also if ( pEntry->mpAccel ) @@ -152,17 +148,16 @@ void Accelerator::ImplCopyData( ImplAccelData& rAccelData ) else pEntry->mpAutoAccel = nullptr; -mpData->maKeyMap.insert( std::make_pair(
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/dialog/basedlgs.cxx | 22 vcl/source/window/window.cxx| 44 +--- 2 files changed, 46 insertions(+), 20 deletions(-) New commits: commit 76de866e162502518acbc0ab020c257b80946c2d Author: Pranav KantDate: Thu Dec 14 13:11:00 2017 +0530 lokdialog: Send close callback when dialog dissappears too Change-Id: I88bea3dc1ae938d31462e85ca1a8f48dd13e8e89 diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index f44ed4c15446..a11ddad63f02 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -161,10 +161,9 @@ void SfxModalDialog::dispose() SetDialogData_Impl(); delete pOutputSet; -SfxViewShell* pViewShell = SfxViewShell::Current(); -if (comphelper::LibreOfficeKit::isActive() && pViewShell) +if (comphelper::LibreOfficeKit::isActive() && GetLOKNotifier()) { -pViewShell->notifyWindow(GetLOKWindowId(), "close"); +SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "close"); ReleaseLOKNotifier(); } @@ -208,13 +207,13 @@ void SfxModalDialog::CreateOutputItemSet( const SfxItemSet& rSet ) void SfxModalDialog::StateChanged( StateChangedType nType ) { -if (comphelper::LibreOfficeKit::isActive() && nType == StateChangedType::InitShow) +if (comphelper::LibreOfficeKit::isActive()) { -// There are some dialogs, like Hyperlink dialog, which inherit from -// SfxModalDialog even though they are modeless, i.e., their Execute method -// isn't called. -if (!GetLOKNotifier()) +if (nType == StateChangedType::InitShow && !GetLOKNotifier()) { +// There are some dialogs, like Hyperlink dialog, which inherit from +// SfxModalDialog even though they are modeless, i.e., their Execute method +// isn't called. SetLOKNotifier(SfxViewShell::Current()); const Size aSize = GetOptimalSize(); std::vector aItems; @@ -222,6 +221,13 @@ void SfxModalDialog::StateChanged( StateChangedType nType ) aItems.emplace_back(std::make_pair("size", aSize.toString())); SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", aItems); } +else if (nType == StateChangedType::Visible && + !IsVisible() && + GetLOKNotifier()) +{ +SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "close"); +ReleaseLOKNotifier(); +} } ModalDialog::StateChanged(nType); commit 53f8f28c53391ef1cadefaf16c3a9e81e04ac7f5 Author: Pranav Kant Date: Thu Dec 14 12:53:35 2017 +0530 lokdialog: Unblock custom window mouse key events In some cases, the mouse event blocks. Eg: when the mouse event is responsible for launching a new dialog (cf. Spell dialog -> Options). We don't want any kind of blocking behavior whatsoever in LOK. Post all custom window mouse events back the main-loop thread and keep the current LOK thread free. Change-Id: I018870fadcb62dbb7b33a7d93f8af3a442b5 diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1e76d47890a2..8075a6368784 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3231,15 +3231,33 @@ VclPtr Window::GetParentWithLOKNotifier() return pWindow; } +struct LOKAsyncEvent +{ +VclPtr mpWindow; +SalEvent mnEvent; +MouseEvent maMouseEvent; +}; + +static void LOKAsyncEventLink( void* pEvent, void* ) +{ +LOKAsyncEvent* pLOKEv = static_cast (pEvent); +if (!pLOKEv->mpWindow->IsDisposed()) +{ +ImplWindowFrameProc(pLOKEv->mpWindow, pLOKEv->mnEvent, >maMouseEvent); +} +} + void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent) { // When we're not doing tiled rendering, then positions must be passed as pixels. assert(comphelper::LibreOfficeKit::isActive()); -if (ImplIsFloatingWindow()) -ImplWindowFrameProc(ImplGetBorderWindow(), SalEvent::ExternalMouseButtonDown, ); -else -ImplWindowFrameProc(this, SalEvent::ExternalMouseButtonDown, ); +LOKAsyncEvent* pEv = new LOKAsyncEvent; +pEv->mpWindow = ImplIsFloatingWindow() ? ImplGetBorderWindow() : this; +pEv->mnEvent = SalEvent::ExternalMouseButtonDown; +pEv->maMouseEvent = rMouseEvent; +Application::PostUserEvent( Link (pEv, LOKAsyncEventLink) ); + } void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent) @@ -3247,10 +3265,11 @@ void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent) // When we're not doing tiled rendering, then positions must be passed as pixels. assert(comphelper::LibreOfficeKit::isActive()); -if (ImplIsFloatingWindow()) -ImplWindowFrameProc(ImplGetBorderWindow(),
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/appl/appinit.cxx |1 + vcl/source/window/dialog.cxx | 14 -- 2 files changed, 9 insertions(+), 6 deletions(-) New commits: commit b0e37303df56472fdc7782b977326c2391fdab07 Author: Michael MeeksDate: Fri Nov 24 13:43:03 2017 + tdf#114025 - avoid deadlock between x11 clipboard and the lock dialog. Change-Id: I06e66f59531e7ff6a2e0bf874ebcf2a882d89b63 Reviewed-on: https://gerrit.libreoffice.org/45228 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 4db7c9674a83..a55dc52705a4 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1063,13 +1063,15 @@ short Dialog::Execute() return 0; VclPtr xWindow = this; - -css::uno::Reference< css::uno::XComponentContext > xContext( +{ +SolarMutexReleaser aReleaser; // tdf#114025 +css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); -css::uno::Reference xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); -css::document::DocumentEvent aObject; -aObject.EventName = "DialogExecute"; -xEventBroadcaster->documentEventOccured(aObject); +css::uno::Reference xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); +css::document::DocumentEvent aObject; +aObject.EventName = "DialogExecute"; +xEventBroadcaster->documentEventOccured(aObject); +} UITestLogger::getInstance().log("DialogExecute"); // Yield util EndDialog is called or dialog gets destroyed // (the latter should not happen, but better safe than sorry commit 4271a447cbc9f517e6cbd257790d08672f973b0a Author: Michael Meeks Date: Fri Nov 24 14:46:21 2017 + tdf#114025 - minimal and not entirely convincing fix for assertion failure. Almost certainly most of the sfx code needs guarding with the SolarMutex. Change-Id: Ied52f1e57c44c20486777e08a901060c191043a2 Reviewed-on: https://gerrit.libreoffice.org/45233 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index a026765176b4..43f4131ddc5f 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -218,6 +218,7 @@ void SfxApplication::Initialize_Impl() if (!utl::ConfigManager::IsFuzzing()) { +SolarMutexGuard aGuard; //ensure instantiation of listener that manages the internal recently-used //list SfxPickList::ensure(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/view/lokhelper.cxx| 22 +- vcl/source/outdev/outdevstate.cxx |1 - 2 files changed, 17 insertions(+), 6 deletions(-) New commits: commit 91242645788f4a5806dfc2a8cf4918acda9ca9a6 Author: Caolán McNamaraDate: Fri Feb 24 10:03:02 2017 + coverity#1399161 the explicit Font::SetLanguage is unnecessary here the new language is set from the font this is a copy of, and has already been copied in the copy ctor Change-Id: I7c0f1bab56aefc7b4e7e0a16596fcfa48c2d diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index cf2ef0d..2681744 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -466,7 +466,6 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont ) { vcl::Font aFont( rNewFont ); -aFont.SetLanguage(rNewFont.GetLanguage()); if ( mnDrawMode & (DrawModeFlags::BlackText | DrawModeFlags::WhiteText | DrawModeFlags::GrayText | DrawModeFlags::GhostedText | DrawModeFlags::SettingsText | DrawModeFlags::BlackFill | DrawModeFlags::WhiteFill | DrawModeFlags::GrayFill | DrawModeFlags::NoFill | DrawModeFlags::GhostedFill | DrawModeFlags::SettingsFill ) ) commit 30847af56329975a8b6afc5c59991aae8f868d2e Author: Caolán McNamara Date: Fri Feb 24 09:36:00 2017 + don't have to create SfxApplication if it doesn't already exist Change-Id: I3ade4e2c2513f334217a85c676ada93c5ed683ff diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 43e0c1f..73e29f3 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -37,8 +37,12 @@ int SfxLokHelper::createView() void SfxLokHelper::destroyView(int nId) { +SfxApplication* pApp = SfxApplication::Get(); +if (!pApp) +return; + unsigned nViewShellId = nId; -SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl(); +SfxViewShellArr_Impl& rViewArr = pApp->GetViewShells_Impl(); for (SfxViewShell* pViewShell : rViewArr) { @@ -54,8 +58,12 @@ void SfxLokHelper::destroyView(int nId) void SfxLokHelper::setView(int nId) { +SfxApplication* pApp = SfxApplication::Get(); +if (!pApp) +return; + unsigned nViewShellId = nId; -SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl(); +SfxViewShellArr_Impl& rViewArr = pApp->GetViewShells_Impl(); for (SfxViewShell* pViewShell : rViewArr) { @@ -90,13 +98,17 @@ int SfxLokHelper::getView(SfxViewShell* pViewShell) std::size_t SfxLokHelper::getViewsCount() { -SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl(); -return rViewArr.size(); +SfxApplication* pApp = SfxApplication::Get(); +return !pApp ? 0 : pApp->GetViewShells_Impl().size(); } bool SfxLokHelper::getViewIds(int* pArray, size_t nSize) { -SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl(); +SfxApplication* pApp = SfxApplication::Get(); +if (!pApp) +return false; + +SfxViewShellArr_Impl& rViewArr = pApp->GetViewShells_Impl(); if (rViewArr.size() > nSize) return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source
sfx2/source/dialog/infobar.cxx |8 ++-- vcl/source/window/winproc.cxx |5 - 2 files changed, 10 insertions(+), 3 deletions(-) New commits: commit 3faf9c4a2a5d2f761dc83b942199f55cdbd5f054 Author: Philippe Jung phil.j...@free.fr Date: Thu May 7 10:15:46 2015 +0200 Fix a crash in SfxInfoBarWindow Fix a crash that occurs when a locked doc is opened. Ask to open it read-only, then click on Edit the document in the info bar. Used to crash. Change-Id: Ic6e53853345e9e8431cae0eb2408ab0624d92cce diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index ff91cc6..3c2c197 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -283,17 +283,21 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar(const OUString sId) void SfxInfoBarContainerWindow::removeInfoBar(SfxInfoBarWindow* pInfoBar) { +// Store a VclPtr to the pInfoBar while we remove it from m_pInfoBars +ScopedVclPtrSfxInfoBarWindow pTmp(pInfoBar); + +// Remove for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it) { if (pInfoBar == it-get()) { +it-disposeAndClear(); m_pInfoBars.erase(it); break; } } -if (pInfoBar) -pInfoBar-disposeOnce(); +// Resize long nY = 0; for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it) { commit cc444e083c59ffcd73520faf55a28f55cfcb0068 Author: Michael Meeks michael.me...@collabora.com Date: Thu May 7 11:08:24 2015 +0100 Hold a reference on the Window while emitting events from vcl backends. Change-Id: I4673dc03c214ca8f5c227a444e182a45f6199b9b diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 6cccd18..30db414 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -2377,11 +2377,14 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow, } } -bool ImplWindowFrameProc( vcl::Window* pWindow, SalFrame* /*pFrame*/, +bool ImplWindowFrameProc( vcl::Window* _pWindow, SalFrame* /*pFrame*/, sal_uInt16 nEvent, const void* pEvent ) { DBG_TESTSOLARMUTEX(); +// Ensure the window survives during this method. +VclPtrvcl::Window pWindow( _pWindow ); + bool nRet = false; // #119709# for some unknown reason it is possible to receive events (in this case key events) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits