[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity include/vcl l10ntools/inc l10ntools/source vcl/inc vcl/unx

Noel Grandin noel.grandin at collabora.co.uk
Mon Jul 24 09:02:59 UTC 2017


 connectivity/source/commontools/sqlerror.cxx          |   11 -
 connectivity/source/drivers/evoab2/NResultSet.cxx     |    2 
 connectivity/source/drivers/mork/MConnection.cxx      |    2 
 connectivity/source/parse/sqlnode.cxx                 |    4 
 dbaccess/source/core/api/RowSetBase.cxx               |    1 
 dbaccess/source/core/dataaccess/ContentHelper.cxx     |    1 
 dbaccess/source/core/dataaccess/documentcontainer.cxx |    7 
 dbaccess/source/sdbtools/connection/objectnames.cxx   |    6 
 dbaccess/source/ui/app/AppControllerGen.cxx           |    2 
 dbaccess/source/ui/browser/brwctrlr.cxx               |    2 
 include/connectivity/sqlerror.hxx                     |    2 
 include/connectivity/sqlparse.hxx                     |    5 
 include/vcl/toolbox.hxx                               |    1 
 l10ntools/inc/export.hxx                              |   51 ----
 l10ntools/source/merge.cxx                            |   27 --
 vcl/inc/unx/i18n_status.hxx                           |    8 
 vcl/unx/generic/app/i18n_status.cxx                   |  195 ------------------
 17 files changed, 22 insertions(+), 305 deletions(-)

New commits:
commit 3e4b0bde6252b80ccc99c8b9ae261d79456ba026
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Jul 24 09:05:18 2017 +0200

    loplugin:unusedfields some untouched fields
    
    which lead to a whole bunch of dead code in vcl/.../i18n_status.cxx
    
    Change-Id: Id8eeadeb9cbc6107e1a0dac5801ce20b2b9ae6dc
    Reviewed-on: https://gerrit.libreoffice.org/40355
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 01e07b26721f..8efc72ceccfd 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -56,7 +56,7 @@ namespace connectivity
     class SQLError_Impl
     {
     public:
-        explicit SQLError_Impl( const Reference<XComponentContext> & _rxContext );
+        explicit SQLError_Impl();
 
         // versions of the public SQLError methods which are just delegated to this impl-class
         static const OUString& getMessagePrefix();
@@ -86,14 +86,11 @@ namespace connectivity
 
     private:
         ::osl::Mutex                                            m_aMutex;
-        Reference<XComponentContext>                            m_aContext;
         std::unique_ptr<std::locale>                            m_xResources;
         bool                                                    m_bAttemptedInit;
     };
 
-    SQLError_Impl::SQLError_Impl( const Reference<XComponentContext> & _rxContext )
-        :m_aContext( _rxContext )
-        ,m_bAttemptedInit( false )
+    SQLError_Impl::SQLError_Impl() : m_bAttemptedInit( false )
     {
     }
 
@@ -276,8 +273,8 @@ namespace connectivity
         return m_xResources.get() != nullptr;
     }
 
