summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-10-10 21:26:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-10-11 08:13:20 +0200
commitcd3c315e5a5c7d0a961418cfce3b1683f9ab5ad9 (patch)
treec919594ead1deeaa2d7e24886c06b1133994ad41 /vcl
parent9943f37e8a80f2c4df6d58da4c50f3e7f3d6f3ce (diff)
-Werror,-Wdeprecated-declarations (--with-macosx-version-min-required=10.14)
These are all the cases where the warning suggests a direct replacement. This is a companion to 2f2c9df8e270ede0fd71b146380c3883b75d8f0d "-Werror,-Wdeprecated-declarations (--with-macosx-version-min-required=10.14)" which covered all the other cases (via SAL_WNODEPRECATED_PUSH/POP) that offered no direct replacement. Change-Id: If22a3f8cec1ff22fd1ac4b9d2f2bffde50e11e86 Reviewed-on: https://gerrit.libreoffice.org/61633 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/DataFlavorMapping.cxx24
-rw-r--r--vcl/osx/PictToBmpFlt.cxx2
-rw-r--r--vcl/osx/printaccessoryview.mm8
-rw-r--r--vcl/osx/salmenu.cxx2
-rw-r--r--vcl/quartz/salgdicommon.cxx2
5 files changed, 19 insertions, 19 deletions
diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx
index 96f69a42546e..4a785129ea28 100644
--- a/vcl/osx/DataFlavorMapping.cxx
+++ b/vcl/osx/DataFlavorMapping.cxx
@@ -111,10 +111,10 @@ namespace
*/
static const FlavorMap flavorMap[] =
{
- { NSStringPboardType, "text/plain;charset=utf-16", "Unicode Text (UTF-16)", true },
- { NSRTFPboardType, "text/rtf", "Rich Text Format", false },
- { NSTIFFPboardType, "image/png", "Portable Network Graphics", false },
- { NSHTMLPboardType, "text/html", "Plain Html", false },
+ { NSPasteboardTypeString, "text/plain;charset=utf-16", "Unicode Text (UTF-16)", true },
+ { NSPasteboardTypeRTF, "text/rtf", "Rich Text Format", false },
+ { NSPasteboardTypeTIFF, "image/png", "Portable Network Graphics", false },
+ { NSPasteboardTypeHTML, "text/html", "Plain Html", false },
SAL_WNODEPRECATED_DECLARATIONS_PUSH
// "'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create
// multiple pasteboard items with NSPasteboardTypeFileURL or kUTTypeFileURL instead"
@@ -538,7 +538,7 @@ const NSString* DataFlavorMapper::openOfficeToSystemFlavor( const DataFlavor& oO
NSString* DataFlavorMapper::openOfficeImageToSystemFlavor(NSPasteboard* pPasteboard)
{
- NSArray *supportedTypes = [NSArray arrayWithObjects: NSTIFFPboardType, nil];
+ NSArray *supportedTypes = [NSArray arrayWithObjects: NSPasteboardTypeTIFF, nil];
NSString *sysFlavor = [pPasteboard availableTypeFromArray:supportedTypes];
return sysFlavor;
}
@@ -567,9 +567,9 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* systemFlavo
}
else
*/
- if ([systemFlavor caseInsensitiveCompare: NSTIFFPboardType] == NSOrderedSame)
+ if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypeTIFF] == NSOrderedSame)
{
- dp = DataProviderPtr_t( new PNGDataProvider( data, NSTIFFFileType));
+ dp = DataProviderPtr_t( new PNGDataProvider( data, NSBitmapImageFileTypeTIFF));
}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
// "'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create
@@ -610,17 +610,17 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* systemFlavo
{
DataProviderPtr_t dp;
- if ([systemFlavor caseInsensitiveCompare: NSStringPboardType] == NSOrderedSame)
+ if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypeString] == NSOrderedSame)
{
dp = DataProviderPtr_t(new UniDataProvider(systemData));
}
- else if ([systemFlavor caseInsensitiveCompare: NSHTMLPboardType] == NSOrderedSame)
+ else if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypeHTML] == NSOrderedSame)
{
dp = DataProviderPtr_t(new HTMLFormatDataProvider(systemData));
}
- else if ([systemFlavor caseInsensitiveCompare: NSTIFFPboardType] == NSOrderedSame)
+ else if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypeTIFF] == NSOrderedSame)
{
- dp = DataProviderPtr_t( new PNGDataProvider(systemData, NSTIFFFileType));
+ dp = DataProviderPtr_t( new PNGDataProvider(systemData, NSBitmapImageFileTypeTIFF));
}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
// "'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create multiple
@@ -665,7 +665,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const css::uno::Sequence<c
{
if( flavors[i].MimeType.startsWith("image/bmp") )
{
- [array addObject: NSTIFFPboardType];
+ [array addObject: NSPasteboardTypeTIFF];
}
else
{
diff --git a/vcl/osx/PictToBmpFlt.cxx b/vcl/osx/PictToBmpFlt.cxx
index 796a119811ba..fda099643c06 100644
--- a/vcl/osx/PictToBmpFlt.cxx
+++ b/vcl/osx/PictToBmpFlt.cxx
@@ -36,7 +36,7 @@ bool ImageToPNG( css::uno::Sequence<sal_Int8> const & rImgData,
if( !pRep)
return false;
- NSData* pOut = [pRep representationUsingType: NSPNGFileType properties: @{ }];
+ NSData* pOut = [pRep representationUsingType: NSBitmapImageFileTypePNG properties: @{ }];
if( !pOut)
return false;
diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index 958686c70c4f..3c3e3f675fbd 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -349,7 +349,7 @@ static OUString filterAccelerator( rtl::OUString const & rText )
{
NSButton* pBtn = static_cast<NSButton*>(pSender);
int nTag = [pBtn tag];
- mpController->changePropertyWithBoolValue( nTag, [pBtn state] == NSOnState );
+ mpController->changePropertyWithBoolValue( nTag, [pBtn state] == NSControlStateValueOn );
}
else if( [pSender isMemberOfClass: [NSMatrix class]] )
{
@@ -660,8 +660,8 @@ static void addBool( NSView* pCurParent, long rCurX, long& rCurY, long nAttachOf
{
NSRect aCheckRect = { { static_cast<CGFloat>(rCurX + nAttachOffset), 0 }, { 0, 15 } };
NSButton* pBtn = [[NSButton alloc] initWithFrame: aCheckRect];
- [pBtn setButtonType: NSSwitchButton];
- [pBtn setState: bValue ? NSOnState : NSOffState];
+ [pBtn setButtonType: NSButtonTypeSwitch];
+ [pBtn setState: bValue ? NSControlStateValueOn : NSControlStateValueOff];
if( ! bEnabled )
[pBtn setEnabled: NO];
linebreakCell( [pBtn cell], rText );
@@ -731,7 +731,7 @@ static void addRadio( NSView* pCurParent, long rCurX, long& rCurY, long nAttachO
{ static_cast<CGFloat>(280 - rCurX),
static_cast<CGFloat>(5*rChoices.getLength()) } };
[pProto setTitle: @"RadioButtonGroup"];
- [pProto setButtonType: NSRadioButton];
+ [pProto setButtonType: NSButtonTypeRadio];
NSMatrix* pMatrix = [[NSMatrix alloc] initWithFrame: aRadioRect
mode: NSRadioModeMatrix
prototype: static_cast<NSCell*>(pProto)
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 5a7c80a4a12d..4a99e4305324 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -562,7 +562,7 @@ void AquaSalMenu::CheckItem( unsigned nPos, bool bCheck )
if( nPos < maItems.size() )
{
NSMenuItem* pItem = maItems[nPos]->mpMenuItem;
- [pItem setState: bCheck ? NSOnState : NSOffState];
+ [pItem setState: bCheck ? NSControlStateValueOn : NSControlStateValueOff];
}
}
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 3db3f20336d5..40ae59121653 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -766,7 +766,7 @@ bool AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
[pOrigNSCtx retain];
// create new context
- NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
+ NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithCGContext: mrContext flipped: IsFlipped()];
// set it, setCurrentContext also releases the prviously set one
[NSGraphicsContext setCurrentContext: pDrawNSCtx];