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

Takeshi Abe tabe at fixedpoint.jp
Wed Feb 27 22:45:42 PST 2013


 sw/source/ui/vba/vbacell.cxx               |    4 ++--
 sw/source/ui/vba/vbaheaderfooterhelper.cxx |    2 +-
 sw/source/ui/vba/vbarangehelper.cxx        |    8 ++++----
 sw/source/ui/vba/vbaselection.cxx          |   16 ++++++++--------
 sw/source/ui/vba/vbaselection.hxx          |    4 ++--
 sw/source/ui/vba/vbatablehelper.cxx        |    6 +++---
 sw/source/ui/vba/vbatablehelper.hxx        |    6 +++---
 sw/source/ui/vba/vbatables.cxx             |    6 +++---
 sw/source/ui/vba/vbatabstops.cxx           |    4 ++--
 sw/source/ui/vba/wordvbahelper.cxx         |    8 +++-----
 sw/source/ui/vba/wordvbahelper.hxx         |    2 +-
 11 files changed, 32 insertions(+), 34 deletions(-)

New commits:
commit 3f5434114bd8e67e97d73df76003ce08a2e931d2
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Feb 28 15:37:00 2013 +0900

    sal_Bool to bool
    
    Change-Id: I78955b1a7aba864e83c5c5869f389809be0e76e0

diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx
index 9244ea3..62d274a 100644
--- a/sw/source/ui/vba/vbacell.cxx
+++ b/sw/source/ui/vba/vbacell.cxx
@@ -42,13 +42,13 @@ SwVbaCell::~SwVbaCell()
 ::sal_Int32 SAL_CALL SwVbaCell::getWidth() throw (css::uno::RuntimeException)
 {
     SwVbaTableHelper aTableHelper( mxTextTable );
-    return aTableHelper.GetColWidth( mnColumn, mnRow, sal_True );
+    return aTableHelper.GetColWidth( mnColumn, mnRow, true );
 }
 
 void SAL_CALL SwVbaCell::setWidth( ::sal_Int32 _width ) throw (css::uno::RuntimeException)
 {
     SwVbaTableHelper aTableHelper( mxTextTable );
-    aTableHelper.SetColWidth( _width, mnColumn, mnRow, sal_True );
+    aTableHelper.SetColWidth( _width, mnColumn, mnRow, true );
 }
 
 uno::Any SAL_CALL SwVbaCell::getHeight() throw (css::uno::RuntimeException)
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
index bed1059..0c45260 100644
--- a/sw/source/ui/vba/vbarangehelper.cxx
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -92,12 +92,12 @@ void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange >& rTextRa
 uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Reference< text::XTextRange >& rTextRange, const uno::Reference< text::XText >& rText ) throw ( uno::RuntimeException )
 {
     uno::Reference< text::XTextCursor > xTextCursor;
-    sal_Bool bGotTextCursor = sal_False;
+    bool bGotTextCursor = false;
 
     try
     {
         xTextCursor = rText->createTextCursorByRange( rTextRange );
-        bGotTextCursor = sal_True;
+        bGotTextCursor = true;
     }
     catch (const uno::Exception& e)
     {
@@ -110,7 +110,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
         {
             uno::Reference< text::XText > xText = rTextRange->getText();
             xTextCursor = xText->createTextCursor();
-            bGotTextCursor = sal_True;
+            bGotTextCursor = true;
         }
         catch (const uno::Exception& e)
         {
@@ -123,7 +123,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
         try
         {
             xTextCursor = rText->createTextCursor();
-            bGotTextCursor = sal_True;
+            bGotTextCursor = true;
         }
         catch (const uno::Exception& e)
         {
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index a2f015a..9e81400 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -736,9 +736,9 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run
                     uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
                     rtl::OUString aPageStyleName;
                     xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
-                    sal_Bool bFirstPage = sal_False;
+                    bool bFirstPage = false;
                     if ( aPageStyleName == "First Page" )
-                        bFirstPage = sal_True;
+                        bFirstPage = true;
                     if( nView == word::WdSeekView::wdSeekFirstPageHeader )
                     {
                         if( bFirstPage )
@@ -959,22 +959,22 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() throw( uno::R
     return xTextTable;
 }
 
-sal_Bool SwVbaSelection::IsInTable() throw( uno::RuntimeException )
+bool SwVbaSelection::IsInTable() throw( uno::RuntimeException )
 {
     uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
     if( xTextTable.is() )
-        return sal_True;
-    return sal_False;
+        return true;
+    return false;
 }
 
-sal_Bool SwVbaSelection::HasSelection() throw( uno::RuntimeException )
+bool SwVbaSelection::HasSelection() throw( uno::RuntimeException )
 {
     uno::Reference< text::XTextRange > xStart = mxTextViewCursor->getStart();
     uno::Reference< text::XTextRange > xEnd = mxTextViewCursor->getEnd();
     uno::Reference< text::XTextRangeCompare > xTRC( mxTextViewCursor->getText(), uno::UNO_QUERY_THROW );
     if( xTRC->compareRegionStarts( xStart, xEnd ) == 0 && xTRC->compareRegionEnds( xStart, xEnd ) == 0 )
-        return sal_False;
-    return sal_True;
+        return false;
+    return true;
 }
 
 void SwVbaSelection::GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString& sBRName ) throw( uno::RuntimeException )
diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx
index 07e6d17..ca76d9a 100644
--- a/sw/source/ui/vba/vbaselection.hxx
+++ b/sw/source/ui/vba/vbaselection.hxx
@@ -46,8 +46,8 @@ private:
     css::uno::Reference< css::text::XTextRange > GetSelectedRange() throw ( css::uno::RuntimeException );
     void GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString& sBRName ) throw ( css::uno::RuntimeException );
     css::uno::Reference< css::text::XTextTable > GetXTextTable() throw ( css::uno::RuntimeException );
-    sal_Bool IsInTable() throw ( css::uno::RuntimeException );
-    sal_Bool HasSelection() throw ( css::uno::RuntimeException );
+    bool IsInTable() throw ( css::uno::RuntimeException );
+    bool HasSelection() throw ( css::uno::RuntimeException );
 
 public:
     SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException );
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index 48f4ecc..5dd9226 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -157,7 +157,7 @@ SwTableBox* SwVbaTableHelper::GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw
     return pStart;
 }
 
-void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool /*bCurRowOnly*/ )
+void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, bool /*bCurRowOnly*/ )
 {
     rCols.SetLeftMin ( 0 );
     rCols.SetLeft    ( 0 );
@@ -188,7 +188,7 @@ sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum)
     return i - 1;
 }
 
