[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sc/inc sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 14 19:09:02 PST 2012
sc/inc/viewopti.hxx | 4 ++--
sc/source/core/tool/viewopti.cxx | 36 ++++++++++++++++++------------------
2 files changed, 20 insertions(+), 20 deletions(-)
New commits:
commit 0dc856a870a300d6743f58b558ca9a0fc23fd1c8
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri Dec 14 22:05:11 2012 -0500
Fixed accidentally modified default view options.
It was unintentionally caused by
6ea8ea456cf5df267284278ecda42aa9b089a682.
Also made the default values easier to see.
Let's not do
foo1 =
foo2 =
foo3 = true;
type of assignment which may give the reader the wrong impression.
Let's do
foo1 = true;
foo2 = true;
foo3 = true;
instead.
Change-Id: I181b80d2aae96d65b662b187bc884913fec836db
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 4bea442..07e8c04 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -86,7 +86,7 @@ public:
void SetDefaults();
void SetOption( ScViewOption eOpt, sal_Bool bNew = sal_True ) { aOptArr[eOpt] = bNew; }
- sal_Bool GetOption( ScViewOption eOpt ) const { return aOptArr[eOpt]; }
+ bool GetOption( ScViewOption eOpt ) const { return aOptArr[eOpt]; }
void SetObjMode( ScVObjType eObj, ScVObjMode eMode ) { aModeArr[eObj] = eMode; }
ScVObjMode GetObjMode( ScVObjType eObj ) const { return aModeArr[eObj]; }
@@ -103,7 +103,7 @@ public:
int operator!= ( const ScViewOptions& rOpt ) const { return !(operator==(rOpt)); }
private:
- sal_Bool aOptArr [MAX_OPT];
+ bool aOptArr [MAX_OPT];
ScVObjMode aModeArr [MAX_TYPE];
Color aGridCol;
String aGridColName;
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index d1078a5..64a4fec 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -134,24 +134,24 @@ ScViewOptions::~ScViewOptions()
void ScViewOptions::SetDefaults()
{
- aOptArr[ VOPT_FORMULAS ] =
- aOptArr[ VOPT_SYNTAX ] =
- aOptArr[ VOPT_HELPLINES ] =
- aOptArr[ VOPT_GRID_ONTOP ] =
- aOptArr[ VOPT_NOTES ] =
- aOptArr[ VOPT_NULLVALS ] =
- aOptArr[ VOPT_VSCROLL ] =
- aOptArr[ VOPT_HSCROLL ] =
- aOptArr[ VOPT_TABCONTROLS ] =
- aOptArr[ VOPT_OUTLINER ] =
- aOptArr[ VOPT_HEADER ] =
- aOptArr[ VOPT_GRID ] =
- aOptArr[ VOPT_ANCHOR ] =
- aOptArr[ VOPT_PAGEBREAKS ] =
- aOptArr[ VOPT_CLIPMARKS ] = sal_True;
-
- aModeArr[VOBJ_TYPE_OLE ] =
- aModeArr[VOBJ_TYPE_CHART] =
+ aOptArr[ VOPT_FORMULAS ] = false;
+ aOptArr[ VOPT_SYNTAX ] = false;
+ aOptArr[ VOPT_HELPLINES ] = false;
+ aOptArr[ VOPT_GRID_ONTOP ] = false;
+ aOptArr[ VOPT_NOTES ] = true;
+ aOptArr[ VOPT_NULLVALS ] = true;
+ aOptArr[ VOPT_VSCROLL ] = true;
+ aOptArr[ VOPT_HSCROLL ] = true;
+ aOptArr[ VOPT_TABCONTROLS ] = true;
+ aOptArr[ VOPT_OUTLINER ] = true;
+ aOptArr[ VOPT_HEADER ] = true;
+ aOptArr[ VOPT_GRID ] = true;
+ aOptArr[ VOPT_ANCHOR ] = true;
+ aOptArr[ VOPT_PAGEBREAKS ] = true;
+ aOptArr[ VOPT_CLIPMARKS ] = true;
+
+ aModeArr[VOBJ_TYPE_OLE ] = VOBJ_MODE_SHOW;
+ aModeArr[VOBJ_TYPE_CHART] = VOBJ_MODE_SHOW;
aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW;
aGridCol = Color( SC_STD_GRIDCOLOR );
More information about the Libreoffice-commits
mailing list