View | Details | Raw Unified | Return to issue 80997
Collapse All | Expand All

(-)vcl/aqua/source/app/salinst.cxx (-2 / +4 lines)
Lines 630-636 Link Here
630
            if( PMPrinterIsDefault( aPrinter ) )
630
            if( PMPrinterIsDefault( aPrinter ) )
631
                maDefaultPrinter = pNewPrinter->maPrinterName;
631
                maDefaultPrinter = pNewPrinter->maPrinterName;
632
        }
632
        }
633
        CFRelease( rPrinterList );
633
        if ( rPrinterList )
634
            CFRelease( rPrinterList );
634
    }
635
    }
635
}
636
}
636
637
Lines 665-671 Link Here
665
                if( PMPrinterIsDefault( aPrinter ) )
666
                if( PMPrinterIsDefault( aPrinter ) )
666
                    maDefaultPrinter = GetOUString( PMPrinterGetName( aPrinter ) );
667
                    maDefaultPrinter = GetOUString( PMPrinterGetName( aPrinter ) );
667
            }
668
            }
668
            CFRelease( rPrinterList );
669
            if ( rPrinterList )
670
                CFRelease( rPrinterList );
669
        }
671
        }
670
    }
672
    }
671
    return maDefaultPrinter;
673
    return maDefaultPrinter;
(-)vcl/aqua/source/gdi/salprn.cxx (-3 / +6 lines)
Lines 73-79 Link Here
73
        // in an actual print job; is this by design ?
73
        // in an actual print job; is this by design ?
74
        CFStringRef rFile = CreateCFString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/dev/null" ) ) );
74
        CFStringRef rFile = CreateCFString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/dev/null" ) ) );
75
        CFURLRef rURL = CFURLCreateWithFileSystemPath( NULL, rFile, kCFURLPOSIXPathStyle, false );
75
        CFURLRef rURL = CFURLCreateWithFileSystemPath( NULL, rFile, kCFURLPOSIXPathStyle, false );
76
        CFRelease( rFile );
76
        if ( rFile )
77
            CFRelease( rFile );
77
                                                       
78
                                                       
78
        OSStatus err =
79
        OSStatus err =
79
        PMSessionSetDestination( mrSession,
80
        PMSessionSetDestination( mrSession,
Lines 505-511 Link Here
505
        {
506
        {
506
            CFStringRef rFile = CreateCFString( *i_pFileName );
507
            CFStringRef rFile = CreateCFString( *i_pFileName );
507
            rURL = CFURLCreateWithFileSystemPath( NULL, rFile, kCFURLPOSIXPathStyle, false );
508
            rURL = CFURLCreateWithFileSystemPath( NULL, rFile, kCFURLPOSIXPathStyle, false );
508
            CFRelease( rFile );
509
            if ( rFile )
510
                CFRelease( rFile );
509
        }
511
        }
510
                                                       
512
                                                       
511
        err =
513
        err =
Lines 532-538 Link Here
532
        {
534
        {
533
            CFStringRef rName = CreateCFString( i_rJobName );
535
            CFStringRef rName = CreateCFString( i_rJobName );
534
            err = PMPrintSettingsSetJobName( mrSettings, rName );
536
            err = PMPrintSettingsSetJobName( mrSettings, rName );
535
            CFRelease( rName );
537
            if ( rName )
538
                CFRelease( rName );
536
        }
539
        }
537
        
540
        
538
        if( err == noErr )
541
        if( err == noErr )
(-)vcl/aqua/source/window/salmenu.cxx (-17 / +26 lines)
Lines 73-80 Link Here
73
            MenuItemIndex outIndex[1];
73
            MenuItemIndex outIndex[1];
74
            GetIndMenuItemWithCommandID(NULL, kHICommandPreferences, 1, &rApplicationMenu, outIndex);
74
            GetIndMenuItemWithCommandID(NULL, kHICommandPreferences, 1, &rApplicationMenu, outIndex);
75
            CFStringRef rStr = CreateCFString( aAbout );
75
            CFStringRef rStr = CreateCFString( aAbout );
76
            InsertMenuItemTextWithCFString(rApplicationMenu, rStr, (short) 0, 0, kHICommandAbout);
76
            if ( rStr )
77
            CFRelease( rStr );
77
            {
78
                InsertMenuItemTextWithCFString(rApplicationMenu, rStr, (short) 0, 0, kHICommandAbout);
79
                CFRelease( rStr );
80
            }
78
        }
81
        }
