[Libreoffice-commits] core.git: include/sfx2 include/svx sfx2/Library_sfx.mk sfx2/source svx/source unusedcode.easy

Caolán McNamara caolanm at redhat.com
Sun Aug 11 03:29:17 PDT 2013


 include/sfx2/sidebar/SidebarToolBox.hxx        |    3 
 include/svx/dlgctrl.hxx                        |    1 
 sfx2/Library_sfx.mk                            |    1 
 sfx2/source/sidebar/ControlFactory.cxx         |    1 
 sfx2/source/sidebar/CustomImageRadioButton.cxx |   77 -------------------------
 sfx2/source/sidebar/CustomImageRadioButton.hxx |   48 ---------------
 sfx2/source/sidebar/SidebarToolBox.cxx         |   39 ------------
 svx/source/dialog/dlgctrl.cxx                  |   14 ----
 unusedcode.easy                                |    1 
 9 files changed, 185 deletions(-)

New commits:
commit 16b35898c35db6b2da69e336903f9bbf73c78326
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 11 10:45:41 2013 +0100

    callcatcher: another layer of unused methods
    
    Change-Id: I70e84f691bcf1b1e1025fd5a534c275633f865d1

diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx
index c3e01b8..5627749 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -51,7 +51,6 @@ public:
             const Size& rRequestedSize = Size(),
             sal_uInt16 nPos = TOOLBOX_APPEND);
 
-    void SetBorderWindow (const Window* pBorderWindow);
     virtual void Paint (const Rectangle& rRect);
 
     virtual Point GetPosPixel (void) const;
@@ -98,8 +97,6 @@ private:
         const sal_uInt16 nItemId,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
         const sal_Int32 nItemWidth = 0);
-    void UpdateIcons (
-        const cssu::Reference<css::frame::XFrame>& rxFrame);
     void RegisterHandlers (void);
 };
 
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index ed5a3e1..8bc5142 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -354,7 +354,6 @@ protected:
     void LocalPostPaint();
 
 public:
-    SvxPreviewBase(Window* pParent, const ResId& rResId);
     SvxPreviewBase(Window* pParent);
     virtual ~SvxPreviewBase();
 
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 836f232..03f3afe 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -250,7 +250,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/sidebar/ControlFactory \
     sfx2/source/sidebar/ControllerFactory \
     sfx2/source/sidebar/ControllerItem \
-    sfx2/source/sidebar/CustomImageRadioButton \
     sfx2/source/sidebar/Deck \
     sfx2/source/sidebar/DeckDescriptor \
     sfx2/source/sidebar/DeckLayouter \
diff --git a/sfx2/source/sidebar/ControlFactory.cxx b/sfx2/source/sidebar/ControlFactory.cxx
index ea5d19a..2e67434 100644
--- a/sfx2/source/sidebar/ControlFactory.cxx
+++ b/sfx2/source/sidebar/ControlFactory.cxx
@@ -22,7 +22,6 @@
 #include "TabItem.hxx"
 #include "sfx2/sidebar/SidebarToolBox.hxx"
 #include "ToolBoxBackground.hxx"
-#include "CustomImageRadioButton.hxx"
 #include <vcl/toolbox.hxx>
 
 
