Bugzilla – Attachment 194952 Details for
Bug 161461
Crash on second copy after pasting using Enter in Calc on macOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch with my failed attempt to get the crash to occur in unit test
nsautoreleasepools.patch (text/plain), 2.52 KB, created by
Patrick Luby (volunteer)
on 2024-06-25 15:22:41 UTC
(
hide
)
Description:
Patch with my failed attempt to get the crash to occur in unit test
Filename:
MIME Type:
Creator:
Patrick Luby (volunteer)
Created:
2024-06-25 15:22:41 UTC
Size:
2.52 KB
patch
obsolete
>diff --git a/sc/CppunitTest_sc_uicalc.mk b/sc/CppunitTest_sc_uicalc.mk >index 97a8291ff66c..76cbc0d3dfdf 100644 >--- a/sc/CppunitTest_sc_uicalc.mk >+++ b/sc/CppunitTest_sc_uicalc.mk >@@ -15,7 +15,7 @@ $(eval $(call gb_CppunitTest_use_externals,sc_uicalc, \ > libxml2 \ > )) > >-$(eval $(call gb_CppunitTest_add_exception_objects,sc_uicalc, \ >+$(eval $(call gb_CppunitTest_add_objcxxobjects_objects,sc_uicalc, \ > sc/qa/unit/uicalc/uicalc \ > )) > >diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx >index ae1edf38147e..e106f9fd06d4 100644 >--- a/sc/qa/unit/uicalc/uicalc.cxx >+++ b/sc/qa/unit/uicalc/uicalc.cxx >@@ -586,6 +586,39 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf144308) > xGlobalSheetSettings->setDoAutoComplete(bOldValue); > } > >+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf161461) >+{ >+NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init]; >+ createScDoc(); >+ ScDocument* pDoc = getScDoc(); >+ ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); >+ >+ insertStringToCell(u"A1"_ustr, u"Test"); >+ >+ goToCell(u"A1"_ustr); >+[pPool release]; >+ >+ for (SCROW i = 1; i <= 10; ++i) >+ { >+pPool = [[NSAutoreleasePool alloc] init]; >+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {}); >+ >+ dispatchCommand(mxComponent, u".uno:GoDown"_ustr, {}); >+ Scheduler::ProcessEventsToIdle(); >+[pPool release]; >+ >+ // Paste using Return >+ // Without the fix in place, this test would have crashed on macOS >+pPool = [[NSAutoreleasePool alloc] init]; >+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN); >+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::RETURN); >+ Scheduler::ProcessEventsToIdle(); >+[pPool release]; >+ >+ CPPUNIT_ASSERT_EQUAL(u"Test"_ustr, pDoc->GetString(ScAddress(0, i, 0))); >+ } >+} >+ > CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf56036) > { > createScDoc(); >diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx >index 16a2c8be9207..6f301ec74bb4 100644 >--- a/vcl/osx/DataFlavorMapping.cxx >+++ b/vcl/osx/DataFlavorMapping.cxx >@@ -591,7 +591,7 @@ const NSString* DataFlavorMapper::openOfficeToSystemFlavor( const DataFlavor& oO > // OUStringToNSString() returns an autoreleased NSString so it > // needs to be retained for the life of maOfficeOnlyTypes. > sysFlavor = maOfficeOnlyTypes[oOOFlavor.MimeType] = >- [OUStringToNSString(oOOFlavor.MimeType) retain]; >+ OUStringToNSString(oOOFlavor.MimeType); > } > else > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 161461
:
194857
| 194952