Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b02e958f
Kaydet (Commit)
b02e958f
authored
Eki 16, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
MAC_OS_X_VERSION_MAX_ALLOWED is always >= 1080 now
Change-Id: Ieae67cbf917cdf4bca2b0d6c1697eddc6137dbe2
üst
f9aa6864
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
2 additions
and
300 deletions
+2
-300
FilterHelper.mm
fpicker/source/aqua/FilterHelper.mm
+0
-4
NSURL_OOoAdditions.mm
fpicker/source/aqua/NSURL_OOoAdditions.mm
+0
-20
SalAquaFilePicker.mm
fpicker/source/aqua/SalAquaFilePicker.mm
+0
-4
SalAquaPicker.mm
fpicker/source/aqua/SalAquaPicker.mm
+0
-29
macspellimp.mm
lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+0
-4
memory.c
sal/osl/unx/memory.c
+0
-11
system.c
sal/osl/unx/system.c
+0
-51
salframe.h
vcl/inc/osx/salframe.h
+0
-4
salframeview.h
vcl/inc/osx/salframeview.h
+0
-12
salgdi.h
vcl/inc/quartz/salgdi.h
+0
-9
DropTarget.cxx
vcl/osx/DropTarget.cxx
+0
-8
salframe.cxx
vcl/osx/salframe.cxx
+0
-38
salframeview.mm
vcl/osx/salframeview.mm
+0
-53
salinst.cxx
vcl/osx/salinst.cxx
+0
-5
salmenu.cxx
vcl/osx/salmenu.cxx
+0
-4
salprn.cxx
vcl/osx/salprn.cxx
+0
-4
ctfonts.cxx
vcl/quartz/ctfonts.cxx
+0
-6
ctlayout.cxx
vcl/quartz/ctlayout.cxx
+2
-18
salgdi.cxx
vcl/quartz/salgdi.cxx
+0
-16
No files found.
fpicker/source/aqua/FilterHelper.mm
Dosyayı görüntüle @
b02e958f
...
@@ -385,11 +385,7 @@ bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
...
@@ -385,11 +385,7 @@ bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
}
}
NSFileManager *manager = [NSFileManager defaultManager];
NSFileManager *manager = [NSFileManager defaultManager];
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
NSDictionary* pAttribs = [manager fileAttributesAtPath: sFilename traverseLink: NO];
#else
NSDictionary* pAttribs = [manager attributesOfItemAtPath: sFilename error: nil];
NSDictionary* pAttribs = [manager attributesOfItemAtPath: sFilename error: nil];
#endif
if( pAttribs )
if( pAttribs )
{
{
NSObject* pType = [pAttribs objectForKey: NSFileType];
NSObject* pType = [pAttribs objectForKey: NSFileType];
...
...
fpicker/source/aqua/NSURL_OOoAdditions.mm
Dosyayı görüntüle @
b02e958f
...
@@ -83,25 +83,6 @@ NSString* resolveAlias( NSString* i_pSystemPath )
...
@@ -83,25 +83,6 @@ NSString* resolveAlias( NSString* i_pSystemPath )
kCFURLPOSIXPathStyle, false);
kCFURLPOSIXPathStyle, false);
if( rUrl != NULL )
if( rUrl != NULL )
{
{
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
FSRef rFS;
if( CFURLGetFSRef( rUrl, &rFS ) )
{
Boolean bIsFolder = false;
Boolean bAlias = false;
OSErr err = FSResolveAliasFile( &rFS, true, &bIsFolder, &bAlias);
if( (err == noErr) && bAlias )
{
CFURLRef rResolvedUrl = CFURLCreateFromFSRef( kCFAllocatorDefault, &rFS );
if( rResolvedUrl != NULL )
{
pResolvedPath = (NSString*)CFURLCopyFileSystemPath( rResolvedUrl, kCFURLPOSIXPathStyle );
CFRelease( rResolvedUrl );
}
}
}
CFRelease( rUrl );
#else
CFErrorRef rError;
CFErrorRef rError;
CFDataRef rBookmark = CFURLCreateBookmarkDataFromFile( NULL, rUrl, &rError );
CFDataRef rBookmark = CFURLCreateBookmarkDataFromFile( NULL, rUrl, &rError );
CFRelease( rUrl );
CFRelease( rUrl );
...
@@ -121,7 +102,6 @@ NSString* resolveAlias( NSString* i_pSystemPath )
...
@@ -121,7 +102,6 @@ NSString* resolveAlias( NSString* i_pSystemPath )
CFRelease( rResolvedUrl );
CFRelease( rResolvedUrl );
}
}
}
}
#endif
}
}
return pResolvedPath;
return pResolvedPath;
...
...
fpicker/source/aqua/SalAquaFilePicker.mm
Dosyayı görüntüle @
b02e958f
...
@@ -769,11 +769,7 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
...
@@ -769,11 +769,7 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
rtl::OUString suffix = (*(aStringList.begin())).copy(1);
rtl::OUString suffix = (*(aStringList.begin())).copy(1);
NSString *requiredFileType = [NSString stringWithOUString:suffix];
NSString *requiredFileType = [NSString stringWithOUString:suffix];
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
[m_pDialog setRequiredFileType:requiredFileType];
#else
[m_pDialog setAllowedFileTypes:[NSArray arrayWithObjects:requiredFileType, nil]];
[m_pDialog setAllowedFileTypes:[NSArray arrayWithObjects:requiredFileType, nil]];
#endif
OSL_TRACE("disallowing other file types");
OSL_TRACE("disallowing other file types");
[m_pDialog setAllowsOtherFileTypes:NO];
[m_pDialog setAllowsOtherFileTypes:NO];
...
...
fpicker/source/aqua/SalAquaPicker.mm
Dosyayı görüntüle @
b02e958f
...
@@ -165,19 +165,6 @@ int SalAquaPicker::run()
...
@@ -165,19 +165,6 @@ int SalAquaPicker::run()
int retVal = 0;
int retVal = 0;
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
NSString *startDirectory;
if (m_sDisplayDirectory.getLength() > 0) {
NSString *temp = [NSString stringWithOUString:m_sDisplayDirectory];
NSURL *url = [NSURL URLWithString:temp];
startDirectory = [url path];
OSL_TRACE("start dir: %s", [startDirectory UTF8String]);
}
else {
startDirectory = NSHomeDirectory();
}
#else
NSURL *startDirectory;
NSURL *startDirectory;
if (m_sDisplayDirectory.getLength() > 0) {
if (m_sDisplayDirectory.getLength() > 0) {
NSString *temp = [NSString stringWithOUString:m_sDisplayDirectory];
NSString *temp = [NSString stringWithOUString:m_sDisplayDirectory];
...
@@ -188,26 +175,17 @@ int SalAquaPicker::run()
...
@@ -188,26 +175,17 @@ int SalAquaPicker::run()
else {
else {
startDirectory = [NSURL fileURLWithPath:NSHomeDirectory() isDirectory:YES];
startDirectory = [NSURL fileURLWithPath:NSHomeDirectory() isDirectory:YES];
}
}
#endif
switch(m_nDialogType) {
switch(m_nDialogType) {
case NAVIGATIONSERVICES_DIRECTORY:
case NAVIGATIONSERVICES_DIRECTORY:
case NAVIGATIONSERVICES_OPEN:
case NAVIGATIONSERVICES_OPEN:
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
retVal = [(NSOpenPanel*)m_pDialog runModalForDirectory:startDirectory file:nil types:nil];
#else
[m_pDialog setDirectoryURL:startDirectory];
[m_pDialog setDirectoryURL:startDirectory];
retVal = [(NSOpenPanel*)m_pDialog runModal];
retVal = [(NSOpenPanel*)m_pDialog runModal];
#endif
break;
break;
case NAVIGATIONSERVICES_SAVE:
case NAVIGATIONSERVICES_SAVE:
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
retVal = [m_pDialog runModalForDirectory:startDirectory file:[NSString stringWithOUString:((SalAquaFilePicker*)this)->getSaveFileName()]];
#else
[m_pDialog setDirectoryURL:startDirectory];
[m_pDialog setDirectoryURL:startDirectory];
[m_pDialog setNameFieldStringValue:[NSString stringWithOUString:((SalAquaFilePicker*)this)->getSaveFileName()]];
[m_pDialog setNameFieldStringValue:[NSString stringWithOUString:((SalAquaFilePicker*)this)->getSaveFileName()]];
retVal = [m_pDialog runModal];
retVal = [m_pDialog runModal];
#endif
break;
break;
// [m_pDialog beginSheetForDirectory:startDirectory file:[m_pDialog saveFilename] modalForWindow:[NSApp keyWindow] modalDelegate:((SalAquaFilePicker*)this)->getDelegate() didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:nil];
// [m_pDialog beginSheetForDirectory:startDirectory file:[m_pDialog saveFilename] modalForWindow:[NSApp keyWindow] modalDelegate:((SalAquaFilePicker*)this)->getDelegate() didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:nil];
default:
default:
...
@@ -215,17 +193,10 @@ int SalAquaPicker::run()
...
@@ -215,17 +193,10 @@ int SalAquaPicker::run()
}
}
if (retVal == NSFileHandlingPanelOKButton) {
if (retVal == NSFileHandlingPanelOKButton) {
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
NSString* pDir = [m_pDialog directory];
if (pDir) {
implsetDisplayDirectory([[NSURL fileURLWithPath:pDir] OUStringForInfo:FULLPATH]);
}
#else
NSURL* pDir = [m_pDialog directoryURL];
NSURL* pDir = [m_pDialog directoryURL];
if (pDir) {
if (pDir) {
implsetDisplayDirectory([pDir OUStringForInfo:FULLPATH]);
implsetDisplayDirectory([pDir OUStringForInfo:FULLPATH]);
}
}
#endif
}
}
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
...
...
lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
Dosyayı görüntüle @
b02e958f
...
@@ -350,11 +350,7 @@ Reference< XSpellAlternatives >
...
@@ -350,11 +350,7 @@ Reference< XSpellAlternatives >
aLang = [aLang stringByAppendingString:aTaggedCountry];
aLang = [aLang stringByAppendingString:aTaggedCountry];
}
}
[macSpell setLanguage:aLang];
[macSpell setLanguage:aLang];
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
NSArray *guesses = [macSpell guessesForWord:aNSStr];
#else
NSArray *guesses = [macSpell guessesForWordRange:NSMakeRange(0, [aNSStr length]) inString:aNSStr language:aLang inSpellDocumentWithTag:0];
NSArray *guesses = [macSpell guessesForWordRange:NSMakeRange(0, [aNSStr length]) inString:aNSStr language:aLang inSpellDocumentWithTag:0];
#endif
count = [guesses count];
count = [guesses count];
if (count)
if (count)
{
{
...
...
sal/osl/unx/memory.c
Dosyayı görüntüle @
b02e958f
...
@@ -24,13 +24,6 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
...
@@ -24,13 +24,6 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
{
{
#if defined __ANDROID__
#if defined __ANDROID__
return
memalign
(
align
,
size
);
return
memalign
(
align
,
size
);
#elif defined MAC_OS_X_VERSION_MAX_ALLOWED && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
void
*
ptr
=
malloc
(
size
+
(
align
-
1
)
+
sizeof
(
void
*
));
if
(
!
ptr
)
return
NULL
;
char
*
aptr
=
((
char
*
)
ptr
)
+
sizeof
(
void
*
);
aptr
+=
(
align
-
((
size_t
)
aptr
&
(
align
-
1
)))
&
(
align
-
1
);
((
void
**
)
aptr
)[
-
1
]
=
ptr
;
return
aptr
;
#else
#else
void
*
ptr
;
void
*
ptr
;
int
err
=
posix_memalign
(
&
ptr
,
align
,
size
);
int
err
=
posix_memalign
(
&
ptr
,
align
,
size
);
...
@@ -41,11 +34,7 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
...
@@ -41,11 +34,7 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
void
osl_aligned_free
(
void
*
p
)
void
osl_aligned_free
(
void
*
p
)
{
{
#if defined MAC_OS_X_VERSION_MAX_ALLOWED && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
free
(((
void
**
)
p
)[
-
1
]);
#else
free
(
p
);
free
(
p
);
#endif
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal/osl/unx/system.c
Dosyayı görüntüle @
b02e958f
...
@@ -156,18 +156,11 @@ int macxp_resolveAlias(char *path, int buflen)
...
@@ -156,18 +156,11 @@ int macxp_resolveAlias(char *path, int buflen)
(
void
)
path
;
(
void
)
path
;
(
void
)
buflen
;
(
void
)
buflen
;
return
0
;
return
0
;
#else
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
FSRef
aFSRef
;
OSStatus
nErr
;
Boolean
bFolder
;
Boolean
bAliased
;
#else
#else
CFStringRef
cfpath
;
CFStringRef
cfpath
;
CFURLRef
cfurl
;
CFURLRef
cfurl
;
CFErrorRef
cferror
;
CFErrorRef
cferror
;
CFDataRef
cfbookmark
;
CFDataRef
cfbookmark
;
#endif
char
*
unprocessedPath
=
path
;
char
*
unprocessedPath
=
path
;
...
@@ -181,49 +174,6 @@ int macxp_resolveAlias(char *path, int buflen)
...
@@ -181,49 +174,6 @@ int macxp_resolveAlias(char *path, int buflen)
if
(
unprocessedPath
)
if
(
unprocessedPath
)
*
unprocessedPath
=
'\0'
;
*
unprocessedPath
=
'\0'
;
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
nErr
=
noErr
;
bFolder
=
FALSE
;
bAliased
=
FALSE
;
if
(
FSPathMakeRef
(
(
const
UInt8
*
)
path
,
&
aFSRef
,
0
)
==
noErr
)
{
nErr
=
FSResolveAliasFileWithMountFlags
(
&
aFSRef
,
TRUE
,
&
bFolder
,
&
bAliased
,
kResolveAliasFileNoUI
);
if
(
nErr
==
nsvErr
)
{
errno
=
ENOENT
;
nRet
=
-
1
;
}
else
if
(
nErr
==
noErr
&&
bAliased
)
{
char
tmpPath
[
PATH_MAX
];
if
(
FSRefMakePath
(
&
aFSRef
,
(
UInt8
*
)
tmpPath
,
PATH_MAX
)
==
noErr
)
{
int
nLen
=
strlen
(
tmpPath
)
+
(
unprocessedPath
?
strlen
(
unprocessedPath
+
1
)
+
1
:
0
);
if
(
nLen
<
buflen
&&
nLen
<
PATH_MAX
)
{
if
(
unprocessedPath
)
{
int
nTmpPathLen
=
strlen
(
tmpPath
);
strcat
(
tmpPath
,
"/"
);
strcat
(
tmpPath
,
unprocessedPath
+
1
);
strcpy
(
path
,
tmpPath
);
unprocessedPath
=
path
+
nTmpPathLen
;
}
else
if
(
!
unprocessedPath
)
{
strcpy
(
path
,
tmpPath
);
}
}
else
{
errno
=
ENAMETOOLONG
;
nRet
=
-
1
;
}
}
}
}
#else
cfpath
=
CFStringCreateWithCString
(
NULL
,
path
,
kCFStringEncodingUTF8
);
cfpath
=
CFStringCreateWithCString
(
NULL
,
path
,
kCFStringEncodingUTF8
);
cfurl
=
CFURLCreateWithFileSystemPath
(
NULL
,
cfpath
,
kCFURLPOSIXPathStyle
,
false
);
cfurl
=
CFURLCreateWithFileSystemPath
(
NULL
,
cfpath
,
kCFURLPOSIXPathStyle
,
false
);
CFRelease
(
cfpath
);
CFRelease
(
cfpath
);
...
@@ -283,7 +233,6 @@ int macxp_resolveAlias(char *path, int buflen)
...
@@ -283,7 +233,6 @@ int macxp_resolveAlias(char *path, int buflen)
}
}
}
}
}
}
#endif
if
(
unprocessedPath
)
if
(
unprocessedPath
)
*
unprocessedPath
++
=
'/'
;
*
unprocessedPath
++
=
'/'
;
...
...
vcl/inc/osx/salframe.h
Dosyayı görüntüle @
b02e958f
...
@@ -93,11 +93,7 @@ public:
...
@@ -93,11 +93,7 @@ public:
sal_uLong
mnICOptions
;
sal_uLong
mnICOptions
;
// To prevent display sleep during presentation
// To prevent display sleep during presentation
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
boost
::
shared_ptr
<
Timer
>
mpActivityTimer
;
#else
IOPMAssertionID
mnAssertionID
;
IOPMAssertionID
mnAssertionID
;
#endif
public
:
public
:
/** Constructor
/** Constructor
...
...
vcl/inc/osx/salframeview.h
Dosyayı görüntüle @
b02e958f
...
@@ -22,11 +22,7 @@
...
@@ -22,11 +22,7 @@
#include "osx/a11ywrapper.h"
#include "osx/a11ywrapper.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
@interface
SalFrameWindow
:
NSWindow
#else
@interface
SalFrameWindow
:
NSWindow
<
NSWindowDelegate
>
@interface
SalFrameWindow
:
NSWindow
<
NSWindowDelegate
>
#endif
{
{
AquaSalFrame
*
mpFrame
;
AquaSalFrame
*
mpFrame
;
id
mDraggingDestinationHandler
;
id
mDraggingDestinationHandler
;
...
@@ -63,11 +59,7 @@
...
@@ -63,11 +59,7 @@
-
(
void
)
unregisterDraggingDestinationHandler
:(
id
)
theHandler
;
-
(
void
)
unregisterDraggingDestinationHandler
:(
id
)
theHandler
;
@end
@end
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
@interface
SalFrameView
:
AquaA11yWrapper
<
NSTextInput
>
#else
@interface
SalFrameView
:
AquaA11yWrapper
<
NSTextInputClient
>
@interface
SalFrameView
:
AquaA11yWrapper
<
NSTextInputClient
>
#endif
{
{
AquaSalFrame
*
mpFrame
;
AquaSalFrame
*
mpFrame
;
...
@@ -121,11 +113,7 @@
...
@@ -121,11 +113,7 @@
/*
/*
text action methods
text action methods
*/
*/
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
-
(
void
)
insertText
:(
id
)
aString
;
#else
-
(
void
)
insertText
:(
id
)
aString
replacementRange
:(
NSRange
)
replacementRange
;
-
(
void
)
insertText
:(
id
)
aString
replacementRange
:(
NSRange
)
replacementRange
;
#endif
-
(
void
)
insertTab
:
(
id
)
aSender
;
-
(
void
)
insertTab
:
(
id
)
aSender
;
-
(
void
)
insertBacktab
:
(
id
)
aSender
;
-
(
void
)
insertBacktab
:
(
id
)
aSender
;
-
(
void
)
moveLeft
:
(
id
)
aSender
;
-
(
void
)
moveLeft
:
(
id
)
aSender
;
...
...
vcl/inc/quartz/salgdi.h
Dosyayı görüntüle @
b02e958f
...
@@ -29,15 +29,6 @@
...
@@ -29,15 +29,6 @@
#include <ApplicationServices/ApplicationServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include "osx/osxvcltypes.h"
#include "osx/osxvcltypes.h"
#include "osx/salframe.h"
#include "osx/salframe.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
// The following symbols are SPI (System Programming Interface) in 10.5.
extern
"C"
{
void
CTRunGetAdvances
(
CTRunRef
run
,
CFRange
range
,
CGSize
buffer
[]);
const
CGSize
*
CTRunGetAdvancesPtr
(
CTRunRef
run
);
extern
const
CFStringRef
kCTTypesetterOptionForcedEmbeddingLevel
;
}
#endif
#else
#else
#include <CoreGraphics/CoreGraphics.h>
#include <CoreGraphics/CoreGraphics.h>
#include <CoreText/CoreText.h>
#include <CoreText/CoreText.h>
...
...
vcl/osx/DropTarget.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -264,17 +264,9 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
...
@@ -264,17 +264,9 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
}
}
if
(
dragOp
==
NSDragOperationNone
)
if
(
dragOp
==
NSDragOperationNone
)
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
SetThemeCursor
(
kThemeNotAllowedCursor
);
#else
[[
NSCursor
operationNotAllowedCursor
]
set
];
[[
NSCursor
operationNotAllowedCursor
]
set
];
#endif
else
if
(
dragOp
==
NSDragOperationCopy
)
else
if
(
dragOp
==
NSDragOperationCopy
)
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
SetThemeCursor
(
kThemeCopyArrowCursor
);
#else
[[
NSCursor
dragCopyCursor
]
set
];
[[
NSCursor
dragCopyCursor
]
set
];
#endif
else
else
[[
NSCursor
arrowCursor
]
set
];
[[
NSCursor
arrowCursor
]
set
];
...
...
vcl/osx/salframe.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
#include "osx/a11yfactory.h"
#include "osx/a11yfactory.h"
#include "quartz/utils.h"
#include "quartz/utils.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
#include "vcl/timer.hxx"
#include "osx/saltimer.h"
#endif
#include "salwtype.hxx"
#include "salwtype.hxx"
#include "premac.h"
#include "premac.h"
...
@@ -198,11 +193,7 @@ void AquaSalFrame::initWindowAndView()
...
@@ -198,11 +193,7 @@ void AquaSalFrame::initWindowAndView()
[
mpNSWindow
setAcceptsMouseMovedEvents
:
YES
];
[
mpNSWindow
setAcceptsMouseMovedEvents
:
YES
];
[
mpNSWindow
setHasShadow
:
YES
];
[
mpNSWindow
setHasShadow
:
YES
];
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
objc_msgSend
(
mpNSWindow
,
@
selector
(
setDelegate
:
),
mpNSWindow
);
#else
[
mpNSWindow
setDelegate
:
static_cast
<
id
<
NSWindowDelegate
>
>
(
mpNSWindow
)];
[
mpNSWindow
setDelegate
:
static_cast
<
id
<
NSWindowDelegate
>
>
(
mpNSWindow
)];
#endif
if
(
[
mpNSWindow
respondsToSelector
:
@
selector
(
setRestorable
:
)])
if
(
[
mpNSWindow
respondsToSelector
:
@
selector
(
setRestorable
:
)])
{
{
...
@@ -759,27 +750,6 @@ void AquaSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
...
@@ -759,27 +750,6 @@ void AquaSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
SendPaintEvent
();
SendPaintEvent
();
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
class
PreventSleepTimer
:
public
AutoTimer
{
public
:
PreventSleepTimer
()
{
SetTimeout
(
30000
);
Start
();
}
virtual
~
PreventSleepTimer
()
{
}
virtual
void
Timeout
()
SAL_OVERRIDE
{
UpdateSystemActivity
(
OverallAct
);
}
};
#endif
void
AquaSalFrame
::
StartPresentation
(
bool
bStart
)
void
AquaSalFrame
::
StartPresentation
(
bool
bStart
)
{
{
if
(
!
mpNSWindow
)
if
(
!
mpNSWindow
)
...
@@ -791,14 +761,10 @@ void AquaSalFrame::StartPresentation( bool bStart )
...
@@ -791,14 +761,10 @@ void AquaSalFrame::StartPresentation( bool bStart )
if
(
bStart
)
if
(
bStart
)
{
{
GetSalData
()
->
maPresentationFrames
.
push_back
(
this
);
GetSalData
()
->
maPresentationFrames
.
push_back
(
this
);
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
mpActivityTimer
.
reset
(
new
PreventSleepTimer
()
);
#else
/* OS X 10.6 and above */
IOPMAssertionCreateWithName
(
kIOPMAssertionTypeNoDisplaySleep
,
IOPMAssertionCreateWithName
(
kIOPMAssertionTypeNoDisplaySleep
,
kIOPMAssertionLevelOn
,
kIOPMAssertionLevelOn
,
CFSTR
(
"LibreOffice presentation running"
),
CFSTR
(
"LibreOffice presentation running"
),
&
mnAssertionID
);
&
mnAssertionID
);
#endif
[
mpNSWindow
setLevel
:
NSPopUpMenuWindowLevel
];
[
mpNSWindow
setLevel
:
NSPopUpMenuWindowLevel
];
if
(
mbShown
)
if
(
mbShown
)
[
mpNSWindow
makeMainWindow
];
[
mpNSWindow
makeMainWindow
];
...
@@ -806,11 +772,7 @@ void AquaSalFrame::StartPresentation( bool bStart )
...
@@ -806,11 +772,7 @@ void AquaSalFrame::StartPresentation( bool bStart )
else
else
{
{
GetSalData
()
->
maPresentationFrames
.
remove
(
this
);
GetSalData
()
->
maPresentationFrames
.
remove
(
this
);
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
mpActivityTimer
.
reset
();
#else
IOPMAssertionRelease
(
mnAssertionID
);
IOPMAssertionRelease
(
mnAssertionID
);
#endif
[
mpNSWindow
setLevel
:
NSNormalWindowLevel
];
[
mpNSWindow
setLevel
:
NSNormalWindowLevel
];
}
}
}
}
...
...
vcl/osx/salframeview.mm
Dosyayı görüntüle @
b02e958f
...
@@ -34,14 +34,6 @@
...
@@ -34,14 +34,6 @@
#define WHEEL_EVENT_FACTOR 1.5
#define WHEEL_EVENT_FACTOR 1.5
// for allowing fullscreen support on deployment targets < OSX 10.7
#if !defined(MAC_OS_X_VERSION_10_7)
#define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7)
#define NSWindowCollectionBehaviorFullScreenAuxiliary (1 << 8)
// #define NSFullScreenWindowMask (1 << 14)
#endif
static sal_uInt16 ImplGetModifierMask( unsigned int nMask )
static sal_uInt16 ImplGetModifierMask( unsigned int nMask )
{
{
sal_uInt16 nRet = 0;
sal_uInt16 nRet = 0;
...
@@ -166,18 +158,6 @@ static const struct ExceptionalKey
...
@@ -166,18 +158,6 @@ static const struct ExceptionalKey
static AquaSalFrame* getMouseContainerFrame()
static AquaSalFrame* getMouseContainerFrame()
{
{
AquaSalFrame* pDispatchFrame = NULL;
AquaSalFrame* pDispatchFrame = NULL;
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
NSInteger nWindows = 0;
NSCountWindows( &nWindows );
NSInteger* pWindows = (NSInteger*)alloca( nWindows * sizeof(NSInteger) );
NSWindowList( nWindows, pWindows ); // NSWindowList is supposed to be in z-order front to back
for(int i = 0; i < nWindows && ! pDispatchFrame; i++ )
{
NSWindow* pWin = [NSApp windowWithWindowNumber: pWindows[i]];
if( pWin && [pWin isMemberOfClass: [SalFrameWindow class]] && [(SalFrameWindow*)pWin containsMouse] )
pDispatchFrame = [(SalFrameWindow*)pWin getSalFrame];
}
#else
NSArray* aWindows = [NSWindow windowNumbersWithOptions:0];
NSArray* aWindows = [NSWindow windowNumbersWithOptions:0];
for(NSUInteger i = 0; i < [aWindows count] && ! pDispatchFrame; i++ )
for(NSUInteger i = 0; i < [aWindows count] && ! pDispatchFrame; i++ )
{
{
...
@@ -185,7 +165,6 @@ static AquaSalFrame* getMouseContainerFrame()
...
@@ -185,7 +165,6 @@ static AquaSalFrame* getMouseContainerFrame()
if( pWin && [pWin isMemberOfClass: [SalFrameWindow class]] && [(SalFrameWindow*)pWin containsMouse] )
if( pWin && [pWin isMemberOfClass: [SalFrameWindow class]] && [(SalFrameWindow*)pWin containsMouse] )
pDispatchFrame = [(SalFrameWindow*)pWin getSalFrame];
pDispatchFrame = [(SalFrameWindow*)pWin getSalFrame];
}
}
#endif
return pDispatchFrame;
return pDispatchFrame;
}
}
...
@@ -776,19 +755,11 @@ private:
...
@@ -776,19 +755,11 @@ private:
if( bNewSeries )
if( bNewSeries )
mfMagnifyDeltaSum = 0.0;
mfMagnifyDeltaSum = 0.0;
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
mfMagnifyDeltaSum += [pEvent deltaZ];
#else
mfMagnifyDeltaSum += [pEvent magnification];
mfMagnifyDeltaSum += [pEvent magnification];
#endif
mfLastMagnifyTime = [pEvent timestamp];
mfLastMagnifyTime = [pEvent timestamp];
// TODO: change to 0.1 when COMMAND_WHEEL_ZOOM handlers allow finer zooming control
// TODO: change to 0.1 when COMMAND_WHEEL_ZOOM handlers allow finer zooming control
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
static const float fMagnifyFactor = 0.25;
#else
static const float fMagnifyFactor = 0.25*500; // steps are 500 times smaller for -magnification
static const float fMagnifyFactor = 0.25*500; // steps are 500 times smaller for -magnification
#endif
static const float fMinMagnifyStep = 15.0 / fMagnifyFactor;
static const float fMinMagnifyStep = 15.0 / fMagnifyFactor;
if( fabs(mfMagnifyDeltaSum) <= fMinMagnifyStep )
if( fabs(mfMagnifyDeltaSum) <= fMinMagnifyStep )
return;
return;
...
@@ -1041,15 +1012,9 @@ private:
...
@@ -1041,15 +1012,9 @@ private:
}
}
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
-(void)insertText:(id)aString
#else
-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange
-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange
#endif
{
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
(void) replacementRange; // FIXME: surely it must be used
(void) replacementRange; // FIXME: surely it must be used
#endif
YIELD_GUARD;
YIELD_GUARD;
...
@@ -1619,15 +1584,9 @@ private:
...
@@ -1619,15 +1584,9 @@ private:
return mSelectedRange;
return mSelectedRange;
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange
#else
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange replacementRange:(NSRange)replacementRange
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange replacementRange:(NSRange)replacementRange
#endif
{
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
(void) replacementRange; // FIXME - use it!
(void) replacementRange; // FIXME - use it!
#endif
YIELD_GUARD;
YIELD_GUARD;
...
@@ -1697,16 +1656,10 @@ private:
...
@@ -1697,16 +1656,10 @@ private:
mSelectedRange = mMarkedRange = NSMakeRange(NSNotFound, 0);
mSelectedRange = mMarkedRange = NSMakeRange(NSNotFound, 0);
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- (NSAttributedString *)attributedSubstringFromRange:(NSRange)aRange
#else
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
#endif
{
{
(void) aRange;
(void) aRange;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
(void) actualRange;
(void) actualRange;
#endif
// FIXME - Implement
// FIXME - Implement
return nil;
return nil;
...
@@ -1750,17 +1703,11 @@ private:
...
@@ -1750,17 +1703,11 @@ private:
mpLastEvent = nil;
mpLastEvent = nil;
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- (NSRect)firstRectForCharacterRange:(NSRange)aRange
#else
- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
#endif
{
{
// FIXME - These should probably be used?
// FIXME - These should probably be used?
(void) aRange;
(void) aRange;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
(void) actualRange;
(void) actualRange;
#endif
YIELD_GUARD;
YIELD_GUARD;
...
...
vcl/osx/salinst.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -1046,12 +1046,7 @@ NSImage* CreateNSImage( const Image& rImage )
...
@@ -1046,12 +1046,7 @@ NSImage* CreateNSImage( const Image& rImage )
NSImage
*
pImage
=
[[
NSImage
alloc
]
initWithSize
:
NSMakeSize
(
aSize
.
Width
(),
aSize
.
Height
()
)];
NSImage
*
pImage
=
[[
NSImage
alloc
]
initWithSize
:
NSMakeSize
(
aSize
.
Width
(),
aSize
.
Height
()
)];
if
(
pImage
)
if
(
pImage
)
{
{
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
[
pImage
setFlipped
:
YES
];
[
pImage
lockFocus
];
#else
[
pImage
lockFocusFlipped
:
YES
];
[
pImage
lockFocusFlipped
:
YES
];
#endif
NSGraphicsContext
*
pContext
=
[
NSGraphicsContext
currentContext
];
NSGraphicsContext
*
pContext
=
[
NSGraphicsContext
currentContext
];
CGContextRef
rCGContext
=
reinterpret_cast
<
CGContextRef
>
([
pContext
graphicsPort
]);
CGContextRef
rCGContext
=
reinterpret_cast
<
CGContextRef
>
([
pContext
graphicsPort
]);
...
...
vcl/osx/salmenu.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -246,11 +246,7 @@ AquaSalMenu::AquaSalMenu( bool bMenuBar ) :
...
@@ -246,11 +246,7 @@ AquaSalMenu::AquaSalMenu( bool bMenuBar ) :
if
(
!
mbMenuBar
)
if
(
!
mbMenuBar
)
{
{
mpMenu
=
[[
SalNSMenu
alloc
]
initWithMenu
:
this
];
mpMenu
=
[[
SalNSMenu
alloc
]
initWithMenu
:
this
];
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
objc_msgSend
(
mpMenu
,
@
selector
(
setDelegate
:
),
mpMenu
);
#else
[
mpMenu
setDelegate
:
(
id
<
NSMenuDelegate
>
)
mpMenu
];
[
mpMenu
setDelegate
:
(
id
<
NSMenuDelegate
>
)
mpMenu
];
#endif
}
}
else
else
{
{
...
...
vcl/osx/salprn.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -462,11 +462,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
...
@@ -462,11 +462,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
{
{
[
mpPrintInfo
setJobDisposition
:
NSPrintSaveJob
];
[
mpPrintInfo
setJobDisposition
:
NSPrintSaveJob
];
NSString
*
pPath
=
CreateNSString
(
*
i_pFileName
);
NSString
*
pPath
=
CreateNSString
(
*
i_pFileName
);
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
[
pPrintDict
setObject
:
[
NSURL
fileURLWithPath
:
pPath
]
forKey
:
NSPrintSavePath
];
#else
[
pPrintDict
setObject
:
[
NSURL
fileURLWithPath
:
pPath
]
forKey
:
NSPrintJobSavingURL
];
[
pPrintDict
setObject
:
[
NSURL
fileURLWithPath
:
pPath
]
forKey
:
NSPrintJobSavingURL
];
#endif
[
pPath
release
];
[
pPath
release
];
}
}
...
...
vcl/quartz/ctfonts.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -83,13 +83,9 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD )
...
@@ -83,13 +83,9 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD )
((
mpFontData
->
GetWeight
()
<
WEIGHT_SEMIBOLD
)
&&
((
mpFontData
->
GetWeight
()
<
WEIGHT_SEMIBOLD
)
&&
(
mpFontData
->
GetWeight
()
!=
WEIGHT_DONTKNOW
))
)
(
mpFontData
->
GetWeight
()
!=
WEIGHT_DONTKNOW
))
)
{
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
int
nStroke
=
-
10.0
;
int
nStroke
=
-
10.0
;
CFNumberRef
rStroke
=
CFNumberCreate
(
NULL
,
kCFNumberSInt32Type
,
&
nStroke
);
CFNumberRef
rStroke
=
CFNumberCreate
(
NULL
,
kCFNumberSInt32Type
,
&
nStroke
);
CFDictionarySetValue
(
mpStyleDict
,
kCTStrokeWidthAttributeName
,
rStroke
);
CFDictionarySetValue
(
mpStyleDict
,
kCTStrokeWidthAttributeName
,
rStroke
);
#else
/* kCTStrokeWidthAttributeName is not available */
/* do we really need "fake" bold? */
#endif
}
}
// fake italic
// fake italic
...
@@ -319,10 +315,8 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
...
@@ -319,10 +315,8 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
// get font-enabled status
// get font-enabled status
if
(
bFontEnabled
)
{
if
(
bFontEnabled
)
{
int
bEnabled
=
TRUE
;
// by default (and when we're on OS X < 10.6) it's "enabled"
int
bEnabled
=
TRUE
;
// by default (and when we're on OS X < 10.6) it's "enabled"
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
CFNumberRef
pEnabled
=
(
CFNumberRef
)
CTFontDescriptorCopyAttribute
(
pFD
,
kCTFontEnabledAttribute
);
CFNumberRef
pEnabled
=
(
CFNumberRef
)
CTFontDescriptorCopyAttribute
(
pFD
,
kCTFontEnabledAttribute
);
CFNumberGetValue
(
pEnabled
,
kCFNumberIntType
,
&
bEnabled
);
CFNumberGetValue
(
pEnabled
,
kCFNumberIntType
,
&
bEnabled
);
#endif
*
bFontEnabled
=
bEnabled
;
*
bFontEnabled
=
bEnabled
;
}
}
...
...
vcl/quartz/ctlayout.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -267,11 +267,6 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
...
@@ -267,11 +267,6 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
// - CoreText handles spaces specially (in particular at the text end)
// - CoreText handles spaces specially (in particular at the text end)
if
(
mnTrailingSpaceCount
)
if
(
mnTrailingSpaceCount
)
{
{
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1060
// don't recreate line layout here, because this can lead to problems
// (looks like internal issues inside early CoreText versions)
mfTrailingSpaceWidth
=
CTLineGetTrailingWhitespaceWidth
(
mpCTLine
);
#else
if
(
mfTrailingSpaceWidth
<=
0.0
)
if
(
mfTrailingSpaceWidth
<=
0.0
)
{
{
mfTrailingSpaceWidth
=
CTLineGetTrailingWhitespaceWidth
(
mpCTLine
);
mfTrailingSpaceWidth
=
CTLineGetTrailingWhitespaceWidth
(
mpCTLine
);
...
@@ -296,7 +291,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
...
@@ -296,7 +291,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
SAL_INFO
(
"vcl.ct"
,
"CTLineCreateWithAttributedString(
\"
"
<<
GetOUString
(
aCFText
)
<<
"
\"
) = "
<<
mpCTLine
);
SAL_INFO
(
"vcl.ct"
,
"CTLineCreateWithAttributedString(
\"
"
<<
GetOUString
(
aCFText
)
<<
"
\"
) = "
<<
mpCTLine
);
CFRelease
(
pAttrStr
);
CFRelease
(
pAttrStr
);
CFRelease
(
aCFText
);
CFRelease
(
aCFText
);
#endif
// in RTL-layouts trailing spaces are leftmost
// in RTL-layouts trailing spaces are leftmost
// TODO: use BiDi-algorithm to thoroughly check this assumption
// TODO: use BiDi-algorithm to thoroughly check this assumption
if
(
rArgs
.
mnFlags
&
SAL_LAYOUT_BIDI_RTL
)
if
(
rArgs
.
mnFlags
&
SAL_LAYOUT_BIDI_RTL
)
...
@@ -304,12 +299,9 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
...
@@ -304,12 +299,9 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
mfBaseAdv
=
mfTrailingSpaceWidth
;
mfBaseAdv
=
mfTrailingSpaceWidth
;
}
}
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1060
CTLineRef
pNewCTLine
=
CTLineCreateJustifiedLine
(
mpCTLine
,
1.0
,
nPixelWidth
-
mfTrailingSpaceWidth
);
#else
CTLineRef
pNewCTLine
=
CTLineCreateJustifiedLine
(
mpCTLine
,
1.0
,
nPixelWidth
);
CTLineRef
pNewCTLine
=
CTLineCreateJustifiedLine
(
mpCTLine
,
1.0
,
nPixelWidth
);
SAL_INFO
(
"vcl.ct"
,
"CTLineCreateJustifiedLine("
<<
mpCTLine
<<
",1.0,"
<<
nPixelWidth
<<
") = "
<<
pNewCTLine
);
SAL_INFO
(
"vcl.ct"
,
"CTLineCreateJustifiedLine("
<<
mpCTLine
<<
",1.0,"
<<
nPixelWidth
<<
") = "
<<
pNewCTLine
);
#endif
if
(
!
pNewCTLine
)
if
(
!
pNewCTLine
)
{
{
// CTLineCreateJustifiedLine can and does fail
// CTLineCreateJustifiedLine can and does fail
...
@@ -323,11 +315,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
...
@@ -323,11 +315,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
SAL_INFO
(
"vcl.ct"
,
"CFRelease("
<<
mpCTLine
<<
")"
);
SAL_INFO
(
"vcl.ct"
,
"CFRelease("
<<
mpCTLine
<<
")"
);
CFRelease
(
mpCTLine
);
CFRelease
(
mpCTLine
);
mpCTLine
=
pNewCTLine
;
mpCTLine
=
pNewCTLine
;
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1060
mfCachedWidth
=
nPixelWidth
;
#else
mfCachedWidth
=
nPixelWidth
+
mfTrailingSpaceWidth
;
mfCachedWidth
=
nPixelWidth
+
mfTrailingSpaceWidth
;
#endif
}
}
}
}
...
@@ -382,13 +370,9 @@ bool CTLayout::DrawTextSpecial( SalGraphics& rGraphics, sal_uInt32 flags ) const
...
@@ -382,13 +370,9 @@ bool CTLayout::DrawTextSpecial( SalGraphics& rGraphics, sal_uInt32 flags ) const
CFDictionaryGetCount(mpTextStyle->GetStyleDict()),
CFDictionaryGetCount(mpTextStyle->GetStyleDict()),
mpTextStyle->GetStyleDict());
mpTextStyle->GetStyleDict());
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
/* just don't do 'kCTStrokeWidthAttributeName' */
#else
int nStroke = 2;
int nStroke = 2;
CFNumberRef rStroke = CFNumberCreate(NULL, kCFNumberSInt32Type, &nStroke);
CFNumberRef rStroke = CFNumberCreate(NULL, kCFNumberSInt32Type, &nStroke);
CFDictionarySetValue(styledict, kCTStrokeWidthAttributeName, rStroke);
CFDictionarySetValue(styledict, kCTStrokeWidthAttributeName, rStroke);
#endif
CFAttributedStringRef pAttrStr = CFAttributedStringCreate(
CFAttributedStringRef pAttrStr = CFAttributedStringCreate(
NULL,
NULL,
...
...
vcl/quartz/salgdi.cxx
Dosyayı görüntüle @
b02e958f
...
@@ -339,28 +339,12 @@ static bool AddTempDevFont(const OUString& rFontFileURL)
...
@@ -339,28 +339,12 @@ static bool AddTempDevFont(const OUString& rFontFileURL)
bool
success
=
false
;
bool
success
=
false
;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
CFErrorRef
error
;
CFErrorRef
error
;
success
=
CTFontManagerRegisterFontsForURL
(
rFontURL
,
kCTFontManagerScopeProcess
,
&
error
);
success
=
CTFontManagerRegisterFontsForURL
(
rFontURL
,
kCTFontManagerScopeProcess
,
&
error
);
if
(
!
success
)
if
(
!
success
)
{
{
CFRelease
(
error
);
CFRelease
(
error
);
}
}
#else
/* CTFontManagerRegisterFontsForURL is not available on OS X <10.6 */
CGDataProviderRef
dataProvider
=
CGDataProviderCreateWithURL
(
rFontURL
);
CGFontRef
graphicsFont
=
CGFontCreateWithDataProvider
(
dataProvider
);
if
(
graphicsFont
)
{
CTFontRef
coreTextFont
=
CTFontCreateWithGraphicsFont
(
graphicsFont
,
/*fontSize*/
0
,
/*matrix*/
NULL
,
/*attributes*/
NULL
);
if
(
coreTextFont
)
{
success
=
true
;
CFRelease
(
coreTextFont
);
}
CGFontRelease
(
graphicsFont
);
}
CGDataProviderRelease
(
dataProvider
);
#endif
return
success
;
return
success
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment