Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


This fixes the following warning:

/source/libo/libo/fpicker/source/aqua/ControlHelper.cxx:244:39: error:
cannot initialize a parameter of type 'NSString *' with an lvalue of type
'const NSString *'

I did not see another solution so quickly than removing const. Also, if
you want to modify the actual string contents, you need to use NSMutableString anyway.


(Please keep me on CC as I am not subscribed to this list).

regards,

-kris.


From 0484a0737c3a90660fd18e325356763a0863208b Mon Sep 17 00:00:00 2001
From: Kristian Rietveld <kris@lanedo.com>
Date: Sat, 22 Oct 2011 09:40:20 +0200
Subject: [PATCH 3/8] Argument to setTitle cannot be const

---
 fpicker/source/aqua/ControlHelper.cxx |    4 ++--
 fpicker/source/aqua/ControlHelper.hxx |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fpicker/source/aqua/ControlHelper.cxx b/fpicker/source/aqua/ControlHelper.cxx
index a29abb7..a781f07 100644
--- a/fpicker/source/aqua/ControlHelper.cxx
+++ b/fpicker/source/aqua/ControlHelper.cxx
@@ -222,7 +222,7 @@ OUString ControlHelper::getLabel( sal_Int16 nControlId )
     return retVal;
 }
 
-void ControlHelper::setLabel( sal_Int16 nControlId, const NSString* aLabel )
+void ControlHelper::setLabel( sal_Int16 nControlId, NSString* aLabel )
 {
     DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "label", aLabel);
 
@@ -959,7 +959,7 @@ void ControlHelper::createFilterControl() {
     DBG_PRINT_EXIT(CLASS_NAME, __func__);
 }
 
-NSTextField* ControlHelper::createLabelWithString(const NSString* labelString) {
+NSTextField* ControlHelper::createLabelWithString(NSString* labelString) {
     DBG_PRINT_ENTRY(CLASS_NAME, __func__, "label", labelString);
 
     NSTextField *textField = [NSTextField new];
diff --git a/fpicker/source/aqua/ControlHelper.hxx b/fpicker/source/aqua/ControlHelper.hxx
index 23dd79b..b2e59be 100644
--- a/fpicker/source/aqua/ControlHelper.hxx
+++ b/fpicker/source/aqua/ControlHelper.hxx
@@ -68,7 +68,7 @@ public:
     uno::Any   getValue( sal_Int16 nControlId, sal_Int16 nControlAction ) const;
     void       enableControl( sal_Int16 nControlId, sal_Bool bEnable ) const;
     OUString   getLabel( sal_Int16 nControlId );
-    void       setLabel( sal_Int16 nControlId, const NSString* aLabel );
+    void       setLabel( sal_Int16 nControlId, NSString* aLabel );
 
     //------------------------------------------------------------------------------------
     // other stuff
@@ -185,7 +185,7 @@ private:
     void         createControls();
     void         createFilterControl();
     void         createUserPane();
-    NSTextField* createLabelWithString(const NSString* label);
+    NSTextField* createLabelWithString(NSString* label);
 
     int          getControlElementName(const Class clazz, const int nControlId) const;
     NSControl*   getControl( const sal_Int16 nControlId ) const;
-- 
1.7.4.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.