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
a8c471a7
Kaydet (Commit)
a8c471a7
authored
Şub 24, 2014
tarafından
Herbert Dürr
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i123840# prefer NSZero* constants over open coded altetnatives
üst
51110dc3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
22 deletions
+18
-22
salinst.cxx
vcl/aqua/source/app/salinst.cxx
+2
-4
saltimer.cxx
vcl/aqua/source/app/saltimer.cxx
+1
-2
aquaprintaccessoryview.mm
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+4
-4
aquaprintview.mm
vcl/aqua/source/gdi/aquaprintview.mm
+2
-3
salframe.cxx
vcl/aqua/source/window/salframe.cxx
+3
-3
salframeview.mm
vcl/aqua/source/window/salframeview.mm
+1
-1
salnsmenu.mm
vcl/aqua/source/window/salnsmenu.mm
+2
-2
salobj.cxx
vcl/aqua/source/window/salobj.cxx
+3
-3
No files found.
vcl/aqua/source/app/salinst.cxx
Dosyayı görüntüle @
a8c471a7
...
@@ -213,9 +213,8 @@ sal_Bool ImplSVMainHook( sal_Bool * pbInit )
...
@@ -213,9 +213,8 @@ sal_Bool ImplSVMainHook( sal_Bool * pbInit )
bNoSVMain
=
false
;
bNoSVMain
=
false
;
initNSApp
();
initNSApp
();
NSPoint
aPt
=
{
0
,
0
};
NSEvent
*
pEvent
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
NSEvent
*
pEvent
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
location
:
aP
t
location
:
NSZeroPoin
t
modifierFlags
:
0
modifierFlags
:
0
timestamp
:
0
timestamp
:
0
windowNumber
:
0
windowNumber
:
0
...
@@ -495,9 +494,8 @@ void AquaSalInstance::wakeupYield()
...
@@ -495,9 +494,8 @@ void AquaSalInstance::wakeupYield()
if
(
mbWaitingYield
)
if
(
mbWaitingYield
)
{
{
SalData
::
ensureThreadAutoreleasePool
();
SalData
::
ensureThreadAutoreleasePool
();
NSPoint
aPt
=
{
0
,
0
};
NSEvent
*
pEvent
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
NSEvent
*
pEvent
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
location
:
aP
t
location
:
NSZeroPoin
t
modifierFlags
:
0
modifierFlags
:
0
timestamp
:
0
timestamp
:
0
windowNumber
:
0
windowNumber
:
0
...
...
vcl/aqua/source/app/saltimer.cxx
Dosyayı görüntüle @
a8c471a7
...
@@ -71,9 +71,8 @@ void ImplSalStartTimer( sal_uLong nMS )
...
@@ -71,9 +71,8 @@ void ImplSalStartTimer( sal_uLong nMS )
{
{
SalData
::
ensureThreadAutoreleasePool
();
SalData
::
ensureThreadAutoreleasePool
();
// post an event so we can get into the main thread
// post an event so we can get into the main thread
NSPoint
aPt
=
{
0
,
0
};
NSEvent
*
pEvent
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
NSEvent
*
pEvent
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
location:
aP
t
location:
NSZeroPoin
t
modifierFlags:
0
modifierFlags:
0
timestamp:
[
NSDate
timeIntervalSinceReferenceDate
]
timestamp:
[
NSDate
timeIntervalSinceReferenceDate
]
windowNumber:
0
windowNumber:
0
...
...
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
Dosyayı görüntüle @
a8c471a7
...
@@ -643,7 +643,7 @@ static void adjustViewAndChildren( NSView* pNSView, NSSize& rMaxSize,
...
@@ -643,7 +643,7 @@ static void adjustViewAndChildren( NSView* pNSView, NSSize& rMaxSize,
NSArray* pSubViews = [pNSView subviews];
NSArray* pSubViews = [pNSView subviews];
unsigned int nViews = [pSubViews count];
unsigned int nViews = [pSubViews count];
NSRect aUnion =
{ { 0, 0 }, { 0, 0 } }
;
NSRect aUnion =
NSZeroRect
;
// get the combined frame of all subviews
// get the combined frame of all subviews
for( unsigned int n = 0; n < nViews; n++ )
for( unsigned int n = 0; n < nViews; n++ )
...
@@ -712,7 +712,7 @@ static void adjustTabViews( NSTabView* pTabView, NSSize aTabSize )
...
@@ -712,7 +712,7 @@ static void adjustTabViews( NSTabView* pTabView, NSSize aTabSize )
static NSControl* createLabel( const rtl::OUString& i_rText )
static NSControl* createLabel( const rtl::OUString& i_rText )
{
{
NSString* pText = CreateNSString( i_rText );
NSString* pText = CreateNSString( i_rText );
NSRect aTextRect = {
{ 0, 0 }
, {20, 15} };
NSRect aTextRect = {
NSZeroPoint
, {20, 15} };
NSTextField* pTextView = [[NSTextField alloc] initWithFrame: aTextRect];
NSTextField* pTextView = [[NSTextField alloc] initWithFrame: aTextRect];
[pTextView setFont: [NSFont controlContentFontOfSize: 0]];
[pTextView setFont: [NSFont controlContentFontOfSize: 0]];
[pTextView setEditable: NO];
[pTextView setEditable: NO];
...
@@ -1093,9 +1093,9 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
...
@@ -1093,9 +1093,9 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
NSView* pCurParent = 0;
NSView* pCurParent = 0;
long nCurY = 0;
long nCurY = 0;
long nCurX = 0;
long nCurX = 0;
NSRect aViewFrame = {
{ 0, 0 }
, {600, 400 } };
NSRect aViewFrame = {
NSZeroPoint
, {600, 400 } };
NSRect aTabViewFrame = { { 190, 0 }, {410, 400 } };
NSRect aTabViewFrame = { { 190, 0 }, {410, 400 } };
NSSize aMaxTabSize =
{ 0, 0 }
;
NSSize aMaxTabSize =
NSZeroSize
;
NSView* pAccessoryView = [[NSView alloc] initWithFrame: aViewFrame];
NSView* pAccessoryView = [[NSView alloc] initWithFrame: aViewFrame];
NSTabView* pTabView = [[NSTabView alloc] initWithFrame: aTabViewFrame];
NSTabView* pTabView = [[NSTabView alloc] initWithFrame: aTabViewFrame];
[pAccessoryView addSubview: [pTabView autorelease]];
[pAccessoryView addSubview: [pTabView autorelease]];
...
...
vcl/aqua/source/gdi/aquaprintview.mm
Dosyayı görüntüle @
a8c471a7
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
@implementation AquaPrintView
@implementation AquaPrintView
-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter
-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter
{
{
NSRect aRect = {
{ 0, 0 }
, [pInfoPrinter->getPrintInfo() paperSize] };
NSRect aRect = {
NSZeroPoint
, [pInfoPrinter->getPrintInfo() paperSize] };
if( (self = [super initWithFrame: aRect]) != nil )
if( (self = [super initWithFrame: aRect]) != nil )
{
{
mpController = pController;
mpController = pController;
...
@@ -62,8 +62,7 @@
...
@@ -62,8 +62,7 @@
-(NSPoint)locationOfPrintRect: (NSRect)aRect
-(NSPoint)locationOfPrintRect: (NSRect)aRect
{
{
(void)aRect;
(void)aRect;
NSPoint aPoint = { 0, 0 };
return NSZeroPoint;
return aPoint;
}
}
-(void)drawRect: (NSRect)rect
-(void)drawRect: (NSRect)rect
...
...
vcl/aqua/source/window/salframe.cxx
Dosyayı görüntüle @
a8c471a7
...
@@ -209,7 +209,7 @@ void AquaSalFrame::initWindowAndView()
...
@@ -209,7 +209,7 @@ void AquaSalFrame::initWindowAndView()
[
mpNSWindow
setHasShadow
:
YES
];
[
mpNSWindow
setHasShadow
:
YES
];
[
mpNSWindow
setDelegate
:
static_cast
<
id
<
NSWindowDelegate
>
>
(
mpNSWindow
)];
[
mpNSWindow
setDelegate
:
static_cast
<
id
<
NSWindowDelegate
>
>
(
mpNSWindow
)];
const
NSRect
aRect
=
NSMakeRect
(
0
,
0
,
maGeometry
.
nWidth
,
maGeometry
.
nHeight
)
;
const
NSRect
aRect
=
{
NSZeroPoint
,
NSMakeSize
(
maGeometry
.
nWidth
,
maGeometry
.
nHeight
)}
;
mnTrackingRectTag
=
[
mpNSView
addTrackingRect
:
aRect
owner
:
mpNSView
userData
:
nil
assumeInside
:
NO
];
mnTrackingRectTag
=
[
mpNSView
addTrackingRect
:
aRect
owner
:
mpNSView
userData
:
nil
assumeInside
:
NO
];
maSysData
.
mpNSView
=
mpNSView
;
maSysData
.
mpNSView
=
mpNSView
;
...
@@ -745,7 +745,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
...
@@ -745,7 +745,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
// which is always on index 0 according to documentation
// which is always on index 0 according to documentation
bool
bHideMenu
=
(
nDisplay
==
0
);
bool
bHideMenu
=
(
nDisplay
==
0
);
NSRect
aNewContentRect
=
{
{
0
,
0
},
{
0
,
0
}
}
;
NSRect
aNewContentRect
=
NSZeroRect
;
// get correct screen
// get correct screen
NSScreen
*
pScreen
=
nil
;
NSScreen
*
pScreen
=
nil
;
NSArray
*
pScreens
=
[
NSScreen
screens
];
NSArray
*
pScreens
=
[
NSScreen
screens
];
...
@@ -1648,7 +1648,7 @@ void AquaSalFrame::UpdateFrameGeometry()
...
@@ -1648,7 +1648,7 @@ void AquaSalFrame::UpdateFrameGeometry()
// release old track rect
// release old track rect
[
mpNSView
removeTrackingRect
:
mnTrackingRectTag
];
[
mpNSView
removeTrackingRect
:
mnTrackingRectTag
];
// install the new track rect
// install the new track rect
NSRect
aTrackRect
=
{
{
0
,
0
}
,
aContentRect
.
size
};
NSRect
aTrackRect
=
{
NSZeroPoint
,
aContentRect
.
size
};
mnTrackingRectTag
=
[
mpNSView
addTrackingRect
:
aTrackRect
owner
:
mpNSView
userData
:
nil
assumeInside
:
NO
];
mnTrackingRectTag
=
[
mpNSView
addTrackingRect
:
aTrackRect
owner
:
mpNSView
userData
:
nil
assumeInside
:
NO
];
// convert to vcl convention
// convert to vcl convention
...
...
vcl/aqua/source/window/salframeview.mm
Dosyayı görüntüle @
a8c471a7
...
@@ -461,7 +461,7 @@ static AquaSalFrame* getMouseContainerFrame()
...
@@ -461,7 +461,7 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
{
// FIXME: does this leak the returned NSCursor of getCurrentCursor ?
// FIXME: does this leak the returned NSCursor of getCurrentCursor ?
const NSRect aRect =
NSMakeRect( 0, 0, mpFrame->maGeometry.nWidth, mpFrame->maGeometry.nHeight)
;
const NSRect aRect =
{ NSZeroPoint, NSMakeSize( mpFrame->maGeometry.nWidth, mpFrame->maGeometry.nHeight) }
;
[self addCursorRect: aRect cursor: mpFrame->getCurrentCursor()];
[self addCursorRect: aRect cursor: mpFrame->getCurrentCursor()];
}
}
}
}
...
...
vcl/aqua/source/window/salnsmenu.mm
Dosyayı görüntüle @
a8c471a7
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
for( size_t i = 0; i < rButtons.size(); ++i )
for( size_t i = 0; i < rButtons.size(); ++i )
{
{
const Size aPixSize = rButtons[i].maButton.maImage.GetSizePixel();
const Size aPixSize = rButtons[i].maButton.maImage.GetSizePixel();
const NSRect aFromRect =
NSMakeRect( 0, 0, aPixSize.Width(), aPixSize.Height())
;
const NSRect aFromRect =
{ NSZeroPoint, NSMakeSize( aPixSize.Width(), aPixSize.Height()) }
;
aImgRect.origin.y = floor((aFrame.size.height - aFromRect.size.height)/2);
aImgRect.origin.y = floor((aFrame.size.height - aFromRect.size.height)/2);
aImgRect.size = aFromRect.size;
aImgRect.size = aFromRect.size;
if( rButtons[i].mpNSImage )
if( rButtons[i].mpNSImage )
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
for( size_t i = 0; i < rButtons.size(); ++i )
for( size_t i = 0; i < rButtons.size(); ++i )
{
{
const Size aPixSize = rButtons[i].maButton.maImage.GetSizePixel();
const Size aPixSize = rButtons[i].maButton.maImage.GetSizePixel();
const NSRect aFromRect =
NSMakeRect( 0, 0, aPixSize.Width(), aPixSize.Height())
;
const NSRect aFromRect =
{ NSZeroPoint, NSMakeSize( aPixSize.Width(), aPixSize.Height()) }
;
aImgRect.origin.y = (aFrame.size.height - aFromRect.size.height)/2;
aImgRect.origin.y = (aFrame.size.height - aFromRect.size.height)/2;
aImgRect.size = aFromRect.size;
aImgRect.size = aFromRect.size;
if( aMousePt.x >= aImgRect.origin.x && aMousePt.x <= (aImgRect.origin.x+aImgRect.size.width) &&
if( aMousePt.x >= aImgRect.origin.x && aMousePt.x <= (aImgRect.origin.x+aImgRect.size.width) &&
...
...
vcl/aqua/source/window/salobj.cxx
Dosyayı görüntüle @
a8c471a7
...
@@ -47,7 +47,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
...
@@ -47,7 +47,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
maSysData
.
nSize
=
sizeof
(
maSysData
);
maSysData
.
nSize
=
sizeof
(
maSysData
);
maSysData
.
mpNSView
=
NULL
;
maSysData
.
mpNSView
=
NULL
;
NSRect
aInitFrame
=
{
{
0
,
0
}
,
{
20
,
20
}
};
NSRect
aInitFrame
=
{
NSZeroPoint
,
{
20
,
20
}
};
mpClipView
=
[[
NSClipView
alloc
]
initWithFrame
:
aInitFrame
];
mpClipView
=
[[
NSClipView
alloc
]
initWithFrame
:
aInitFrame
];
if
(
mpClipView
)
if
(
mpClipView
)
{
{
...
@@ -168,7 +168,7 @@ void AquaSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
...
@@ -168,7 +168,7 @@ void AquaSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
void
AquaSalObject
::
setClippedPosSize
()
void
AquaSalObject
::
setClippedPosSize
()
{
{
NSRect
aViewRect
=
NSMakeRect
(
0
,
0
,
mnWidth
,
mnHeight
)
;
NSRect
aViewRect
=
{
NSZeroPoint
,
NSMakeSize
(
mnWidth
,
mnHeight
)
}
;
if
(
maSysData
.
mpNSView
)
if
(
maSysData
.
mpNSView
)
{
{
NSView
*
pNSView
=
maSysData
.
mpNSView
;
NSView
*
pNSView
=
maSysData
.
mpNSView
;
...
@@ -176,7 +176,7 @@ void AquaSalObject::setClippedPosSize()
...
@@ -176,7 +176,7 @@ void AquaSalObject::setClippedPosSize()
}
}
NSRect
aClipViewRect
=
NSMakeRect
(
mnX
,
mnY
,
mnWidth
,
mnHeight
);
NSRect
aClipViewRect
=
NSMakeRect
(
mnX
,
mnY
,
mnWidth
,
mnHeight
);
NSPoint
aClipPt
=
NS
MakePoint
(
0
,
0
)
;
NSPoint
aClipPt
=
NS
ZeroPoint
;
if
(
mbClip
)
if
(
mbClip
)
{
{
aClipViewRect
.
origin
.
x
+=
mnClipX
;
aClipViewRect
.
origin
.
x
+=
mnClipX
;
...
...
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