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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 15 17:04:19 PST 2013


 sw/source/ui/dbui/mmaddressblockpage.cxx |    6 +++---
 sw/source/ui/dbui/mmconfigitem.cxx       |    4 ++--
 sw/source/ui/dbui/mmgreetingspage.cxx    |    2 +-
 sw/source/ui/dialog/ascfldlg.cxx         |    8 ++++----
 sw/source/ui/dialog/macassgn.cxx         |    2 +-
 sw/source/ui/dialog/regionsw.cxx         |    4 ----
 sw/source/ui/dialog/uiregionsw.cxx       |   24 ++++++++++++------------
 sw/source/ui/dochdl/gloshdl.cxx          |    4 ++--
 8 files changed, 25 insertions(+), 29 deletions(-)

New commits:
commit e2d76d285611b5ab5b88f1849b7ffecd84c4aa65
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jan 16 01:12:20 2013 +0900

    sal_Bool to bool
    
    Change-Id: I6997b288f444c7f0a982e88a9549569ed816493e

diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index d750156..1d2e4ce 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -293,7 +293,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
     }
     else
     {
-        sal_Bool bNext = pButton == &m_aNextSetIB;
+        bool bNext = pButton == &m_aNextSetIB;
         sal_Int32 nPos = rConfig.GetResultSetPosition();
         rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
     }
@@ -504,12 +504,12 @@ SwRestrictedComboBox::~SwRestrictedComboBox()
 
 void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
 {
-    sal_Bool bCallParent = sal_True;
+    bool bCallParent = true;
     if(rEvt.GetCharCode())
     {
         rtl::OUString sKey(rEvt.GetCharCode());
         if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
-            bCallParent = sal_False;
+            bCallParent = false;
     }
     if(bCallParent)
         ComboBox::KeyInput(rEvt);
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 04d6314..5e086fc 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -1265,7 +1265,7 @@ void SwMailMergeConfigItem::SetColumnAssignment( const SwDBData& rDBData,
                             const Sequence< ::rtl::OUString>& rList)
 {
     ::std::vector<DBAddressDataAssignment>::iterator aAssignIter;
-    sal_Bool bFound = sal_False;
+    bool bFound = false;
     for(aAssignIter = m_pImpl->aAddressDataAssignments.begin();
                 aAssignIter != m_pImpl->aAddressDataAssignments.end(); ++aAssignIter)
     {
@@ -1276,7 +1276,7 @@ void SwMailMergeConfigItem::SetColumnAssignment( const SwDBData& rDBData,
                 aAssignIter->aDBColumnAssignments = rList;
                 aAssignIter->bColumnAssignmentsChanged = true;
             }
-            bFound = sal_True;
+            bFound = true;
             break;
         }
     }
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 10b9151..96244f4 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -412,7 +412,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
     }
     else
     {
-        sal_Bool bNext = pButton == &m_aNextSetIB;
+        bool bNext = pButton == &m_aNextSetIB;
         sal_Int32 nPos = rConfig.GetResultSetPosition();
         rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
     }
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 71d46c6..d7f2fda 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -105,13 +105,13 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
             aBuffer[ nBytesRead+1 ] = '0';
         }
 
