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


Hi Kohei,
I have various small fixes related to Calc options in store which
accumulated while poking around in this part of the code.

Here is the first one.

/Albert
From 44c021da20b3695385ab48623c194c6e172ed8ba Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner <albert.thuswaldner@gmail.com>
Date: Sun, 15 Apr 2012 17:15:20 +0200
Subject: [PATCH] Have operators of ScViewOptions and ScPrintOptions return bool instead of int

---
 sc/inc/printopt.hxx              |    4 ++--
 sc/inc/viewopti.hxx              |    4 ++--
 sc/source/core/tool/printopt.cxx |    4 ++--
 sc/source/core/tool/viewopti.cxx |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index 5883e7c..8e32b7c 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -52,8 +52,8 @@ public:
     void    SetDefaults();
 
     const ScPrintOptions&   operator=  ( const ScPrintOptions& rCpy );
-    int                     operator== ( const ScPrintOptions& rOpt ) const;
-    int                     operator!= ( const ScPrintOptions& rOpt ) const;
+    bool                    operator== ( const ScPrintOptions& rOpt ) const;
+    bool                    operator!= ( const ScPrintOptions& rOpt ) const;
 };
 
 //==================================================================
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 0c763ce..b82f566 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -83,8 +83,8 @@ public:
 
     void                    SetDefaults();
     const ScGridOptions&    operator=  ( const ScGridOptions& rCpy );
-    int                     operator== ( const ScGridOptions& rOpt ) const;
-    int                     operator!= ( const ScGridOptions& rOpt ) const { return 
!(operator==(rOpt)); }
+    bool                    operator== ( const ScGridOptions& rOpt ) const;
+    bool                    operator!= ( const ScGridOptions& rOpt ) const { return 
!(operator==(rOpt)); }
 };
 
 //==================================================================
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 095e594..215989b 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -74,13 +74,13 @@ const ScPrintOptions& ScPrintOptions::operator=( const ScPrintOptions& rCpy )
     return *this;
 }
 
-int ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const
+bool ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const
 {
     return bSkipEmpty == rOpt.bSkipEmpty
         && bAllSheets == rOpt.bAllSheets;
 }
 
-int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const
+bool ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const
 {
     return !(operator==(rOpt));
 }
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 7c40d22..b20c57d 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -105,7 +105,7 @@ const ScGridOptions& ScGridOptions::operator=( const ScGridOptions& rCpy )
 
 //------------------------------------------------------------------------
 
-int ScGridOptions::operator==( const ScGridOptions& rCpy ) const
+bool ScGridOptions::operator==( const ScGridOptions& rCpy ) const
 {
     return (   nFldDrawX        == rCpy.nFldDrawX
             && nFldDivisionX    == rCpy.nFldDivisionX
-- 
1.7.3.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.