[Libreoffice-commits] .: 4 commits - sfx2/source svl/inc svl/source svx/inc svx/source sw/source unotools/inc unotools/source unusedcode.easy vcl/inc vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Oct 28 02:23:23 PDT 2011


 sfx2/source/menu/objmnctl.cxx                |  159 ---------------------------
 svl/inc/svl/imageitm.hxx                     |    2 
 svl/source/items/imageitm.cxx                |   14 --
 svx/inc/svx/svdocapt.hxx                     |    1 
 svx/source/svdraw/svdocapt.cxx               |    8 -
 sw/source/filter/html/htmlfly.cxx            |    6 -
 sw/source/ui/docvw/srcedtw.cxx               |    4 
 unotools/inc/unotools/workingsetoptions.hxx  |   20 ---
 unotools/source/config/workingsetoptions.cxx |   55 ---------
 unusedcode.easy                              |    8 -
 vcl/inc/ilstbox.hxx                          |    4 
 vcl/source/control/ilstbox.cxx               |   15 --
 12 files changed, 5 insertions(+), 291 deletions(-)

New commits:
commit 2a98e45039878508c931b30f58260ce01ce2e297
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 28 09:12:00 2011 +0100

    update list

diff --git a/unusedcode.easy b/unusedcode.easy
index a8c6b07..319cb24 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -696,7 +696,6 @@ SfxMedium::GetHdl()
 SfxMedium::GetReferer() const
 SfxModuleArr_Impl::DeleteAndDestroy(unsigned short, unsigned short)
 SfxNavigatorWrapper::GetChildWindowId()
-SfxObjectVerbsControl::RegisterControl(unsigned short, SfxModule*)
 SfxOleDateProperty::SfxOleDateProperty(int, com::sun::star::util::Date const&)
 SfxOleString16Property::SfxOleString16Property(int, String const&)
 SfxOrganizeDlg_Impl::OkHdl(Button*)
commit bfef1510c1f586b8b21c2c1bea6d7791eb9b91bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 27 22:46:14 2011 +0100

    ditch some ByteStrings

diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 0ef3d6c..1f59846 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -948,7 +948,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
         rHTMLWrt.aImgMapNames.Insert( new String(aIMapName),
                                           rHTMLWrt.aImgMapNames.Count() );
 
-        ByteString aIndMap, aIndArea;
+        rtl::OString aIndMap, aIndArea;
         const sal_Char *pLF = 0, *pIndArea = 0, *pIndMap = 0;
 #if defined(UNX)
         sal_Char aLF[2] = "\x00";
@@ -965,8 +965,8 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
 #else
             pLF = SwHTMLWriter::sNewLine;
 #endif
-            pIndArea = aIndArea.GetBuffer();
-            pIndMap = aIndMap.GetBuffer();
+            pIndArea = aIndArea.getStr();
+            pIndMap = aIndMap.getStr();
         }
 
         if( bScale )
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index d84c4d2..b80904f 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -162,8 +162,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
                     {
                         // what was that?
 #if OSL_DEBUG_LEVEL > 1
-                        OSL_FAIL("Token not recognised!");
-                        OSL_FAIL(ByteString(sToken, gsl_getSystemTextEncoding()).GetBuffer());
+                        OSL_FAIL(OSL_FORMAT("Token %s not recognised!",
+                            rtl::OUStringToOString(sToken, osl_getThreadTextEncoding()).getStr()));
 #endif
                     }
 
commit 533ee0b970497d979a733fdca674e2aa18c30197
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 27 22:33:22 2011 +0100

    remove dangling objmnctl.cxx

diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx
deleted file mode 100644
index 1042d48..0000000
--- a/sfx2/source/menu/objmnctl.cxx
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-#include <com/sun/star/embed/VerbDescriptor.hpp>
-#include <com/sun/star/embed/VerbAttributes.hpp>
-
-#include <vcl/menu.hxx>
-#include <svl/stritem.hxx>
-
-#include <sfx2/sfxsids.hrc>
-#include "objmnctl.hxx"
-#include <sfx2/dispatch.hxx>
-#include <sfx2/viewsh.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/objsh.hxx>
-
-// STATIC DATA -----------------------------------------------------------
-
-SFX_IMPL_MENU_CONTROL(SfxObjectVerbsControl, SfxStringItem);
-
-using namespace com::sun::star;
-//--------------------------------------------------------------------
-
-/*
-    Constructor; sets the Select-Handler for the Menu and inserts it into
-    its Parent.
- */
-
-SfxObjectVerbsControl::SfxObjectVerbsControl(sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings)
-    : SfxMenuControl( nSlotId, rBindings )
-    , pMenu(new PopupMenu)
-    , rParent(rMenu)
-{
-    rMenu.SetPopupMenu(nSlotId, pMenu);
-    pMenu->SetSelectHdl(LINK(this, SfxObjectVerbsControl, MenuSelect));
-    FillMenu();
-}
-
-//--------------------------------------------------------------------
-
-/*
-    Make up a menu with the current view of the verbs from ViewShell.
- */
-
-void SfxObjectVerbsControl::FillMenu()
-{
-    pMenu->Clear();
-    SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell();
-    if (pView)
-    {
-        SfxObjectShell* pDoc = pView->GetObjectShell();
-        const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs =  pView->GetVerbs();
-        if ( aVerbs.getLength() )
-        {
-            sal_uInt16 nSlotId = SID_VERB_START;
-            for (sal_uInt16 n=0; n<aVerbs.getLength(); n++)
-            {
-                // check for ReadOnly verbs
-                if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) )
-                    continue;
-
-                // check for verbs that shouldn't appear in the menu
-                if ( !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU) )
-                    continue;
-
-                DBG_ASSERT(nSlotId <= SID_VERB_END, "Too many Verbs!");
-                if (nSlotId > SID_VERB_END)
-                    break;
-
-                pMenu->InsertItem(nSlotId++, aVerbs[n].VerbName);
-            }
-        }
-    }
-
-    rParent.EnableItem( GetId(), (sal_Bool)pMenu->GetItemCount() );
-}
-
-//--------------------------------------------------------------------
-
-/*
-    Status notification:
-    Fill the menu with the current verbs from the ViewShell of the
-    the DocumentShell. If the functionality is disabled, the corresponding
-    menu entry in Parent menu is disabled, otherwise it is enabled.
- */
-
-void SfxObjectVerbsControl::StateChanged(
-    sal_uInt16 /*nSID*/,
-    SfxItemState eState,
-    const SfxPoolItem* /*pState*/ )
-{
-    rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState );
-    if ( SFX_ITEM_AVAILABLE == eState )
-        FillMenu();
-}
-
-//--------------------------------------------------------------------
-
-/*
-    Select-Handler for Menus;
-    run the selected Verb,
- */
-
-IMPL_LINK_INLINE_START( SfxObjectVerbsControl, MenuSelect, Menu *, pSelMenu )
-{
-    const sal_uInt16 nSlotId = pSelMenu->GetCurItemId();
-    if( nSlotId )
-        GetBindings().Execute(nSlotId);
-    return 1;
-}
-IMPL_LINK_INLINE_END( SfxObjectVerbsControl, MenuSelect, Menu *, pSelMenu )
-
-//--------------------------------------------------------------------
-
-/*
-    Destructor; releases the Menu.
- */
-
-SfxObjectVerbsControl::~SfxObjectVerbsControl()
-{
-    delete pMenu;
-}
-
-//--------------------------------------------------------------------
-
-PopupMenu* SfxObjectVerbsControl::GetPopup() const
-{
-    return pMenu;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 576d7aaadaf97fd504d2e8be258a4a5b738837f3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 27 22:31:48 2011 +0100

    drop some unused code

diff --git a/svl/inc/svl/imageitm.hxx b/svl/inc/svl/imageitm.hxx
index e6cd1d5..1f75ea8 100644
--- a/svl/inc/svl/imageitm.hxx
+++ b/svl/inc/svl/imageitm.hxx
@@ -41,7 +41,6 @@ class SVL_DLLPUBLIC SfxImageItem : public SfxInt16Item
 public:
                             TYPEINFO();
                             SfxImageItem( sal_uInt16 nWhich = 0, sal_uInt16 nImage = 0 );
-                            SfxImageItem( sal_uInt16 nWhich, const String& rURL );
                             SfxImageItem( const SfxImageItem& );
     virtual                 ~SfxImageItem();
 
@@ -54,7 +53,6 @@ public:
     long                    GetRotation() const;
     void                    SetMirrored( sal_Bool bSet );
     sal_Bool                    IsMirrored() const;
-    String                  GetURL() const;
 };
 
 #endif // _SFX_IMAGEITM_HXX
diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx
index 4daa24f..0a24080 100644
--- a/svl/source/items/imageitm.cxx
+++ b/svl/source/items/imageitm.cxx
@@ -53,15 +53,6 @@ SfxImageItem::SfxImageItem( sal_uInt16 which, sal_uInt16 nImage )
     pImp->bMirrored = sal_False;
 }
 
-SfxImageItem::SfxImageItem( sal_uInt16 which, const String& rURL )
-    : SfxInt16Item( which, 0 )
-{
-    pImp = new SfxImageItem_Impl;
-    pImp->nAngle = 0;
-    pImp->bMirrored = sal_False;
-    pImp->aURL = rURL;
-}
-
 SfxImageItem::SfxImageItem( const SfxImageItem& rItem )
     : SfxInt16Item( rItem )
 {
@@ -139,9 +130,4 @@ sal_Bool SfxImageItem::IsMirrored() const
     return pImp->bMirrored;
 }
 
-String SfxImageItem::GetURL() const
-{
-    return pImp->aURL;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/svx/svdocapt.hxx b/svx/inc/svx/svdocapt.hxx
index 7397a29..2a745cd 100644
--- a/svx/inc/svx/svdocapt.hxx
+++ b/svx/inc/svx/svdocapt.hxx
@@ -88,7 +88,6 @@ private:
 public:
     TYPEINFO();
     SdrCaptionObj();
-    SdrCaptionObj(const Rectangle& rRect);
     SdrCaptionObj(const Rectangle& rRect, const Point& rTail);
     virtual ~SdrCaptionObj();
 
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 3c0b242..aaa711c 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -207,14 +207,6 @@ SdrCaptionObj::SdrCaptionObj():
 {
 }
 
-SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect):
-    SdrRectObj(OBJ_TEXT,rRect),
-    aTailPoly(3),  // Default Groesse: 3 Punkte = 2 Linien
-    mbSpecialTextBoxShadow(sal_False),
-    mbFixedTail(sal_False)
-{
-}
-
 SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect, const Point& rTail):
     SdrRectObj(OBJ_TEXT,rRect),
     aTailPoly(3),  // Default Groesse: 3 Punkte = 2 Linien
diff --git a/unotools/inc/unotools/workingsetoptions.hxx b/unotools/inc/unotools/workingsetoptions.hxx
index bad092a..07a93c3 100644
--- a/unotools/inc/unotools/workingsetoptions.hxx
+++ b/unotools/inc/unotools/workingsetoptions.hxx
@@ -96,26 +96,6 @@ class SvtWorkingSetOptions: public utl::detail::Options
          SvtWorkingSetOptions();
         virtual ~SvtWorkingSetOptions();
 
-        //---------------------------------------------------------------------------------------------------------
-        //  interface
-        //---------------------------------------------------------------------------------------------------------
-
-        /*-****************************************************************************************************//**
-            @short      interface methods to get and set value of config key "org.openoffice.Office.Common/Security/Scripting/SecureURL"
-            @descr      These value defines the editing view for documents and windows, which have to be restored
-                        when restarting StarOffice. The list gets filled, if Save/WorkingSet = true.
-
-            @seealso    -
-
-            @param      "seqWindowList", new values to set it in configuration.
-            @return     The values which represent current state of internal variable.
-
-            @onerror    No error should occurre!
-        *//*-*****************************************************************************************************/
-
-        ::com::sun::star::uno::Sequence< ::rtl::OUString >  GetWindowList(                                                                          ) const ;
-        void                                                SetWindowList( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& seqWindowList  )       ;
-
     //-------------------------------------------------------------------------------------------------------------
     //  private methods
     //-------------------------------------------------------------------------------------------------------------
diff --git a/unotools/source/config/workingsetoptions.cxx b/unotools/source/config/workingsetoptions.cxx
index e465ac4..ab9c010 100644
--- a/unotools/source/config/workingsetoptions.cxx
+++ b/unotools/source/config/workingsetoptions.cxx
@@ -114,26 +114,6 @@ class SvtWorkingSetOptions_Impl : public ConfigItem
 
         virtual void Commit();
 
-        //---------------------------------------------------------------------------------------------------------
-        //  public interface
-        //---------------------------------------------------------------------------------------------------------
-
-        /*-****************************************************************************************************//**
-            @short      access method to get internal values
-            @descr      These method give us a chance to regulate acces to ouer internal values.
-                        It's not used in the moment - but it's possible for the feature!
-
-            @seealso    -
-
-            @param      -
-            @return     -
-
-            @onerror    -
-        *//*-*****************************************************************************************************/
-
-        Sequence< OUString >    GetWindowList(                                              ) const ;
-        void                    SetWindowList( const Sequence< OUString >&  seqWindowList   )       ;
-
     //-------------------------------------------------------------------------------------------------------------
     //  private methods
     //-------------------------------------------------------------------------------------------------------------
@@ -269,23 +249,6 @@ void SvtWorkingSetOptions_Impl::Commit()
 }
 
 //*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-Sequence< OUString > SvtWorkingSetOptions_Impl::GetWindowList() const
