diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 20:31:36 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 20:31:36 +0100 |
commit | 5be108ee578a4000ee77f2ccb9a2c2d5d2bcc39c (patch) | |
tree | c0cd05efba5c808fbca993a8c4c978b8dedbaa1f /starmath/qa | |
parent | 16f7f5899bddc32ddfdf3b0e23faee528883e36c (diff) |
starmath: convert new to ::Create to get initial ref-counting right.
Change-Id: I4382f4a9cf74f87766c76412698b4031574b6107
Diffstat (limited to 'starmath/qa')
-rw-r--r-- | starmath/qa/cppunit/test_starmath.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index d19c2972d2e9..0e3c1dead415 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -85,9 +85,9 @@ void Test::setUp() m_pDispatcher = new SfxDispatcher(pViewFrame); m_aBindings.SetDispatcher(m_pDispatcher); m_aBindings.EnterRegistrations(); - m_pSmCmdBoxWindow = new SmCmdBoxWindow(&m_aBindings, NULL, NULL); + m_pSmCmdBoxWindow.reset(VclPtr<SmCmdBoxWindow>::Create(&m_aBindings, nullptr, nullptr)); m_aBindings.LeaveRegistrations(); - m_pEditWindow = new SmEditWindow(*m_pSmCmdBoxWindow); + m_pEditWindow = VclPtr<SmEditWindow>::Create(*m_pSmCmdBoxWindow); m_pViewShell = m_pEditWindow->GetView(); CPPUNIT_ASSERT_MESSAGE("Should have a SmViewShell", m_pViewShell); } |