diff --git a/sfx2/source/sidebar/CustomImageRadioButton.cxx b/sfx2/source/sidebar/CustomImageRadioButton.cxx
deleted file mode 100644
index a92f4d9..0000000
--- a/sfx2/source/sidebar/CustomImageRadioButton.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "CustomImageRadioButton.hxx"
-
-#include "DrawHelper.hxx"
-#include "Paint.hxx"
-#include "sfx2/sidebar/Tools.hxx"
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
-
-namespace sfx2 { namespace sidebar {
-
-
-CustomImageRadioButton::CustomImageRadioButton (
-    Window* pParentWindow,
-    const ResId& rResId )
-    : ImageRadioButton( pParentWindow, rResId )
-{
-    SetStyle( GetStyle() | WB_NOPOINTERFOCUS );
-}
-
-
-CustomImageRadioButton::~CustomImageRadioButton (void)
-{
-}
-
-
-void CustomImageRadioButton::Paint (const Rectangle& /*rUpdateArea*/)
-{
-    Rectangle aPaintRect( Rectangle(Point(0,0), GetSizePixel() ) );
-    SetMouseRect( aPaintRect );
-    SetStateRect( aPaintRect );
-
-    const Theme::ThemeItem eBackground =
-        IsMouseOver()
-          ? Theme::Paint_TabItemBackgroundHighlight
-          : Theme::Paint_PanelBackground;
-    DrawHelper::DrawRoundedRectangle(
-        *this,
-        aPaintRect,
-        Theme::GetInteger(Theme::Int_ButtonCornerRadius),
-        IsChecked() || IsMouseOver() ? Theme::GetColor(Theme::Color_TabItemBorder) : Color(0xffffffff),
-        Theme::GetPaint( eBackground ) );
-
-    const Image& rIcon = GetModeRadioImage();
-    const Size aIconSize (rIcon.GetSizePixel());
-    const Point aIconLocation(
-        (GetSizePixel().Width() - aIconSize.Width())/2,
-        (GetSizePixel().Height() - aIconSize.Height())/2 );
-    DrawImage(
-        aIconLocation,
-        rIcon,
-        IsEnabled() ? 0 : IMAGE_DRAW_DISABLE );
-}
-
-
-} } // end of namespace sfx2::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/CustomImageRadioButton.hxx b/sfx2/source/sidebar/CustomImageRadioButton.hxx
deleted file mode 100644
index e6ddf0c..0000000
--- a/sfx2/source/sidebar/CustomImageRadioButton.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef SFX_SIDEBAR_CUSTOM_IMAGE_RADIO_BUTTON_HXX
-#define SFX_SIDEBAR_CUSTOM_IMAGE_RADIO_BUTTON_HXX
-
-#include "vcl/button.hxx"
-
-#include "sfx2/sidebar/Theme.hxx"
-
-namespace sfx2 { namespace sidebar {
-
-/** A custom image radion button with more control over used colors for sidebar
-*/
-class CustomImageRadioButton
-    : public ImageRadioButton
-{
-public:
-    CustomImageRadioButton(
-        Window* pParentWindow,
-        const ResId& rResId );
-
-    virtual ~CustomImageRadioButton(void);
-
-    virtual void Paint( const Rectangle& rUpdateArea );
-};
-
-
-} } // end of namespace sfx2::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index 6d93c5f..28685cc 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -94,30 +94,6 @@ void SidebarToolBox::InsertItem(const OUString& rCommand,
     RegisterHandlers();
 }
 
-void SidebarToolBox::SetBorderWindow (const Window* pBorderWindow)
-{
-    if (pBorderWindow != GetParent())
-    {
-        OSL_ASSERT("SetBorderWindow can only handle parent as border window");
-        return;
-    }
-
-    if ( ! mbParentIsBorder)
-    {
-        mbParentIsBorder = true;
-
-        setPosSizePixel (
-            GetPosPixel().X(),
-            GetPosPixel().Y(),
-            GetSizePixel().Width(),
-            GetSizePixel().Height(),
-            WINDOW_POSSIZE_ALL);
-    }
-}
-
-
-
-
 void SidebarToolBox::Paint (const Rectangle& rRect)
 {
     ToolBox::Paint(rRect);
@@ -280,21 +256,6 @@ void SidebarToolBox::SetController(
 
 
 
-void SidebarToolBox::UpdateIcons (const Reference<frame::XFrame>& rxFrame)
-{
-    for (ControllerContainer::iterator iController(maControllers.begin()), iEnd(maControllers.end());
-         iController!=iEnd;
-         ++iController)
-    {
-        const ::rtl::OUString sCommandURL (iController->second.msCurrentCommand);
-        Image aImage (framework::GetImageFromURL(rxFrame, sCommandURL, false));
-        SetItemImage(iController->first, aImage);
-    }
-}
-
-
-
-
 sal_uInt16 SidebarToolBox::GetItemIdForSubToolbarName (const OUString& rsSubToolbarName) const
 {
     for (ControllerContainer::const_iterator iController(maControllers.begin()), iEnd(maControllers.end());
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 9c2178b..5d59296 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1665,20 +1665,6 @@ void SvxPreviewBase::InitSettings(bool bForeground, bool bBackground)
     Invalidate();
 }
 
-SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId )
-:   Control( pParent, rResId ),
-    mpModel( new SdrModel() ),
-    mpBufferDevice( new VirtualDevice(*this) )
-{
-    //  Draw the control's border as a flat thin black line.
-    SetBorderStyle(WINDOW_BORDER_MONO);
-    SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
-    SetMapMode(MAP_100TH_MM);
-
-    // init model
-    mpModel->GetItemPool().FreezeIdRanges();
-}
-
 SvxPreviewBase::SvxPreviewBase(Window* pParent)
     : Control(pParent, WB_BORDER)
     , mpModel(new SdrModel())
diff --git a/unusedcode.easy b/unusedcode.easy
index 30b8cd9..fd38fcb 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -200,7 +200,6 @@ sfx2::sidebar::SidebarController::ShowDetailMenu(rtl::OUString const&) const
 sfx2::sidebar::SidebarDockingWindow::GetChildWindow()
 sfx2::sidebar::SidebarPanelBase::GetControl() const
 sfx2::sidebar::SidebarPanelBase::SetControl(Window*)
-sfx2::sidebar::SidebarToolBox::SetBorderWindow(Window const*)
 sfx2::sidebar::ToolBoxBackground::ToolBoxBackground(Window*, bool)
 std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >::_Rb_tree(std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >&&)
 std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr<formula::FormulaTokenArray>&)


More information about the Libreoffice-commits mailing list