diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/app/seltrans.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/viewfunc.hxx | 152 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk3.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/undo/undocell.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/undo/undotab.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/excelvbahelper.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshe.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 162 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 66 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun4.cxx | 38 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 30 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun7.cxx | 24 |
19 files changed, 270 insertions, 266 deletions
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 9b64c826e4bc..160deb25727e 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -288,7 +288,7 @@ void ScSelectionTransferObj::CreateCellData() // bApi = sal_True -> no error messages // #i18364# bStopEdit = sal_False -> don't end edit mode // (this may be called from pasting into the edit line) - sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, sal_True, sal_True, false ); + sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, true, true, false ); ScDrawLayer::SetGlobalDrawPersist(NULL); diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index daad48ecea63..9ef8671f4a94 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -61,7 +61,7 @@ class ScViewFunc : public ScTabView private: ScAddress aFormatSource; // for automatic extension of formatting ScRange aFormatArea; - sal_Bool bFormatValid; + bool bFormatValid; public: ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ); @@ -71,9 +71,9 @@ public: void GetSelectionFrame ( SvxBoxItem& rLineOuter, SvxBoxInfoItem& rLineInner ); - sal_uInt8 GetSelectionScriptType(); + sal_uInt8 GetSelectionScriptType(); - sal_Bool GetAutoSumArea(ScRangeList& rRangeList); + bool GetAutoSumArea(ScRangeList& rRangeList); void EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr); bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue ); OUString GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr ); @@ -94,11 +94,11 @@ public: void EnterDataAtCursor( const OUString& rString ); //! Not used? - SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, sal_Bool bIncludeObjects = false ); - SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc = NULL, sal_Bool bCut = false, sal_Bool bApi = false, - sal_Bool bIncludeObjects = false, sal_Bool bStopEdit = true ); - SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, sal_Bool bCut = false, - sal_Bool bApi = false, sal_Bool bIncludeObjects = false, sal_Bool bStopEdit = true, sal_Bool bUseRangeForVBA = true ); + SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, bool bIncludeObjects = false ); + SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc = NULL, bool bCut = false, bool bApi = false, + bool bIncludeObjects = false, bool bStopEdit = true ); + SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, bool bCut = false, + bool bApi = false, bool bIncludeObjects = false, bool bStopEdit = true, bool bUseRangeForVBA = true ); ScTransferObj* CopyToTransferable(); SC_DLLPUBLIC bool PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction = PASTE_NOFUNC, bool bSkipEmpty = false, @@ -107,34 +107,34 @@ public: sal_uInt16 nUndoExtraFlags = IDF_NONE, bool bAllowDialogs = false ); - void FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink ); + void FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ); SC_DLLPUBLIC void PasteFromSystem(); - SC_DLLPUBLIC sal_Bool PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi = false ); + SC_DLLPUBLIC bool PasteFromSystem( sal_uLong nFormatId, bool bApi = false ); void PasteFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); void PasteDraw(); void PasteDraw( const Point& rLogicPos, SdrModel* pModel, - sal_Bool bGroup = false, sal_Bool bSameDocClipboard = false ); + bool bGroup = false, bool bSameDocClipboard = false ); - sal_Bool PasteOnDrawObjectLinked( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, - SdrObject& rHitObj); + bool PasteOnDrawObjectLinked( + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, + SdrObject& rHitObj); - sal_Bool PasteDataFormat( sal_uLong nFormatId, + bool PasteDataFormat( sal_uLong nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL, - sal_Bool bLink = false, sal_Bool bAllowDialogs = false ); + bool bLink = false, bool bAllowDialogs = false ); - sal_Bool PasteFile( const Point&, const OUString&, sal_Bool bLink=false ); - sal_Bool PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const OUString& = OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT ); - sal_Bool PasteBitmapEx( const Point&, const BitmapEx& ); - sal_Bool PasteMetaFile( const Point&, const GDIMetaFile& ); - sal_Bool PasteGraphic( const Point& rPos, const Graphic& rGraphic, + bool PasteFile( const Point&, const OUString&, bool bLink=false ); + bool PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const OUString& = OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT ); + bool PasteBitmapEx( const Point&, const BitmapEx& ); + bool PasteMetaFile( const Point&, const GDIMetaFile& ); + bool PasteGraphic( const Point& rPos, const Graphic& rGraphic, const OUString& rFile, const OUString& rFilter ); - sal_Bool PasteBookmark( sal_uLong nFormatId, + bool PasteBookmark( sal_uLong nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY ); @@ -143,17 +143,17 @@ public: void InsertBookmark( const OUString& rDescription, const OUString& rURL, SCCOL nPosX, SCROW nPosY, const OUString* pTarget = NULL, - sal_Bool bTryReplace = false ); - bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent ); + bool bTryReplace = false ); + bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent ); long DropRequestHdl( Exchange* pExchange ); - sal_Bool MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, - sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); + bool MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, + bool bCut, bool bRecord, bool bPaint, bool bApi ); - sal_Bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi ); + bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, bool bApi ); void CreateNames( sal_uInt16 nFlags ); - sal_uInt16 GetCreateNameFlags(); + sal_uInt16 GetCreateNameFlags(); void InsertNameList(); bool InsertName( const OUString& rName, const OUString& rSymbol, const OUString& rType ); @@ -170,11 +170,12 @@ public: void ApplyUserItemSet( const SfxItemSet& rItemSet ); - const SfxStyleSheet* GetStyleSheetFromMarked(); - void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, + const SfxStyleSheet* + GetStyleSheetFromMarked(); + void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, bool bRecord = true ); - void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); - void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); + void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); + void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 ); void SetNumFmtByStr( const OUString& rCode ); @@ -201,65 +202,67 @@ public: ScMarkData* pMarkData = NULL ); void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, bool bRecord = true, bool bPaint = true ); - void ShowMarkedColumns( sal_Bool bShow, sal_Bool bRecord = sal_True ); - void ShowMarkedRows( sal_Bool bShow, sal_Bool bRecord = sal_True ); + void ShowMarkedColumns( bool bShow, bool bRecord = true ); + void ShowMarkedRows( bool bShow, bool bRecord = true ); - sal_Bool AdjustBlockHeight( sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL ); - sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint = sal_True ); + bool AdjustBlockHeight( bool bPaint = true, ScMarkData* pMarkData = NULL ); + bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint = true ); void ModifyCellSize( ScDirection eDir, bool bOptimal ); - SC_DLLPUBLIC void InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True, + SC_DLLPUBLIC void + InsertPageBreak( bool bColumn, bool bRecord = true, const ScAddress* pPos = NULL, - sal_Bool bSetModified = sal_True ); - SC_DLLPUBLIC void DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True, + bool bSetModified = true ); + SC_DLLPUBLIC void + DeletePageBreak( bool bColumn, bool bRecord = true, const ScAddress* pPos = NULL, - sal_Bool bSetModified = sal_True ); + bool bSetModified = true ); void RemoveManualBreaks(); void SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages); void AdjustPrintZoom(); - sal_Bool TestMergeCells(); - sal_Bool TestRemoveMerge(); + bool TestMergeCells(); + bool TestRemoveMerge(); - sal_Bool MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord = true, sal_Bool bCenter = false ); - sal_Bool RemoveMerge( sal_Bool bRecord = true ); + bool MergeCells( bool bApi, bool& rDoContents, bool bRecord = true, bool bCenter = false ); + bool RemoveMerge( bool bRecord = true ); void FillSimple( FillDir eDir, bool bRecord = true ); void FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, - double fStart, double fStep, double fMax, sal_Bool bRecord = sal_True ); + double fStart, double fStep, double fMax, bool bRecord = true ); void FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord = sal_True ); + SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, bool bRecord = true ); void FillCrossDblClick(); void TransliterateText( sal_Int32 nType ); ScAutoFormatData* CreateAutoFormatData(); - void AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord = sal_True ); + void AutoFormat( sal_uInt16 nFormatNo, bool bRecord = true ); - sal_Bool SearchAndReplace( const SvxSearchItem* pSearchItem, - sal_Bool bAddUndo, sal_Bool bIsApi ); + bool SearchAndReplace( const SvxSearchItem* pSearchItem, + bool bAddUndo, bool bIsApi ); void Solve( const ScSolveParam& rParam ); - void TabOp( const ScTabOpParam& rParam, sal_Bool bRecord = sal_True ); + void TabOp( const ScTabOpParam& rParam, bool bRecord = true ); - sal_Bool InsertTable( const OUString& rName, SCTAB nTabNr, sal_Bool bRecord = sal_True ); - sal_Bool InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SCTAB nCount, sal_Bool bRecord = sal_True); + bool InsertTable( const OUString& rName, SCTAB nTabNr, bool bRecord = true ); + bool InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SCTAB nCount, bool bRecord = true); - sal_Bool AppendTable( const OUString& rName, sal_Bool bRecord = sal_True ); + bool AppendTable( const OUString& rName, bool bRecord = true ); - sal_Bool DeleteTable( SCTAB nTabNr, sal_Bool bRecord = true ); - sal_Bool DeleteTables(const std::vector<SCTAB>& TheTabs, sal_Bool bRecord = true ); + bool DeleteTable( SCTAB nTabNr, bool bRecord = true ); + bool DeleteTables(const std::vector<SCTAB>& TheTabs, bool bRecord = true ); bool DeleteTables(SCTAB nTab, SCTAB nSheets); - sal_Bool RenameTable( const OUString& rName, SCTAB nTabNr ); - void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = NULL ); + bool RenameTable( const OUString& rName, SCTAB nTabNr ); + void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = NULL ); void ImportTables( ScDocShell* pSrcShell, SCTAB nCount, const SCTAB* pSrcTabs, - sal_Bool bLink,SCTAB nTab); + bool bLink,SCTAB nTab); bool SetTabBgColor( const Color& rColor, SCTAB nTabNr ); bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList ); @@ -287,22 +290,22 @@ public: void InsertDraw(); void SetSelectionFrameLines( const ::editeng::SvxBorderLine* pLine, - sal_Bool bColorOnly ); + bool bColorOnly ); void SetNoteText( const ScAddress& rPos, const OUString& rNoteText ); void ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate ); - void DoRefConversion( sal_Bool bRecord = sal_True ); + void DoRefConversion( bool bRecord = true ); - void DoHangulHanjaConversion( sal_Bool bRecord = true ); - void DoThesaurus( sal_Bool bRecord = true ); + void DoHangulHanjaConversion( bool bRecord = true ); + void DoThesaurus( bool bRecord = true ); /** Generic implementation of sheet conversion functions. */ - void DoSheetConversion( const ScConversionParam& rParam, sal_Bool bRecord = sal_True ); + void DoSheetConversion( const ScConversionParam& rParam, bool bRecord = true ); - void SetPrintRanges( sal_Bool bEntireSheet, + void SetPrintRanges( bool bEntireSheet, const OUString* pPrint, const OUString* pRepCol, const OUString* pRepRow, - sal_Bool bAddPrint ); + bool bAddPrint ); void DetectiveAddPred(); void DetectiveDelPred(); @@ -324,18 +327,19 @@ public: void ForgetFormatArea() { bFormatValid = false; } bool SelectionEditable( bool* pOnlyNotBecauseOfMatrix = NULL ); - SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow , - SCROW nStartRow , SCCOL nStartCol , - SCROW nEndRow , SCCOL nEndCol , - boost::ptr_vector<boost::nullable<Edit> >& aEdits, - sal_uInt16 aColLength ); + SC_DLLPUBLIC void + DataFormPutData( SCROW nCurrentRow , + SCROW nStartRow , SCCOL nStartCol , + SCROW nEndRow , SCCOL nEndCol , + boost::ptr_vector<boost::nullable<Edit> >& aEdits, + sal_uInt16 aColLength ); void UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAttr = NULL ); // Internal helper functions protected: void UpdateLineAttrs( ::editeng::SvxBorderLine& rLine, const ::editeng::SvxBorderLine* pDestLine, const ::editeng::SvxBorderLine* pSrcLine, - sal_Bool bColor ); + bool bColor ); private: @@ -343,17 +347,17 @@ private: const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); - bool PasteMultiRangesFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, + bool PasteMultiRangesFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs, InsCellCmd eMoveMode, sal_uInt16 nUndoFlags ); - bool PasteFromClipToMultiRanges( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, + bool PasteFromClipToMultiRanges( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs, InsCellCmd eMoveMode, sal_uInt16 nUndoFlags ); void PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMarkData& rMark); - sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula ); + sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula ); void StartFormatArea(); bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bAttrChanged ); diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index c11285d744bc..1fdf7d156c2b 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -826,7 +826,7 @@ void ScUndoCut::Redo() void ScUndoCut::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, sal_True ); + ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, true ); } bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index e5c1628658d5..a23cf09d1385 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -621,7 +621,7 @@ void ScUndoAutoFill::Repeat(SfxRepeatTarget& rTarget) rViewShell.FillSimple( eFillDir, true ); else rViewShell.FillSeries( eFillDir, eFillCmd, eFillDateCmd, - fStartValue, fStepValue, fMaxValue, sal_True ); + fStartValue, fStepValue, fMaxValue, true ); } } @@ -745,8 +745,8 @@ void ScUndoMerge::Repeat(SfxRepeatTarget& rTarget) if (rTarget.ISA(ScTabViewTarget)) { ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); - sal_Bool bCont = false; - rViewShell.MergeCells( false, bCont, sal_True ); + bool bCont = false; + rViewShell.MergeCells( false, bCont, true ); } } @@ -896,7 +896,7 @@ void ScUndoAutoFormat::Redo() void ScUndoAutoFormat::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, sal_True ); + ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, true ); } bool ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const @@ -1052,7 +1052,7 @@ void ScUndoReplace::Redo() { SetViewMarkData( aMarkData ); - pViewShell->SearchAndReplace( pSearchItem, false, sal_True ); + pViewShell->SearchAndReplace( pSearchItem, false, true ); } } else if (pSearchItem->GetPattern() && @@ -1065,7 +1065,7 @@ void ScUndoReplace::Redo() } else if (pViewShell) - pViewShell->SearchAndReplace( pSearchItem, false, sal_True ); + pViewShell->SearchAndReplace( pSearchItem, false, true ); SetChangeTrack(); @@ -1075,7 +1075,7 @@ void ScUndoReplace::Redo() void ScUndoReplace::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, sal_True, false ); + ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, true, false ); } bool ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const @@ -1257,7 +1257,7 @@ void ScUndoConversion::Redo() void ScUndoConversion::Repeat( SfxRepeatTarget& rTarget ) { if( rTarget.ISA( ScTabViewTarget ) ) - ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, sal_True ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, true ); } bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index a21150066d61..9f60f460f087 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -565,9 +565,9 @@ void ScUndoPageBreak::Repeat(SfxRepeatTarget& rTarget) ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); if (bInsert) - rViewShell.InsertPageBreak(bColumn, sal_True); + rViewShell.InsertPageBreak(bColumn, true); else - rViewShell.DeletePageBreak(bColumn, sal_True); + rViewShell.DeletePageBreak(bColumn, true); } } @@ -769,7 +769,7 @@ void ScUndoThesaurus::Redo() void ScUndoThesaurus::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( sal_True ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( true ); } bool ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 498d463fcc87..7740bd8f8958 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -413,7 +413,7 @@ void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget) if (rTarget.ISA(ScTabViewTarget)) { ScTabViewShell* pViewShell = ((ScTabViewTarget&)rTarget).GetViewShell(); - pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), sal_True ); + pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), true ); } } diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index a50834c74e06..1550c0c6a568 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -180,7 +180,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel ) ScTabViewShell* pViewShell = getBestViewShell( xModel ); if ( pViewShell ) { - pViewShell->CutToClip( NULL, sal_True ); + pViewShell->CutToClip( NULL, true ); // mark the copied transfer object so it is used in ScVbaRange::Insert ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 45163a22d0b3..dfb92942a5eb 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4093,9 +4093,9 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti { ScTabViewShell* pViewShell = excel::getBestViewShell( xModel ); if ( nPageBreak == excel::XlPageBreak::xlPageBreakManual ) - pViewShell->InsertPageBreak( bColumn, sal_True, &aAddr); + pViewShell->InsertPageBreak( bColumn, true, &aAddr); else if ( nPageBreak == excel::XlPageBreak::xlPageBreakNone ) - pViewShell->DeletePageBreak( bColumn, sal_True, &aAddr); + pViewShell->DeletePageBreak( bColumn, true, &aAddr); } } } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index f11be50ec52a..6a7932ec5e06 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1502,7 +1502,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) pTabViewShell->PasteDraw(); else - bRet = pTabViewShell->PasteFromSystem(nFormat, sal_True); // TRUE: no error messages + bRet = pTabViewShell->PasteFromSystem(nFormat, true); // TRUE: no error messages } if ( bRet ) @@ -1590,7 +1590,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) break; case FID_INS_COLBRK: - pTabViewShell->InsertPageBreak( sal_True ); + pTabViewShell->InsertPageBreak( true ); rReq.Done(); break; @@ -1600,7 +1600,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) break; case FID_DEL_COLBRK: - pTabViewShell->DeletePageBreak( sal_True ); + pTabViewShell->DeletePageBreak( true ); rReq.Done(); break; diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index f7f1a0b3953b..d9acade2cf69 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -756,7 +756,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) if( bMerge ) { // merge - check if to move contents of covered cells - sal_Bool bMoveContents = false; + bool bMoveContents = false; sal_Bool bApi = rReq.IsAPI(); const SfxPoolItem* pItem; if ( pReqArgs && diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 1fb5941df403..8f371fb97658 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1767,7 +1767,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if ( pDefLine ) { pDefLine->SetColor( rColor ); - pTabViewShell->SetSelectionFrameLines( pDefLine, sal_True ); + pTabViewShell->SetSelectionFrameLines( pDefLine, true ); } else { diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index c19c743d7bb7..9020afd0d735 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4157,12 +4157,12 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos if ( bIsLink ) { // call with bApi = sal_True to avoid error messages in drop handler - bDone = pView->LinkBlock( aSource, aDest.aStart, sal_True /*bApi*/ ); + bDone = pView->LinkBlock( aSource, aDest.aStart, true /*bApi*/ ); } else { // call with bApi = sal_True to avoid error messages in drop handler - bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, sal_True /*bRecord*/, sal_True /*bPaint*/, sal_True /*bApi*/ ); + bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, true /*bRecord*/, true /*bPaint*/, true /*bApi*/ ); } } diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index a0bd11236b84..ef4d5113ab17 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -958,12 +958,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if (pDoc->HasColBreak(static_cast<SCCOL>(nPagebreakBreak), nTab) & BREAK_MANUAL) { ScAddress aOldAddr( static_cast<SCCOL>(nPagebreakBreak), nPosY, nTab ); - pViewFunc->DeletePageBreak( sal_True, sal_True, &aOldAddr, false ); + pViewFunc->DeletePageBreak( true, true, &aOldAddr, false ); } if ( !bHide && !bToEnd ) // am Ende nicht { ScAddress aNewAddr( static_cast<SCCOL>(nNew), nPosY, nTab ); - pViewFunc->InsertPageBreak( sal_True, sal_True, &aNewAddr, false ); + pViewFunc->InsertPageBreak( true, true, &aNewAddr, false ); } if ( bGrow ) { @@ -972,7 +972,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if ( static_cast<SCCOL>(nPagebreakPrev) > aPagebreakSource.aStart.Col() && !bManualBreak ) { ScAddress aPrev( static_cast<SCCOL>(nPagebreakPrev), nPosY, nTab ); - pViewFunc->InsertPageBreak( sal_True, sal_True, &aPrev, false ); + pViewFunc->InsertPageBreak( true, true, &aPrev, false ); } if (!pDocSh->AdjustPrintZoom( ScRange( @@ -985,12 +985,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if (pDoc->HasRowBreak(nPagebreakBreak, nTab) & BREAK_MANUAL) { ScAddress aOldAddr( nPosX, nPagebreakBreak, nTab ); - pViewFunc->DeletePageBreak( false, sal_True, &aOldAddr, false ); + pViewFunc->DeletePageBreak( false, true, &aOldAddr, false ); } if ( !bHide && !bToEnd ) // am Ende nicht { ScAddress aNewAddr( nPosX, nNew, nTab ); - pViewFunc->InsertPageBreak( false, sal_True, &aNewAddr, false ); + pViewFunc->InsertPageBreak( false, true, &aNewAddr, false ); } if ( bGrow ) { @@ -999,7 +999,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if ( nPagebreakPrev > aPagebreakSource.aStart.Row() && !bManualBreak ) { ScAddress aPrev( nPosX, nPagebreakPrev, nTab ); - pViewFunc->InsertPageBreak( false, sal_True, &aPrev, false ); + pViewFunc->InsertPageBreak( false, true, &aPrev, false ); } if (!pDocSh->AdjustPrintZoom( ScRange( diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 5f084986e848..49c9d8a98c0b 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -143,7 +143,7 @@ void ScTabViewShell::InsertURL( const OUString& rName, const OUString& rURL, con SCCOL nPosX = GetViewData()->GetCurX(); SCROW nPosY = GetViewData()->GetCurY(); - InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, sal_True ); + InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, true ); } } else @@ -236,7 +236,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem; ScGlobal::SetSearchItem( *pSearchItem ); - sal_Bool bSuccess = SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() ); + bool bSuccess = SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); const SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId()); if (pChildWindow) diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index c5cba869dbf6..f6c2021fd253 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -103,7 +103,7 @@ void VBA_DeleteModule( ScDocShell& rDocSh, const OUString& sModuleName ); //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::AdjustBlockHeight( sal_Bool bPaint, ScMarkData* pMarkData ) +bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); if (!pMarkData) @@ -165,7 +165,7 @@ sal_Bool ScViewFunc::AdjustBlockHeight( sal_Bool bPaint, ScMarkData* pMarkData ) //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint ) +bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -399,7 +399,7 @@ static bool lcl_GetAutoSumForRowRange( ScDocument* pDoc, ScRangeList& rRangeList //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) +bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) { ScDocument* pDoc = GetViewData()->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); @@ -415,8 +415,8 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) SCROW nSeekRow = nRow; SCCOLROW nExtend; // will become valid via reference for ScAutoSumSum - sal_Bool bCol = false; - sal_Bool bRow = false; + bool bCol = false; + bool bRow = false; ScAutoSum eSum; if ( nRow != 0 @@ -426,19 +426,19 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData ) ) { - bRow = sal_True; + bRow = true; nSeekRow = nRow - 1; } else if ( nCol != 0 && (eSum = lcl_IsAutoSumData( pDoc, nCol-1, nRow, nTab, DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData ) { - bCol = sal_True; + bCol = true; nSeekCol = nCol - 1; } else if ( (eSum = lcl_SeekAutoSumData( pDoc, nCol, nSeekRow, nTab, DIR_TOP, nExtend /*out*/ )) != ScAutoSumNone ) - bRow = sal_True; + bRow = true; else if (( eSum = lcl_SeekAutoSumData( pDoc, nSeekCol, nRow, nTab, DIR_LEFT, nExtend /*out*/ )) != ScAutoSumNone ) - bCol = sal_True; + bCol = true; if ( bCol || bRow ) { @@ -458,7 +458,7 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) else nEndCol = nCol - 1; // maybe extend data area to the right } - sal_Bool bContinue = false; + bool bContinue = false; do { if ( eSum == ScAutoSumData ) @@ -498,7 +498,7 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) } } } while ( bContinue ); - return sal_True; + return true; } return false; } @@ -849,8 +849,8 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat //---------------------------------------------------------------------------- // manual page break -void ScViewFunc::InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos, - sal_Bool bSetModified ) +void ScViewFunc::InsertPageBreak( bool bColumn, bool bRecord, const ScAddress* pPos, + bool bSetModified ) { SCTAB nTab = GetViewData()->GetTabNo(); ScAddress aCursor; @@ -859,7 +859,7 @@ void ScViewFunc::InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAd else aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab ); - sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, false ); if ( bSuccess && bSetModified ) @@ -869,8 +869,8 @@ void ScViewFunc::InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAd //---------------------------------------------------------------------------- -void ScViewFunc::DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos, - sal_Bool bSetModified ) +void ScViewFunc::DeletePageBreak( bool bColumn, bool bRecord, const ScAddress* pPos, + bool bSetModified ) { SCTAB nTab = GetViewData()->GetTabNo(); ScAddress aCursor; @@ -879,7 +879,7 @@ void ScViewFunc::DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAd else aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab ); - sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, false ); if ( bSuccess && bSetModified ) @@ -893,7 +893,7 @@ void ScViewFunc::RemoveManualBreaks() ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { @@ -931,9 +931,9 @@ void ScViewFunc::AdjustPrintZoom() //---------------------------------------------------------------------------- -void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const OUString* pPrint, +void ScViewFunc::SetPrintRanges( bool bEntireSheet, const OUString* pPrint, const OUString* pRepCol, const OUString* pRepRow, - sal_Bool bAddPrint ) + bool bAddPrint ) { // on all selected tables @@ -941,7 +941,7 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const OUString* pPrint, ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTab; - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver(); @@ -1044,9 +1044,9 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const OUString* pPrint, //---------------------------------------------------------------------------- // Merge cells -sal_Bool ScViewFunc::TestMergeCells() // pre-test (for menu) +bool ScViewFunc::TestMergeCells() // pre-test (for menu) { - // simple test: sal_True if there's a selection but no multi selection and not filtered + // simple test: true if there's a selection but no multi selection and not filtered const ScMarkData& rMark = GetViewData()->GetMarkData(); if ( rMark.IsMarked() || rMark.IsMultiMarked() ) @@ -1061,7 +1061,7 @@ sal_Bool ScViewFunc::TestMergeCells() // pre-test (for menu) //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord, sal_Bool bCenter ) +bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bCenter ) { // Editable- and Being-Nested- test must be at the beginning (in DocFunc too), // so that the Contents-QueryBox won't appear @@ -1118,7 +1118,7 @@ sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bAskDialog = true; } - sal_Bool bOk = true; + bool bOk = true; if (bAskDialog) { @@ -1131,7 +1131,7 @@ sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool sal_uInt16 nRetVal = aBox.Execute(); if ( nRetVal == RET_YES ) - rDoContents = sal_True; + rDoContents = true; else if ( nRetVal == RET_CANCEL ) bOk = false; } @@ -1158,15 +1158,15 @@ sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::TestRemoveMerge() +bool ScViewFunc::TestRemoveMerge() { - sal_Bool bMerged = false; + bool bMerged = false; ScRange aRange; if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE) { ScDocument* pDoc = GetViewData()->GetDocument(); if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) ) - bMerged = sal_True; + bMerged = true; } return bMerged; } @@ -1200,7 +1200,7 @@ static bool lcl_extendMergeRange(ScCellMergeOption& rOption, const ScRange& rRan return bExtended; } -sal_Bool ScViewFunc::RemoveMerge( sal_Bool bRecord ) +bool ScViewFunc::RemoveMerge( bool bRecord ) { ScRange aRange; ScEditableTester aTester( this ); @@ -1238,14 +1238,14 @@ sal_Bool ScViewFunc::RemoveMerge( sal_Bool bRecord ) } while (bExtended); - sal_Bool bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, bRecord ); + bool bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, bRecord ); aExtended = aOption.getFirstSingleRange(); MarkRange( aExtended ); if (bOk) pDocSh->UpdateOle(GetViewData()); } - return sal_True; //! bOk ?? + return true; //! bOk ?? } //---------------------------------------------------------------------------- @@ -1271,14 +1271,14 @@ void ScViewFunc::FillSimple( FillDir eDir, bool bRecord ) //---------------------------------------------------------------------------- void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, - double fStart, double fStep, double fMax, sal_Bool bRecord ) + double fStart, double fStep, double fMax, bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - sal_Bool bSuccess = pDocSh->GetDocFunc(). + bool bSuccess = pDocSh->GetDocFunc(). FillSeries( aRange, &rMark, eDir, eCmd, eDateCmd, fStart, fStep, fMax, bRecord, false ); if (bSuccess) @@ -1296,14 +1296,14 @@ void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, //---------------------------------------------------------------------------- void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord ) + SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, bool bRecord ) { SCTAB nTab = GetViewData()->GetTabNo(); ScRange aRange( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab ); ScRange aSourceRange( aRange ); ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - sal_Bool bSuccess = pDocSh->GetDocFunc(). + bool bSuccess = pDocSh->GetDocFunc(). FillAuto( aRange, &rMark, eDir, nCount, bRecord, false ); if (bSuccess) { @@ -1340,7 +1340,7 @@ void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, //---------------------------------------------------------------------------- -void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink ) +void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ) { //! allow source sheet to be protected ScEditableTester aTester( this ); @@ -1354,11 +1354,11 @@ void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSki ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTab = GetViewData()->GetTabNo(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); ScRange aMarkRange; rMark.MarkToSimple(); - sal_Bool bMulti = rMark.IsMultiMarked(); + bool bMulti = rMark.IsMultiMarked(); if (bMulti) rMark.GetMultiMarkArea( aMarkRange ); else if (rMark.IsMarked()) @@ -1530,7 +1530,7 @@ ScAutoFormatData* ScViewFunc::CreateAutoFormatData() //---------------------------------------------------------------------------- -void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord ) +void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) @@ -1538,7 +1538,7 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); - sal_Bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, false ); + bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, false ); if (bSuccess) pDocSh->UpdateOle(GetViewData()); } @@ -1550,8 +1550,8 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord ) //---------------------------------------------------------------------------- // Suchen & Ersetzen -sal_Bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, - sal_Bool bAddUndo, sal_Bool bIsApi ) +bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, + bool bAddUndo, bool bIsApi ) { SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); ScDocShell* pDocSh = GetViewData()->GetDocShell(); @@ -1795,7 +1795,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) GetFrameWin()->EnterWait(); - sal_Bool bExact = + bool bExact = pDoc->Solver( rParam.aRefFormulaCell.Col(), rParam.aRefFormulaCell.Row(), @@ -1844,7 +1844,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) //---------------------------------------------------------------------------- // multi operation -void ScViewFunc::TabOp( const ScTabOpParam& rParam, sal_Bool bRecord ) +void ScViewFunc::TabOp( const ScTabOpParam& rParam, bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) @@ -1918,10 +1918,10 @@ void ScViewFunc::UseScenario( const OUString& rName ) //---------------------------------------------------------------------------- // Insert table -sal_Bool ScViewFunc::InsertTable( const OUString& rName, SCTAB nTab, sal_Bool bRecord ) +bool ScViewFunc::InsertTable( const OUString& rName, SCTAB nTab, bool bRecord ) { // Order Tabl/Name is inverted for DocFunc - sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). InsertTable( nTab, rName, bRecord, false ); if (bSuccess) SetTabNo( nTab, true ); @@ -1932,8 +1932,8 @@ sal_Bool ScViewFunc::InsertTable( const OUString& rName, SCTAB nTab, sal_Bool bR //---------------------------------------------------------------------------- // Insert tables -sal_Bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, - SCTAB nCount, sal_Bool bRecord ) +bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, + SCTAB nCount, bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -1982,7 +1982,7 @@ sal_Bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::AppendTable( const OUString& rName, sal_Bool bRecord ) +bool ScViewFunc::AppendTable( const OUString& rName, bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -2005,7 +2005,7 @@ sal_Bool ScViewFunc::AppendTable( const OUString& rName, sal_Bool bRecord ) pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return sal_True; + return true; } else { @@ -2016,12 +2016,12 @@ sal_Bool ScViewFunc::AppendTable( const OUString& rName, sal_Bool bRecord ) //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord ) +bool ScViewFunc::DeleteTable( SCTAB nTab, bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, false ); + bool bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, false ); if (bSuccess) { SCTAB nNewTab = nTab; @@ -2075,11 +2075,11 @@ bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets ) return false; } -sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord ) +bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bVbaEnabled = pDoc->IsInVBAMode(); + bool bVbaEnabled = pDoc->IsInVBAMode(); SCTAB nNewTab = TheTabs.front(); WaitObject aWait( GetFrameWin() ); if (bRecord && !pDoc->IsUndoEnabled()) @@ -2090,7 +2090,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) ) --nNewTab; - sal_Bool bWasLinked = false; + bool bWasLinked = false; ScDocument* pUndoDoc = NULL; ScRefUndoData* pUndoData = NULL; if (bRecord) @@ -2112,7 +2112,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord pUndoDoc->RenameTab( nTab, aOldName, false ); if (pDoc->IsLinked(nTab)) { - bWasLinked = sal_True; + bWasLinked = true; pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab), pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab), pDoc->GetLinkTab(nTab), @@ -2126,7 +2126,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord sal_uInt16 nScenFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags ); - sal_Bool bActive = pDoc->IsActiveScenario( nTab ); + bool bActive = pDoc->IsActiveScenario( nTab ); pUndoDoc->SetActiveScenario( nTab, bActive ); } pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) ); @@ -2148,15 +2148,15 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord pUndoData = new ScRefUndoData( pDoc ); } - sal_Bool bDelDone = false; + bool bDelDone = false; for(int i=TheTabs.size()-1; i>=0; --i) { OUString sCodeName; - sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName ); + bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName ); if (pDoc->DeleteTab(TheTabs[i])) { - bDelDone = sal_True; + bDelDone = true; if( bVbaEnabled ) { if( bHasCodeName ) @@ -2208,10 +2208,10 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord //---------------------------------------------------------------------------- -sal_Bool ScViewFunc::RenameTable( const OUString& rName, SCTAB nTab ) +bool ScViewFunc::RenameTable( const OUString& rName, SCTAB nTab ) { // order Table/Name is inverted for DocFunc - sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). RenameTable( nTab, rName, true, false ); if (bSuccess) { @@ -2290,7 +2290,7 @@ void ScViewFunc::InsertTableLink( const OUString& rFile, } if ( nTab <= MAXTAB ) - ImportTables( pSrcSh, 1, &nTab, sal_True, + ImportTables( pSrcSh, 1, &nTab, true, GetViewData()->GetTabNo() ); } } @@ -2300,17 +2300,17 @@ void ScViewFunc::InsertTableLink( const OUString& rFile, // Copy/link tables from another document void ScViewFunc::ImportTables( ScDocShell* pSrcShell, - SCTAB nCount, const SCTAB* pSrcTabs, sal_Bool bLink,SCTAB nTab ) + SCTAB nCount, const SCTAB* pSrcTabs, bool bLink,SCTAB nTab ) { ScDocument* pSrcDoc = pSrcShell->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); - sal_Bool bError = false; - sal_Bool bRefs = false; - sal_Bool bName = false; + bool bError = false; + bool bRefs = false; + bool bName = false; if (pSrcDoc->GetDrawLayer()) pDocSh->MakeDrawLayer(); @@ -2327,7 +2327,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, pDoc->CreateValidTabName( aName ); if ( !pDoc->InsertTab( nTab+i, aName ) ) { - bError = sal_True; // total error + bError = true; // total error break; // for } ++nInsCount; @@ -2345,13 +2345,13 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, bError = true; break; case 2: - bRefs = sal_True; + bRefs = true; break; case 3: - bName = sal_True; + bName = true; break; case 4: - bRefs = bName = sal_True; + bRefs = bName = true; break; } @@ -2368,7 +2368,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, aFilterName = pMed->GetFilter()->GetFilterName(); OUString aOptions = ScDocumentLoader::GetOptions(*pMed); - sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions ); + bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions ); sal_uLong nRefresh = 0; OUString aTabStr; @@ -2431,7 +2431,7 @@ void ScViewFunc::MoveTable( ScDocument* pDestDoc = NULL; ScDocShell* pDestShell = NULL; ScTabViewShell* pDestViewSh = NULL; - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); bool bRename = pNewTabName && !pNewTabName->isEmpty(); bool bNewDoc = (nDestDocNo == SC_DOC_NEW); @@ -2705,9 +2705,9 @@ void ScViewFunc::MoveTable( pDoc->GetScenarioData(nMovTab, aComment,aColor, nFlags); pDoc->SetScenario(nDestTab1,true); pDoc->SetScenarioData(nDestTab1,aComment,aColor,nFlags); - sal_Bool bActive = pDoc->IsActiveScenario(nMovTab ); + bool bActive = pDoc->IsActiveScenario(nMovTab ); pDoc->SetActiveScenario( nDestTab1, bActive ); - sal_Bool bVisible=pDoc->IsVisible(nMovTab); + bool bVisible=pDoc->IsVisible(nMovTab); pDoc->SetVisible(nDestTab1,bVisible ); } @@ -2782,7 +2782,7 @@ void ScViewFunc::ShowTable( const std::vector<OUString>& rNames ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); std::vector<SCTAB> undoTabs; OUString aName; @@ -2822,7 +2822,7 @@ void ScViewFunc::HideTable( const ScMarkData& rMark ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); SCTAB nVisible = 0; SCTAB nTabCount = pDoc->GetTableCount(); @@ -2909,7 +2909,7 @@ void ScViewFunc::InsertSpecialChar( const OUString& rStr, const Font& rFont ) void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine, const SvxBorderLine* pDestLine, const SvxBorderLine* pSrcLine, - sal_Bool bColor ) + bool bColor ) { if ( pSrcLine && pDestLine ) { @@ -2946,7 +2946,7 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine, //---------------------------------------------------------------------------- void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, - sal_Bool bColorOnly ) + bool bColorOnly ) { // Not editable only due to a matrix? Attribute is ok anyhow. bool bOnlyNotBecauseOfMatrix; diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 5b915c75aaf4..ae40407029e2 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -78,7 +78,7 @@ using namespace com::sun::star; //---------------------------------------------------------------------------- // C U T -void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects ) +void ScViewFunc::CutToClip( ScDocument* pClipDoc, bool bIncludeObjects ) { UpdateInputLine(); @@ -95,7 +95,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects ) ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); - const sal_Bool bRecord(pDoc->IsUndoEnabled()); // Undo/Redo + const bool bRecord(pDoc->IsUndoEnabled()); // Undo/Redo ScDocShellModificator aModificator( *pDocSh ); @@ -107,7 +107,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects ) MarkDataChanged(); } - CopyToClip( pClipDoc, sal_True, false, bIncludeObjects ); // Ab ins Clipboard + CopyToClip( pClipDoc, true, false, bIncludeObjects ); // Ab ins Clipboard ScAddress aOldEnd( aRange.aEnd ); // Zusammengefasste Zellen im Bereich? pDoc->ExtendMerge( aRange, true ); @@ -154,25 +154,25 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects ) //---------------------------------------------------------------------------- // C O P Y -sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit ) +bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, bool bCut, bool bApi, bool bIncludeObjects, bool bStopEdit ) { ScRange aRange; ScMarkType eMarkType = GetViewData()->GetSimpleArea( aRange ); ScMarkData& rMark = GetViewData()->GetMarkData(); - sal_Bool bDone = sal_False; + bool bDone = false; if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED ) { ScRangeList aRangeList; aRangeList.Append( aRange ); - bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit, sal_False ); + bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit, false ); } else if (eMarkType == SC_MARK_MULTI) { ScRangeList aRangeList; rMark.MarkToSimple(); rMark.FillRangeListWithMarks(&aRangeList, false); - bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit, sal_False ); + bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit, false ); } else { @@ -184,11 +184,11 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool b } // Copy the content of the Range into clipboard. -sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit, sal_Bool bUseRangeForVBA ) +bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, bool bCut, bool bApi, bool bIncludeObjects, bool bStopEdit, bool bUseRangeForVBA ) { if ( rRanges.empty() ) return false; - sal_Bool bDone = false; + bool bDone = false; if ( bStopEdit ) UpdateInputLine(); @@ -203,12 +203,12 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange { if ( pDoc && ( !pDoc->HasSelectedBlockMatrixFragment( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), rMark ) ) ) { - sal_Bool bSysClip = false; + bool bSysClip = false; if ( !pClipDoc ) // no clip doc specified { // Create one (deleted by ScTransferObj). pClipDoc = new ScDocument( SCDOCMODE_CLIP ); - bSysClip = sal_True; // and copy into system + bSysClip = true; // and copy into system } if ( !bCut ) { @@ -219,7 +219,7 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange if ( bSysClip && bIncludeObjects ) { - sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange ); + bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange ); // Update ScGlobal::pDrawClipDocShellRef. ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) ); } @@ -415,7 +415,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable() { ScDocument *pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj) - sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark ); + bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark ); ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) ); ScClipParam aClipParam(aRange, false); @@ -504,7 +504,7 @@ void ScViewFunc::PasteFromSystem() // it probably is spreadsheet cells that have been put // on the clipboard by OOo, so use the SYLK. (fdo#31077) - sal_Bool bDoRtf = false; + bool bDoRtf = false; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) { @@ -605,7 +605,7 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE )) { // If it's a Writer object, insert RTF instead of OLE - sal_Bool bDoRtf = false; + bool bDoRtf = false; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) { @@ -657,11 +657,11 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran } } -sal_Bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi ) +bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, bool bApi ) { UpdateInputLine(); - sal_Bool bRet = sal_True; + bool bRet = true; Window* pWin = GetActiveWin(); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); if ( nFormatId == 0 && pOwnClip ) @@ -692,7 +692,7 @@ sal_Bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi ) //---------------------------------------------------------------------------- // P A S T E -sal_Bool ScViewFunc::PasteOnDrawObjectLinked( +bool ScViewFunc::PasteOnDrawObjectLinked( const uno::Reference<datatransfer::XTransferable>& rxTransferable, SdrObject& rHitObj) { @@ -714,7 +714,7 @@ sal_Bool ScViewFunc::PasteOnDrawObjectLinked( if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, aEmpty, aEmpty )) { - return sal_True; + return true; } } } @@ -730,7 +730,7 @@ sal_Bool ScViewFunc::PasteOnDrawObjectLinked( if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aMtf), aBeginUndo, aEmpty, aEmpty )) { - return sal_True; + return true; } } } @@ -746,21 +746,21 @@ sal_Bool ScViewFunc::PasteOnDrawObjectLinked( if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aBmpEx), aBeginUndo, aEmpty, aEmpty )) { - return sal_True; + return true; } } } - return sal_False; + return false; } -static sal_Bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, +static bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rTabSelection, sal_uInt16 nMask ) { ScMarkData::const_iterator itr = rTabSelection.begin(), itrEnd = rTabSelection.end(); for (; itr != itrEnd; ++itr) if ( pDoc->HasAttrib( nCol1, nRow1, *itr, nCol2, nRow2, *itr, nMask ) ) - return sal_True; + return true; return false; } @@ -1753,13 +1753,13 @@ void ScViewFunc::PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMark // // innerhalb des Dokuments -sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, - sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ) +bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, + bool bCut, bool bRecord, bool bPaint, bool bApi ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); HideAllCursors(); // wegen zusammengefassten - sal_Bool bSuccess = sal_True; + bool bSuccess = true; SCTAB nDestTab = rDestPos.Tab(); const ScMarkData& rMark = GetViewData()->GetMarkData(); if ( rSource.aStart.Tab() == nDestTab && rSource.aEnd.Tab() == nDestTab && rMark.GetSelectCount() > 1 ) @@ -1818,7 +1818,7 @@ sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDest rDestPos.Row() + rSource.aEnd.Row() - rSource.aStart.Row(), nDestTab ); - sal_Bool bIncludeFiltered = bCut; + bool bIncludeFiltered = bCut; if ( !bIncludeFiltered ) { // find number of non-filtered rows @@ -1841,7 +1841,7 @@ sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDest // Link innerhalb des Dokuments -sal_Bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi ) +bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, bool bApi ) { // Test auf Ueberlappung @@ -1880,7 +1880,7 @@ sal_Bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPo delete pClipDoc; - return sal_True; + return true; } void ScViewFunc::DataFormPutData( SCROW nCurrentRow , @@ -1896,7 +1896,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow , ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager(); if ( pDoc ) { - const sal_Bool bRecord( pDoc->IsUndoEnabled()); + const bool bRecord( pDoc->IsUndoEnabled()); ScDocument* pUndoDoc = NULL; ScDocument* pRedoDoc = NULL; ScRefUndoData* pUndoData = NULL; @@ -1910,8 +1910,8 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow , pChangeTrack->ResetLastCut(); // kein CutMode mehr } ScRange aUserRange( nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab ); - sal_Bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW ); - sal_Bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL ); + bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW ); + bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL ); SCCOL nUndoEndCol = nStartCol+aColLength-1; SCROW nUndoEndRow = nCurrentRow; sal_uInt16 nUndoFlags = IDF_NONE; diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index eb7504d3f84c..1f279b833aac 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -72,7 +72,7 @@ using namespace com::sun::star; // STATIC DATA ----------------------------------------------------------- -sal_Bool bPasteIsDrop = false; +bool bPasteIsDrop = false; //================================================================== @@ -89,7 +89,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); - const sal_Bool bRecord (pDoc->IsUndoEnabled()); + const bool bRecord (pDoc->IsUndoEnabled()); const ScPatternAttr* pPattern = pDoc->GetPattern( nStartCol, nStartRow, nTab ); ScTabEditEngine* pEngine = new ScTabEditEngine( *pPattern, pDoc->GetEnginePool() ); @@ -176,7 +176,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, ShowAllCursors(); } } -void ScViewFunc::DoRefConversion( sal_Bool bRecord ) +void ScViewFunc::DoRefConversion( bool bRecord ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -186,7 +186,7 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord ) ScRange aMarkRange; rMark.MarkToSimple(); - sal_Bool bMulti = rMark.IsMultiMarked(); + bool bMulti = rMark.IsMultiMarked(); if (bMulti) rMark.GetMultiMarkArea( aMarkRange ); else if (rMark.IsMarked()) @@ -205,7 +205,7 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord ) } ScDocShell* pDocSh = GetViewData()->GetDocShell(); - sal_Bool bOk = false; + bool bOk = false; ScDocument* pUndoDoc = NULL; if (bRecord) @@ -301,7 +301,7 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord ) ErrorMessage(STR_ERR_NOREF); } // Thesaurus - Undo ok -void ScViewFunc::DoThesaurus( sal_Bool bRecord ) +void ScViewFunc::DoThesaurus( bool bRecord ) { SCCOL nCol; SCROW nRow; @@ -317,7 +317,7 @@ void ScViewFunc::DoThesaurus( sal_Bool bRecord ) EditView* pEditView = NULL; boost::scoped_ptr<ESelection> pEditSel; ScEditEngineDefaulter* pThesaurusEngine; - sal_Bool bIsEditMode = GetViewData()->HasEditView(eWhich); + bool bIsEditMode = GetViewData()->HasEditView(eWhich); if (bRecord && !pDoc->IsUndoEnabled()) bRecord = false; if (bIsEditMode) // Edit-Mode aktiv @@ -438,13 +438,13 @@ void ScViewFunc::DoThesaurus( sal_Bool bRecord ) pDocSh->PostPaintGridAll(); } -void ScViewFunc::DoHangulHanjaConversion( sal_Bool bRecord ) +void ScViewFunc::DoHangulHanjaConversion( bool bRecord ) { ScConversionParam aConvParam( SC_CONVERSION_HANGULHANJA, LANGUAGE_KOREAN, 0, true ); DoSheetConversion( aConvParam, bRecord ); } -void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Bool bRecord ) +void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bRecord ) { SCCOL nCol; SCROW nRow; @@ -455,7 +455,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Boo ScMarkData& rMark = rViewData.GetMarkData(); ScSplitPos eWhich = rViewData.GetActivePart(); EditView* pEditView = NULL; - sal_Bool bIsEditMode = rViewData.HasEditView(eWhich); + bool bIsEditMode = rViewData.HasEditView(eWhich); if (bRecord && !pDoc->IsUndoEnabled()) bRecord = false; if (bIsEditMode) // Edit-Mode aktiv @@ -473,7 +473,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Boo nTab = rViewData.GetTabNo(); rMark.MarkToMulti(); - sal_Bool bMarked = rMark.IsMultiMarked(); + bool bMarked = rMark.IsMultiMarked(); if (bMarked) { ScEditableTester aTester( pDoc, rMark ); @@ -581,7 +581,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Boo // Pasten von FORMAT_FILE-Items // wird nicht direkt aus Drop aufgerufen, sondern asynchron -> Dialoge sind erlaubt -sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bool bLink ) +bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink ) { INetURLObject aURL; aURL.SetSmartURL( rFile ); @@ -591,7 +591,7 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bo if( ::avmedia::MediaWindow::isMediaURL( aStrURL, ""/*TODO?*/ ) ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL ); - return sal_Bool( 0 != GetViewData()->GetDispatcher().Execute( + return ( 0 != GetViewData()->GetDispatcher().Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L ) ); } @@ -620,7 +620,7 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bo // Asynchron oeffnen, kann naemlich auch aus D&D heraus passieren // und das bekommt dem MAC nicht so gut ... - return sal_Bool( 0 != rDispatcher.Execute( SID_OPENDOC, + return ( 0 != rDispatcher.Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, 0L) ); } } @@ -657,7 +657,7 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bo SCROW nPosY = aRange.aStart.Row(); InsertBookmark( aStrURL, aStrURL, nPosX, nPosY ); - return sal_True; + return true; } else { @@ -680,11 +680,11 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bo // If an OLE object can't be created, insert a URL button GetViewData()->GetViewShell()->InsertURLButton( aStrURL, aStrURL, EMPTY_OUSTRING, &rPos ); - return sal_True; + return true; } } -sal_Bool ScViewFunc::PasteBookmark( sal_uLong nFormatId, +bool ScViewFunc::PasteBookmark( sal_uLong nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY ) @@ -695,12 +695,12 @@ sal_Bool ScViewFunc::PasteBookmark( sal_uLong nFormatId, return false; InsertBookmark( aBookmark.GetDescription(), aBookmark.GetURL(), nPosX, nPosY ); - return sal_True; + return true; } void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& rURL, SCCOL nPosX, SCROW nPosY, const OUString* pTarget, - sal_Bool bTryReplace ) + bool bTryReplace ) { ScViewData* pViewData = GetViewData(); if ( pViewData->HasEditView( pViewData->GetActivePart() ) && diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index aa128dfde9c8..ef4777f4e033 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -74,9 +74,9 @@ using namespace com::sun::star; //------------------------------------------------------------------ -sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, +bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, const uno::Reference<datatransfer::XTransferable>& rxTransferable, - SCCOL nPosX, SCROW nPosY, Point* pLogicPos, sal_Bool bLink, sal_Bool bAllowDialogs ) + SCCOL nPosX, SCROW nPosY, Point* pLogicPos, bool bLink, bool bAllowDialogs ) { ScDocument* pDoc = GetViewData()->GetDocument(); pDoc->SetPastingDrawFromOtherDoc( true ); @@ -87,7 +87,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, else { // inserting position isn't needed for text formats - sal_Bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) || + bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) || nFormatId == FORMAT_RTF ); if ( !bIsTextFormat ) { @@ -105,7 +105,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, } TransferableDataHelper aDataHelper( rxTransferable ); - sal_Bool bRet = false; + bool bRet = false; // // handle individual formats @@ -164,7 +164,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, bAllowDialogs ); delete pClipDoc; - bRet = sal_True; + bRet = true; } xDocShRef->DoClose(); @@ -191,7 +191,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, else PasteObject( aPos, xObj, &aObjDesc.maSize ); - bRet = sal_True; + bRet = true; } else { @@ -262,7 +262,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, // let object stay in loaded state after insertion SdrOle2Obj::Unload( xObj, embed::Aspects::MSOLE_CONTENT ); - bRet = sal_True; + bRet = true; } else { @@ -282,7 +282,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, { // use EditView's PasteSpecial / Drop PasteRTF( nPosX, nPosY, rxTransferable ); - bRet = sal_True; + bRet = true; } else { @@ -349,7 +349,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, bRet = false; } else - bRet = sal_True; + bRet = true; // Yes, no failure, don't raise a "couldn't paste" // dialog if user cancelled. delete pDlg; @@ -397,7 +397,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, } SfxStringItem aTarget(FN_PARAM_1, sTarget); - sal_Bool bAreaIsNew = !pDBData; + bool bAreaIsNew = !pDBData; SfxBoolItem aAreaNew(FN_PARAM_2, bAreaIsNew); // asynchronous, to avoid doing the whole import in drop handler @@ -405,7 +405,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, rDisp.Execute(SID_SBA_IMPORT, SFX_CALLMODE_ASYNCHRON, &aDataDesc, &aTarget, &aAreaNew, (void*)0 ); - bRet = sal_True; + bRet = true; } } else if (nFormatId == SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE) @@ -449,7 +449,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, pScDrawView->InsertObjectSafe(pObj, *pScDrawView->GetSdrPageView()); GetViewData()->GetViewShell()->SetDrawShell( true ); - bRet = sal_True; + bRet = true; } } } @@ -518,7 +518,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, PasteDraw( aPos, pModel, (nObjCount > 1) ); // grouped if more than 1 object delete pModel; aDragShellRef->DoClose(); - bRet = sal_True; + bRet = true; } } else if ( (nFormatId == SOT_FORMATSTR_ID_BIFF_5) || (nFormatId == SOT_FORMATSTR_ID_BIFF_8) ) @@ -578,7 +578,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, bAllowDialogs ); delete pInsDoc; - bRet = sal_True; + bRet = true; } } } @@ -603,7 +603,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, aPos.X() += 400; aPos.Y() += 400; } - bRet = sal_True; + bRet = true; } } else if ( nFormatId == SOT_FORMATSTR_ID_SOLK || diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 17ece9f2360f..032802374a30 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -49,7 +49,7 @@ extern Point aDragStartDiff; -sal_Bool bPasteIsMove = false; +bool bPasteIsMove = false; using namespace com::sun::star; @@ -73,7 +73,7 @@ static void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize ) } void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, - sal_Bool bGroup, sal_Bool bSameDocClipboard ) + bool bGroup, bool bSameDocClipboard ) { MakeDrawLayer(); Point aPos( rLogicPos ); @@ -88,7 +88,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, pRef->SetMapMode( MapMode(MAP_100TH_MM) ); } - sal_Bool bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ); + bool bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ); SdrView* pDragEditView = NULL; ScModule* pScMod = SC_MOD(); @@ -114,7 +114,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, if (bGroup) pScDrawView->BegUndo( ScGlobal::GetRscString( STR_UNDO_PASTE ) ); - sal_Bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() ); + bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() ); if (bSameDoc) { // copy locally - incl. charts @@ -267,7 +267,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, if (pRef) pRef->SetMapMode( aOldMapMode ); - // GetViewData()->GetViewShell()->SetDrawShell( sal_True ); + // GetViewData()->GetViewShell()->SetDrawShell( true ); // It is not sufficient to just set the DrawShell if we pasted, for // example, a chart. SetDrawShellOrSub() would only work for D&D in the // same document but not if inserting from the clipboard, therefore @@ -276,7 +276,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, } -sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj, +bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj, const Size* pDescSize, const Graphic* pReplGraph, const OUString& aMediaType, sal_Int64 nAspect ) { MakeDrawLayer(); @@ -353,27 +353,27 @@ sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embe SdrPageView* pPV = pDrView->GetSdrPageView(); pDrView->InsertObjectSafe( pSdrObj, *pPV ); // don't mark if OLE GetViewData()->GetViewShell()->SetDrawShell( true ); - return sal_True; + return true; } else return false; } -sal_Bool ScViewFunc::PasteBitmapEx( const Point& rPos, const BitmapEx& rBmpEx ) +bool ScViewFunc::PasteBitmapEx( const Point& rPos, const BitmapEx& rBmpEx ) { OUString aEmpty; Graphic aGraphic(rBmpEx); return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty ); } -sal_Bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf ) +bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf ) { OUString aEmpty; Graphic aGraphic(rMtf); return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty ); } -sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, +bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, const OUString& rFile, const OUString& rFilter ) { MakeDrawLayer(); @@ -406,7 +406,7 @@ sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, { // we are done; mark the modified/new object pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView()); - return sal_True; + return true; } } } @@ -449,7 +449,7 @@ sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, if (!rFile.isEmpty()) pGrafObj->SetGraphicLink( rFile, ""/*TODO?*/, rFilter ); - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |