[Libreoffice-commits] .: 4 commits - cui/source desktop/source sfx2/inc sfx2/source svx/source unusedcode.easy vcl/inc vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Aug 26 02:24:33 PDT 2011


 cui/source/dialogs/SpellDialog.cxx                                    |   16 ++++--
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |    4 -
 sfx2/inc/sfx2/dinfdlg.hxx                                             |    6 --
 sfx2/source/dialog/dinfdlg.cxx                                        |   23 ----------
 svx/source/form/formcontrolling.cxx                                   |   20 --------
 svx/source/inc/formcontrolling.hxx                                    |   17 -------
 unusedcode.easy                                                       |    4 -
 vcl/inc/vcl/cmdevt.hxx                                                |    1 
 vcl/source/window/cmdevt.cxx                                          |   14 ------
 9 files changed, 13 insertions(+), 92 deletions(-)

New commits:
commit 66876a7117ece7902d546b35311c81762fe64ab9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 26 09:01:37 2011 +0100

    callcatcher: some unused code

diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index a8e9a66..115a6df 100644
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -512,7 +512,6 @@ public:
     void                ClearAllLines();
     void                DoScroll( sal_Int32 nNewPos );
 
-    bool                DoesCustomPropertyExist( const String& rName ) const;
     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
                         GetCustomProperties() const;
     void                SetRemovedHdl( const Link& rLink ) { m_aRemovedHdl = rLink; }
@@ -527,11 +526,8 @@ private:
     CustomPropertiesWindow  m_aPropertiesWin;
     ScrollBar               m_aVertScroll;
 
-    bool                    m_bIsInitialized;
     sal_Int32               m_nThumbPos;
 
-    void                    Initialize();
-
     DECL_LINK( ScrollHdl, ScrollBar* );
     DECL_LINK( RemovedHdl, void* );
 
@@ -543,8 +539,6 @@ public:
 
     inline bool     AreAllLinesValid() const { return m_aPropertiesWin.AreAllLinesValid(); }
     inline void     ClearAllLines() { m_aPropertiesWin.ClearAllLines(); }
-    inline bool     DoesCustomPropertyExist( const String& rName ) const
-                        { return m_aPropertiesWin.DoesCustomPropertyExist( rName ); }
     inline ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
                     GetCustomProperties() const
                         { return m_aPropertiesWin.GetCustomProperties(); }
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a69a844..76d512b 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2241,24 +2241,6 @@ void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos )
     }
 }
 