-    SQLError::SQLError( const Reference<XComponentContext> & _rxContext )
-        :m_pImpl( new SQLError_Impl( _rxContext ) )
+    SQLError::SQLError()
+        :m_pImpl( new SQLError_Impl )
     {
     }
 
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 83b05ef3fb18..52bc5b567de1 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -668,7 +668,7 @@ void OEvoabResultSet::construct( const QueryData& _rData )
         case eFilterNone:
             if ( !m_pVersionHelper->isLocal( pBook ) )
             {
-                SQLError aErrorFactory( comphelper::getComponentContext(m_pConnection->getDriver().getMSFactory()) );
+                SQLError aErrorFactory;
                 SQLException aAsException = aErrorFactory.getSQLException( ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED, *this );
                 m_aWarnings.appendWarning( SQLWarning(
                     aAsException.Message,
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 9c421095232a..32ea6b192128 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -390,7 +390,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
 
     if ( _rError.getErrorCondition() != 0 )
     {
-        SQLError aErrorHelper( comphelper::getComponentContext(getDriver()->getFactory()) );
+        SQLError aErrorHelper;
         const OUString& sParameter( _rError.getParameter() );
         if ( !sParameter.isEmpty() )
             aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter );
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 36274ffbe02d..b7464836e90b 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -639,7 +639,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer& rStri
             }
             else
             {
-                SQLError aErrors( ::comphelper::getProcessComponentContext() );
+                SQLError aErrors;
                 aErrors.raiseException( sdb::ErrorCondition::PARSER_CYCLIC_SUB_QUERIES );
             }
         }
@@ -1298,7 +1298,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
 OSQLParser::OSQLParser(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const IParseContext* _pContext)
     :m_pContext(_pContext)
     ,m_pParseTree(nullptr)
-    ,m_pData( new OSQLParser_Data( rxContext ) )
+    ,m_pData( new OSQLParser_Data )
     ,m_nFormatKey(0)
     ,m_nDateFormatKey(0)
     ,m_xContext(rxContext)
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index a0a680e9113b..6a4dfbfe4587 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -84,7 +84,6 @@ ORowSetBase::ORowSetBase( const Reference<XComponentContext>& _rContext, ::cppu:
     ,m_rBHelper(_rBHelper)
     ,m_pEmptyCollection( nullptr )
     ,m_aContext( _rContext )
-    ,m_aErrors( _rContext )
     ,m_nLastColumnIndex(-1)
     ,m_nDeletedPosition(-1)
     ,m_nResultSetType( ResultSetType::FORWARD_ONLY )
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index e365e94d6367..01d7d7b811d2 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -67,7 +67,6 @@ OContentHelper::OContentHelper(const Reference< XComponentContext >& _xORB
     ,m_aPropertyChangeListeners(m_aMutex)
     ,m_xParentContainer( _xParentContainer )
     ,m_aContext( _xORB )
-    ,m_aErrorHelper( m_aContext )
     ,m_pImpl(_pImpl)
     ,m_nCommandId(0)
 {
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 9674fe45ba61..2d1f03d8cd87 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -64,11 +64,6 @@ class LocalNameApproval : public IContainerApprove
     ::connectivity::SQLError    m_aErrors;
 
 public:
-    explicit LocalNameApproval( const Reference< XComponentContext >& _rxContext )
-        :m_aErrors( _rxContext )
-    {
-    }
-
     void SAL_CALL   approveElement( const OUString& _rName, const Reference< XInterface >& _rxElement ) override;
 };
 
@@ -96,7 +91,7 @@ ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xO
     registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::BOUND | PropertyAttribute::READONLY | PropertyAttribute::CONSTRAINED,
                     &m_pImpl->m_aProps.aTitle, cppu::UnoType<decltype(m_pImpl->m_aProps.aTitle)>::get());
 
-    setElementApproval( PContainerApprove( new LocalNameApproval ( _xORB ) ) );
+    setElementApproval( PContainerApprove( new LocalNameApproval ) );
 }
 
 ODocumentContainer::~ODocumentContainer()
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index 9bc0e42b5c90..42f58e9d5b5c 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -94,7 +94,7 @@ namespace sdbtools
             if ( validateName( _rName ) )
                 return;
 
-            ::connectivity::SQLError aErrors( m_aContext );
+            ::connectivity::SQLError aErrors;
             SQLException aError( aErrors.getSQLException( ErrorCondition::DB_OBJECT_NAME_IS_USED, m_xConnection, _rName ) );
 
             ::dbtools::DatabaseMetaData aMeta( m_xConnection );
@@ -142,7 +142,7 @@ namespace sdbtools
             if ( validateName( _rName ) )
                 return;
 
-            ::connectivity::SQLError aErrors( m_aContext );
+            ::connectivity::SQLError aErrors;
             aErrors.raiseException( ErrorCondition::DB_INVALID_SQL_NAME, m_xConnection, _rName );
         }
     };
@@ -187,7 +187,7 @@ namespace sdbtools
             ::connectivity::ErrorCondition nErrorCondition = validateName_getErrorCondition( _rName );
             if ( nErrorCondition != 0 )
             {
-                ::connectivity::SQLError aErrors( m_aContext );
+                ::connectivity::SQLError aErrors;
                 aErrors.raiseException( nErrorCondition, m_xConnection );
             }
         }
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 28e0860c3b51..3fda1ec29e3b 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -384,7 +384,7 @@ void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int
     // ensure we're connected
     if ( !isConnected() )
     {
-        SQLError aError( getORB() );
+        SQLError aError;
         aError.raiseException( ErrorCondition::DB_NOT_CONNECTED, *this );
     }
 
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index e7e9a1f0a6e4..af094e97620d 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -616,7 +616,7 @@ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _r
 
 void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError )
 {
-    ::connectivity::SQLError aError( getORB() );
+    ::connectivity::SQLError aError;
     ::connectivity::ErrorCode nErrorCode( connectivity::SQLError::getErrorCode( sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) );
     if ( static_cast<const SQLException*>(_rError)->ErrorCode == nErrorCode )
     {
diff --git a/include/connectivity/sqlerror.hxx b/include/connectivity/sqlerror.hxx
index 4c4d6e683c01..026d6d84bbae 100644
--- a/include/connectivity/sqlerror.hxx
+++ b/include/connectivity/sqlerror.hxx
@@ -78,7 +78,7 @@ namespace connectivity
 
 
     public:
-        explicit        SQLError( const css::uno::Reference< css::uno::XComponentContext > & _rxContext );
+                        SQLError();
                         ~SQLError();
 
         /** returns the message associated with a given error condition, after (optionally) replacing
diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx
index eb1f7e075df5..7651162b3e30 100644
--- a/include/connectivity/sqlparse.hxx
+++ b/include/connectivity/sqlparse.hxx
@@ -113,11 +113,6 @@ namespace connectivity
     {
         css::lang::Locale               aLocale;
         ::connectivity::SQLError        aErrors;
-
-        OSQLParser_Data( const css::uno::Reference< css::uno::XComponentContext >& _rxContext )
-            :aErrors( _rxContext )
-        {
-        }
     };
 
     /** Parser for SQL92
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 28d05b7783ef..09f912ef3ba6 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -103,7 +103,6 @@ private:
     Idle               *mpIdle;
     tools::Rectangle           maUpperRect;
     tools::Rectangle           maLowerRect;
-    tools::Rectangle           maInDockRect;
     tools::Rectangle           maPaintRect;
     VclPtr<FloatingWindow> mpFloatWin;
     sal_uInt16          mnKeyModifier;
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index b412f10df2a8..cbc4819f80b9 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -72,28 +72,12 @@ public:
     ResData( const OString &rGId , const OString &rFilename );
     bool SetId(const OString &rId, IdLevel nLevel);
 
-    IdLevel nIdLevel;
-    bool bChild;
-    bool bChildWithText;
-
-    bool bText;
-    bool bQuickHelpText;
-    bool bTitle;
-
     OString sResTyp;
     OString sId;
     OString sGId;
     OString sFilename;
 
     OStringHashMap sText;
-
-    OStringHashMap sQuickHelpText;
-
-    OStringHashMap sTitle;
-
-    OString sTextTyp;
-
-    ExportList  m_aList;
 };
 
 
@@ -116,27 +100,7 @@ class ParserQueue;
 class Export
 {
 private:
-    union
-    {
-        std::ofstream* mSimple;
-        PoOfstream* mPo;
-
-    } aOutput;
-
-    ResStack aResStack;                 ///< stack for parsing recursive
-
-    bool bDefine;                       // cur. res. in a define?
-    bool bNextMustBeDefineEOL;          ///< define but no \ at lineend
-    std::size_t nLevel; // res. recursive? how deep?
-    ExportListType nList;                       ///< cur. res. is List
-    std::size_t nListLevel;
-    bool bMergeMode;
-    OString sMergeSrc;
     bool bError;                        // any errors while export?
-    bool bReadOver;
-    OString sFilename;
-
-    std::vector<OString> aLanguages;
 
     ParserQueue* pParseQueue;
 
@@ -277,13 +241,11 @@ class MergeData
     friend class MergeDataHashMap;
 
 public:
-    OString sGID;
-    OString sLID;
     std::unique_ptr<MergeEntrys> pMergeEntrys;
 private:
     MergeDataHashMap::iterator m_aNextData;
 public:
-    MergeData( const OString &rGID, const OString &rLID );
+    MergeData();
     ~MergeData();
     MergeEntrys* GetMergeEntries() { return pMergeEntrys.get();}
 
@@ -343,21 +305,10 @@ public:
     ~ParserQueue();
 
     inline void Push( const QueueEntry& aEntry );
-    bool bCurrentIsM;  // public ?
-    bool bNextIsM;   // public ?
-    bool bLastWasM;   // public ?
-    bool bMflag;   // public ?
 
     void Close();
 private:
-    std::queue<QueueEntry>* aQueueNext;
-    std::queue<QueueEntry>* aQueueCur;
-
-    Export& aExport;
-    bool bStart;
-
     inline void Pop( std::queue<QueueEntry>& aQueue );
-
 };
 #endif // INCLUDED_L10NTOOLS_INC_EXPORT_HXX
 
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index fa213224a533..af4ffb8d308c 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -60,29 +60,15 @@ namespace
 
 ResData::ResData( const OString &rGId )
     :
-    nIdLevel( IdLevel::Null ),
-    bChild( false ),
-    bChildWithText( false ),
-    bText( false ),
-    bQuickHelpText( false ),
-    bTitle( false ),
-    sGId( rGId ),
-    sTextTyp( "Text" )
+    sGId( rGId )
 {
     sGId = sGId.replaceAll("\r", OString());
 }
 
 ResData::ResData( const OString &rGId, const OString &rFilename)
     :
-    nIdLevel( IdLevel::Null ),
-    bChild( false ),
-    bChildWithText( false ),
-    bText( false ),
-    bQuickHelpText( false ),
-    bTitle( false ),
     sGId( rGId ),
-    sFilename( rFilename ),
-    sTextTyp( "Text" )
+    sFilename( rFilename )
 {
     sGId = sGId.replaceAll("\r", OString());
 }
@@ -197,11 +183,8 @@ MergeDataHashMap::iterator const & MergeDataHashMap::find(const OString& rKey)
 // class MergeData
 
 
-MergeData::MergeData(const OString &rGID,
-    const OString &rLID )
-    : sGID( rGID ),
-    sLID( rLID ) ,
-    pMergeEntrys( new MergeEntrys() )
+MergeData::MergeData()
+    : pMergeEntrys( new MergeEntrys() )
 {
 }
 
@@ -407,7 +390,7 @@ void MergeDataFile::InsertEntry(
 
     if( !pData )
     {
-        pData = new MergeData( rGID, rLID );
+        pData = new MergeData;
         aMap.insert( sKey, pData );
     }
 
diff --git a/vcl/inc/unx/i18n_status.hxx b/vcl/inc/unx/i18n_status.hxx
index d9be17c5d288..3bc64fcca34e 100644
--- a/vcl/inc/unx/i18n_status.hxx
+++ b/vcl/inc/unx/i18n_status.hxx
@@ -50,16 +50,10 @@ public:
 
 class I18NStatus
 {
-public:
-    struct ChoiceData
-    {
-        OUString  aString;
-    };
 private:
     SalFrame*                       m_pParent;
     VclPtr<StatusWindow>            m_pStatusWindow;
     OUString                        m_aCurrentIM;
-    ::std::vector< ChoiceData >     m_aChoices;
 
     I18NStatus();
     ~I18NStatus();
@@ -80,8 +74,6 @@ public:
     enum ShowReason { focus, presentation, contextmap };
     void show( bool bShow, ShowReason eReason );
 
-    const ::std::vector< ChoiceData >& getChoices() const { return m_aChoices; }
-
     // External Control:
 
     /** Toggle the status window on or off.
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 4e08c3b45711..cca11999e6b6 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -290,194 +290,6 @@ void XIMStatusWindow::setText( const OUString& rText )
     m_aWindowSize.Width() = m_aStatusText->GetTextWidth( rText )+8;
 }
 
-namespace vcl {
-
-class IIIMPStatusWindow : public StatusWindow
-{
-    VclPtr<MenuButton>      m_aStatusBtn;
-    SalFrame*               m_pResetFocus;
-    bool                    m_bShow;
-    bool                    m_bOn;
-
-    DECL_LINK( SelectHdl, MenuButton*, void );
-
-    void show();
-
-public:
-    IIIMPStatusWindow( SalFrame* pParent, bool bOn ); // for initial position
-
-    virtual void setText( const OUString & ) override;
-    virtual void show( bool bShow, I18NStatus::ShowReason eReason ) override;
-    virtual void toggle( bool bOn ) override;
-    virtual ~IIIMPStatusWindow() override { disposeOnce(); }
-    virtual void dispose() override;
-    void layout();
-
-    // override Window focus handler
-    virtual void        GetFocus() override;
-    // override WorkWindow::DataChanged
-    virtual void DataChanged( const DataChangedEvent& rEvt ) override;
-};
-
-}
-
-IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
-        StatusWindow( WB_MOVEABLE ),
-        m_aStatusBtn(VclPtr<MenuButton>::Create(this, WB_BORDER)),
-        m_pResetFocus( pParent ),
-        m_bShow( true ),
-        m_bOn( bOn )
-{
-    SetText( "IME Status" );
-
-    layout();
-
-    m_aStatusBtn->SetSelectHdl( LINK( this, IIIMPStatusWindow, SelectHdl ) );
-    m_aStatusBtn->SetPopupMenu( nullptr );
-    m_aStatusBtn->Show();
-
-    if( pParent )
-    {
-        const SystemEnvData* pEnvData = GetSystemData();
-
-        const SalFrameGeometry& rGeom( pParent->GetUnmirroredGeometry() );
-        int nDistance = rGeom.nTopDecoration;
-        if( nDistance < 20 )
-            nDistance = 20;
-        XMoveWindow( static_cast<Display*>(pEnvData->pDisplay),
-                     (::Window)pEnvData->aShellWindow,
-                     rGeom.nX,
-                     rGeom.nY + rGeom.nHeight + nDistance
-                     );
-    }
-#if OSL_DEBUG_LEVEL > 1
-    else
-        fprintf( stderr, "Warning: could not reposition status window since no frame\n" );
-#endif
-    EnableAlwaysOnTop();
-}
-
-void IIIMPStatusWindow::layout()
-{
-    Font aFont( m_aStatusBtn->GetFont() );
-    Size aSize( 15*aFont.GetFontHeight(), aFont.GetFontHeight()+14 );
-    aSize = m_aStatusBtn->LogicToPixel( aSize );
-
-    m_aStatusBtn->SetPosSizePixel( Point( 0, 0 ), aSize );
-    SetOutputSizePixel( aSize );
-    if( IsVisible() )
-        Invalidate();
-}
-
-void IIIMPStatusWindow::DataChanged( const DataChangedEvent& )
-{
-    m_aStatusBtn->SetSettings( GetSettings() );
-    layout();
-}
-
-void IIIMPStatusWindow::setText( const OUString& rText )
-{
-    m_aStatusBtn->SetText( rText );
-}
-
-void IIIMPStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason )
-{
-    // hide IIIMPStatusWindow only in presentations
-    if( ! bShow
-        && eReason != I18NStatus::presentation
-        )
-        return;
-
-    m_bShow = bShow;
-    show();
-}
-
-void IIIMPStatusWindow::toggle( bool bOn )
-{
-    if (bOn != m_bOn)
-    {
-        m_bOn = bOn;
-        show();
-    }
-}
-
-void IIIMPStatusWindow::dispose()
-{
-    m_aStatusBtn.disposeAndClear();
-    StatusWindow::dispose();
-}
-
-void IIIMPStatusWindow::show()
-{
-    if (m_bOn && m_bShow && !IsVisible())
-        m_pResetFocus = I18NStatus::get().getParent();
-    Show(m_bOn && m_bShow);
-}
-
-void IIIMPStatusWindow::GetFocus()
-{
-    /*
-     *  this is here just to put the focus back to the application
-     *  window at startup on clickToFocus WMs
-     */
-    WorkWindow::GetFocus();
-    if( m_pResetFocus )
-    {
-        /*
-         *  look if reset focus still exists
-         *  since reset focus really is an internal hack there should
-         *  not be a method to be called in SalFrame destructor
-         */
-        const std::list< SalFrame* >& rFrames = vcl_sal::getSalDisplay(GetGenericData())->getFrames();
-        std::list< SalFrame* >::const_iterator it;
-        for( it = rFrames.begin(); it != rFrames.end() && *it != m_pResetFocus; ++it )
-            ;
-        if( it != rFrames.end() )
-        {
-            const SystemEnvData* pParentEnvData = m_pResetFocus->GetSystemData();
-            GetGenericData()->ErrorTrapPush();
-            XSetInputFocus( static_cast<Display*>(pParentEnvData->pDisplay),
-                            (::Window)pParentEnvData->aShellWindow,
-                            RevertToNone,
-                            CurrentTime
-                            );
-            XSync( static_cast<Display*>(pParentEnvData->pDisplay), False );
-            GetGenericData()->ErrorTrapPop();
-        }
-        m_pResetFocus = nullptr;
-    }
-}
-
-IMPL_LINK( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn, void )
-{
-    if( pBtn == m_aStatusBtn )
-    {
-        const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() );
-        unsigned int nIndex = m_aStatusBtn->GetCurItemId()-1;
-        if( nIndex < rChoices.size() )
-        {
-            XSetICValues( static_cast<X11SalFrame*>(I18NStatus::get().getParent())->getInputContext()->GetContext(),
-                          XNUnicodeCharacterSubset,
-                          nullptr,
-                          nullptr);
-            // FIXME: get rid of X11SalFrame
-            X11SalFrame* pParent = static_cast<X11SalFrame*>(I18NStatus::get().getParent());
-            if( pParent && pParent->isMapped() )
-            {
-                const SystemEnvData* pEnv = pParent->GetSystemData();
-                GetGenericData()->ErrorTrapPush();
-                XSetInputFocus( static_cast<Display*>(pEnv->pDisplay),
-                                (::Window)pEnv->aShellWindow,
-                                RevertToNone,
-                                CurrentTime
-                                );
-                XSync( static_cast<Display*>(pEnv->pDisplay), False );
-                GetGenericData()->ErrorTrapPop();
-            }
-        }
-    }
-}
-
 /*
  *  I18NStatus
  */
@@ -523,12 +335,7 @@ void I18NStatus::setParent( SalFrame* pParent )
     m_pParent = pParent;
     if( ! m_pStatusWindow )
     {
-        bool bIIIMPmode = m_aChoices.begin() != m_aChoices.end();
-        if( bIIIMPmode )
-            m_pStatusWindow = VclPtr<IIIMPStatusWindow>::Create( pParent,
-                                                     getStatusWindowMode() );
-        else
-            m_pStatusWindow = VclPtr<XIMStatusWindow>::Create( getStatusWindowMode() );
+        m_pStatusWindow = VclPtr<XIMStatusWindow>::Create( getStatusWindowMode() );
         setStatusText( m_aCurrentIM );
     }
     m_pStatusWindow->setPosition( m_pParent );


More information about the Libreoffice-commits mailing list