-{
-    return m_seqWindowList;
-}
-
-//*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-void SvtWorkingSetOptions_Impl::SetWindowList( const Sequence< OUString >& seqWindowList )
-{
-    m_seqWindowList = seqWindowList;
-    SetModified();
-}
-
-//*****************************************************************************************************************
 //  private method
 //*****************************************************************************************************************
 Sequence< OUString > SvtWorkingSetOptions_Impl::GetPropertyNames()
@@ -344,24 +307,6 @@ SvtWorkingSetOptions::~SvtWorkingSetOptions()
     }
 }
 
-//*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-Sequence< OUString > SvtWorkingSetOptions::GetWindowList() const
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pDataContainer->GetWindowList();
-}
-
-//*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-void SvtWorkingSetOptions::SetWindowList( const Sequence< OUString >& seqWindowList )
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    m_pDataContainer->SetWindowList( seqWindowList );
-}
-
 namespace
 {
     class theWorkingSetOptionsMutex : public rtl::Static<osl::Mutex, theWorkingSetOptionsMutex>{};
diff --git a/unusedcode.easy b/unusedcode.easy
index 5ceda59..a8c6b07 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -232,8 +232,6 @@ ImplImageList::GetImageCount() const
 ImplListBox::GetEntryFlags(unsigned short) const
 ImplRegionBand::IsInside(long, long)
 ImplRegionBand::IsOver(long, long)
-ImplWin::GetModeImage() const
-ImplWin::SetModeImage(Image const&)
 IniParser::Dump()
 InsCapOptArr::Insert(InsCapOptArr const*, unsigned short, unsigned short)
 InsCapOptArr::Insert(InsCaptionOpt* const&, unsigned short&)
@@ -573,7 +571,6 @@ ScrollableWindow::ScrollableWindow(Window*, ResId const&, unsigned short)
 ScrollableWindow::SetLineSize(unsigned long, unsigned long)
 ScrollableWindow::SetVisibleSize(Size const&)
 SdFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
-SdrCaptionObj::SdrCaptionObj(Rectangle const&)
 SdrCreateView::ImpDelCreateAttr()
 SdrCustomShapeDataItem::SdrCustomShapeDataItem(String const&)
 SdrCustomShapeEngineItem::SdrCustomShapeEngineItem(String const&)
@@ -688,8 +685,6 @@ SfxFrameDescriptor::GetWallpaper() const
 SfxFrameDescriptor::GetWinBits() const
 SfxFrameDescriptor::SetURL(INetURLObject const&)
 SfxHintPoster::SfxHintPoster()
-SfxImageItem::GetURL() const
-SfxImageItem::SfxImageItem(unsigned short, String const&)
 SfxInPlaceClient::GetActiveWindow(SfxObjectShell*, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&)
 SfxInPlaceClient::IsObjectActive() const
 SfxItemPropertySetInfo::getMap() const
@@ -967,8 +962,6 @@ SvtStartOptions::SetConnectionURL(rtl::OUString const&)
 SvtSysLocaleOptions::GetUILocale() const
 SvtTabAppearanceCfg::SetDragMode(unsigned short)
 SvtUserOptions::GetLocale() const
-SvtWorkingSetOptions::GetWindowList() const
-SvtWorkingSetOptions::SetWindowList(com::sun::star::uno::Sequence<rtl::OUString> const&)
 Svx3DLightControl::Svx3DLightControl(Window*, ResId const&)
 Svx3DWin::LinkStubClickLightHdl(void*, void*)
 Svx3DWin::LinkStubDoubleClickHdl(void*, void*)
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 69d127a..881d4fb 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -608,10 +608,6 @@ public:
     const Image&    GetImage() const { return maImage; }
     void            SetImage( const Image& rImg ) { maImage = rImg; }
 
-    sal_Bool        SetModeImage( const Image& rImage );
-    const Image&    GetModeImage( ) const;
-
-
     virtual void    MBDown();
     void            SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; }
     const Link&     GetMBDownHdl() const { return maMBDownHdl; }
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index e558425..df2fc0b 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2774,21 +2774,6 @@ ImplWin::ImplWin( Window* pParent, WinBits nWinStyle ) :
 
 // -----------------------------------------------------------------------
 
-sal_Bool ImplWin::SetModeImage( const Image& rImage )
-{
-    SetImage( rImage );
-    return sal_True;
-}
-
-// -----------------------------------------------------------------------
-
-const Image& ImplWin::GetModeImage( ) const
-{
-    return maImage;
-}
-
-// -----------------------------------------------------------------------
-
 void ImplWin::MBDown()
 {
     if( IsEnabled() )


More information about the Libreoffice-commits mailing list