79
    }
82
    }
80
    return pAquaSalMenu;
83
    return pAquaSalMenu;
Lines 167-175 Link Here
167
    else
170
    else
168
    {
171
    {
169
        CFStringRef menuText = CreateCFString(pAquaSalMenuItem->mText);
172
        CFStringRef menuText = CreateCFString(pAquaSalMenuItem->mText);
170
173
        if ( menuText )
171
        AppendMenuItemTextWithCFString( mrMenuRef, menuText, pAquaSalMenuItem->maMenuAttributes, 0, &pAquaSalMenuItem->mnMenuItemIndex);
174
        {
172
        CFRelease(menuText);
175
            AppendMenuItemTextWithCFString( mrMenuRef, menuText, pAquaSalMenuItem->maMenuAttributes, 0, &pAquaSalMenuItem->mnMenuItemIndex);
176
            CFRelease(menuText);
177
        }
173
    }
178
    }
174
179
175
    /* Associate the pointer to this SalMenuItem with the menu item */
180
    /* Associate the pointer to this SalMenuItem with the menu item */
Lines 194-203 Link Here
194
    if (subAquaSalMenu)
199
    if (subAquaSalMenu)
195
    {
200
    {
196
        CFStringRef menuText = CreateCFString(pAquaSalMenuItem->mText);
201
        CFStringRef menuText = CreateCFString(pAquaSalMenuItem->mText);
197
202
        if ( menuText )
198
        pAquaSalMenuItem->mpSubMenu = pSubMenu;
203
        {
199
        SetMenuTitleWithCFString(subAquaSalMenu->mrMenuRef, menuText);
204
            pAquaSalMenuItem->mpSubMenu = pSubMenu;
200
        CFRelease(menuText);
205
            SetMenuTitleWithCFString(subAquaSalMenu->mrMenuRef, menuText);
206
            CFRelease(menuText);
207
        }
201
        SetMenuItemHierarchicalMenu (mrMenuRef, pAquaSalMenuItem->mnMenuItemIndex, subAquaSalMenu->mrMenuRef);
208
        SetMenuItemHierarchicalMenu (mrMenuRef, pAquaSalMenuItem->mnMenuItemIndex, subAquaSalMenu->mrMenuRef);
202
    }
209
    }
203
}
210
}
Lines 269-284 Link Here
269
    pAquaSalMenuItem->mText.EraseAllChars( '~' );
276
    pAquaSalMenuItem->mText.EraseAllChars( '~' );
270
277
271
    CFStringRef menuText = CreateCFString(pAquaSalMenuItem->mText);
278
    CFStringRef menuText = CreateCFString(pAquaSalMenuItem->mText);
272
279
    if ( menuText )
273
    SetMenuItemTextWithCFString( mrMenuRef, pAquaSalMenuItem->mnMenuItemIndex, menuText);
274
275
    // if the menu item has a submenu, change its title as well
276
    if (pAquaSalMenuItem->mpSubMenu)
277
    {
280
    {
278
        AquaSalMenu *subMenu = (AquaSalMenu *) pAquaSalMenuItem->mpSubMenu;
281
        SetMenuItemTextWithCFString( mrMenuRef, pAquaSalMenuItem->mnMenuItemIndex, menuText);
279
        SetMenuTitleWithCFString(subMenu->mrMenuRef, menuText);
282
283
        // if the menu item has a submenu, change its title as well
284
        if (pAquaSalMenuItem->mpSubMenu)
285
        {
286
            AquaSalMenu *subMenu = (AquaSalMenu *) pAquaSalMenuItem->mpSubMenu;
287
            SetMenuTitleWithCFString(subMenu->mrMenuRef, menuText);
288
        }
289
        CFRelease(menuText);
280
    }
290
    }
281
    CFRelease(menuText);
282
}
291
}
283
292
284
void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName )
293
void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName )

Return to issue 80997