-sal_Int32 SwVbaTableHelper::GetColWidth( sal_Int32 nCol, sal_Int32 nRow, sal_Bool bCurRowOnly ) throw (uno::RuntimeException)
+sal_Int32 SwVbaTableHelper::GetColWidth( sal_Int32 nCol, sal_Int32 nRow, bool bCurRowOnly ) throw (uno::RuntimeException)
 {
     SwTableBox* pStart = GetTabBox( nCol, nRow );
     SwTabCols aCols;
@@ -230,7 +230,7 @@ sal_Int32 SwVbaTableHelper::GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) thro
     return nWidth;
 }
 
-void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow, sal_Bool bCurRowOnly ) throw (css::uno::RuntimeException)
+void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow, bool bCurRowOnly ) throw (css::uno::RuntimeException)
 {
     double dAbsWidth = Millimeter::getInHundredthsOfOneMillimeter( _width );
     sal_Int32 nTableWidth = getTableWidth( );
diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx
index 5662cac..1d60af8 100644
--- a/sw/source/ui/vba/vbatablehelper.hxx
+++ b/sw/source/ui/vba/vbatablehelper.hxx
@@ -32,7 +32,7 @@ private:
 
 private:
     SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException);
-    void    InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly  = sal_False );
+    void    InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, bool bCurRowOnly  = false );
     sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const;
     sal_Int32 GetColCount( SwTabCols& rCols ) const;
     sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException);
@@ -46,8 +46,8 @@ public:
     sal_Int32 getTabColIndex( const rtl::OUString& sCellName ) throw (css::uno::RuntimeException);
     sal_Int32 getTableWidth( ) throw (css::uno::RuntimeException);
 
-    sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly  = sal_False ) throw (css::uno::RuntimeException);
-    void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly  = sal_False ) throw (css::uno::RuntimeException);
+    sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, bool bCurRowOnly  = false ) throw (css::uno::RuntimeException);
+    void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, bool bCurRowOnly  = false ) throw (css::uno::RuntimeException);
 
     static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
     static rtl::OUString getColumnStr( sal_Int32 nCol );
diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx
index c54e6ee..83b868d 100644
--- a/sw/source/ui/vba/vbatables.cxx
+++ b/sw/source/ui/vba/vbatables.cxx
@@ -48,15 +48,15 @@ static uno::Any lcl_createTable( const uno::Reference< XHelperInterface >& xPare
     return uno::makeAny( xTable );
 }
 
-static sal_Bool lcl_isInHeaderFooter( const uno::Reference< text::XTextTable >& xTable )
+static bool lcl_isInHeaderFooter( const uno::Reference< text::XTextTable >& xTable )
 {
     uno::Reference< text::XTextContent > xTextContent( xTable, uno::UNO_QUERY_THROW );
     uno::Reference< text::XText > xText = xTextContent->getAnchor()->getText();
     uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW );
     rtl::OUString aImplName = xServiceInfo->getImplementationName();
     if ( aImplName == "SwXHeadFootText" )
-        return sal_True;
-    return sal_False;
+        return true;
+    return false;
 }
 
 typedef ::cppu::WeakImplHelper1< css::container::XEnumeration > EnumBase;
diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx
index d906e9a..1a3c2db 100644
--- a/sw/source/ui/vba/vbatabstops.cxx
+++ b/sw/source/ui/vba/vbatabstops.cxx
@@ -199,7 +199,7 @@ uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, co
     aTab.FillChar = cLeader;
 
     uno::Sequence< style::TabStop > aOldTabs = lcl_getTabStops( mxParaProps );
-    sal_Bool bOverWriter = sal_False;
+    bool bOverWriter = false;
 
     sal_Int32 nTabs = aOldTabs.getLength();
     uno::Sequence< style::TabStop > aNewTabs( nTabs + 1 );
@@ -211,7 +211,7 @@ uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, co
     {
         if( pOldTab[nIndex].Position == nPosition )
         {
-            bOverWriter = sal_True;
+            bOverWriter = true;
             pOldTab[nIndex] = aTab;
             break;
         }
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index 404e20c..55feb3f 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -161,16 +161,16 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod
     return xText;
 }
 
-sal_Bool gotoSelectedObjectAnchor( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
+bool gotoSelectedObjectAnchor( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
 {
-    sal_Bool isObjectSelected = sal_False;
+    bool isObjectSelected = false;
     uno::Reference< text::XTextContent > xTextContent( xModel->getCurrentSelection(), uno::UNO_QUERY );
     if( xTextContent.is() )
     {
         uno::Reference< text::XTextRange > xTextRange( xTextContent->getAnchor(), uno::UNO_QUERY_THROW );
         uno::Reference< view::XSelectionSupplier > xSelectSupp( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
         xSelectSupp->select( uno::makeAny( xTextRange ) );
-        isObjectSelected = sal_True;
+        isObjectSelected = true;
     }
     return isObjectSelected;
 }
diff --git a/sw/source/ui/vba/wordvbahelper.hxx b/sw/source/ui/vba/wordvbahelper.hxx
index d654e33..de765d4 100644
--- a/sw/source/ui/vba/wordvbahelper.hxx
+++ b/sw/source/ui/vba/wordvbahelper.hxx
@@ -45,7 +45,7 @@ namespace ooo
         css::uno::Reference< css::style::XStyle > getDefaultParagraphStyle( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
         css::uno::Reference< css::text::XTextRange > getFirstObjectPosition( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException);
         css::uno::Reference< css::text::XText > getCurrentXText( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
-        sal_Bool gotoSelectedObjectAnchor( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
+        bool gotoSelectedObjectAnchor( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
 
     enum E_DIRECTION
     {
commit aa636bddbdd4aa690124f36086d5cd25d40be2b9
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Feb 28 08:10:35 2013 +0900

    drop/fix #define suffixed with semicolon
    
    Change-Id: I0569586cf558d5ab487da4cf8ede24507ec84035

diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
index c1da332..65291be 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -31,7 +31,7 @@
 using namespace ::com::sun::star;
 using namespace ::ooo::vba;
 
-#define FIRST_PAGE 1;
+#define FIRST_PAGE 1
 
 // Class HeaderFooterHelper
 sal_Bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index ac30a41..404e20c 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -36,8 +36,6 @@
 using namespace ::com::sun::star;
 using namespace ::ooo::vba;
 
-#define FIRST_PAGE 1;
-
 namespace ooo
 {
 namespace vba


More information about the Libreoffice-commits mailing list