[Libreoffice-commits] .: 2 commits - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jan 6 05:00:55 PST 2013


 sw/source/ui/app/apphdl.cxx   |    8 +--
 sw/source/ui/app/appopt.cxx   |   10 ++--
 sw/source/ui/app/docsh2.cxx   |   17 +++---
 sw/source/ui/app/docst.cxx    |    8 ---
 sw/source/ui/app/docstyle.cxx |  103 ++++++++++++++++++++----------------------
 5 files changed, 71 insertions(+), 75 deletions(-)

New commits:
commit f4f23167b6acf2ca7a044cb61dfe347a2ddbe20d
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Jan 6 21:43:34 2013 +0900

    sal_Bool to bool
    
    Change-Id: I5a29ca056af443643bfef823d0a064c5d834d24f

diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 45a0233..19cab01 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -687,9 +687,9 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                 if( pWrtSh )
                 {
                     SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
-                    sal_Bool bUpdateFields = sal_True;
+                    bool bUpdateFields = true;
                     if( pUpdateDocItem &&  pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE)
-                        bUpdateFields = sal_False;
+                        bUpdateFields = false;
                     if(bUpdateFields)
                     {
                         pWrtSh->UpdateInputFlds();
@@ -768,11 +768,11 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
     }
     else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions )
     {
-        sal_Bool bAccessibility = sal_False;
+        bool bAccessibility = false;
         if( pBrdCst == pColorConfig )
             SwViewOption::ApplyColorConfigValues(*pColorConfig);
         else
-            bAccessibility = sal_True;
+            bAccessibility = true;
 
         //invalidate all edit windows
         const TypeId aSwViewTypeId = TYPE(SwView);
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index 3ca32fa..edeb058 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -74,7 +74,7 @@ using namespace ::com::sun::star::lang;
 
 SfxItemSet*  SwModule::CreateItemSet( sal_uInt16 nId )
 {
-    sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False;
+    bool bTextDialog = (nId == SID_SW_EDITOPTIONS);
 
     // the options for the Web- and Textdialog are put together here
         SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -86,7 +86,7 @@ SfxItemSet*  SwModule::CreateItemSet( sal_uInt16 nId )
         if(pAppView)
         {
         // if Text then no WebView and vice versa
-            sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+            bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
             if( (bWebView &&  !bTextDialog) ||(!bWebView &&  bTextDialog))
             {
                 aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
@@ -241,14 +241,14 @@ SfxItemSet*  SwModule::CreateItemSet( sal_uInt16 nId )
 
 void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
 {
-    sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS;
+    bool bTextDialog = nId == SID_SW_EDITOPTIONS;
     SwView* pAppView = GetView();
     if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
         pAppView = 0;
     if(pAppView)
     {
         // the text dialog mustn't apply data to the web view and vice versa
-        sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+        bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
         if(bWebView == bTextDialog)
             pAppView = 0;
     }
@@ -499,7 +499,7 @@ SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
             if(pCurrView)
             {
                 // if text then not WebView and vice versa
-                sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
+                bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
                 if( (bWebView &&  RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
                     (!bWebView &&  RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
                 {
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 58bbd6d..f0fa5c3 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -120,7 +120,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 using ::rtl::OUString;
 using namespace ::sfx2;
-extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
+extern bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
 
 /*--------------------------------------------------------------------
     Description:    create DocInfo (virtual)
@@ -691,7 +691,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
 
         case SID_PRINTPREVIEW:
             {
-                sal_Bool bSet = sal_False, bFound = sal_False, bOnly = sal_True;
+                sal_Bool bSet = sal_False;
+                bool bFound = false, bOnly = true;
                 SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
                 SfxViewShell* pViewShell = SfxViewShell::Current();
                 SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell );
@@ -700,11 +701,11 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 while( pTmpFrm )    // search PreView
                 {
                     if( IS_TYPE( SwView, pTmpFrm->GetViewShell()) )
-                        bOnly = sal_False;
+                        bOnly = false;
                     else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell()))
                     {
                         pTmpFrm->GetFrame().Appear();
-                        bFound = sal_True;
+                        bFound = true;
                     }
                     if( bFound && !bOnly )
                         break;
@@ -806,7 +807,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                             }
                             pFlt = aIter.Next();
                         }
-                        sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
+                        bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
                         const SfxFilter *pOwnFlt =
                                 SwDocShell::Factory().GetFilterContainer()->
                                 GetFilter4FilterName(rtl::OUString("writer8"));
@@ -918,7 +919,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
 
                 // the SourceView is not the 1 for SwWebDocShell
                 sal_uInt16 nSlot = SID_VIEWSHELL1;
-                sal_Bool bSetModified = sal_False;
+                bool bSetModified = false;
                 SfxPrinter* pSavePrinter = 0;
                 if( 0 != pSrcView)
                 {
@@ -1146,9 +1147,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
         case FN_NEW_GLOBAL_DOC:
             {
                 bDone = sal_False;
-                sal_Bool bCreateHtml = FN_NEW_HTML_DOC == nWhich;
+                bool bCreateHtml = FN_NEW_HTML_DOC == nWhich;
 
-                sal_Bool bCreateByOutlineLevel = false;     //#outline level,add by zhaojianwei
+                bool bCreateByOutlineLevel = false;     //#outline level,add by zhaojianwei
                 sal_Int32  nTemplateOutlineLevel = 0 ;      //#outline level,add by zhaojianwei
 
                 String aFileName, aTemplateName;
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 1ef1d85..ddee625 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -961,10 +961,10 @@ sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
 
     SwEditWin& rEdtWin = pView->GetEditWin();
     SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
-    sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
+    bool bWaterCan = !(pApply && pApply->eType != 0);
 
     if( !rName.Len() )
-        bWaterCan = sal_False;
+        bWaterCan = false;
 
     SwApplyTemplate aTemplate;
     aTemplate.eType = nFamily;
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 0ee955e..90398f0 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -112,7 +112,7 @@ SwImplShellAction::~SwImplShellAction()
 static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
                             const String& rName,
                             SwDocStyleSheet* pStyle = 0,
-                            sal_Bool bCreate = sal_True )
+                            bool bCreate = true )
 {
     SwCharFmt*  pFmt = 0;
     if( rName.Len() )
@@ -158,7 +158,7 @@ static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
 static SwTxtFmtColl* lcl_FindParaFmt(  SwDoc& rDoc,
                                 const String& rName,
                                 SwDocStyleSheet* pStyle = 0,
-                                sal_Bool bCreate = sal_True )
+                                bool bCreate = true )
 {
     SwTxtFmtColl*   pColl = 0;
 
@@ -201,7 +201,7 @@ static SwTxtFmtColl* lcl_FindParaFmt(  SwDoc& rDoc,
 static SwFrmFmt* lcl_FindFrmFmt(   SwDoc& rDoc,
                             const String& rName,
                             SwDocStyleSheet* pStyle = 0,
-                            sal_Bool bCreate = sal_True )
+                            bool bCreate = true )
 {
     SwFrmFmt* pFmt = 0;
     if( rName.Len() )
@@ -239,7 +239,7 @@ static SwFrmFmt* lcl_FindFrmFmt(   SwDoc& rDoc,
 static const SwPageDesc* lcl_FindPageDesc( SwDoc&  rDoc,
                                     const String&    rName,
                                     SwDocStyleSheet* pStyle = 0,
-                                    sal_Bool bCreate = sal_True )
+                                    bool bCreate = true )
 {
     const SwPageDesc* pDesc = 0;
 
@@ -273,7 +273,7 @@ static const SwPageDesc* lcl_FindPageDesc( SwDoc&  rDoc,
 static const SwNumRule* lcl_FindNumRule(   SwDoc&  rDoc,
                                     const String&    rName,
                                     SwDocStyleSheet* pStyle = 0,
-                                    sal_Bool bCreate = sal_True )
+                                    bool bCreate = true )
 {
     const SwNumRule* pRule = 0;
 
@@ -325,23 +325,23 @@ static sal_uInt16 lcl_FindName(const SwPoolFmtList& rLst, SfxStyleFamily eFam,
     return USHRT_MAX;
 }
 
-sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
+bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
 {
     switch( eFam )
     {
     case SFX_STYLE_FAMILY_CHAR :
-        return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False );
+        return 0 != lcl_FindCharFmt( rDoc, rName, 0, false );
     case SFX_STYLE_FAMILY_PARA :
-        return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False );
+        return 0 != lcl_FindParaFmt( rDoc, rName, 0, false );
     case SFX_STYLE_FAMILY_FRAME:
-        return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False );
+        return 0 != lcl_FindFrmFmt( rDoc, rName, 0, false );
     case SFX_STYLE_FAMILY_PAGE :
-        return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False );
+        return 0 != lcl_FindPageDesc( rDoc, rName, 0, false );
     case SFX_STYLE_FAMILY_PSEUDO:
-        return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False );
+        return 0 != lcl_FindNumRule( rDoc, rName, 0, false );
     default:; //prevent warning
     }
-    return sal_False;
+    return false;
 }
 
 
@@ -734,8 +734,8 @@ String  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
 
         rtl::OUString sPageNum;
         String sModel, sBreak;
-        sal_Bool bHasWesternFontPrefix = sal_False;
-        sal_Bool bHasCJKFontPrefix = sal_False;
+        bool bHasWesternFontPrefix = false;
+        bool bHasCJKFontPrefix = false;
         SvtCJKOptions aCJKOptions;
 
         while ( pItem )
@@ -761,7 +761,7 @@ String  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
                                 *pItem, SFX_ITEM_PRESENTATION_COMPLETE,
                                 eUnit, aItemPresentation, &aIntlWrapper ) )
                         {
-                            sal_Bool bIsDefault = sal_False;
+                            bool bIsDefault = false;
                             switch ( pItem->Which() )
                             {
                                 case SID_ATTR_PARA_PAGENUM:
@@ -779,11 +779,11 @@ String  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
                                 case RES_CHRATR_CJK_POSTURE:
                                 case RES_CHRATR_CJK_WEIGHT:
                                 if(aCJKOptions.IsCJKFontEnabled())
-                                    bIsDefault = sal_True;
+                                    bIsDefault = true;
                                 if(!bHasCJKFontPrefix)
                                 {
                                     aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0);
-                                    bHasCJKFontPrefix = sal_True;
+                                    bHasCJKFontPrefix = true;
                                 }
                                 break;
                                 case RES_CHRATR_FONT:
@@ -794,12 +794,12 @@ String  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
                                 if(!bHasWesternFontPrefix)
                                 {
                                     aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0);
-                                    bHasWesternFontPrefix = sal_True;
-                                    bIsDefault = sal_True;
+                                    bHasWesternFontPrefix = true;
+                                    bIsDefault = true;
                                 }
                                 // no break;
                                 default:
-                                    bIsDefault = sal_True;
+                                    bIsDefault = true;
                             }
                             if(bIsDefault)
                             {
@@ -1250,7 +1250,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
                     ((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond );
                     const String& rStyle = pCondItem->GetStyle( i );
                     if( rStyle.Len() &&
-                        0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
+                        0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, true )))
                     {
                         aCond.RegisterToFormat( *pFindFmt );
                         ((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond );
@@ -1283,7 +1283,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
                 {
                     const String& rStyle = pCondItem->GetStyle( i );
                     if( rStyle.Len() &&
-                        0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
+                        0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, true )))
                     {
                         pCColl->InsertCondition( SwCollCondition( pFindFmt,
                                     pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) );
@@ -1612,9 +1612,9 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
     sal_uInt16 nPoolId = USHRT_MAX;
     SwFmt* pFmt = 0;
 
-    sal_Bool bCreate = FillPhysical == eFType;
-    sal_Bool bDeleteInfo = sal_False;
-    sal_Bool bFillOnlyInfo = FillAllInfo == eFType;
+    bool bCreate = FillPhysical == eFType;
+    bool bDeleteInfo = false;
+    bool bFillOnlyInfo = FillAllInfo == eFType;
     std::vector<void*> aDelArr;
 
     switch(nFamily)
@@ -1624,9 +1624,9 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
         bPhysical = 0 != pCharFmt;
         if( bFillOnlyInfo && !bPhysical )
         {
-            bDeleteInfo = sal_True;
+            bDeleteInfo = true;
             ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
-            pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True );
+            pCharFmt = lcl_FindCharFmt(rDoc, aName, this, true );
         }
 
         pFmt = pCharFmt;
@@ -1651,9 +1651,9 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
             bPhysical = 0 != pColl;
             if( bFillOnlyInfo && !bPhysical )
             {
-                bDeleteInfo = sal_True;
+                bDeleteInfo = true;
                 ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
-                pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True );
+                pColl = lcl_FindParaFmt(rDoc, aName, this, true );
             }
 
             pFmt = pColl;
@@ -1674,9 +1674,9 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
         bPhysical = 0 != pFrmFmt;
         if( bFillOnlyInfo && bPhysical )
         {
-            bDeleteInfo = sal_True;
+            bDeleteInfo = true;
             ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
-            pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True );
+            pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, true );
         }
         pFmt = pFrmFmt;
         if( !bCreate && !pFmt )
@@ -1693,9 +1693,9 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
         bPhysical = 0 != pDesc;
         if( bFillOnlyInfo && !pDesc )
         {
-            bDeleteInfo = sal_True;
+            bDeleteInfo = true;
             ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
-            pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True );
+            pDesc = lcl_FindPageDesc( rDoc, aName, this, true );
         }
 
         if( pDesc )
@@ -1721,9 +1721,9 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
         bPhysical = 0 != pNumRule;
         if( bFillOnlyInfo && !pNumRule )
         {
-            bDeleteInfo = sal_True;
+            bDeleteInfo = true;
             ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
-            pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True );
+            pNumRule = lcl_FindNumRule( rDoc, aName, this, true );
         }
 
         if( pNumRule )
@@ -1982,7 +1982,7 @@ sal_uLong  SwDocStyleSheet::GetHelpId( String& rFile )
     {
     case SFX_STYLE_FAMILY_CHAR :
         if( !pCharFmt &&
-            0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) )
+            0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, false )) )
         {
             nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
             return USHRT_MAX == nId ? 0 : nId;
@@ -1992,7 +1992,7 @@ sal_uLong  SwDocStyleSheet::GetHelpId( String& rFile )
 
     case SFX_STYLE_FAMILY_PARA:
         if( !pColl &&
-            0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) )
+            0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, false )) )
         {
             nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
             return USHRT_MAX == nId ? 0 : nId;
@@ -2002,7 +2002,7 @@ sal_uLong  SwDocStyleSheet::GetHelpId( String& rFile )
 
     case SFX_STYLE_FAMILY_FRAME:
         if( !pFrmFmt &&
-            0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) )
+            0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, false ) ) )
         {
             nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
             return USHRT_MAX == nId ? 0 : nId;
@@ -2012,7 +2012,7 @@ sal_uLong  SwDocStyleSheet::GetHelpId( String& rFile )
 
     case SFX_STYLE_FAMILY_PAGE:
         if( !pDesc &&
-            0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) )
+            0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, false ) ) )
         {
             nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
             return USHRT_MAX == nId ? 0 : nId;
@@ -2025,7 +2025,7 @@ sal_uLong  SwDocStyleSheet::GetHelpId( String& rFile )
 
     case SFX_STYLE_FAMILY_PSEUDO:
         if( !pNumRule &&
-            0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) )
+            0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, false ) ) )
         {
             nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
             return USHRT_MAX == nId ? 0 : nId;
@@ -2186,7 +2186,7 @@ void  SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
 
     SwImplShellAction aTmpSh( rDoc );
 
-    sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
+    bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
     if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool )
     {
         // deal with separately!
@@ -2273,28 +2273,28 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
     if( !pStyle )
         return;
 
-    sal_Bool bBroadcast = sal_True;
+    bool bBroadcast = true;
     SwImplShellAction aTmpSh( rDoc );
     const String& rName = pStyle->GetName();
     switch( pStyle->GetFamily() )
     {
     case SFX_STYLE_FAMILY_CHAR:
         {
-            SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False );
+            SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, false );
             if(pFmt)
                 rDoc.DelCharFmt(pFmt);
         }
         break;
     case SFX_STYLE_FAMILY_PARA:
         {
-            SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False );
+            SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, false );
             if(pColl)
                 rDoc.DelTxtFmtColl(pColl);
         }
         break;
     case SFX_STYLE_FAMILY_FRAME:
         {
-            SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False );
+            SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, false );
             if(pFmt)
                 rDoc.DelFrmFmt(pFmt);
         }
@@ -2311,13 +2311,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
         {
             if( !rDoc.DelNumRule( rName ) )
                 // Only send Broadcast, when something was deleted
-                bBroadcast = sal_False;
+                bBroadcast = false;
         }
         break;
 
     default:
         OSL_ENSURE(!this, "unknown style family");
-        bBroadcast = sal_False;
+        bBroadcast = false;
     }
 
     if( bBroadcast )
@@ -2399,8 +2399,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
             nSMask = SWSTYLEBIT_HTML;
     }
 
-    const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
-                             n & SFXSTYLEBIT_USED ) ? sal_True : sal_False;
+    const bool bSearchUsed = ( n != SFXSTYLEBIT_ALL && n & SFXSTYLEBIT_USED );
     const SwModify* pMod = 0;
 
     mxStyleSheet->SetPhysical( sal_False );
@@ -2648,7 +2647,7 @@ SfxStyleSheetBase*  SwStyleSheetIterator::First()
                     if( (nId  & COLL_GET_RANGE_BITS) != COLL_HTML_BITS)
                     {
                         // but some we also want to see in this section
-                        sal_Bool bWeiter = sal_True;
+                        bool bWeiter = true;
                         switch( nId )
                         {
                         case RES_POOLCOLL_SENDADRESS:   //  --> ADDRESS
@@ -2665,7 +2664,7 @@ SfxStyleSheetBase*  SwStyleSheetIterator::First()
                         case RES_POOLCOLL_STANDARD:     //  --> P
                         case RES_POOLCOLL_FOOTNOTE:
                         case RES_POOLCOLL_ENDNOTE:
-                            bWeiter = sal_False;
+                            bWeiter = false;
                             break;
                         }
                         if( bWeiter )
@@ -2900,7 +2899,7 @@ void SwStyleSheetIterator::AppendStyleList(const boost::ptr_vector<String>& rLis
     sal_Bool bUsed = sal_False;
     for ( sal_uInt16 i=0; i < rList.size(); ++i )
     {
-        sal_Bool bHidden = sal_False;
+        bool bHidden = false;
         sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rList[i], (SwGetPoolIdFromName)nSection);
         switch ( nSection )
         {
commit 2a0e3c1026579b02d650b602b1c0f737f6133d01
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Jan 6 21:42:16 2013 +0900

    bSetReturn was always true
    
    Change-Id: I94cea45c0e9d2890160a97d1ef198ae3f4f140d4

diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index ad8c702..1ef1d85 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -263,7 +263,6 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
     const SfxItemSet* pArgs = rReq.GetArgs();
     const SfxPoolItem* pItem;
     SwWrtShell* pActShell = 0;
-    sal_Bool bSetReturn = sal_True;
     switch (nSlot)
     {
     case SID_STYLE_NEW:
@@ -487,13 +486,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
         }
     }
 
-    if(bSetReturn)
-    {
         if(rReq.IsAPI()) // Basic only gets TRUE or FALSE
             rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet !=0));
         else
             rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
-    }
 
 }
 


More information about the Libreoffice-commits mailing list