summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-10 16:33:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-10 16:34:14 +0100
commitcf6516632379688fa2b4c66f5e1644355fb424fe (patch)
treea28a2882acabc445121ff3baeda76b2f3e8bf031
parent07d01742c69f1c0335bc7e1b57abd8341ce255e7 (diff)
WaE: unsafe mix of bool and sal_Bool
Change-Id: Ie2fcc1a5404c62dc15b98f99f89631795df91b01
-rw-r--r--sc/Library_scfilt.mk5
-rw-r--r--sc/source/filter/excel/xecontent.cxx29
-rw-r--r--sc/source/ui/docshell/docfunc.cxx38
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/docsh3.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/inc/areasdlg.hxx2
-rw-r--r--sc/source/ui/inc/autofmt.hxx4
-rw-r--r--sc/source/ui/inc/docfunc.hxx4
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx8
-rw-r--r--sc/source/ui/unoobj/docuno.cxx3
-rw-r--r--sc/source/ui/view/tabview.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--vcl/inc/vcl/settings.hxx2
-rw-r--r--vcl/source/app/settings.cxx4
17 files changed, 63 insertions, 56 deletions
diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index 61b7f9dcde24..e5a4b2c6695b 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -142,6 +142,7 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/lotus/lotus \
sc/source/filter/lotus/memory \
sc/source/filter/lotus/op \
+ sc/source/filter/lotus/optab \
sc/source/filter/lotus/tool \
sc/source/filter/qpro/biff \
sc/source/filter/qpro/qpro \
@@ -216,8 +217,4 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/oox/worksheetsettings \
))
-$(eval $(call gb_Library_add_noexception_objects,scfilt,\
- sc/source/filter/lotus/optab \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index fb974d943177..6a23166aa09a 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -785,35 +785,44 @@ namespace {
const char* GetOperatorString(ScConditionMode eMode, bool& bFrmla2)
{
+ const char *pRet = "";
switch(eMode)
{
case SC_COND_EQUAL:
- return "equal";
+ pRet = "equal";
+ break;
case SC_COND_LESS:
- return "lessThan";
+ pRet = "lessThan";
+ break;
case SC_COND_GREATER:
- return "greaterThan";
+ pRet = "greaterThan";
+ break;
case SC_COND_EQLESS:
- return "lessThanOrEqual";
+ pRet = "lessThanOrEqual";
+ break;
case SC_COND_EQGREATER:
- return "greaterThanOrEqual";
+ pRet = "greaterThanOrEqual";
+ break;
case SC_COND_NOTEQUAL:
- return "notEqual";
+ pRet = "notEqual";
+ break;
case SC_COND_BETWEEN:
bFrmla2 = true;
- return "between";
+ pRet = "between";
+ break;
case SC_COND_NOTBETWEEN:
bFrmla2 = true;
- return "notBetween";
+ pRet = "notBetween";
+ break;
case SC_COND_DUPLICATE:
case SC_COND_NOTDUPLICATE:
case SC_COND_DIRECT:
case SC_COND_NONE:
default:
- return "";
+ pRet = "";
break;
}
- return "";
+ return pRet;
}
const char* GetTypeString(ScConditionMode eMode)
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 379887f45f9b..5227044e0a97 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -193,7 +193,7 @@ sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -229,7 +229,7 @@ sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
{
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return false;
@@ -273,7 +273,7 @@ sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -309,7 +309,7 @@ sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
{
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return false;
@@ -353,7 +353,7 @@ sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos)
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -392,7 +392,7 @@ sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
Window* pWaitWin = rDocShell.GetActiveDialogParent();
@@ -431,7 +431,7 @@ sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab)
{
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return false;
@@ -474,7 +474,7 @@ sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic )
sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScDetOpList* pList = pDoc->GetDetOpList();
if ( pList && pList->Count() )
{
@@ -771,7 +771,7 @@ sal_Bool ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText,
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
if (!aTester.IsEditable())
{
@@ -833,7 +833,7 @@ sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bo
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
sal_Bool bXMLLoading(pDoc->IsImportingXML());
// #i925#; it is not neccessary to test whether the cell is editable on loading a XML document
@@ -2858,10 +2858,10 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
return bSuccess;
}
-sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi )
+sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsVisible( nTab ) == bVisible )
return sal_True; // nichts zu tun - ok
@@ -2907,10 +2907,10 @@ sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bAp
return sal_True;
}
-sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool /* bApi */ )
+sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, bool bRTL, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsLayoutRTL( nTab ) == bRTL )
return sal_True; // nothing to do - ok
@@ -3564,7 +3564,7 @@ sal_Bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhic
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo (pDoc->IsUndoEnabled());
+ bool bUndo (pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
@@ -3611,7 +3611,7 @@ sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement,
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
@@ -3786,7 +3786,7 @@ sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMa
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nEndTab = rRange.aEnd.Tab();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
ScMarkData aMark;
if (pTabMark)
@@ -4584,7 +4584,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA
OSL_ENSURE( pNewRanges, "pNewRanges is 0" );
ScDocument* pDoc = rDocShell.GetDocument();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
@@ -4933,7 +4933,7 @@ sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNe
SCROW nStartRow = rOldRange.aStart.Row();
SCTAB nTab = rOldRange.aStart.Tab();
- sal_Bool bUndo(pDoc->IsUndoEnabled());
+ bool bUndo(pDoc->IsUndoEnabled());
sal_Bool bRet = false;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index a95d0a79dfac..4a5510d891d1 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3039,7 +3039,7 @@ bool ScDocShell::SetProtectionPassword( const String &rNewPassword )
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if (pChangeTrack)
{
- sal_Bool bProtected = pChangeTrack->IsProtected();
+ bool bProtected = pChangeTrack->IsProtected();
if (rNewPassword.Len())
{
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index a07226bd288c..f506b50773d0 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -356,7 +356,7 @@ void ScDocShell::UnlockDocument()
//------------------------------------------------------------------
-void ScDocShell::SetInplace( sal_Bool bInplace )
+void ScDocShell::SetInplace( bool bInplace )
{
if (bIsInplace != bInplace)
{
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e92fae8b73a7..f01b5106aa28 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1134,7 +1134,7 @@ bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJust
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if ( pChangeTrack )
{
- sal_Bool bProtected = pChangeTrack->IsProtected();
+ bool bProtected = pChangeTrack->IsProtected();
if ( bJustQueryIfProtected && !bProtected )
return true;
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index fafd293a2a4b..a085e9fec075 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -89,7 +89,7 @@ private:
void Impl_Reset();
sal_Bool Impl_CheckRefStrings();
void Impl_FillLists();
- sal_Bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
+ bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
// Handler:
DECL_LINK( Impl_SelectHdl, ListBox* );
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index 4950341129dc..8c020bca308c 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -71,7 +71,7 @@ private:
VirtualDevice aVD;
SvtScriptedTextHelper aScriptedText;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBreakIter;
- sal_Bool bFitWidth;
+ bool bFitWidth;
svx::frame::Array maArray; /// Implementation to draw the frame borders.
bool mbRTL;
Size aPrvSize;
@@ -90,7 +90,7 @@ private:
//-------------------------------------------
SC_DLLPRIVATE void Init ();
SC_DLLPRIVATE void DoPaint ( const Rectangle& rRect );
- SC_DLLPRIVATE void CalcCellArray ( sal_Bool bFitWidth );
+ SC_DLLPRIVATE void CalcCellArray ( bool bFitWidth );
SC_DLLPRIVATE void CalcLineMap ();
SC_DLLPRIVATE void PaintCells ();
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index e7f6b4dd2980..9ea375a869eb 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -132,9 +132,9 @@ public:
virtual bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
virtual bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
- virtual sal_Bool SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi );
+ virtual sal_Bool SetTableVisible( SCTAB nTab, bool bVisible, sal_Bool bApi );
- virtual sal_Bool SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool bApi );
+ virtual sal_Bool SetLayoutRTL( SCTAB nTab, bool bRTL, sal_Bool bApi );
virtual SC_DLLPUBLIC sal_Bool
SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 56f6c934b667..157daf45ae88 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -360,7 +360,7 @@ public:
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
- void SetInplace( sal_Bool bInplace );
+ void SetInplace( bool bInplace );
bool IsEmpty() const;
void SetEmpty(bool bSet);
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index e720b1228168..cde8ff45dc65 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -451,7 +451,7 @@ void ScAutoFmtPreview::Init()
//------------------------------------------------------------------------
-void ScAutoFmtPreview::CalcCellArray( sal_Bool bFitWidthP )
+void ScAutoFmtPreview::CalcCellArray( bool bFitWidthP )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( bFitWidthP ? mnDataColWidth2 : mnDataColWidth1 );
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index f4de499da793..dd7f95c83d60 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -360,10 +360,10 @@ void ScPrintAreasDlg::Impl_Reset()
//----------------------------------------------------------------------------
-sal_Bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
+bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
{
String aRangeStr = pEd->GetText();
- sal_Bool bDataChanged = (pEd->GetSavedValue() != aRangeStr);
+ bool bDataChanged = (pEd->GetSavedValue() != aRangeStr);
if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd )
{
@@ -529,7 +529,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
{
if ( Impl_CheckRefStrings() )
{
- sal_Bool bDataChanged = false;
+ bool bDataChanged = false;
String aStr;
SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
@@ -540,7 +540,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
//-------------------------
// first try the list box, if "Entite sheet" is selected
- sal_Bool bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
+ bool bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
SfxBoolItem aEntireSheet( FN_PARAM_4, bEntireSheet );
bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 45623348aa38..ec1ec10e1366 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1388,9 +1388,10 @@ sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime
return false;
}
-void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled )
+void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabledIn )
throw(uno::RuntimeException)
{
+ bool bEnabled(bEnabledIn);
SolarMutexGuard aGuard;
if (pDocShell)
{
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 219f9d21b25c..0a3ab2863051 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1095,7 +1095,7 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
if ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight )
{
- sal_Bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
+ bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
ScHSplitPos eWhich = (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT;
long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich);
if (nDelta) ScrollX( nDelta, eWhich );
@@ -1116,7 +1116,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
{
sal_Bool bOnlineScroll = sal_True; //! Optionen
- sal_Bool bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight );
+ bool bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight );
long nViewPos;
if ( bHoriz )
nViewPos = aViewData.GetPosX( (pScroll == &aHScrollLeft) ?
@@ -1125,8 +1125,8 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
nViewPos = aViewData.GetPosY( (pScroll == &aVScrollTop) ?
SC_SPLIT_TOP : SC_SPLIT_BOTTOM );
- sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
- sal_Bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
+ bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
ScrollType eType = pScroll->GetType();
if ( eType == SCROLL_DRAG )
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 8fcb4691b345..7080d6e13ba0 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -997,7 +997,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if( pReqArgs->HasItem( FID_PROTECT_DOC, &pItem ) &&
- ((const SfxBoolItem*)pItem)->GetValue() == pDoc->IsDocProtected() )
+ ((const SfxBoolItem*)pItem)->GetValue() == static_cast<sal_Bool>(pDoc->IsDocProtected()) )
{
rReq.Ignore();
break;
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index f69f91f0955a..a3399e14925d 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -1046,7 +1046,7 @@ public:
LanguageType GetLanguage() const;
void SetUILanguage( LanguageType eLang );
LanguageType GetUILanguage() const;
- sal_Bool GetLayoutRTL() const; // returns sal_True if UI language requires right-to-left UI
+ bool GetLayoutRTL() const; // returns true if UI language requires right-to-left UI
const LocaleDataWrapper& GetLocaleDataWrapper() const;
const LocaleDataWrapper& GetUILocaleDataWrapper() const;
const vcl::I18nHelper& GetLocaleI18nHelper() const;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index cd2c7e65d798..35ed7a818a1b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1490,7 +1490,7 @@ void AllSettings::SetUILanguage( LanguageType )
// -----------------------------------------------------------------------
-sal_Bool AllSettings::GetLayoutRTL() const
+bool AllSettings::GetLayoutRTL() const
{
static const char* pEnv = getenv("SAL_RTL_ENABLED" );
static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
@@ -1499,7 +1499,7 @@ sal_Bool AllSettings::GetLayoutRTL() const
if( pEnv )
return true;
- sal_Bool bRTL = sal_False;
+ bool bRTL = false;
if( nUIMirroring == -1 )
{