Related tdf#tdf155376 fix minor memory leaks
Change-Id: I9cdc5fb38ffba113e3d069d9d766dbe1a82c492d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152352
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
(cherry picked from commit 7ae89a2ad89c9e7702fbd2b31269ee4c61fe5bcb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152316
diff --git a/vcl/osx/a11ytextattributeswrapper.mm b/vcl/osx/a11ytextattributeswrapper.mm
index 9db1ba91..8a8afe9 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -315,6 +315,7 @@ using namespace ::com::sun::star::uno;
try {
NSString * myString = CreateNSString ( [ wrapper accessibleText ] -> getText() ); // TODO: dirty fix for i87817
string = [ [ NSMutableAttributedString alloc ] initWithString: CreateNSString ( [ wrapper accessibleText ] -> getTextRange ( loc, loc + len ) ) ];
[ string autorelease ];
if ( [ wrapper accessibleTextAttributes ] && [myString characterAtIndex:0] != 57361) { // TODO: dirty fix for i87817
[ string beginEditing ];
// add default attributes for whole string
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index cb6fca0..96de29e 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -855,7 +855,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
SolarMutexGuard aGuard;
SAL_INFO("vcl.a11y", "[" << self << " accessibilityParameterizedAttributeNames]");
NSMutableArray * attributeNames = [ [ NSMutableArray alloc ] init ];
NSMutableArray * attributeNames = [ NSMutableArray array ];
// Special Attributes depending on interface
if ( [ self accessibleText ] ) {
[ AquaA11yTextWrapper addParameterizedAttributeNamesTo: attributeNames ];