-        sal_Bool bCR = sal_False, bLF = sal_False, bNullChar = sal_False;
+        bool bCR = false, bLF = false, bNullChar = false;
         for( sal_uInt16 nCnt = 0; nCnt < nBytesRead; ++nCnt )
             switch( aBuffer[ nCnt ] )
             {
-                case 0x0:   bNullChar = sal_True; break;
-                case 0xA:   bLF = sal_True; break;
-                case 0xD:   bCR = sal_True; break;
+                case 0x0:   bNullChar = true; break;
+                case 0xA:   bLF = true; break;
+                case 0xD:   bCR = true; break;
                 case 0xC:
                 case 0x1A:
                 case 0x9:   break;
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index ebf586a..6aeb1be 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -46,7 +46,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
     SfxEventNamesItem aItem(SID_EVENTCONFIG);
 
     sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
-    sal_Bool bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
+    bool bHtmlMode = nHtmlMode & HTMLMODE_ON;
 
     switch( eType )
     {
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 7f476f1..e4a741b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -610,10 +610,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
         bool bHidden            = true;
         bool bProtect           = true;
         String sCondition;
-        sal_Bool bFirst             = sal_True;
-        sal_Bool bFileValid         = sal_True;
-        sal_Bool bFile              = sal_True;
-        sal_Bool bPasswdValid       = sal_True;
+        bool bFirst             = true;
+        bool bFileValid         = true;
+        bool bFile              = true;
+        bool bPasswdValid       = true;
 
         while( pEntry )
         {
@@ -646,7 +646,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
                 bPasswdValid      = (aCurPasswd == rData.GetPassword());
             }
             pEntry = pBox->NextSelected(pEntry);
-            bFirst = sal_False;
+            bFirst = false;
         }
 
         aHideCB.SetState( !bHiddenValid ? STATE_DONTKNOW :
@@ -956,14 +956,14 @@ IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl)
     {
         const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
         SvTreeListEntry* pRemove = 0;
-        sal_Bool bRestart = sal_False;
+        bool bRestart = false;
         if(pSectRepr->IsSelected())
         {
             aSectReprArr.insert( pSectRepr );
             while( (pChild = aTree.FirstChild(pEntry) )!= 0 )
             {
                 // because of the repositioning we have to start at the beginning again
-                bRestart = sal_True;
+                bRestart = true;
                 pParent=aTree.GetParent(pEntry);
                 aTree.GetModel()->Move(pChild, pParent, aTree.GetModel()->GetRelPos(pEntry));
             }
@@ -1292,7 +1292,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
 
 IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
 {
-    sal_Bool bChange = pBox == &aPasswdPB;
+    bool bChange = pBox == &aPasswdPB;
     if(!CheckPasswd(0))
     {
         if(!bChange)
@@ -1300,7 +1300,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
         return 0;
     }
     SvTreeListEntry* pEntry=aTree.FirstSelected();
-    sal_Bool bSet = bChange ? bChange : aPasswdCB.IsChecked();
+    bool bSet = bChange ? bChange : aPasswdCB.IsChecked();
     OSL_ENSURE(pEntry,"no entry found");
     while( pEntry )
     {
@@ -1492,7 +1492,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
     SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
     long nHtmlMode = rHtmlOpt.GetExportMode();
 
-    sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+    bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
     if(bWeb)
     {
         RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -1631,7 +1631,7 @@ void    SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
 {
     m_pWrtSh = &rSh;
 
-    sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
+    bool bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
     if(bWeb)
     {
         aHideCB         .Hide();
@@ -2171,7 +2171,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
 
     SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
     long nHtmlMode = rHtmlOpt.GetExportMode();
-    sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+    bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
     if(bWeb)
     {
         RemoveTabPage(TP_SECTION_FTNENDNOTES);
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index f373837..a564ab2 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -116,7 +116,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlw
     }
     if(pCurGrp)
     {
-        sal_Bool bPathEqual = sal_False;
+        bool bPathEqual = false;
         if(!bAlwaysCreateNew)
         {
             INetURLObject aTemp( pCurGrp->GetFileName() );
@@ -138,7 +138,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlw
             sal_uInt16 nComparePath = (sal_uInt16)sPath.ToInt32();
             if(nCurrentPath == nComparePath &&
                 sGroup.GetToken(0, GLOS_DELIM) == sCurBase)
-                bPathEqual = sal_True;
+                bPathEqual = true;
         }
 
         // When path changed, the name is not reliable
commit 604936e0dcf256fa5a2fb95054a2d06810dd9191
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jan 16 01:09:20 2013 +0900

    Drop unreachable branch
    
    Change-Id: I90ce9190b652956e3ddb248bf570cf829da3a387

diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index b45312b..80005c6 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -218,8 +218,6 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
         case FN_EDIT_REGION:
         {
             Window* pParentWin = &GetView().GetViewFrame()->GetWindow();
-            sal_Bool bStart = sal_True;
-            if(bStart)
             {
                 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
                 OSL_ENSURE(pFact, "Dialogdiet fail!");
@@ -233,8 +231,6 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
                 pEditRegionDlg->Execute();
                 delete pEditRegionDlg;
             }
-            else
-                InfoBox(pParentWin, SW_RES(REG_WRONG_PASSWORD)).Execute();
         }
         break;
     }


More information about the Libreoffice-commits mailing list