[Libreoffice-commits] .: 3 commits - editeng/inc editeng/source toolkit/inc toolkit/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Tue Apr 24 08:08:08 PDT 2012


 editeng/inc/editeng/editeng.hxx                 |    4 ++--
 editeng/inc/editeng/editobj.hxx                 |    4 ++--
 editeng/source/editeng/editattr.hxx             |    4 ++--
 editeng/source/editeng/editeng.cxx              |    4 ++--
 editeng/source/editeng/editobj.cxx              |    8 ++++----
 editeng/source/editeng/editobj2.hxx             |   17 +++++++----------
 editeng/source/editeng/impedit.hxx              |    6 +++---
 editeng/source/editeng/impedit3.cxx             |    6 +++---
 toolkit/inc/toolkit/controls/unocontrolbase.hxx |    6 ++++--
 toolkit/source/controls/unocontrolbase.cxx      |    8 --------
 unusedcode.easy                                 |    1 -
 11 files changed, 29 insertions(+), 39 deletions(-)

New commits:
commit b856ea5af5282b8790a0edd6aa3a6de5f54c3ba6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 24 16:07:24 2012 +0100

    inline unused ctor needed by MSVC at compile time

diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
index 34779cc..d5e19ea 100644
--- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
@@ -40,8 +40,10 @@
 class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl
 {
 protected:
-    UnoControlBase();
-
+    UnoControlBase() //do not use! needed by MSVC at compile time to satisfy AggImplInheritanceHelper5
+    {
+        assert(false);
+    }
 protected:
     UnoControlBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
         :UnoControl( i_factory )
commit 6ac292332620737bfe522166f88994097d1a5460
Author: Xavi Escriche Galindo <xescriche at hotmail.com>
Date:   Tue Apr 24 16:06:00 2012 +0100

    Remove unused method UnoControlBase::UnoControlBase()

diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx
index dc95dec..1de8849 100644
--- a/toolkit/source/controls/unocontrolbase.cxx
+++ b/toolkit/source/controls/unocontrolbase.cxx
@@ -39,14 +39,6 @@
 //  class UnoControlBase
 //  ----------------------------------------------------
 
-UnoControlBase::UnoControlBase()
-    :UnoControl( ::comphelper::getProcessServiceFactory() )
-{
-    OSL_ENSURE( false, "UnoControlBase::UnoControlBase: not implemented. Well, not really." );
-    // just implemented to let the various FooImplInheritanceHelper compile, you should use the
-    // version taking a service factory
-}
-
 sal_Bool UnoControlBase::ImplHasProperty( sal_uInt16 nPropId )
 {
     ::rtl::OUString aPropName( GetPropertyName( nPropId ) );
diff --git a/unusedcode.easy b/unusedcode.easy
index b4fd869..d1f5e1d 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -261,7 +261,6 @@ TempFile::IsValid() const
 TextEngine::GetLeftMargin() const
 TransferableDataHelper::GetInterface(com::sun::star::datatransfer::DataFlavor const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&)
 TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl()
-UnoControlBase::UnoControlBase()
 UnoControlModel::UnoControlModel()
 VCLUnoHelper::CreatePointer()
 VCLXPrinterServer::getImplementationId()
commit 070dfe4840cfb5854be6aba99dd65b9015ed0a90
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 24 15:46:11 2012 +0100

    WaE: mixing comparison of bool and sal_Bool

diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index f2208a9..8b23f00 100644
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -223,8 +223,8 @@ public:
     void            SetPaperSize( const Size& rSize );
     const Size&     GetPaperSize() const;
 
-    void            SetVertical( sal_Bool bVertical );
-    sal_Bool            IsVertical() const;
+    void            SetVertical( bool bVertical );
+    bool            IsVertical() const;
 
     void            SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
 
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
index b495efb..c57a70b 100644
--- a/editeng/inc/editeng/editobj.hxx
+++ b/editeng/inc/editeng/editobj.hxx
@@ -72,8 +72,8 @@ public:
     virtual sal_uLong       GetObjectSettings() const;
     virtual void        SetObjectSettings( sal_uLong n );
 
-    virtual sal_Bool        IsVertical() const;
-    virtual void        SetVertical( sal_Bool bVertical );
+    virtual bool        IsVertical() const;
+    virtual void        SetVertical( bool bVertical );
 
     virtual sal_uInt16      GetScriptType() const;
 
diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx
index 1a371d0..d2cdb42 100644
--- a/editeng/source/editeng/editattr.hxx
+++ b/editeng/source/editeng/editattr.hxx
@@ -107,10 +107,10 @@ public:
                 { return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); }
     sal_Bool    IsInside( sal_uInt16 nIndex ) const
                 { return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); }
-    sal_Bool    IsEmpty() const
+    bool        IsEmpty() const
                 { return nStart == nEnd; }
 
-    sal_Bool    IsFeature() const   { return bFeature; }
+    bool    IsFeature() const   { return bFeature; }
     void    SetFeature( sal_Bool b) { bFeature = b; }
 
     sal_Bool    IsEdge() const      { return bEdge; }
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 4c75f6f..dd4cfb0 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -482,13 +482,13 @@ const Size& EditEngine::GetPaperSize() const
     return pImpEditEngine->GetPaperSize();
 }
 
