summaryrefslogtreecommitdiff
path: root/fpicker
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 /fpicker
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 'fpicker')
-rw-r--r--fpicker/source/aqua/AquaFilePickerDelegate.mm2
-rw-r--r--fpicker/source/aqua/ControlHelper.hxx2
-rw-r--r--fpicker/source/aqua/ControlHelper.mm10
3 files changed, 7 insertions, 7 deletions
diff --git a/fpicker/source/aqua/AquaFilePickerDelegate.mm b/fpicker/source/aqua/AquaFilePickerDelegate.mm
index e6eaf32c37ea..d9506c2c72e8 100644
--- a/fpicker/source/aqua/AquaFilePickerDelegate.mm
+++ b/fpicker/source/aqua/AquaFilePickerDelegate.mm
@@ -105,7 +105,7 @@
return;
}
uno::Any aValue;
- aValue <<= ([static_cast<NSButton*>(sender) state] == NSOnState);
+ aValue <<= ([static_cast<NSButton*>(sender) state] == NSControlStateValueOn);
filePicker->setValue(css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
}
diff --git a/fpicker/source/aqua/ControlHelper.hxx b/fpicker/source/aqua/ControlHelper.hxx
index 227e5472f6af..f984b5281c0f 100644
--- a/fpicker/source/aqua/ControlHelper.hxx
+++ b/fpicker/source/aqua/ControlHelper.hxx
@@ -116,7 +116,7 @@ public:
}
bool isAutoExtensionEnabled() {
- return ([static_cast<NSButton*>(m_pToggles[AUTOEXTENSION]) state] == NSOnState);
+ return ([static_cast<NSButton*>(m_pToggles[AUTOEXTENSION]) state] == NSControlStateValueOn);
}
private:
diff --git a/fpicker/source/aqua/ControlHelper.mm b/fpicker/source/aqua/ControlHelper.mm
index dccedf69a4a9..1b10248630b2 100644
--- a/fpicker/source/aqua/ControlHelper.mm
+++ b/fpicker/source/aqua/ControlHelper.mm
@@ -335,7 +335,7 @@ void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, co
bool bChecked = false;
rValue >>= bChecked;
SAL_INFO("fpicker.aqua"," value is a bool: " << bChecked);
- [static_cast<NSButton*>(pControl) setState:(bChecked ? NSOnState : NSOffState)];
+ [static_cast<NSButton*>(pControl) setState:(bChecked ? NSControlStateValueOn : NSControlStateValueOff)];
} else
{
SAL_INFO("fpicker.aqua","Can't set value on button / list " << nControlId << " " << nControlAction);
@@ -358,7 +358,7 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction
aRetval = HandleGetListValue(pControl, nControlAction);
} else if( [pControl class] == [NSButton class] ) {
//NSLog(@"control: %@", [[pControl cell] title]);
- bool bValue = [static_cast<NSButton*>(pControl) state] == NSOnState;
+ bool bValue = [static_cast<NSButton*>(pControl) state] == NSControlStateValueOn;
aRetval <<= bValue;
SAL_INFO("fpicker.aqua","value is a bool (checkbox): " << bValue);
}
@@ -566,9 +566,9 @@ void ControlHelper::createControls()
NSButton *button = [NSButton new];
[button setTitle:sLabel];
- [button setButtonType:NSSwitchButton];
+ [button setButtonType:NSButtonTypeSwitch];
- [button setState:NSOffState];
+ [button setState:NSControlStateValueOff];
if (i == AUTOEXTENSION) {
[button setTarget:m_pDelegate];
@@ -587,7 +587,7 @@ void ControlHelper::createControls()
NSControl *pPreviewBox = m_pToggles[PREVIEW];
if (pPreviewBox != nil) {
[pPreviewBox setEnabled:NO];
- [static_cast<NSButton*>(pPreviewBox) setState:NSOnState];
+ [static_cast<NSButton*>(pPreviewBox) setState:NSControlStateValueOn];
}
}