[Libreoffice-commits] .: 18 commits - filter/source sc/source sot/source svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk svtools/source svx/inc svx/source sw/qa sw/source unotools/inc unotools/source unusedcode.easy vcl/inc vcl/source vcl/unx
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Mar 6 03:27:10 PST 2012
filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 4
filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 1
sc/source/ui/inc/namedefdlg.hxx | 1
sc/source/ui/miscdlgs/anyrefdg.cxx | 1
sc/source/ui/namedlg/namedefdlg.cxx | 10
sot/source/base/factory.cxx | 10
svtools/Library_svt.mk | 4
svtools/Package_inc.mk | 1
svtools/inc/svtools/taskbar.hxx | 390 -----------------
svtools/source/control/taskbar.cxx | 503 ----------------------
svtools/source/control/taskbox.cxx | 277 ------------
svtools/source/control/taskmisc.cxx | 57 --
svtools/source/control/taskstat.cxx | 460 --------------------
svx/inc/svx/float3d.hxx | 6
svx/source/engine3d/float3d.cxx | 67 +-
sw/qa/core/Test-BigPtrArray.cxx | 6
sw/source/core/txtnode/fntcache.cxx | 2
sw/source/core/view/viewsh.cxx | 2
sw/source/ui/frmdlg/column.cxx | 7
sw/source/ui/inc/column.hxx | 4
sw/source/ui/inc/swuicnttab.hxx | 2
sw/source/ui/index/cnttab.cxx | 7
unotools/inc/unotools/transliterationwrapper.hxx | 4
unotools/source/i18n/transliterationwrapper.cxx | 20
unusedcode.easy | 12
vcl/inc/unx/gtk/gtkdata.hxx | 1
vcl/inc/vcl/window.hxx | 2
vcl/source/window/window.cxx | 17
vcl/unx/gtk/app/gtkdata.cxx | 5
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 1
vcl/unx/gtk/window/gtkframe.cxx | 19
31 files changed, 78 insertions(+), 1825 deletions(-)
New commits:
commit 6b1a10244857fcb099c1a12b92eb6a2f6ac894b4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 11:00:29 2012 +0000
make it easier to find leaks by dropping globals at exit
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 21fb1e4..63b8ae3 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -113,6 +113,7 @@ public:
virtual ~GtkData();
virtual void Init();
+ virtual void Dispose();
virtual void initNWF();
virtual void deInitNWF();
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 7141ded..3b62677 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -550,6 +550,11 @@ GtkData::~GtkData()
osl_destroyMutex( m_aDispatchMutex );
}
+void GtkData::Dispose()
+{
+ deInitNWF();
+}
+
void GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
/* #i33212# only enter g_main_context_iteration in one thread at any one
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9729915..6669a97 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -467,7 +467,6 @@ void GtkData::initNWF( void )
*********************************************************/
void GtkData::deInitNWF( void )
{
-
for( unsigned int i = 0; i < gWidgetData.size(); i++ )
{
// free up global widgets
commit d99251cecd8a2094bacf55c5f8f2242dc874c0e3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 10:30:58 2012 +0000
leak in IMHandler::signalIMPreeditChanged early return
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 14bc435..f761c5f 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -227,10 +227,6 @@ utl::ConfigManager::addConfigItem(utl::ConfigItem & item) {
}
void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) {
- static int hack = 0;
- fprintf(stderr, "remove %d of %p\n", hack, &item);
- ++hack;
-
for (std::list< ConfigItem * >::iterator i(items_.begin());
i != items_.end(); ++i)
{
@@ -243,9 +239,6 @@ void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) {
void utl::ConfigManager::registerConfigItem(utl::ConfigItem * item) {
OSL_ASSERT(item != 0);
- static int hack = 0;
- fprintf(stderr, "add %d is %p\n", hack, item);
- ++hack;
items_.push_back(item);
}
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 6844a10..3c3a757 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3925,6 +3925,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
if( pThis->m_aInputEvent.maText.Len() == 0 )
{
g_free( pText );
+ pango_attr_list_unref( pAttrs );
return;
}
}
commit c05373e331a0224db0cdf4de809c56bc001490b2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 10:18:41 2012 +0000
valgrind: fix minor leak
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index b9e29e5..4608cd1 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -57,7 +57,15 @@ SotData_Impl::SotData_Impl()
SotData_Impl::~SotData_Impl()
{
- delete pDataFlavorList;
+ if (pDataFlavorList)
+ {
+ for( tDataFlavorList::iterator aI = pDataFlavorList->begin(),
+ aEnd = pDataFlavorList->end(); aI != aEnd; ++aI)
+ {
+ delete *aI;
+ }
+ delete pDataFlavorList;
+ }
delete pFactoryList;
}
commit 70143dc4a366fd84d2718769f39c1015a3c199ec
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 10:07:20 2012 +0000
fix leak: return value of pango_attr_list_get_iterator should be released
"PangoAttrIterator * pango_attr_list_get_iterator (PangoAttrList *list);
Returns : the newly allocated PangoAttrIterator, which should be freed with
pango_attr_iterator_destroy()."
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index a2e6df8..6844a10 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3941,7 +3941,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.Len() ), 0 );
- PangoAttrIterator *iter = pango_attr_list_get_iterator (pAttrs);
+ PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
do
{
GSList *attr_list = NULL;
@@ -3996,8 +3996,9 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_aInputFlags[i] |= sal_attr;
}
} while (pango_attr_iterator_next (iter));
+ pango_attr_iterator_destroy(iter);
- pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
+ pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
g_free( pText );
pango_attr_list_unref( pAttrs );
commit e7737fef7f84f065ec94f114761d70fc7f90ed5a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 09:46:00 2012 +0000
ditch archaic taskbox/taskmisc/taskstat implementations
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 275bae5..fda23c2 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -38,7 +38,6 @@
#include <vcl/wrkwin.hxx>
#include <vcl/mnemonic.hxx>
#include <tools/shl.hxx>
-#include <svtools/taskbar.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index bb2a63f..48a1c14 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -128,9 +128,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/control/stdctrl \
svtools/source/control/stdmenu \
svtools/source/control/tabbar \
- svtools/source/control/taskbox \
- svtools/source/control/taskmisc \
- svtools/source/control/taskstat \
svtools/source/control/toolbarmenu \
svtools/source/control/toolbarmenuacc \
svtools/source/control/urlcontrol \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index 2ba89de..f112021 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -155,7 +155,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablemodel.hxx,s
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablerenderer.hxx,svtools/table/tablerenderer.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabletypes.hxx,svtools/table/tabletypes.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablesort.hxx,svtools/table/tablesort.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/taskbar.hxx,svtools/taskbar.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templatefoldercache.hxx,svtools/templatefoldercache.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templdlg.hxx,svtools/templdlg.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textdata.hxx,svtools/textdata.hxx))
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
deleted file mode 100644
index f7122b1..0000000
--- a/svtools/inc/svtools/taskbar.hxx
+++ /dev/null
@@ -1,271 +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.
- *
- ************************************************************************/
-
-#ifndef _TASKBAR_HXX
-#define _TASKBAR_HXX
-
-#include "svtools/svtdllapi.h"
-#include <tools/time.hxx>
-#include <vcl/timer.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/status.hxx>
-
-class TaskStatusFieldItem;
-struct ImplTaskSBFldItem;
-
-struct ImplTaskItem;
-typedef ::std::vector< ImplTaskItem* > ImplTaskItemList;
-
-struct ImplTaskSBFldItem;
-typedef ::std::vector< ImplTaskSBFldItem* > ImplTaskSBItemList;
-
-// -----------------
-// - Dokumentation -
-// -----------------
-
-/*
-
-TaskToolBox
-===========
-
-ActivateTask()
-Handler der gerufen wird, wenn ein Task aktiviert werden muss.
-
-ContextMenu()
-Dieser Handler wird gerufen, wenn ein ContextMenu angezeigt werden soll.
-Mit GetTaskMode() kann abgefragt werden, ob fuer einen Task oder ein
-Item.
-
-GetContextMenuPos()
-Liefert die Position zurueck, wo das Contextmenu angezeigt werden soll.
-
-
-TaskStatusBar
-=============
-
-Fuegt ein Statusfeld ein, wo die aktuelle Uhrzeit angezeigt wird. In
-dieses Feld koennen dann mit AddStatusFielItem(), ModifyStatusFielItem()
-und RemoveStatusFielItem() Status-Items eingefuegt werden. Bei diesen
-muss man ein Image angeben, welches dann angezeigt wird. Ausserdem kann
-man bei diesen noch Hilfe-Texte angeben oder sagen, ob sie blinken
-sollen und ein Notify-Object, worueber man informiert wird, wenn ein
-Kontextmenu angezeigt wird oder das Item angeklickt wird. Am
-TaskStatusBar kann auch ein Notify-Object gesetzt werden, wenn man
-benachrichtigt werden will, wenn die Uhrzeit oder die TaskStatusBar
-angeklickt wird. Wenn der Notify fuer die Uhrzeit kommt, ist die
-Id TASKSTATUSBAR_CLOCKID, wenn er fuer die TaskStatusBar kommt, ist
-die Id 0.
-*/
-
-// -----------------
-// - TaskButtonBar -
-// -----------------
-
-class TaskButtonBar : public ToolBox
-{
-private:
- void* mpDummy1;
- void* mpDummy2;
- void* mpDummy3;
- void* mpDummy4;
-
-public:
- TaskButtonBar( Window* pParent, WinBits nWinStyle = 0 );
- ~TaskButtonBar();
-
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- void InsertButton( sal_uInt16 nItemId,
- const Image& rImage, const String& rText,
- sal_uInt16 nPos = TOOLBOX_APPEND )
- { InsertItem( nItemId, rImage, rText, TIB_LEFT | TIB_AUTOSIZE, nPos ); }
- void RemoveButton( sal_uInt16 nItemId )
- { RemoveItem( nItemId ); }
-};
-
-// ---------------
-// - TaskToolBox -
-// ---------------
-
-class SVT_DLLPUBLIC TaskToolBox : public ToolBox
-{
-private:
- ImplTaskItemList* mpItemList;
- Point maContextMenuPos;
- size_t mnOldItemCount;
- long mnMaxTextWidth;
- long mnDummy1;
- size_t mnUpdatePos;
- size_t mnUpdateNewPos;
- size_t mnActiveItemId;
- size_t mnNewActivePos;
- sal_uInt16 mnSmallItem;
- sal_uInt16 mnDummy2;
- sal_Bool mbMinActivate;
- sal_Bool mbDummy1;
- Link maActivateTaskHdl;
- Link maContextMenuHdl;
-
-#ifdef _TASKBAR_CXX
- SVT_DLLPRIVATE void ImplFormatTaskToolBox();
-#endif
-
- // Forbidden and not implemented.
- TaskToolBox (const TaskToolBox &);
- TaskToolBox & operator= (const TaskToolBox &);
-
-public:
- TaskToolBox( Window* pParent, WinBits nWinStyle = 0 );
- ~TaskToolBox();
-
- void ActivateTaskItem( sal_uInt16 nItemId,
- sal_Bool bMinActivate = sal_False );
-
- virtual void ActivateTask();
- virtual void ContextMenu();
-
- virtual void Select();
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void Resize();
- virtual void Command( const CommandEvent& rCEvt );
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- const Point& GetContextMenuPos() const { return maContextMenuPos; }
- sal_Bool IsMinActivate() const { return mbMinActivate; }
-
- void SetActivateTaskHdl( const Link& rLink ) { maActivateTaskHdl = rLink; }
- const Link& GetActivateTaskHdl() const { return maActivateTaskHdl; }
- void SetContextMenuHdl( const Link& rLink ) { maContextMenuHdl = rLink; }
- const Link& GetContextMenuHdl() const { return maContextMenuHdl; }
-};
-
-// ---------------------
-// - ITaskStatusNotify -
-// ---------------------
-
-class ITaskStatusNotify
-{
-public:
- virtual sal_Bool MouseButtonDown( sal_uInt16 nItemd, const MouseEvent& rMEvt );
- virtual sal_Bool MouseButtonUp( sal_uInt16 nItemd, const MouseEvent& rMEvt );
- virtual sal_Bool MouseMove( sal_uInt16 nItemd, const MouseEvent& rMEvt );
- virtual sal_Bool Command( sal_uInt16 nItemd, const CommandEvent& rCEvt );
- virtual sal_Bool UpdateHelp( sal_uInt16 nItemd );
-};
-
-// -----------------------
-// - TaskStatusFieldItem -
-// -----------------------
-
-#define TASKSTATUSFIELDITEM_FLASH ((sal_uInt16)0x0001)
-
-class TaskStatusFieldItem
-{
-private:
- ITaskStatusNotify* mpNotify;
- Image maImage;
- XubString maQuickHelpText;
- XubString maHelpText;
- rtl::OString maHelpId;
- sal_uInt16 mnFlags;
-
-public:
- TaskStatusFieldItem();
- TaskStatusFieldItem( const TaskStatusFieldItem& rItem );
- ~TaskStatusFieldItem();
-
- void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
- ITaskStatusNotify* GetNotifyObject() const { return mpNotify; }
- void SetImage( const Image& rImage ) { maImage = rImage; }
- const Image& GetImage() const { return maImage; }
- void SetQuickHelpText( const XubString& rStr ) { maQuickHelpText = rStr; }
- const XubString& GetQuickHelpText() const { return maQuickHelpText; }
- void SetHelpText( const XubString& rStr ) { maHelpText = rStr; }
- const XubString& GetHelpText() const { return maHelpText; }
- void SetHelpId( const rtl::OString& rHelpId ) { maHelpId = rHelpId; }
- const rtl::OString& GetHelpId() const { return maHelpId; }
- void SetFlags( sal_uInt16 nFlags ) { mnFlags = nFlags; }
- sal_uInt16 GetFlags() const { return mnFlags; }
-
- const TaskStatusFieldItem& operator=( const TaskStatusFieldItem& rItem );
-};
-
-// -----------------
-// - TaskStatusBar -
-// -----------------
-
-#define TASKSTATUSBAR_STATUSFIELDID ((sal_uInt16)61000)
-
-#define TASKSTATUSBAR_CLOCKID ((sal_uInt16)61000)
-#define TASKSTATUSFIELD_CLOCK ((sal_uInt16)0x0001)
-
-class SVT_DLLPUBLIC TaskStatusBar : public StatusBar
-{
-private:
- ImplTaskSBItemList* mpFieldItemList;
- ITaskStatusNotify* mpNotify;
- Time maTime;
- XubString maTimeText;
- AutoTimer maTimer;
- long mnClockWidth;
- long mnItemWidth;
- long mnFieldWidth;
- sal_uInt16 mnFieldFlags;
- sal_uInt16 mnDummy1;
- sal_Bool mbFlashItems;
- sal_Bool mbOutInterval;
- sal_Bool mbDummy1;
- sal_Bool mbDummy2;
-
-#ifdef _TASKBAR_CXX
- SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const;
- SVT_DLLPRIVATE sal_Bool ImplUpdateClock();
- SVT_DLLPRIVATE sal_Bool ImplUpdateFlashItems();
- DECL_DLLPRIVATE_LINK( ImplTimerHdl, void* );
-#endif
-
-public:
- TaskStatusBar( Window* pParent, WinBits nWinStyle = WB_LEFT );
- ~TaskStatusBar();
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void Command( const CommandEvent& rCEvt );
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual void UserDraw( const UserDrawEvent& rUDEvt );
-
- sal_uInt16 GetFieldFlags() const { return mnFieldFlags; }
- void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
- ITaskStatusNotify* GetNotifyObject() const { return mpNotify; }
-};
-
-#endif // _TASKBAR_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx
deleted file mode 100644
index deb6f4c..0000000
--- a/svtools/source/control/taskbox.cxx
+++ /dev/null
@@ -1,277 +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.
- *
- ************************************************************************/
-
-
-#define _TASKBAR_CXX
-
-#include <tools/debug.hxx>
-#include <vcl/image.hxx>
-#include <vcl/help.hxx>
-#include <svtools/taskbar.hxx>
-
-// =======================================================================
-
-#define TASKBOX_TASKOFF 3
-
-// =======================================================================
-
-struct ImplTaskItem
-{
- Image maImage;
- XubString maText;
-};
-
-// =======================================================================
-
-TaskToolBox::TaskToolBox( Window* pParent, WinBits nWinStyle ) :
- ToolBox( pParent, nWinStyle | WB_SCROLL | WB_3DLOOK )
-{
- mpItemList = new ImplTaskItemList;
- mnMaxTextWidth = 0;
- mnActiveItemId = 0;
- mnSmallItem = TOOLBOX_ITEM_NOTFOUND;
- mbMinActivate = sal_False;
-
- SetAlign( WINDOWALIGN_BOTTOM );
- SetButtonType( BUTTON_SYMBOLTEXT );
-}
-
-// -----------------------------------------------------------------------
-
-TaskToolBox::~TaskToolBox()
-{
- for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) {
- delete (*mpItemList)[ i ];
- }
- mpItemList->clear();
- delete mpItemList;
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::ActivateTaskItem( sal_uInt16 nItemId, sal_Bool bMinActivate )
-{
- if ( nItemId )
- {
- if ( nItemId != mnActiveItemId )
- {
- if ( mnActiveItemId )
- CheckItem( mnActiveItemId, sal_False );
- CheckItem( nItemId );
- mnActiveItemId = nItemId;
- }
- else
- {
- if ( !bMinActivate )
- return;
-
- mbMinActivate = sal_True;
- }
-
- ActivateTask();
- mbMinActivate = sal_False;
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::ActivateTask()
-{
- maActivateTaskHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::ContextMenu()
-{
- maContextMenuHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if ( !rMEvt.IsRight() )
- ToolBox::MouseButtonDown( rMEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::Resize()
-{
- mnOldItemCount = mpItemList->size();
- mnUpdatePos = mnOldItemCount;
- mnUpdateNewPos = TOOLBOX_ITEM_NOTFOUND;
- ImplFormatTaskToolBox();
- ToolBox::Resize();
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::Command( const CommandEvent& rCEvt )
-{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
- {
- maContextMenuPos = rCEvt.GetMousePosPixel();
- ContextMenu();
- maContextMenuPos = Point();
- }
- else
- ToolBox::Command( rCEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::RequestHelp( const HelpEvent& rHEvt )
-{
- if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
- {
- size_t nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
-
- if ( nItemId )
- {
- ImplTaskItem* pItem = ( nItemId-1 < mpItemList->size() ) ? (*mpItemList)[ nItemId-1 ] : NULL;
- if ( pItem )
- {
- if ( pItem->maText != GetItemText( nItemId ) )
- {
- Rectangle aItemRect = GetItemRect( nItemId );
- if ( rHEvt.GetMode() & HELPMODE_QUICK )
- Help::ShowQuickHelp( this, aItemRect, pItem->maText );
- else
- Help::ShowBalloon( this, aItemRect.Center(), aItemRect, pItem->maText );
- }
- else
- Help::ShowQuickHelp( this, Rectangle(), String() );
- return;
- }
- }
- }
-
- ToolBox::RequestHelp( rHEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::Select()
-{
- sal_uInt16 nItemId = GetCurItemId();
- ActivateTaskItem( nItemId, sal_True );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskToolBox::ImplFormatTaskToolBox()
-{
- if ( mnUpdateNewPos == TOOLBOX_ITEM_NOTFOUND )
- {
- // Eintraege aus der Liste entfernen
- while ( mpItemList->size() > mnUpdatePos ) {
- delete mpItemList->back();
- mpItemList->pop_back();
- }
- mnUpdateNewPos = mnUpdatePos;
- }
-
- // Maximale Itemgroesse berechnen
- long nOldMaxTextWidth = mnMaxTextWidth;
- mnMaxTextWidth = 70;
- if ( !mpItemList->empty() )
- {
- long nWinSize = GetOutputSizePixel().Width()-8;
- long nItemSize = (*mpItemList)[ 0 ]->maImage.GetSizePixel().Width()+7+TASKBOX_TASKOFF+2;
- nWinSize -= mpItemList->size()*nItemSize;
- if ( nWinSize > 0 )
- nWinSize /= mpItemList->size();
- else
- nWinSize = 0;
- if ( nWinSize < mnMaxTextWidth )
- mnMaxTextWidth = nWinSize;
- if ( (mnMaxTextWidth < nOldMaxTextWidth) ||
- ((mnMaxTextWidth-nOldMaxTextWidth > 3) &&
- (mnSmallItem != TOOLBOX_ITEM_NOTFOUND)) )
- {
- mnSmallItem = TOOLBOX_ITEM_NOTFOUND;
- mnUpdateNewPos = 0;
- }
- }
-
- // Eintraege aus der ToolBox entfernen, die ersetzt werden
- sal_uInt16 nBtnPos = (mnUpdateNewPos*2);
- while ( nBtnPos < GetItemCount() )
- RemoveItem( nBtnPos );
- if ( mnUpdateNewPos <= (mnActiveItemId-1) )
- mnActiveItemId = 0;
-
- // Neue Eintrage einfuegen
- size_t i = mnUpdateNewPos;
- while ( i < mpItemList->size() )
- {
- ImplTaskItem* pItem = (*mpItemList)[ i ];
-
- // Textlaenge berechnen
- XubString aText = pItem->maText;
- if ( !aText.Len() )
- aText = ' ';
- long nTxtWidth = GetTextWidth( aText );
- if ( nTxtWidth > mnMaxTextWidth )
- {
- if ( mnSmallItem == TOOLBOX_ITEM_NOTFOUND )
- mnSmallItem = i;
- // 3 == Len of "..."
- aText.AppendAscii( "..." );
- do
- {
- aText.Erase( aText.Len()-3-1, 1 );
- nTxtWidth = GetTextWidth( aText );
- }
- while ( (nTxtWidth > mnMaxTextWidth) && (aText.Len() > 3) );
- }
-
- sal_uInt16 nItemId = i+1;
- if ( aText.EqualsAscii( "..." ) )
- InsertItem( nItemId, pItem->maImage, TIB_LEFT );
- else
- InsertItem( nItemId, pItem->maImage, aText, TIB_LEFT );
- InsertSeparator( TOOLBOX_APPEND, TASKBOX_TASKOFF );
- i++;
- }
-
- if ( mnUpdateNewPos != 0 )
- mnMaxTextWidth = nOldMaxTextWidth;
-
- if ( mnNewActivePos+1 != mnActiveItemId )
- {
- if ( mnActiveItemId )
- CheckItem( mnActiveItemId, sal_False );
- mnActiveItemId = mnNewActivePos+1;
- CheckItem( mnActiveItemId );
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx
deleted file mode 100644
index 0735de9..0000000
--- a/svtools/source/control/taskmisc.cxx
+++ /dev/null
@@ -1,57 +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.
- *
- ************************************************************************/
-
-
-#define _TASKBAR_CXX
-
-#include <vcl/help.hxx>
-#include <svtools/taskbar.hxx>
-
-// =======================================================================
-
-TaskButtonBar::TaskButtonBar( Window* pParent, WinBits nWinStyle ) :
- ToolBox( pParent, nWinStyle | WB_3DLOOK )
-{
- SetAlign( WINDOWALIGN_BOTTOM );
- SetButtonType( BUTTON_SYMBOLTEXT );
-}
-
-// -----------------------------------------------------------------------
-
-TaskButtonBar::~TaskButtonBar()
-{
-}
-
-// -----------------------------------------------------------------------
-
-void TaskButtonBar::RequestHelp( const HelpEvent& rHEvt )
-{
- ToolBox::RequestHelp( rHEvt );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
deleted file mode 100644
index cb26d23..0000000
--- a/svtools/source/control/taskstat.cxx
+++ /dev/null
@@ -1,459 +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.
- *
- ************************************************************************/
-
-
-#define _TASKBAR_CXX
-
-#include <tools/date.hxx>
-#include <vcl/image.hxx>
-#include <vcl/help.hxx>
-#include <vcl/svapp.hxx>
-#include <unotools/calendarwrapper.hxx>
-#include <unotools/syslocale.hxx>
-#include <svtools/taskbar.hxx>
-
-// =======================================================================
-
-#define TASKSTATUSBAR_CLOCXOFFX 3
-#define TASKSTATUSBAR_IMAGEOFFX 1
-
-// =======================================================================
-
-struct ImplTaskSBFldItem
-{
- TaskStatusFieldItem maItem;
- sal_uInt16 mnId;
- long mnOffX;
-};
-
-// =======================================================================
-
-sal_Bool ITaskStatusNotify::MouseButtonDown( sal_uInt16, const MouseEvent& )
-{
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool ITaskStatusNotify::MouseButtonUp( sal_uInt16, const MouseEvent& )
-{
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool ITaskStatusNotify::MouseMove( sal_uInt16, const MouseEvent& )
-{
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool ITaskStatusNotify::Command( sal_uInt16, const CommandEvent& )
-{
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool ITaskStatusNotify::UpdateHelp( sal_uInt16 )
-{
- return sal_False;
-}
-
-// =======================================================================
-
-TaskStatusFieldItem::TaskStatusFieldItem()
-{
- mpNotify = NULL;
- mnFlags = 0;
-}
-
-// -----------------------------------------------------------------------
-
-TaskStatusFieldItem::TaskStatusFieldItem( const TaskStatusFieldItem& rItem ) :
- mpNotify( rItem.mpNotify ),
- maImage( rItem.maImage ),
- maQuickHelpText( rItem.maQuickHelpText ),
- maHelpText( rItem.maHelpText ),
- mnFlags( rItem.mnFlags )
-{
-}
-
-// -----------------------------------------------------------------------
-
-TaskStatusFieldItem::~TaskStatusFieldItem()
-{
-}
-
-// -----------------------------------------------------------------------
-
-const TaskStatusFieldItem& TaskStatusFieldItem::operator=( const TaskStatusFieldItem& rItem )
-{
- mpNotify = rItem.mpNotify;
- maImage = rItem.maImage;
- maQuickHelpText = rItem.maQuickHelpText;
- maHelpText = rItem.maHelpText;
- mnFlags = rItem.mnFlags;
- return *this;
-}
-
-// =======================================================================
-
-TaskStatusBar::TaskStatusBar( Window* pParent, WinBits nWinStyle ) :
- StatusBar( pParent, nWinStyle | WB_3DLOOK ),
- maTime( 0, 0, 0 )
-{
- mpFieldItemList = NULL;
- mpNotify = NULL;
- mnClockWidth = 0;
- mnItemWidth = 0;
- mnFieldWidth = 0;
- mnFieldFlags = 0;
- mbFlashItems = sal_False;
- mbOutInterval = sal_False;
-
- maTimer.SetTimeoutHdl( LINK( this, TaskStatusBar, ImplTimerHdl ) );
-}
-
-// -----------------------------------------------------------------------
-
-TaskStatusBar::~TaskStatusBar()
-{
- if ( mpFieldItemList )
- {
- for ( size_t i = 0, n = mpFieldItemList->size(); i < n; ++i ) {
- delete (*mpFieldItemList)[ i ];
- }
- mpFieldItemList->clear();
- delete mpFieldItemList;
- }
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK_NOARG(TaskStatusBar, ImplTimerHdl)
-{
- sal_Bool bUpdate = ImplUpdateClock();
- if ( ImplUpdateFlashItems() )
- bUpdate = sal_True;
- if ( bUpdate )
- SetItemData( TASKSTATUSBAR_STATUSFIELDID, NULL );
-
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const
-{
- if ( GetItemId( rPos ) == TASKSTATUSBAR_STATUSFIELDID )
- {
- rFieldRect = sal_True;
-
- if ( mpFieldItemList )
- {
- long nX = rPos.X()-GetItemRect( TASKSTATUSBAR_STATUSFIELDID ).Left();
- for ( size_t i = 0, n = mpFieldItemList->size(); i < n; ++i ) {
- ImplTaskSBFldItem* pItem = (*mpFieldItemList)[ i ];
- if ( nX < pItem->mnOffX + pItem->maItem.GetImage().GetSizePixel().Width() ) {
- return pItem;
- }
- }
- }
- }
- else
- rFieldRect = sal_False;
-
- return NULL;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool TaskStatusBar::ImplUpdateClock()
-{
- if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
- {
- Time aTime( Time::SYSTEM );
- maTimer.SetTimeout( ((long)60000)-((aTime.GetSec()*1000)+(aTime.Get100Sec()*10)) );
- if ( (aTime.GetMin() != maTime.GetMin()) ||
- (aTime.GetHour() != maTime.GetHour()) )
- {
- maTime = aTime;
- maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, sal_False, sal_False );
- return sal_True;
- }
- }
-
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool TaskStatusBar::ImplUpdateFlashItems()
-{
- if ( mbFlashItems )
- {
- if ( mbOutInterval )
- {
- maTimer.SetTimeout( 900 );
- mbOutInterval = sal_False;
- }
- else
- {
- maTimer.SetTimeout( 700 );
- mbOutInterval = sal_True;
- }
-
- return sal_True;
- }
-
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
-{
- sal_Bool bFieldRect;
- sal_Bool bBaseClass = sal_False;
- ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
-
- ITaskStatusNotify* pNotify = mpNotify;
- sal_uInt16 nItemId = 0;
-
- if ( bFieldRect )
- nItemId = TASKSTATUSBAR_CLOCKID;
-
- if ( pItem )
- {
- pNotify = pItem->maItem.GetNotifyObject();
- nItemId = pItem->mnId;
- }
-
- if ( pNotify )
- bBaseClass = pNotify->MouseButtonDown( nItemId, rMEvt );
-
- if ( bBaseClass )
- StatusBar::MouseButtonDown( rMEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
-{
- sal_Bool bFieldRect;
- sal_Bool bBaseClass = sal_False;
- ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
-
- ITaskStatusNotify* pNotify = mpNotify;
- sal_uInt16 nItemId = 0;
-
- if ( bFieldRect )
- nItemId = TASKSTATUSBAR_CLOCKID;
-
- if ( pItem )
- {
- pNotify = pItem->maItem.GetNotifyObject();
- nItemId = pItem->mnId;
- }
-
- if ( pNotify )
- bBaseClass = pNotify->MouseButtonUp( nItemId, rMEvt );
-
- if ( bBaseClass )
- StatusBar::MouseButtonUp( rMEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskStatusBar::MouseMove( const MouseEvent& rMEvt )
-{
- sal_Bool bFieldRect;
- sal_Bool bBaseClass = sal_False;
- ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
-
- ITaskStatusNotify* pNotify = mpNotify;
- sal_uInt16 nItemId = 0;
-
- if ( bFieldRect )
- nItemId = TASKSTATUSBAR_CLOCKID;
-
- if ( pItem )
- {
- pNotify = pItem->maItem.GetNotifyObject();
- nItemId = pItem->mnId;
- }
-
- if ( pNotify )
- bBaseClass = pNotify->MouseMove( nItemId, rMEvt );
-
- if ( bBaseClass )
- StatusBar::MouseMove( rMEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskStatusBar::Command( const CommandEvent& rCEvt )
-{
- sal_Bool bFieldRect;
- sal_Bool bBaseClass = sal_False;
- ImplTaskSBFldItem* pItem = ImplGetFieldItem( rCEvt.GetMousePosPixel(), bFieldRect );
-
- ITaskStatusNotify* pNotify = mpNotify;
- sal_uInt16 nItemId = 0;
-
- if ( bFieldRect )
- nItemId = TASKSTATUSBAR_CLOCKID;
-
- if ( pItem )
- {
- pNotify = pItem->maItem.GetNotifyObject();
- nItemId = pItem->mnId;
- }
-
- if ( pNotify )
- bBaseClass = pNotify->Command( nItemId, rCEvt );
-
- if ( bBaseClass )
- StatusBar::Command( rCEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt )
-{
- sal_Bool bFieldRect;
- ImplTaskSBFldItem* pItem = ImplGetFieldItem( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), bFieldRect );
- if ( bFieldRect )
- {
- ITaskStatusNotify* pNotify = mpNotify;
- sal_uInt16 nItemId = 0;
-
- if ( pItem )
- {
- pNotify = pItem->maItem.GetNotifyObject();
- nItemId = pItem->mnId;
- }
-
- if ( pNotify )
- pNotify->UpdateHelp( nItemId );
-
- if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
- {
- Rectangle aItemRect = GetItemRect( TASKSTATUSBAR_STATUSFIELDID );
- Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
- aItemRect.Left() = aPt.X();
- aItemRect.Top() = aPt.Y();
- aPt = OutputToScreenPixel( aItemRect.BottomRight() );
- aItemRect.Right() = aPt.X();
- aItemRect.Bottom() = aPt.Y();
- if ( pItem )
- {
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
- {
- XubString aStr = pItem->maItem.GetHelpText();
- if ( !aStr.Len() )
- aStr = pItem->maItem.GetQuickHelpText();
- Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
- }
- else
- Help::ShowQuickHelp( this, aItemRect, pItem->maItem.GetQuickHelpText() );
- }
- else
- {
- SvtSysLocale aSL;
- const LocaleDataWrapper& rLDW = aSL.GetLocaleData();
- CalendarWrapper aCal( rLDW.getServiceFactory());
- aCal.loadDefaultCalendar( rLDW.getLoadedLocale());
- XubString aStr = rLDW.getLongDate( Date( Date::SYSTEM), aCal );
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
- Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
- else
- Help::ShowQuickHelp( this, aItemRect, aStr );
- }
- return;
- }
- else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
- {
- if ( pItem )
- {
- rtl::OUString aHelpId( rtl::OStringToOUString( pItem->maItem.GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
- if ( !aHelpId.isEmpty() )
- {
- // Wenn eine Hilfe existiert, dann ausloesen
- Help* pHelp = Application::GetHelp();
- if ( pHelp )
- pHelp->Start( aHelpId, this );
- return;
- }
- }
- }
- }
-
- StatusBar::RequestHelp( rHEvt );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskStatusBar::UserDraw( const UserDrawEvent& rUDEvt )
-{
- if ( rUDEvt.GetItemId() == TASKSTATUSBAR_STATUSFIELDID )
- {
- OutputDevice* pDev = rUDEvt.GetDevice();
- Rectangle aRect = rUDEvt.GetRect();
-
- if ( mpFieldItemList )
- {
- for ( size_t i = 0, n = mpFieldItemList->size(); i < n; ++i )
- {
- ImplTaskSBFldItem* pItem = (*mpFieldItemList)[ i ];
- if ( !mbOutInterval || !(pItem->maItem.GetFlags() & TASKSTATUSFIELDITEM_FLASH) )
- {
- const Image& rImage = pItem->maItem.GetImage();
- Size aImgSize = rImage.GetSizePixel();
- pDev->DrawImage( Point( aRect.Left()+pItem->mnOffX,
- aRect.Top()+((aRect.GetHeight()-aImgSize.Width())/2) ),
- rImage );
- }
- }
- }
-
- if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
- {
- long nX = mnItemWidth+TASKSTATUSBAR_CLOCXOFFX;
- Point aPos = GetItemTextPos( TASKSTATUSBAR_STATUSFIELDID );
- aPos.X() = aRect.Left()+nX;
- pDev->DrawText( aPos, maTimeText );
- }
- }
- else
- StatusBar::UserDraw( rUDEvt );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index 5ded365..7b0a3b7 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -357,7 +357,6 @@ SwpHtStart::Insert(SwTxtAttr const**, unsigned short)
SwpHtStart::Insert(SwpHtStart const*, unsigned short, unsigned short)
SwpHtStart::Remove(SwTxtAttr const*&, unsigned short)
SystemChildWindow::SystemChildWindow(Window*, ResId const&)
-TaskStatusFieldItem::TaskStatusFieldItem()
TempFile::IsValid() const
TextEngine::GetLeftMargin() const
TransferableDataHelper::GetInterface(com::sun::star::datatransfer::DataFlavor const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&)
@@ -479,8 +478,6 @@ _ZSortFlys_SAR::Replace(_ZSortFly const&, unsigned short)
_ZSortFlys_SAR::Replace(_ZSortFly const*, unsigned short, unsigned short)
_ZSortFlys_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(_ZSortFly const&, void*), void*)
basebmp::debugDump(boost::shared_ptr<basebmp::BitmapDevice> const&, std::basic_ostream<char, std::char_traits<char> >&)
-basegfx::(anonymous namespace)::impAppendCopy(basegfx::B3DPolygon&, basegfx::B3DPolygon const&, unsigned int)
-basegfx::(anonymous namespace)::impAppendInterpolate(basegfx::B3DPolygon&, basegfx::B3DPolygon const&, unsigned int, unsigned int, double)
basegfx::tools::equal(basegfx::B2DPolyPolygon const&, basegfx::B2DPolyPolygon const&, double const&)
basegfx::tools::equal(basegfx::B3DPolyPolygon const&, basegfx::B3DPolyPolygon const&, double const&)
basegfx::tools::getSignedArea(basegfx::B3DPolygon const&)
@@ -918,6 +915,7 @@ drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimit
formula::ArgInput::GetArgSelection()
formula::EditBox::EditBox(Window*, long)
formula::FormulaListBox::FormulaListBox(Window*, long)
+formula::FormulaTokenArray::AddBad(unsigned short const*)
formula::FormulaTokenIterator::First()
framework::TabWindow::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
jfw_plugin::VendorBase::createInstance()
commit f9a4af41ca574760dbd22c8207661fabb6823e3b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 09:45:08 2012 +0000
silence SolarMutex not locked spew
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 2ec7fb9..4ddeb3d 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -382,6 +382,8 @@ sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& r
{
if ( USHRT_MAX == nGuessedLeading || USHRT_MAX == nExtLeading )
{
+ SolarMutexGuard aGuard;
+
const Font aOldFnt( rOut.GetFont() );
((OutputDevice&)rOut).SetFont( *pPrtFont );
const FontMetric aMet( rOut.GetFontMetric() );
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0413382..774000c 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -253,6 +253,8 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
{
if ( !nLockPaint )
{
+ SolarMutexGuard aGuard;
+
sal_Bool bPaintsFromSystem = aInvalidRect.HasArea();
GetWin()->Update();
if ( aInvalidRect.HasArea() )
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 24336ce..a2e6df8 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3835,6 +3835,7 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
{
GtkSalFrame::IMHandler* pThis = (GtkSalFrame::IMHandler*)im_handler;
+ SolarMutexGuard aGuard;
vcl::DeletionListener aDel( pThis->m_pFrame );
// open a block that will end the GTK_YIELD_GRAB before calling preedit changed again
{
@@ -4003,6 +4004,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
GTK_YIELD_GRAB();
+ SolarMutexGuard aGuard;
vcl::DeletionListener aDel( pThis->m_pFrame );
pThis->m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pThis->m_aInputEvent);
@@ -4023,6 +4025,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
pThis->m_bPreeditJustChanged = true;
+ SolarMutexGuard aGuard;
vcl::DeletionListener aDel( pThis->m_pFrame );
pThis->doCallEndExtTextInput();
if( ! aDel.isDeleted() )
commit 0e7f8150388f061ae731f26ed1d659d06f194432
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 09:43:08 2012 +0000
nothing uses ImplAsyncStateChangedHdl anymore now
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 45f4bb4..ce92c94 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -525,7 +525,6 @@ public:
DECL_DLLPRIVATE_LINK( ImplGenerateMouseMoveHdl, void* );
DECL_DLLPRIVATE_LINK( ImplTrackTimerHdl, Timer* );
DECL_DLLPRIVATE_LINK( ImplAsyncFocusHdl, void* );
- DECL_DLLPRIVATE_LINK( ImplAsyncStateChangedHdl, void* );
DECL_DLLPRIVATE_LINK( ImplHideOwnerDrawWindowsHdl, void* );
DECL_DLLPRIVATE_LINK( ImplHandleResizeTimerHdl, void* );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 1d679a5..a71dda2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -5324,14 +5324,6 @@ void Window::RemoveUserEvent( sal_uLong nUserEvent )
// -----------------------------------------------------------------------
-IMPL_LINK( Window, ImplAsyncStateChangedHdl, void*, pState )
-{
- StateChanged( (StateChangedType)(sal_uLong)pState );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Window::IsLocked( sal_Bool bChildren ) const
{
if ( mpWindowImpl->mnLockCount != 0 )
commit 681c6b470a84b7fdd0aa91c23233ecb39ce2d37b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 09:41:40 2012 +0000
improve debugging message
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 1cd1bd0..24336ce 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3987,7 +3987,9 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
for (int i = start; i < end; ++i)
{
SAL_WARN_IF(i >= static_cast<int>(pThis->m_aInputFlags.size()),
- "vcl.gtk", "pango attrib out of range?");
+ "vcl.gtk", "pango attrib out of range. Broken range: "
+ << start << "," << end << " Legal range: 0,"
+ << pThis->m_aInputFlags.size());
if (i >= static_cast<int>(pThis->m_aInputFlags.size()))
continue;
pThis->m_aInputFlags[i] |= sal_attr;
commit 78719066cb546c7dc74e87488b9b7a695606cf7c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 09:37:35 2012 +0000
wrong types used here, breaks 64bit bigendian
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index 7953dc3..d9be7a2 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -82,7 +82,7 @@ namespace /* private */
sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs)
{
BigPtrEntryMock* const pbem = static_cast<BigPtrEntryMock* const>(rElem);
- pbem->setCount(pbem->getCount() + *((int*)pArgs));
+ pbem->setCount(pbem->getCount() + *((sal_uLong*)pArgs));
return true;
}
@@ -655,7 +655,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(AddToCount, &addCount);
for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
@@ -715,7 +715,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(NUM_ENTRIES / 2, NUM_ENTRIES, AddToCount, &addCount);
sal_uLong i = 0;
commit a7f82767e0fed810df3f6300a09507dc00cd87f9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 06:37:05 2012 +0000
last user of Window::PostStateChanged was TaskBar
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index f4b79ae..45f4bb4 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -624,7 +624,6 @@ public:
sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
void RemoveUserEvent( sal_uLong nUserEvent );
- void PostStateChanged( StateChangedType nState );
void IncrementLockCount();
void DecrementLockCount();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8c3d455..1d679a5 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -5332,15 +5332,6 @@ IMPL_LINK( Window, ImplAsyncStateChangedHdl, void*, pState )
// -----------------------------------------------------------------------
-void Window::PostStateChanged( StateChangedType nState )
-{
- DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-
- PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(sal_uLong)nState );
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Window::IsLocked( sal_Bool bChildren ) const
{
if ( mpWindowImpl->mnLockCount != 0 )
commit 867df14dd1b4570fa5a3719faf2e8f2a2007323e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:57:07 2012 +0000
SwColumnPage::LinkStubTimeout doesn't need to be a link
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 0c6a035..e9059f7 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -1056,7 +1056,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
IMPL_LINK( SwColumnPage, EdModify, PercentField *, pField )
{
pModifiedField = pField;
- Timeout(0);
+ Timeout();
return 0;
}
@@ -1115,7 +1115,7 @@ IMPL_LINK_NOARG(SwColumnPage, Down)
handler; triggered by an alteration of the column width
or the column gap.
------------------------------------------------------------------------*/
-IMPL_LINK_NOARG(SwColumnPage, Timeout)
+void SwColumnPage::Timeout()
{
DBG_PROFSTART(columnhdl) ;
if(pModifiedField)
@@ -1156,7 +1156,6 @@ IMPL_LINK_NOARG(SwColumnPage, Timeout)
}
Update();
DBG_PROFSTOP(columnhdl) ;
- return 0;
}
/*------------------------------------------------------------------------
@@ -1312,7 +1311,7 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
pModifiedField = &aEd1;
}
bLockUpdate = sal_False;
- Timeout(0);
+ Timeout();
}
return 0;
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 5cc078c..213544f 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -164,13 +164,13 @@ class SwColumnPage : public SfxTabPage
DECL_LINK( GapModify, PercentField * );
DECL_LINK( EdModify, PercentField * );
DECL_LINK( AutoWidthHdl, CheckBox * );
- DECL_LINK(Timeout, void *);
DECL_LINK( SetDefaultsHdl, ValueSet * );
DECL_LINK(Up, void *);
DECL_LINK(Down, void *);
- void Apply(Button *);
DECL_LINK( UpdateColMgr, void* );
+ void Apply(Button *);
+ void Timeout();
void Update();
void UpdateCols();
diff --git a/unusedcode.easy b/unusedcode.easy
index dd168e5..5ded365 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -244,7 +244,6 @@ SwBlockNames::Remove(SwBlockName const*&, unsigned short)
SwBlockNames::Remove(unsigned short, unsigned short)
SwCellFrms::DeleteAndDestroy(unsigned short, unsigned short)
SwChartBoxes::DeleteAndDestroy(unsigned short, unsigned short)
-SwColumnPage::LinkStubTimeout(void*, void*)
SwContentArr::Insert(SwContent* const&, unsigned short&)
SwContentArr::Insert(SwContent* const*, unsigned short)
SwContentArr::Insert(SwContentArr const*, unsigned short, unsigned short)
commit c1e467f7999592f1144ce0c1c6563fa21f54cbbd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:52:50 2012 +0000
remove TransliterationWrapper::compareSubstring
diff --git a/unotools/inc/unotools/transliterationwrapper.hxx b/unotools/inc/unotools/transliterationwrapper.hxx
index c4c340d..d6ac07d 100644
--- a/unotools/inc/unotools/transliterationwrapper.hxx
+++ b/unotools/inc/unotools/transliterationwrapper.hxx
@@ -118,10 +118,6 @@ public:
const String& rStr1, sal_Int32 nPos1, sal_Int32 nCount1, sal_Int32& nMatch1,
const String& rStr2, sal_Int32 nPos2, sal_Int32 nCount2, sal_Int32& nMatch2 ) const;
- sal_Int32 compareSubstring(
- const String& rStr1, sal_Int32 nOff1, sal_Int32 nLen1,
- const String& rStr2, sal_Int32 nOff2, sal_Int32 nLen2 ) const;
-
sal_Int32 compareString( const String& rStr1, const String& rStr2 ) const;
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index f761c5f..14bc435 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -227,6 +227,10 @@ utl::ConfigManager::addConfigItem(utl::ConfigItem & item) {
}
void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) {
+ static int hack = 0;
+ fprintf(stderr, "remove %d of %p\n", hack, &item);
+ ++hack;
+
for (std::list< ConfigItem * >::iterator i(items_.begin());
i != items_.end(); ++i)
{
@@ -239,6 +243,9 @@ void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) {
void utl::ConfigManager::registerConfigItem(utl::ConfigItem * item) {
OSL_ASSERT(item != 0);
+ static int hack = 0;
+ fprintf(stderr, "add %d is %p\n", hack, item);
+ ++hack;
items_.push_back(item);
}
diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx
index eaae56b..ea7aaa8 100644
--- a/unotools/source/i18n/transliterationwrapper.cxx
+++ b/unotools/source/i18n/transliterationwrapper.cxx
@@ -217,26 +217,6 @@ sal_Bool TransliterationWrapper::equals(
return sal_False;
}
-
-sal_Int32 TransliterationWrapper::compareSubstring(
- const String& rStr1, sal_Int32 nOff1, sal_Int32 nLen1,
- const String& rStr2, sal_Int32 nOff2, sal_Int32 nLen2 ) const
-{
- try
- {
- if( bFirstCall )
- loadModuleImpl();
- if ( xTrans.is() )
- return xTrans->compareSubstring( rStr1, nOff1, nLen1, rStr2, nOff2, nLen2 );
- }
- catch (const Exception& e)
- {
- SAL_WARN( "unotools.i18n", "compareSubstring: Exception caught " << e.Message );
- }
- return 0;
-}
-
-
sal_Int32 TransliterationWrapper::compareString( const String& rStr1, const String& rStr2 ) const
{
try
diff --git a/unusedcode.easy b/unusedcode.easy
index dbfcc02..dd168e5 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1077,5 +1077,4 @@ ucbhelper::Content::getPropertyValues(com::sun::star::uno::Sequence<int> const&)
ucbhelper::Content::insertNewContent(rtl::OUString const&, com::sun::star::uno::Sequence<int> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, ucbhelper::Content&)
ucbhelper::SimpleCertificateValidationRequest::getResponse() const
utl::OConfigurationNode::appendNode(rtl::OUString const&, utl::OConfigurationNode const&) const
-utl::TransliterationWrapper::compareSubstring(String const&, int, int, String const&, int, int) const
vcl::PDFWriter::DrawPixel(Polygon const&, Color const*)
commit 09aaa188bc9c84508f0b043eaee5eddd0ae4e3cc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:47:30 2012 +0000
TaskBar is never constructed
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index c07d01b..bb2a63f 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -128,7 +128,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/control/stdctrl \
svtools/source/control/stdmenu \
svtools/source/control/tabbar \
- svtools/source/control/taskbar \
svtools/source/control/taskbox \
svtools/source/control/taskmisc \
svtools/source/control/taskstat \
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
index a303949..f7122b1 100644
--- a/svtools/inc/svtools/taskbar.hxx
+++ b/svtools/inc/svtools/taskbar.hxx
@@ -35,7 +35,6 @@
#include <vcl/toolbox.hxx>
#include <vcl/status.hxx>
-class TaskBar;
class TaskStatusFieldItem;
struct ImplTaskSBFldItem;
@@ -81,39 +80,6 @@ benachrichtigt werden will, wenn die Uhrzeit oder die TaskStatusBar
angeklickt wird. Wenn der Notify fuer die Uhrzeit kommt, ist die
Id TASKSTATUSBAR_CLOCKID, wenn er fuer die TaskStatusBar kommt, ist
die Id 0.
-
-
-TaskBar
-=======
-
-Erlaubte StyleBits
-------------------
-
-WB_BORDER - Border an der oberen Kante
-WB_SIZEABLE - Zwischen TaskToolBox und TaskStatusBar kann der Anwender
- die Groesse aendern.
-
-Wenn WB_SIZEABLE gesetzt ist, kann die Breite des StatusBars gesetzt und
-abgefragt werden. Dazu kann man SetStatusSize()/GetStatusSize() aufrufen.
-0 steht dabei fuer optimale Groesse, was auch der Default ist. Bei einem
-Doppelklick auf den Trenner kann der Anwender auch wieder die optimale
-Groesse einstellen.
-
-Wichtige Methoden
-------------------
-
-virtual TaskToolBox* TaskBar::CreateButtonBar();
-virtual TaskToolBox* TaskBar::CreateTaskToolBox();
-virtual TaskStatusBar* TaskBar::CreateTaskStatusBar();
-
-Diese Methoden muesste man ueberladen, wenn man eine eigene Klasse anlegen
-will.
-
-void TaskBar::ShowStatusText( const String& rText );
-void TaskBar::HideStatusText();
-
-Blendet den ButtonBar und die TaskBar ein bzw. aus um den Hilfetexte in der
-gesammten Zeile anzuzeigen.
*/
// -----------------
@@ -122,10 +88,7 @@ gesammten Zeile anzuzeigen.
class TaskButtonBar : public ToolBox
{
- friend class TaskBar;
-
private:
- TaskBar* mpNotifyTaskBar;
void* mpDummy1;
void* mpDummy2;
void* mpDummy3;
@@ -151,11 +114,8 @@ public:
class SVT_DLLPUBLIC TaskToolBox : public ToolBox
{
- friend class TaskBar;
-
private:
ImplTaskItemList* mpItemList;
- TaskBar* mpNotifyTaskBar;
Point maContextMenuPos;
size_t mnOldItemCount;
long mnMaxTextWidth;
@@ -267,11 +227,8 @@ public:
class SVT_DLLPUBLIC TaskStatusBar : public StatusBar
{
- friend class TaskBar;
-
private:
ImplTaskSBItemList* mpFieldItemList;
- TaskBar* mpNotifyTaskBar;
ITaskStatusNotify* mpNotify;
Time maTime;
XubString maTimeText;
@@ -309,82 +266,6 @@ public:
ITaskStatusNotify* GetNotifyObject() const { return mpNotify; }
};
-// -----------
-// - TaskBar -
-// -----------
-
-class SVT_DLLPUBLIC TaskBar : public Window
-{
-private:
- TaskButtonBar* mpButtonBar;
- TaskToolBox* mpTaskToolBox;
- TaskStatusBar* mpStatusBar;
- void* mpDummy1;
- void* mpDummy2;
- void* mpDummy3;
- void* mpDummy4;
- String maOldText;
- long mnStatusWidth;
- long mnMouseOff;
- long mnOldStatusWidth;
- long mnDummy1;
- long mnDummy2;
- long mnDummy3;
- long mnDummy4;
- WinBits mnWinBits;
- sal_uInt16 mnLines;
- sal_Bool mbStatusText;
- sal_Bool mbShowItems;
- sal_Bool mbAutoHide;
- sal_Bool mbAlignDummy1;
- sal_Bool mbDummy1;
- sal_Bool mbDummy2;
- sal_Bool mbDummy3;
- sal_Bool mbDummy4;
- Link maTaskResizeHdl;
-
-#ifdef _TASKBAR_CXX
- SVT_DLLPRIVATE void ImplInitSettings();
- SVT_DLLPRIVATE void ImplNewHeight( long nNewHeight );
-#endif
-
-public:
- TaskBar( Window* pParent, WinBits nWinStyle = WB_BORDER | WB_SIZEABLE );
- ~TaskBar();
-
- virtual void TaskResize();
-
- virtual TaskButtonBar* CreateButtonBar();
- virtual TaskToolBox* CreateTaskToolBox();
- virtual TaskStatusBar* CreateTaskStatusBar();
-
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void Tracking( const TrackingEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- void Format();
-
- sal_uInt16 GetLines() const { return mnLines; }
- sal_Bool IsAutoHideEnabled() const { return mbAutoHide; }
-
- void SetStatusSize( long nNewSize )
- { mnStatusWidth=nNewSize; Resize(); }
- long GetStatusSize() const { return mnStatusWidth; }
-
- Size CalcWindowSizePixel() const;
-
- TaskButtonBar* GetButtonBar() const;
- TaskToolBox* GetTaskToolBox() const;
- TaskStatusBar* GetStatusBar() const;
-
- void SetTaskResizeHdl( const Link& rLink ) { maTaskResizeHdl = rLink; }
- const Link& GetTaskResizeHdl() const { return maTaskResizeHdl; }
-};
-
#endif // _TASKBAR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx
deleted file mode 100644
index 9ee135b..0000000
--- a/svtools/source/control/taskbar.cxx
+++ /dev/null
@@ -1,503 +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.
- *
- ************************************************************************/
-
-
-#define _TASKBAR_CXX
-
-#include <vcl/floatwin.hxx>
-
-#include <svtools/taskbar.hxx>
-
-#define TASKBAR_BORDER 2
-#define TASKBAR_OFFSIZE 3
-#define TASKBAR_OFFX 2
-#define TASKBAR_OFFY 1
-#define TASKBAR_BUTTONOFF 5
-#define TASKBAR_AUTOHIDE_HEIGHT 2
-
-// =======================================================================
-
-TaskBar::TaskBar( Window* pParent, WinBits nWinStyle ) :
- Window( pParent, WB_3DLOOK )
-{
- mpButtonBar = NULL;
- mpTaskToolBox = NULL;
- mpStatusBar = NULL;
- mnStatusWidth = 0;
- mnOldStatusWidth = 0;
- mnLines = 1;
- mnWinBits = nWinStyle;
- mbStatusText = sal_False;
- mbShowItems = sal_False;
- mbAutoHide = sal_False;
-
- ImplInitSettings();
-}
-
-// -----------------------------------------------------------------------
-
-TaskBar::~TaskBar()
-{
- if ( mpButtonBar )
- delete mpButtonBar;
- if ( mpTaskToolBox )
- delete mpTaskToolBox;
- if ( mpStatusBar )
- delete mpStatusBar;
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::ImplInitSettings()
-{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
- Color aColor;
- if ( IsControlBackground() )
- aColor = GetControlBackground();
- else if ( Window::GetStyle() & WB_3DLOOK )
- aColor = rStyleSettings.GetFaceColor();
- else
- aColor = rStyleSettings.GetWindowColor();
- SetBackground( aColor );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::ImplNewHeight( long nNewHeight )
-{
- long nOldHeight = GetSizePixel().Height();
- if ( nNewHeight != nOldHeight )
- {
- long nY = GetPosPixel().Y()-(nNewHeight-nOldHeight);
- SetPosSizePixel( 0, nY, 0, nNewHeight,
- WINDOW_POSSIZE_Y | WINDOW_POSSIZE_HEIGHT );
- TaskResize();
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::TaskResize()
-{
- maTaskResizeHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-TaskButtonBar* TaskBar::CreateButtonBar()
-{
- return new TaskButtonBar( this );
-}
-
-// -----------------------------------------------------------------------
-
-TaskToolBox* TaskBar::CreateTaskToolBox()
-{
- return new TaskToolBox( this );
-}
-
-// -----------------------------------------------------------------------
-
-TaskStatusBar* TaskBar::CreateTaskStatusBar()
-{
- return new TaskStatusBar( this );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::MouseMove( const MouseEvent& rMEvt )
-{
- if ( mnWinBits & WB_SIZEABLE )
- {
- TaskToolBox* pTempTaskToolBox = GetTaskToolBox();
- TaskStatusBar* pTempStatusBar = GetStatusBar();
-
- if ( pTempTaskToolBox && pTempStatusBar )
- {
- long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2;
- long nMouseX = rMEvt.GetPosPixel().X();
- PointerStyle ePtrStyle;
- if ( (nMouseX >= nStatusX-1) && (nMouseX <= nStatusX+3) )
- ePtrStyle = POINTER_HSIZEBAR;
- else
- ePtrStyle = POINTER_ARROW;
- Pointer aPtr( ePtrStyle );
- SetPointer( aPtr );
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if ( rMEvt.IsLeft() && (mnWinBits & WB_SIZEABLE) )
- {
- TaskToolBox* pTempTaskToolBox = GetTaskToolBox();
- TaskStatusBar* pTempStatusBar = GetStatusBar();
-
- if ( pTempTaskToolBox && pTempStatusBar )
- {
- long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2;
- long nMouseX = rMEvt.GetPosPixel().X();
- if ( (nMouseX >= nStatusX-1) && (nMouseX <= nStatusX+3) )
- {
- if ( rMEvt.GetClicks() == 2 )
- {
- if ( mnStatusWidth )
- {
- mnStatusWidth = 0;
- Resize();
- }
- }
- else
- {
- StartTracking();
- mnOldStatusWidth = mnStatusWidth;
- mnMouseOff = nMouseX-nStatusX;
- }
- }
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::Tracking( const TrackingEvent& rTEvt )
-{
- if ( rTEvt.IsTrackingEnded() )
- {
- if ( rTEvt.IsTrackingCanceled() )
- {
- mnStatusWidth = mnOldStatusWidth;
- Resize();
- Update();
- }
- }
- else
- {
- Size aSize = GetOutputSizePixel();
-
- long nMouseX = rTEvt.GetMouseEvent().GetPosPixel().X()-mnMouseOff;
- if ( nMouseX < 0 )
- nMouseX = 0;
- long nMaxX = aSize.Width()-TASKBAR_OFFX-TASKBAR_OFFSIZE-1;
- if ( nMouseX > nMaxX )
- nMouseX = nMaxX;
- mnStatusWidth = aSize.Width()-nMouseX-TASKBAR_OFFX-TASKBAR_OFFSIZE;
- Resize();
- Update();
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::Paint( const Rectangle& rRect )
-{
- if ( mnWinBits & (WB_BORDER | WB_SIZEABLE) )
- {
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- Size aSize = GetOutputSizePixel();
- long nY = 0;
-
- if ( mnWinBits & WB_BORDER )
- {
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( 0, 0 ), Point( aSize.Width()-1, 0 ) );
- SetLineColor( rStyleSettings.GetLightColor() );
- DrawLine( Point( 0, 1 ), Point( aSize.Width()-1, 1 ) );
- nY += 2;
- }
-
- if ( (mnWinBits & WB_SIZEABLE) )
- {
- //TaskButtonBar* pTempButtonBar = GetButtonBar();
- TaskToolBox* pTempTaskToolBox = GetTaskToolBox();
- TaskStatusBar* pTempStatusBar = GetStatusBar();
-
- if ( pTempTaskToolBox && pTempStatusBar )
- {
- long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2;
- if ( nStatusX > 0 )
- {
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( nStatusX, nY ), Point( nStatusX, aSize.Height()-1 ) );
- nStatusX++;
- SetLineColor( rStyleSettings.GetLightColor() );
- DrawLine( Point( nStatusX, nY ), Point( nStatusX, aSize.Height()-1 ) );
- }
- }
- }
- }
-
- Window::Paint( rRect );
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::Resize()
-{
- if ( !IsReallyShown() )
- return;
-
- TaskButtonBar* pTempButtonBar = GetButtonBar();
- TaskToolBox* pTempTaskToolBox = GetTaskToolBox();
- TaskStatusBar* pTempStatusBar = GetStatusBar();
- Point aToolPos( TASKBAR_OFFX, 0 );
- Size aSize = GetOutputSizePixel();
- Size aStatusSize;
- Size aToolSize( aSize.Width()-(TASKBAR_OFFX*2), 0 );
- long nOldStatusX = -1;
- long nNewStatusX = -1;
- long nTaskHeight = aSize.Height() - (TASKBAR_OFFY*2);
-
- if ( mnWinBits & WB_BORDER )
- {
- nTaskHeight -= TASKBAR_BORDER;
- aToolPos.Y() += TASKBAR_BORDER;
- }
-
- if ( pTempButtonBar )
- {
- sal_uInt16 i = 0;
- sal_Bool bVisibleItems = sal_False;
- while ( i < pTempButtonBar->GetItemCount() )
- {
- if ( pTempButtonBar->IsItemVisible( pTempButtonBar->GetItemId( i ) ) )
- {
- bVisibleItems = sal_True;
- break;
- }
- i++;
- }
- if ( mbStatusText || !bVisibleItems )
- pTempButtonBar->Hide();
- else
- {
- Size aButtonBarSize = pTempButtonBar->CalcWindowSizePixel();
- if ( pTempButtonBar->GetItemCount() )
- nTaskHeight = aButtonBarSize.Height();
- else
- aButtonBarSize.Height() = nTaskHeight;
- Point aTempPos = aToolPos;
- aTempPos.Y() += (aSize.Height()-aButtonBarSize.Height()-aTempPos.Y())/2;
- pTempButtonBar->SetPosSizePixel( aTempPos, aButtonBarSize );
- pTempButtonBar->Show();
- aToolPos.X() += aButtonBarSize.Width()+TASKBAR_BUTTONOFF;
- }
- }
-
- if ( pTempStatusBar )
- {
- aStatusSize = pTempStatusBar->CalcWindowSizePixel();
- if ( mnStatusWidth )
- aStatusSize.Width() = mnStatusWidth;
- if ( !pTempTaskToolBox || mbStatusText )
- aStatusSize.Width() = aSize.Width();
- long nMaxHeight = aSize.Height()-(TASKBAR_OFFY*2);
- if ( mnWinBits & WB_BORDER )
- nMaxHeight -= TASKBAR_BORDER;
- if ( nMaxHeight+2 > aStatusSize.Height() )
- aStatusSize.Height() = nMaxHeight;
- Point aPos( aSize.Width()-aStatusSize.Width(), 0 );
- if ( pTempTaskToolBox && (mnWinBits & WB_SIZEABLE) && !mbStatusText )
- {
- long nMinToolWidth = aToolPos.X()+50;
- if ( aPos.X() < nMinToolWidth )
- {
- aStatusSize.Width() -= nMinToolWidth-aPos.X();
- aPos.X() = nMinToolWidth;
- }
- }
- if ( aPos.X() < 0 )
- {
- aStatusSize.Width() = aSize.Width();
- aPos.X() = 0;
- }
- if ( mnWinBits & WB_BORDER )
- aPos.Y() += TASKBAR_BORDER;
- aPos.Y() += (aSize.Height()-aStatusSize.Height()-aPos.Y())/2;
- if ( mnWinBits & WB_SIZEABLE )
- {
- if ( pTempTaskToolBox )
- {
- nOldStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2;
- nNewStatusX = aPos.X()-TASKBAR_OFFSIZE-2;
- }
- }
- pTempStatusBar->SetPosSizePixel( aPos, aStatusSize );
- pTempStatusBar->Show();
- aToolSize.Width() = aPos.X()-aToolPos.X()-TASKBAR_OFFX;
- if ( mnWinBits & WB_SIZEABLE )
- aToolSize.Width() -= (TASKBAR_OFFSIZE*2)-2;
- }
-
- if ( pTempTaskToolBox )
- {
- if ( aToolSize.Width() <= 24 )
- pTempTaskToolBox->Hide();
- else
- {
- aToolSize.Height() = pTempTaskToolBox->CalcWindowSizePixel().Height();
- if ( pTempTaskToolBox->GetItemCount() )
- nTaskHeight = aToolSize.Height();
- else
- aToolSize.Height() = nTaskHeight;
- aToolPos.Y() += (aSize.Height()-aToolSize.Height()-aToolPos.Y())/2;
- pTempTaskToolBox->SetPosSizePixel( aToolPos, aToolSize );
- pTempTaskToolBox->Show();
- }
- }
-
- if ( nOldStatusX != nNewStatusX )
- {
- if ( nOldStatusX > 0 )
- {
- Rectangle aRect( nOldStatusX, 0, nOldStatusX+2, aSize.Height()-1 );
- Invalidate( aRect );
- }
- if ( nNewStatusX > 0 )
- {
- Rectangle aRect( nNewStatusX, 0, nNewStatusX+2, aSize.Height()-1 );
- Invalidate( aRect );
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::StateChanged( StateChangedType nType )
-{
- Window::StateChanged( nType );
-
- if ( nType == STATE_CHANGE_INITSHOW )
- Format();
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
- {
- ImplInitSettings();
- Invalidate();
- }
- else if ( nType == STATE_CHANGE_FORMAT )
- {
- ImplInitSettings();
- ImplNewHeight( CalcWindowSizePixel().Height() );
- Format();
- Invalidate();
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::DataChanged( const DataChangedEvent& rDCEvt )
-{
- Window::DataChanged( rDCEvt );
-
- if ( (rDCEvt.GetType() == DATACHANGED_FONTS) ||
- (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
- ((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
- (rDCEvt.GetFlags() & SETTINGS_STYLE)) )
- {
- // Asyncronen StateChanged ausloesen, damit sich die
- // TaskBar an die neuen Groessen der Child-Fenster
- // orientieren kann
- PostStateChanged( STATE_CHANGE_FORMAT );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TaskBar::Format()
-{
- ImplNewHeight( CalcWindowSizePixel().Height() );
- Resize();
-}
-
-// -----------------------------------------------------------------------
-
-Size TaskBar::CalcWindowSizePixel() const
-{
- TaskButtonBar* pTempButtonBar = GetButtonBar();
- TaskToolBox* pTempTaskToolBox = GetTaskToolBox();
- TaskStatusBar* pTempStatusBar = GetStatusBar();
- Size aSize;
- long nTempHeight;
-
- if ( pTempButtonBar && pTempButtonBar->GetItemCount() )
- aSize.Height() = pTempButtonBar->CalcWindowSizePixel().Height()+(TASKBAR_OFFY*2);
- if ( pTempTaskToolBox && pTempTaskToolBox->GetItemCount() )
- {
- nTempHeight = pTempTaskToolBox->CalcWindowSizePixel().Height()+(TASKBAR_OFFY*2);
- if ( nTempHeight > aSize.Height() )
- aSize.Height() = nTempHeight;
- }
- if ( pTempStatusBar )
- {
- nTempHeight = pTempStatusBar->GetSizePixel().Height();
- if ( nTempHeight > aSize.Height() )
- aSize.Height() = nTempHeight;
- }
-
- if ( mnWinBits & WB_BORDER )
- aSize.Height() += TASKBAR_BORDER;
-
- return aSize;
-}
-
-// -----------------------------------------------------------------------
-
-TaskButtonBar* TaskBar::GetButtonBar() const
-{
- if ( !mpButtonBar )
- ((TaskBar*)this)->mpButtonBar = ((TaskBar*)this)->CreateButtonBar();
- return mpButtonBar;
-}
-
-// -----------------------------------------------------------------------
-
-TaskToolBox* TaskBar::GetTaskToolBox() const
-{
- if ( !mpTaskToolBox )
- ((TaskBar*)this)->mpTaskToolBox = ((TaskBar*)this)->CreateTaskToolBox();
- return mpTaskToolBox;
-}
-
-// -----------------------------------------------------------------------
-
-TaskStatusBar* TaskBar::GetStatusBar() const
-{
- if ( !mpStatusBar )
- {
- ((TaskBar*)this)->mpStatusBar = ((TaskBar*)this)->CreateTaskStatusBar();
- if ( mpStatusBar )
- mpStatusBar->mpNotifyTaskBar = (TaskBar*)this;
- }
- return mpStatusBar;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
index 3c25d0f..cb26d23 100644
--- a/svtools/source/control/taskstat.cxx
+++ b/svtools/source/control/taskstat.cxx
@@ -130,7 +130,6 @@ TaskStatusBar::TaskStatusBar( Window* pParent, WinBits nWinStyle ) :
maTime( 0, 0, 0 )
{
mpFieldItemList = NULL;
- mpNotifyTaskBar = NULL;
mpNotify = NULL;
mnClockWidth = 0;
mnItemWidth = 0;
diff --git a/unusedcode.easy b/unusedcode.easy
index 631ae5c..dbfcc02 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -358,7 +358,6 @@ SwpHtStart::Insert(SwTxtAttr const**, unsigned short)
SwpHtStart::Insert(SwpHtStart const*, unsigned short, unsigned short)
SwpHtStart::Remove(SwTxtAttr const*&, unsigned short)
SystemChildWindow::SystemChildWindow(Window*, ResId const&)
-TaskBar::TaskBar(Window*, long)
TaskStatusFieldItem::TaskStatusFieldItem()
TempFile::IsValid() const
TextEngine::GetLeftMargin() const
commit c936fcf81fc3a9d514bf8e54969f6ee0a62335c9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:33:07 2012 +0000
SwTOXStylesTabPage::LinkStubModifyHdl doesn't need to be a link
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 3f752c6..f2f4d22 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -489,7 +489,7 @@ class SwTOXStylesTabPage : public SfxTabPage
DECL_LINK(EnableSelectHdl, void *);
DECL_LINK(DoubleClickHdl, void *);
DECL_LINK(AssignHdl, void *);
- DECL_LINK( ModifyHdl, void*);
+ void Modify();
SwForm& GetForm()
{
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b6133b5..0d41a0b 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3851,7 +3851,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl)
aLevelLB.RemoveEntry(nLevPos);
aLevelLB.InsertEntry(aStr, nLevPos);
aLevelLB.SelectEntry(aStr);
- ModifyHdl(0);
+ Modify();
}
return 0;
}
@@ -3868,7 +3868,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, StdHdl)
aLevelLB.InsertEntry(aStr, nPos);
aLevelLB.SelectEntry(aStr);
m_pCurrentForm->SetTemplate(nPos, aEmptyStr);
- ModifyHdl(0);
+ Modify();
}
return 0;
}
@@ -3901,7 +3901,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, EnableSelectHdl)
return 0;
}
-IMPL_LINK_NOARG(SwTOXStylesTabPage, ModifyHdl)
+void SwTOXStylesTabPage::Modify()
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
if(pTOXDlg)
@@ -3909,7 +3909,6 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, ModifyHdl)
GetForm() = *m_pCurrentForm;
pTOXDlg->CreateOrUpdateExample(pTOXDlg->GetCurrentTOXType().eType, TOX_PAGE_STYLES);
}
- return 0;
}
#define ITEM_SEARCH 1
diff --git a/unusedcode.easy b/unusedcode.easy
index 0e2e7e9..631ae5c 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -322,7 +322,6 @@ SwTOXSources::Remove(unsigned short, unsigned short)
SwTOXSources::Replace(SwTOXSource const&, unsigned short)
SwTOXSources::Replace(SwTOXSource const*, unsigned short, unsigned short)
SwTOXSources::_ForEach(unsigned short, unsigned short, unsigned char (*)(SwTOXSource const&, void*), void*)
-SwTOXStylesTabPage::LinkStubModifyHdl(void*, void*)
SwTabFrm::GetLeaf(MakePageType, unsigned char)
SwTableSortBoxes::DeleteAndDestroy(unsigned short, unsigned short)
SwTableSortBoxes::Insert(SwTableBox* const&, unsigned short&)
commit a47f2e69bc544d9225d134bb0193bc09920158a0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:28:51 2012 +0000
XMLFilterTabPageXSLT::LinkStubToggleXSLTImplHdl does nothing
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index 8047474..dc1a4c8 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -199,10 +199,6 @@ OUString XMLFilterTabPageXSLT::GetURL( SvtURLBox& rURLBox )
return aURL;
}
-IMPL_LINK_NOARG(XMLFilterTabPageXSLT, ToggleXSLTImplHdl) {
- return (0L);
-}
-
IMPL_LINK ( XMLFilterTabPageXSLT, ClickBrowseHdl_Impl, PushButton *, pButton )
{
SvtURLBox* pURLBox;
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
index a5bae97..a9d8062 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
@@ -49,7 +49,6 @@ public:
void SetInfo(const filter_info_impl* pInfo);
DECL_LINK( ClickBrowseHdl_Impl, PushButton * );
- DECL_LINK( ToggleXSLTImplHdl, void* );
FixedText maFTDocType;
Edit maEDDocType;
diff --git a/unusedcode.easy b/unusedcode.easy
index e9ee73b..0e2e7e9 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -403,7 +403,6 @@ XMLErrors::AddRecord(int, com::sun::star::uno::Sequence<rtl::OUString> const&)
XMLErrors::AddRecord(int, com::sun::star::uno::Sequence<rtl::OUString> const&, rtl::OUString const&)
XMLFamilyDataList_Impl::GetPos(XMLFamilyData_Impl const*) const
XMLFamilyDataList_Impl::Remove(XMLFamilyData_Impl*)
-XMLFilterTabPageXSLT::LinkStubToggleXSLTImplHdl(void*, void*)
XMLFontAutoStylePoolNames_Impl::GetPos(rtl::OUString const*) const
XMLFontAutoStylePoolNames_Impl::Remove(rtl::OUString*)
XMLFontAutoStylePool_Impl::GetPos(XMLFontAutoStylePoolEntry_Impl const*) const
commit 32079836d97c78cd415b8591ab9be0d5ef7a4db8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:23:59 2012 +0000
ClickLightHdl doesn't need to be a link
and ClickLightHdl always takes a non-NULL argument, so NULL test is
pointless. Turn it into a normal method that takes a reference.
GetLightSource can be const. Nothing calls DoubleClickHdl, remove it.
diff --git a/svx/inc/svx/float3d.hxx b/svx/inc/svx/float3d.hxx
index b13cb6f..5769657 100644
--- a/svx/inc/svx/float3d.hxx
+++ b/svx/inc/svx/float3d.hxx
@@ -230,9 +230,7 @@ private:
DECL_LINK( ClickColorHdl, PushButton * );
DECL_LINK( SelectHdl, void * );
DECL_LINK( ModifyHdl, void * );
- DECL_LINK( ClickLightHdl, PushButton * );
-
- DECL_LINK( DoubleClickHdl, void * );
+ void ClickLight(PushButton &rBtn);
DECL_LINK( ChangeLightCallbackHdl, void * );
DECL_LINK( ChangeSelectionCallbackHdl, void * );
@@ -244,7 +242,7 @@ private:
SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn = NULL );
SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = NULL );
- SVX_DLLPRIVATE bool GetUILightState( ImageButton& aBtn ) const;
+ SVX_DLLPRIVATE bool GetUILightState( const ImageButton& rBtn ) const;
SVX_DLLPRIVATE void SetUILightState( ImageButton& aBtn, bool bState );
protected:
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 0162c2e..2518c00 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -483,9 +483,9 @@ void Svx3DWin::Reset()
aCtlLightPreview.GetSvx3DLightControl().SelectLight(0);
}
-bool Svx3DWin::GetUILightState( ImageButton& aBtn ) const
+bool Svx3DWin::GetUILightState( const ImageButton& rBtn ) const
{
- return (aBtn.GetModeImage() == aImgLightOn);
+ return (rBtn.GetModeImage() == aImgLightOn);
}
void Svx3DWin::SetUILightState( ImageButton& aBtn, bool bState )
@@ -2718,7 +2718,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
aBtnLightColor.Enable( bEnable );
pLb->Enable( bEnable );
- ClickLightHdl( pBtn );
+ ClickLight(*pBtn);
bUpdatePreview = sal_True;
}
// Textures
@@ -2950,45 +2950,30 @@ IMPL_LINK( Svx3DWin, ModifyHdl, void*, pField )
// -----------------------------------------------------------------------
-IMPL_LINK( Svx3DWin, ClickLightHdl, PushButton*, pBtn )
+void Svx3DWin::ClickLight(PushButton& rBtn)
{
-
- if( pBtn )
- {
- sal_uInt16 nLightSource = GetLightSource( pBtn );
- ColorLB* pLb = GetLbByButton( pBtn );
- Color aColor( pLb->GetSelectEntryColor() );
- SfxItemSet aLightItemSet(aCtlLightPreview.GetSvx3DLightControl().Get3DAttributes());
- const bool bOnOff(GetUILightState( *(ImageButton*)pBtn ));
-
- switch(nLightSource)
- {
- case 0: aLightItemSet.Put(Svx3DLightcolor1Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff1Item(bOnOff)); break;
- case 1: aLightItemSet.Put(Svx3DLightcolor2Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff2Item(bOnOff)); break;
- case 2: aLightItemSet.Put(Svx3DLightcolor3Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff3Item(bOnOff)); break;
- case 3: aLightItemSet.Put(Svx3DLightcolor4Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff4Item(bOnOff)); break;
- case 4: aLightItemSet.Put(Svx3DLightcolor5Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff5Item(bOnOff)); break;
- case 5: aLightItemSet.Put(Svx3DLightcolor6Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff6Item(bOnOff)); break;
- case 6: aLightItemSet.Put(Svx3DLightcolor7Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff7Item(bOnOff)); break;
- default:
- case 7: aLightItemSet.Put(Svx3DLightcolor8Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff8Item(bOnOff)); break;
- }
-
- aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes(aLightItemSet);
- aCtlLightPreview.GetSvx3DLightControl().SelectLight(nLightSource);
- aCtlLightPreview.CheckSelection();
- }
- return( 0L );
-}
-
-
-// -----------------------------------------------------------------------
-IMPL_LINK_NOARG(Svx3DWin, DoubleClickHdl)
-{
- // and assign
- ClickAssignHdl( NULL );
-
- return( 0L );
+ sal_uInt16 nLightSource = GetLightSource( &rBtn );
+ ColorLB* pLb = GetLbByButton( &rBtn );
+ Color aColor( pLb->GetSelectEntryColor() );
+ SfxItemSet aLightItemSet(aCtlLightPreview.GetSvx3DLightControl().Get3DAttributes());
+ const bool bOnOff(GetUILightState( (const ImageButton&)rBtn ));
+
+ switch(nLightSource)
+ {
+ case 0: aLightItemSet.Put(Svx3DLightcolor1Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff1Item(bOnOff)); break;
+ case 1: aLightItemSet.Put(Svx3DLightcolor2Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff2Item(bOnOff)); break;
+ case 2: aLightItemSet.Put(Svx3DLightcolor3Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff3Item(bOnOff)); break;
+ case 3: aLightItemSet.Put(Svx3DLightcolor4Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff4Item(bOnOff)); break;
+ case 4: aLightItemSet.Put(Svx3DLightcolor5Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff5Item(bOnOff)); break;
+ case 5: aLightItemSet.Put(Svx3DLightcolor6Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff6Item(bOnOff)); break;
+ case 6: aLightItemSet.Put(Svx3DLightcolor7Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff7Item(bOnOff)); break;
+ default:
+ case 7: aLightItemSet.Put(Svx3DLightcolor8Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff8Item(bOnOff)); break;
+ }
+
+ aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes(aLightItemSet);
+ aCtlLightPreview.GetSvx3DLightControl().SelectLight(nLightSource);
+ aCtlLightPreview.CheckSelection();
}
// -----------------------------------------------------------------------
diff --git a/unusedcode.easy b/unusedcode.easy
index 54e6686..e9ee73b 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -201,8 +201,6 @@ SvXMLTokenMap_Impl::Insert(SvXMLTokenMapEntry_Impl* const*, unsigned short)
SvXMLTokenMap_Impl::Insert(SvXMLTokenMap_Impl const*, unsigned short, unsigned short)
SvXMLTokenMap_Impl::Remove(SvXMLTokenMapEntry_Impl* const&, unsigned short)
SvXMLTokenMap_Impl::Remove(unsigned short, unsigned short)
-Svx3DWin::LinkStubClickLightHdl(void*, void*)
-Svx3DWin::LinkStubDoubleClickHdl(void*, void*)
SvxAreaTabPage::LinkStubClickBitmapHdl_Impl(void*, void*)
SvxAreaTabPage::LinkStubClickColorHdl_Impl(void*, void*)
SvxAreaTabPage::LinkStubClickGradientHdl_Impl(void*, void*)
commit 8a8e3035045c9a72d644e56b597e7f7461134577
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 6 00:16:37 2012 +0000
ScNameDefDlg::EdModifyHdl just calls IsNameValid, doesn't need to be a Link
diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index ddccd37..aebaa8f 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -91,7 +91,6 @@ private:
DECL_LINK( CancelBtnHdl, void * );
DECL_LINK( AddBtnHdl, void* );
DECL_LINK( NameModifyHdl, void* );
- DECL_LINK( EdModifyHdl, void * );
DECL_LINK( AssignGetFocusHdl, void * );
DECL_LINK( MoreBtnHdl, void* );
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 282c47a..fe383d7 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -309,7 +309,7 @@ sal_Bool ScNameDefDlg::IsRefInputMode() const
void ScNameDefDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
- EdModifyHdl(&maEdRange);
+ IsNameValid();
}
void ScNameDefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
@@ -393,15 +393,9 @@ IMPL_LINK_NOARG(ScNameDefDlg, NameModifyHdl)
return 0;
}
-IMPL_LINK_NOARG(ScNameDefDlg, EdModifyHdl)
-{
- IsNameValid();
- return 0;
-}
-
IMPL_LINK_NOARG(ScNameDefDlg, AssignGetFocusHdl)
{
- EdModifyHdl( &maEdRange );
+ IsNameValid();
return 0;
}
diff --git a/unusedcode.easy b/unusedcode.easy
index baa7669..54e6686 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -89,7 +89,6 @@ ScHTMLColOffset::Remove(unsigned long const&, unsigned short)
ScHTMLColOffset_SAR::Replace(unsigned long const&, unsigned short)
ScHTMLColOffset_SAR::Replace(unsigned long const*, unsigned short, unsigned short)
ScHTMLColOffset_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned long const&, void*), void*)
-ScNameDefDlg::LinkStubEdModifyHdl(void*, void*)
ScNamedRangeObj::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>)
ScRTFColTwips::Insert(ScRTFColTwips const*, unsigned short, unsigned short)
ScRTFColTwips::Insert(unsigned long const&, unsigned short&)
commit 7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Mar 5 21:02:45 2012 +0000
Related: rhbz#799628 crash with chewing-IM with g3g
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 112e066..1cd1bd0 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3984,8 +3984,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
g_slist_free (attr_list);
// Set the sal attributes on our text
- for (int i = start; i < end; i++)
+ for (int i = start; i < end; ++i)
+ {
+ SAL_WARN_IF(i >= static_cast<int>(pThis->m_aInputFlags.size()),
+ "vcl.gtk", "pango attrib out of range?");
+ if (i >= static_cast<int>(pThis->m_aInputFlags.size()))
+ continue;
pThis->m_aInputFlags[i] |= sal_attr;
+ }
} while (pango_attr_iterator_next (iter));
pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
More information about the Libreoffice-commits
mailing list