-void EditEngine::SetVertical( sal_Bool bVertical )
+void EditEngine::SetVertical( bool bVertical )
 {
     DBG_CHKTHIS( EditEngine, 0 );
     pImpEditEngine->SetVertical( bVertical );
 }
 
-sal_Bool EditEngine::IsVertical() const
+bool EditEngine::IsVertical() const
 {
     DBG_CHKTHIS( EditEngine, 0 );
     return pImpEditEngine->IsVertical();
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 67099ba..a2aaa17 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -343,13 +343,13 @@ void EditTextObject::SetObjectSettings( sal_uLong )
     OSL_FAIL( "Virtual method direct from EditTextObject!" );
 }
 
-sal_Bool EditTextObject::IsVertical() const
+bool EditTextObject::IsVertical() const
 {
     OSL_FAIL( "Virtual method direct from EditTextObject!" );
     return false;
 }
 
-void EditTextObject::SetVertical( sal_Bool bVertical )
+void EditTextObject::SetVertical( bool bVertical )
 {
     OSL_FAIL( "Virtual method direct from EditTextObject!" );
     ((BinTextObject*)this)->SetVertical( bVertical );
@@ -616,12 +616,12 @@ void BinTextObject::SetObjectSettings( sal_uLong n )
     nObjSettings = n;
 }
 
-sal_Bool BinTextObject::IsVertical() const
+bool BinTextObject::IsVertical() const
 {
     return bVertical;
 }
 
-void BinTextObject::SetVertical( sal_Bool b )
+void BinTextObject::SetVertical( bool b )
 {
     if ( b != bVertical )
     {
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index cd0eb69..ea633fa 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -65,7 +65,11 @@ public:
 
     sal_uInt16              GetLen() const              { return nEnd-nStart; }
 
-    inline sal_Bool         IsFeature();
+    bool                    IsFeature()
+    {
+        sal_uInt16 nWhich = pItem->Which();
+        return  ((nWhich >= EE_FEATURE_START) && (nWhich <=  EE_FEATURE_END));
+    }
 
     inline bool         operator==( const XEditAttribute& rCompare );
 };
@@ -79,13 +83,6 @@ inline bool XEditAttribute::operator==( const XEditAttribute& rCompare )
             (*pItem == *rCompare.pItem));
 }
 
-inline sal_Bool XEditAttribute::IsFeature()
-{
-    sal_uInt16 nWhich = pItem->Which();
-    return  ( ( nWhich >= EE_FEATURE_START ) &&
-              ( nWhich <=  EE_FEATURE_END ) );
-}
-
 typedef XEditAttribute* XEditAttributePtr;
 SV_DECL_PTRARR( XEditAttributeListImpl, XEditAttributePtr, 0 )
 
@@ -216,8 +213,8 @@ public:
     sal_uLong                   GetObjectSettings() const;
     void                    SetObjectSettings( sal_uLong n );
 
-    sal_Bool                    IsVertical() const;
-    void                    SetVertical( sal_Bool b );
+    bool                    IsVertical() const;
+    void                    SetVertical( bool b );
 
     sal_uInt16                  GetScriptType() const;
     void                    SetScriptType( sal_uInt16 nType );
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index a662dab..9aefbe3 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -573,7 +573,7 @@ private:
     EditPaM             SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos );
     EditPaM             ConnectContents( sal_uInt16 nLeftNode, sal_Bool bBackward );
 
-    void                ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow );
+    void                ShowParagraph( sal_uInt16 nParagraph, bool bShow );
 
     EditPaM             PageUp( const EditPaM& rPaM, EditView* pView);
     EditPaM             PageDown( const EditPaM& rPaM, EditView* pView);
@@ -689,8 +689,8 @@ public:
 
     inline EditUndoManager& GetUndoManager();
 
-    void                    SetUpdateMode( sal_Bool bUp, EditView* pCurView = 0, sal_Bool bForceUpdate = sal_False );
-    bool                GetUpdateMode() const   { return bUpdate; }
+    void                    SetUpdateMode( bool bUp, EditView* pCurView = 0, sal_Bool bForceUpdate = sal_False );
+    bool                    GetUpdateMode() const   { return bUpdate; }
 
     ViewsType& GetEditViews() { return aEditViews; }
     const ViewsType& GetEditViews() const { return aEditViews; }
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index a08a6c7..e19b88a 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3759,9 +3759,9 @@ EditPaM ImpEditEngine::ConnectContents( sal_uInt16 nLeftNode, sal_Bool bBackward
     return ImpConnectParagraphs( pLeftNode, pRightNode, bBackward );
 }
 
-void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bForceUpdate )
+void ImpEditEngine::SetUpdateMode( bool bUp, EditView* pCurView, sal_Bool bForceUpdate )
 {
-    sal_Bool bChanged = ( GetUpdateMode() != bUp );
+    bool bChanged = ( GetUpdateMode() != bUp );
 
     // When switching from sal_True to sal_False, all selections were visible,
     // => paint over
@@ -3774,7 +3774,7 @@ void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bF
         FormatAndUpdate( pCurView );
 }
 
-void ImpEditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow )
+void ImpEditEngine::ShowParagraph( sal_uInt16 nParagraph, bool bShow )
 {
     ParaPortion* pPPortion = GetParaPortions().SafeGetObject( nParagraph );
     DBG_ASSERT( pPPortion, "ShowParagraph: Paragraph does not exist! ");


More information about the Libreoffice-commits mailing list