[Libreoffice-commits] core.git: 3 commits - chart2/source qadevOOo/tests sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 16 19:25:16 UTC 2019
chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 7 ++++---
qadevOOo/tests/java/ifc/frame/_XController.java | 3 ++-
sfx2/source/control/request.cxx | 14 +++++++++-----
3 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit 31fd3641b363c81ab23e10e6425a39e27a224c3d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Nov 16 16:40:33 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 16 20:24:33 2019 +0100
cid#1453998 Wrapper object use after free
Change-Id: I1dc733e72ba63db1eaa20113a7599ea7580eef31
Reviewed-on: https://gerrit.libreoffice.org/82988
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index ccf2cdc5221f..2bdedc962856 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -68,6 +68,10 @@ CreationWizard::CreationWizard(weld::Window* pParent, const uno::Reference<frame
declarePath(PATH_FULL, aPath);
+ m_pTemplateProvider = static_cast<ChartTypeTabPage*>(GetOrCreatePage(STATE_CHARTTYPE));
+ assert(m_pTemplateProvider && "must exist");
+ m_pDialogModel->setTemplate(m_pTemplateProvider->getCurrentTemplate());
+
SetRoadmapHelpId(HID_SCH_WIZARD_ROADMAP);
if (!m_pDialogModel->getModel().isDataFromSpreadsheet())
@@ -97,9 +101,6 @@ std::unique_ptr<BuilderPage> CreationWizard::createPage(WizardState nState)
{
m_aTimerTriggeredControllerLock.startTimer();
xRet = std::make_unique<ChartTypeTabPage>(pPageContainer, this, m_xChartModel);
- m_pTemplateProvider = static_cast<ChartTypeTabPage*>(xRet.get());
- if (m_pDialogModel)
- m_pDialogModel->setTemplate( m_pTemplateProvider->getCurrentTemplate());
break;
}
case STATE_SIMPLE_RANGE:
commit 591c305541306d41d3777ad5e2c92f875072e2d9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Nov 16 17:54:26 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 16 20:24:16 2019 +0100
cid#1448447 silence RV: Bad use of return value
Change-Id: If24d5fffb4ecf86fa6a43d824b5e40fcef29a691
Reviewed-on: https://gerrit.libreoffice.org/82995
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/qadevOOo/tests/java/ifc/frame/_XController.java b/qadevOOo/tests/java/ifc/frame/_XController.java
index af467456e9e6..0419976a8ca2 100644
--- a/qadevOOo/tests/java/ifc/frame/_XController.java
+++ b/qadevOOo/tests/java/ifc/frame/_XController.java
@@ -153,7 +153,8 @@ public class _XController extends MultiMethodTest {
log.println("as expected, see #82938");
}
tRes.tested("attachModel()", result);
- oObj.attachModel(firstModel);
+ boolean bResult = oObj.attachModel(firstModel);
+ log.println("attachModel() --> " + bResult);
}
/**
commit 2d6f56e4f7e492ba5394a86f13bc710bf6c68335
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Nov 16 16:30:59 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 16 20:24:02 2019 +0100
cid#1455212 Uncaught exception
Change-Id: I75956bfc3dccdf3ef400c3b9dcea40606abb8504
Reviewed-on: https://gerrit.libreoffice.org/82987
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index fcdb5c036f32..ec3d36eb4467 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -74,7 +74,7 @@ struct SfxRequest_Impl: public SfxListener
SfxViewFrame* pViewFrame;
css::uno::Reference< css::frame::XDispatchRecorder > xRecorder;
- css::uno::Reference< uno::XComponentContext > xContext;
+ css::uno::Reference< css::util::XURLTransformer > xTransform;
explicit SfxRequest_Impl( SfxRequest *pOwner )
: pAnti( pOwner)
@@ -88,7 +88,6 @@ struct SfxRequest_Impl: public SfxListener
, nCallMode( SfxCallMode::SYNCHRON )
, bAllowRecording( false )
, pViewFrame(nullptr)
- , xContext(comphelper::getProcessComponentContext())
{
}
@@ -167,6 +166,8 @@ SfxRequest::SfxRequest
{
pImpl->SetPool( &pImpl->pShell->GetPool() );
pImpl->xRecorder = SfxRequest::GetMacroRecorder(pImpl->pViewFrame);
+ if (pImpl->xRecorder)
+ pImpl->xTransform = util::URLTransformer::create(comphelper::getProcessComponentContext());
pImpl->aTarget = pImpl->pShell->GetName();
}
else
@@ -206,6 +207,8 @@ SfxRequest::SfxRequest
{
pImpl->SetPool( &pImpl->pShell->GetPool() );
pImpl->xRecorder = SfxRequest::GetMacroRecorder( pViewFrame );
+ if (pImpl->xRecorder)
+ pImpl->xTransform = util::URLTransformer::create(comphelper::getProcessComponentContext());
pImpl->aTarget = pImpl->pShell->GetName();
}
else
@@ -333,10 +336,11 @@ void SfxRequest_Impl::Record
*/
{
- OUString aCmd = ".uno:" + OUString::createFromAscii( pSlot->GetUnoName() );
if(!xRecorder.is())
return;
+ OUString aCmd = ".uno:" + OUString::createFromAscii( pSlot->GetUnoName() );
+
uno::Reference< container::XIndexReplace > xReplace( xRecorder, uno::UNO_QUERY );
if ( xReplace.is() && aCmd == ".uno:InsertText" )
{
@@ -360,8 +364,6 @@ void SfxRequest_Impl::Record
}
}
- uno::Reference< util::XURLTransformer > xTransform = util::URLTransformer::create( xContext );
-
css::util::URL aURL;
aURL.Complete = aCmd;
xTransform->parseStrict(aURL);
@@ -392,6 +394,8 @@ void SfxRequest::Record_Impl
pImpl->pShell = &rSh;
pImpl->pSlot = &rSlot;
pImpl->xRecorder = xRecorder;
+ if (!pImpl->xTransform)
+ pImpl->xTransform = util::URLTransformer::create(comphelper::getProcessComponentContext());
pImpl->aTarget = rSh.GetName();
pImpl->pViewFrame = pViewFrame;
}
More information about the Libreoffice-commits
mailing list