-bool CustomPropertiesWindow::DoesCustomPropertyExist( const String& rName ) const
-{
-    bool bRet = false;
-    std::vector< CustomPropertyLine* >::const_iterator pIter;
-    for ( pIter = m_aCustomPropertiesLines.begin();
-            pIter != m_aCustomPropertiesLines.end(); ++pIter )
-    {
-        CustomPropertyLine* pLine = *pIter;
-        if ( !pLine->m_bIsRemoved && pLine->m_aNameBox.GetText() == rName )
-        {
-            bRet = true;
-            break;
-        }
-    }
-
-    return bRet;
-}
-
 Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() const
 {
     Sequence< beans::PropertyValue > aPropertiesSeq( m_aCustomPropertiesLines.size() );
@@ -2332,7 +2314,6 @@ CustomPropertiesControl::CustomPropertiesControl( Window* pParent, const ResId&
     m_aPropertiesWin( this, ResId( WIN_PROPERTIES, *rResId.GetResMgr() ) ),
     m_aVertScroll   ( this, ResId( SB_VERTICAL, *rResId.GetResMgr() ) ),
 
-    m_bIsInitialized( false ),
     m_nThumbPos     ( 0 )
 
 {
@@ -2377,10 +2358,6 @@ CustomPropertiesControl::~CustomPropertiesControl()
 {
 }
 
-void CustomPropertiesControl::Initialize()
-{
-}
-
 IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar )
 {
     sal_Int32 nOffset = m_aPropertiesWin.GetLineHeight();
diff --git a/unusedcode.easy b/unusedcode.easy
index 594d044..c1f7c2f 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -77,7 +77,6 @@ CharPosArray::Replace(int const*, unsigned short, unsigned short)
 CharPosArray::_ForEach(unsigned short, unsigned short, unsigned char (*)(int const&, void*), void*)
 CloneList::Count() const
 Color::IncreaseContrast(unsigned char)
-CommandExtTextInputData::CommandExtTextInputData()
 CommunicationLinkList::DeleteAndDestroy(unsigned short, unsigned short)
 CommunicationLinkList::Insert(CommunicationLink const*&, unsigned short&)
 CommunicationLinkList::Insert(CommunicationLink const**, unsigned short)
@@ -92,8 +91,6 @@ CurrencyBox::InsertValue(long, unsigned short)
 CurrencyBox::RemoveValue(long)
 CurrencyField::CurrencyField(Window*, ResId const&)
 CurrencyFormatter::SetCurrencySymbol(String const&)
-CustomPropertiesControl::Initialize()
-CustomPropertiesWindow::DoesCustomPropertyExist(String const&) const
 CustomToolBarImportHelper::showToolbar(rtl::OUString const&)
 DateBox::GetDate(unsigned short) const
 DateBox::GetDatePos(Date const&) const
diff --git a/vcl/inc/vcl/cmdevt.hxx b/vcl/inc/vcl/cmdevt.hxx
index c71160b..77c994c 100644
--- a/vcl/inc/vcl/cmdevt.hxx
+++ b/vcl/inc/vcl/cmdevt.hxx
@@ -63,7 +63,6 @@ private:
     sal_Bool                mbOnlyCursor;
 
 public:
-                        CommandExtTextInputData();
                         CommandExtTextInputData( const XubString& rText,
                                                  const sal_uInt16* pTextAttr,
                                                  xub_StrLen nCursorPos,
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index 1fa77a3..561123e 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -33,20 +33,6 @@
 
 #include <vcl/cmdevt.hxx>
 
-// =======================================================================
-
-CommandExtTextInputData::CommandExtTextInputData()
-{
-    mpTextAttr      = NULL;
-    mnCursorPos     = 0;
-    mnDeltaStart    = 0;
-    mnOldTextLen    = 0;
-    mnCursorFlags   = 0;
-    mbOnlyCursor    = sal_False;
-}
-
-// -----------------------------------------------------------------------
-
 CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
                                                   const sal_uInt16* pTextAttr,
                                                   xub_StrLen nCursorPos,
commit ae9c5dc3711b6e37b97cb2974fb8322a65cf7869
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 25 23:23:37 2011 +0100

    regenerate list

diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index 87428eb..c7727c1 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -281,26 +281,6 @@ namespace svx
     }
 
     //--------------------------------------------------------------------
-    FormControllerHelper::FormControllerHelper( const ::comphelper::ComponentContext& _rContext,
-            const Reference< XForm >& _rxForm, IControllerFeatureInvalidation* _pInvalidationCallback )
-        :m_aContext( _rContext )
-        ,m_pInvalidationCallback( _pInvalidationCallback )
-    {
-        osl_incrementInterlockedCount( &m_refCount );
-        try
-        {
-            m_xFormOperations = FormOperations::createWithForm( m_aContext.getUNOContext(), _rxForm );
-            if ( m_xFormOperations.is() )
-                m_xFormOperations->setFeatureInvalidation( this );
-        }
-        catch( const Exception& )
-        {
-            DBG_UNHANDLED_EXCEPTION();
-        }
-        osl_decrementInterlockedCount( &m_refCount );
-    }
-
-    //--------------------------------------------------------------------
     FormControllerHelper::~FormControllerHelper( )
     {
         try
diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx
index d2c249f..ae27a12 100644
--- a/svx/source/inc/formcontrolling.hxx
+++ b/svx/source/inc/formcontrolling.hxx
@@ -189,23 +189,6 @@ namespace svx
             IControllerFeatureInvalidation* _pInvalidationCallback
         );
 
-        /** constructs the helper form a <type scope="com::sun::star::form">XForm<type> instance
-
-            Any functionality which depends on a controller will not be available.
-
-            @param _rContext
-                the context the component lives in
-            @param _rxForm
-                The form which the helper should be responsible for. Must not be <NULL/>.
-            @param _pInvalidationCallback
-                the callback for invalidating feature states
-        */
-        FormControllerHelper(
-            const ::comphelper::ComponentContext& _rContext,
-            const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
-            IControllerFeatureInvalidation* _pInvalidationCallback
-        );
-
         // forwards to the XFormOperations implementation
         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >
                     getCursor() const;
diff --git a/unusedcode.easy b/unusedcode.easy
index 1bfe896..594d044 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2461,6 +2461,7 @@ comphelper::OTruncatedTransactedFileStream::OTruncatedTransactedFileStream(rtl::
 comphelper::OfficeResourceBundle::OfficeResourceBundle(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&)
 comphelper::PropertySetHelper::PropertySetHelper()
 comphelper::PropertySetHelper::setInfo(comphelper::PropertySetInfo*)
+comphelper::PropertySetInfo::add(comphelper::PropertyMapEntry*, int)
 comphelper::ResourceBasedEventLogger::ResourceBasedEventLogger(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&)
 comphelper::SequenceAsHashMap::getAsConstAnyList(unsigned char) const
 comphelper::ServiceInfoHelper::concatSequences(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Sequence<rtl::OUString> const&)
commit c7c62c71144d9758a5f1d5f33734d4025e31a920
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 25 23:23:07 2011 +0100

    oops, out-by-one idiocy

diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index e49253a..f0a113b 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -650,8 +650,8 @@ OUString replaceOrigin(
             }
             pAdd = origin.getStr();
             nAdd = origin.getLength();
-            pBytes += SAL_N_ELEMENTS("origin%");
-            nBytes -= SAL_N_ELEMENTS("origin%");
+            pBytes += RTL_CONSTASCII_LENGTH("origin%");
+            nBytes -= RTL_CONSTASCII_LENGTH("origin%");
             use_filtered = true;
         }
         if ((write_pos + nAdd) > filtered.getLength())
commit c9e6df76fffe84da7529d92cba7bb79e36d9cd15
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 25 22:13:52 2011 +0100

    Resolves: fdo#36678 move init that depends on parent to post-parent avail

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index cfdc2f5..02be99c 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -303,12 +303,6 @@ void SpellDialog::Init_Impl()
     // initialize language ListBox
     aLanguageLB.SetLanguageList( LANG_LIST_SPELL_USED, sal_False, sal_False, sal_True );
 
-    // get current language
-    UpdateBoxes_Impl();
-
-    // fill dictionary PopupMenu
-    InitUserDicts();
-
     aSentenceED.ClearModifyFlag();
     SvxGetChangeAllList()->clear();
 }
@@ -429,6 +423,12 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG )
     pThis->aSentenceED.ResetUndo();
     pThis->aUndoPB.Enable(sal_False);
 
+    // get current language
+    pThis->UpdateBoxes_Impl();
+
+    // fill dictionary PopupMenu
+    pThis->InitUserDicts();
+
     pThis->LockFocusChanges(true);
     if( pThis->aChangePB.IsEnabled() )
         pThis->aChangePB.GrabFocus();
@@ -819,6 +819,10 @@ LanguageType SpellDialog::GetSelectedLang_Impl() const
 //-------------------------------------------------
 IMPL_LINK(SpellDialog, LanguageSelectHdl, SvxLanguageBox*, pBox)
 {
+    //If selected language changes, then add->list should be regenerated to
+    //match
+    InitUserDicts();
+
     //if currently an error is selected then search for alternatives for
     //this word and fill the alternatives ListBox accordingly
     String sError = aSentenceED.GetErrorText();


More information about the Libreoffice-commits mailing list