summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/bibliography/bibload.cxx1
-rw-r--r--extensions/source/bibliography/general.cxx1
-rw-r--r--extensions/source/bibliography/toolbar.cxx2
-rw-r--r--filter/source/flash/swfdialog.cxx1
-rw-r--r--filter/source/flash/swfwriter1.cxx1
-rw-r--r--filter/source/pdf/impdialog.cxx1
-rw-r--r--filter/source/pdf/impdialog.hxx2
-rw-r--r--filter/source/pdf/pdfdialog.cxx1
-rw-r--r--filter/source/pdf/pdfexport.cxx1
-rw-r--r--filter/source/pdf/pdffilter.hxx1
-rw-r--r--filter/source/pdf/pdfinteract.hxx1
-rw-r--r--filter/source/svg/svgdialog.cxx1
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx1
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.hxx1
-rw-r--r--filter/source/xsltfilter/OleHandler.hxx1
-rw-r--r--include/svtools/valueset.hxx3
-rw-r--r--include/vcl/button.hxx2
-rw-r--r--include/vcl/layout.hxx26
-rw-r--r--include/vcl/scrbar.hxx2
-rw-r--r--include/vcl/window.hxx20
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--sfx2/source/appl/shutdowniconaqua.mm1
-rw-r--r--svtools/source/control/valueset.cxx2
-rw-r--r--vcl/source/window/layout.cxx90
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--winaccessibility/source/UAccCOM/AccTextBase.cxx1
-rw-r--r--winaccessibility/source/service/AccEventListener.cxx5
-rw-r--r--winaccessibility/source/service/AccTopWindowListener.cxx1
28 files changed, 93 insertions, 81 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 8a732ccb2b58..3d9f5c250c39 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -62,7 +62,6 @@
#include <bibconfig.hxx>
#include <cppuhelper/implbase4.hxx>
-using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 7c2ca8d81842..26a2512774e2 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -51,7 +51,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::sdb;
-using namespace ::rtl;
static OUString lcl_GetColumnName( const Mapping* pMapping, sal_uInt16 nIndexPos )
{
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 2a5d07b55fd1..bf7e81ded27c 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -281,7 +281,7 @@ void BibToolBar::InitListener()
pListener=new BibToolBarListener(this,aURL.Complete,nId);
}
- BibToolBarListenerRef* pxInsert = new Reference<frame::XStatusListener>;
+ BibToolBarListenerRef* pxInsert = new uno::Reference<frame::XStatusListener>;
(*pxInsert) = pListener;
aListenerArr.push_back( pxInsert );
xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pListener),aURL);
diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx
index 1b5f5fa287f4..2af211dc8728 100644
--- a/filter/source/flash/swfdialog.cxx
+++ b/filter/source/flash/swfdialog.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-using namespace ::rtl;
using namespace ::vcl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 13b38c1040df..e2c34c10f8ef 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -40,7 +40,6 @@
using namespace ::swf;
using namespace ::std;
-using namespace ::rtl;
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index b2e6cec13135..20e0350a80ac 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -54,6 +54,7 @@ PDFFilterResId::PDFFilterResId( sal_uInt32 nId ) : ResId( nId, getPDFFilterResMg
using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
// tabbed PDF dialog implementation
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 244d4b904552..42f5c2ac3ec1 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -167,7 +167,7 @@ public:
ImpPDFTabDialog( vcl::Window* pParent,
Sequence< PropertyValue >& rFilterData,
- const Reference< XComponent >& rDoc
+ const css::uno::Reference< XComponent >& rDoc
);
virtual ~ImpPDFTabDialog();
diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx
index 02d6a8e374e2..9db0eb60f8a7 100644
--- a/filter/source/pdf/pdfdialog.cxx
+++ b/filter/source/pdf/pdfdialog.cxx
@@ -25,7 +25,6 @@
#include <svl/solar.hrc>
#include <com/sun/star/view/XRenderable.hpp>
-using namespace ::rtl;
using namespace ::vcl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 749dbb8cc1bf..9fdc626d6320 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -76,7 +76,6 @@
#include "com/sun/star/graphic/XGraphicProvider.hpp"
#include <boost/scoped_ptr.hpp>
-using namespace ::rtl;
using namespace ::vcl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/filter/source/pdf/pdffilter.hxx b/filter/source/pdf/pdffilter.hxx
index 584405aab73d..c4b28faedc82 100644
--- a/filter/source/pdf/pdffilter.hxx
+++ b/filter/source/pdf/pdffilter.hxx
@@ -44,7 +44,6 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
-using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/filter/source/pdf/pdfinteract.hxx b/filter/source/pdf/pdfinteract.hxx
index cbe46a106dfc..fc4d852a656d 100644
--- a/filter/source/pdf/pdfinteract.hxx
+++ b/filter/source/pdf/pdfinteract.hxx
@@ -25,7 +25,6 @@
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/task/XInteractionHandler2.hpp"
-using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx
index ee307a3c27ff..3243eb5f8670 100644
--- a/filter/source/svg/svgdialog.cxx
+++ b/filter/source/svg/svgdialog.cxx
@@ -32,7 +32,6 @@
#define SVG_DIALOG_IMPLEMENTATION_NAME SVG_DIALOG_SERVICE_NAME
#define SVG_FILTER_DATA_NAME "FilterData"
-using namespace ::rtl;
using namespace ::vcl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index 6e55c266787d..7c62fd803efe 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -44,7 +44,6 @@
#include "xmlfiltersettingsdialog.hxx"
-using namespace ::rtl;
using namespace ::cppu;
using namespace ::osl;
using namespace ::com::sun::star::uno;
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index cfdead8b11f2..cc078b9eb5c4 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -37,7 +37,6 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/xml/xslt/XXSLTTransformer.hpp>
-using namespace ::rtl;
using namespace ::cppu;
using namespace ::osl;
using namespace ::com::sun::star::beans;
diff --git a/filter/source/xsltfilter/OleHandler.hxx b/filter/source/xsltfilter/OleHandler.hxx
index 799226fb9d11..d1d9ad8acea8 100644
--- a/filter/source/xsltfilter/OleHandler.hxx
+++ b/filter/source/xsltfilter/OleHandler.hxx
@@ -41,7 +41,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::io;
-using namespace ::rtl;
namespace XSLT
{
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index e82a4b4ce353..4ddc64db36e4 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -177,7 +177,6 @@ to be set (before Show) with SetStyle().
*************************************************************************/
typedef std::vector<ValueSetItem*> ValueItemList;
-typedef boost::scoped_ptr<ScrollBar> ScrollBarPtr;
typedef boost::scoped_ptr<ValueSetItem> ValueSetItemPtr;
// - ValueSet types -
@@ -202,7 +201,7 @@ private:
Timer maTimer;
ValueItemList mItemList;
ValueSetItemPtr mpNoneItem;
- ScrollBarPtr mpScrollBar;
+ boost::scoped_ptr<ScrollBar> mpScrollBar;
Rectangle maNoneItemRect;
Rectangle maItemListRect;
long mnItemWidth;
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 6c9384cdd5c5..9f5142aebf3a 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -566,6 +566,8 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
};
+typedef rtl::Reference<DisclosureButton> DisclosureButtonPtr;
+
#endif // INCLUDED_VCL_BUTTON_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 0eed7cb6f723..88f1887750a8 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -513,29 +513,29 @@ public:
VclExpander(vcl::Window *pParent)
: VclBin(pParent)
, m_bResizeTopLevel(true)
- , m_aDisclosureButton(this)
+ , m_pDisclosureButton(new DisclosureButton(this))
{
- m_aDisclosureButton.SetToggleHdl(LINK(this, VclExpander, ClickHdl));
- m_aDisclosureButton.Show();
+ m_pDisclosureButton->SetToggleHdl(LINK(this, VclExpander, ClickHdl));
+ m_pDisclosureButton->Show();
}
virtual vcl::Window *get_child() SAL_OVERRIDE;
virtual const vcl::Window *get_child() const SAL_OVERRIDE;
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
bool get_expanded() const
{
- return m_aDisclosureButton.IsChecked();
+ return m_pDisclosureButton->IsChecked();
}
void set_expanded(bool bExpanded)
{
- m_aDisclosureButton.Check(bExpanded);
+ m_pDisclosureButton->Check(bExpanded);
}
void set_label(const OUString& rLabel)
{
- m_aDisclosureButton.SetText(rLabel);
+ m_pDisclosureButton->SetText(rLabel);
}
OUString get_label() const
{
- return m_aDisclosureButton.GetText();
+ return m_pDisclosureButton->GetText();
}
virtual void StateChanged(StateChangedType nType) SAL_OVERRIDE;
void SetExpandedHdl( const Link& rLink ) { maExpandedHdl = rLink; }
@@ -543,9 +543,10 @@ public:
protected:
virtual Size calculateRequisition() const SAL_OVERRIDE;
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
+ void dispose() SAL_OVERRIDE { m_pDisclosureButton.clear(); VclBin::dispose(); }
private:
bool m_bResizeTopLevel;
- DisclosureButton m_aDisclosureButton;
+ DisclosureButtonPtr m_pDisclosureButton;
Link maExpandedHdl;
DECL_DLLPRIVATE_LINK(ClickHdl, DisclosureButton* pBtn);
};
@@ -557,8 +558,8 @@ public:
virtual vcl::Window *get_child() SAL_OVERRIDE;
virtual const vcl::Window *get_child() const SAL_OVERRIDE;
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
- ScrollBar& getVertScrollBar() { return m_aVScroll; }
- ScrollBar& getHorzScrollBar() { return m_aHScroll; }
+ ScrollBar& getVertScrollBar() { return *m_pVScroll.get(); }
+ ScrollBar& getHorzScrollBar() { return *m_pHScroll.get(); }
Size getVisibleChildSize() const;
//set to true to disable the built-in scrolling callbacks to allow the user
//to override it
@@ -569,10 +570,11 @@ protected:
DECL_LINK(ScrollBarHdl, void *);
void InitScrollBars(const Size &rRequest);
virtual bool Notify(NotifyEvent& rNEvt) SAL_OVERRIDE;
+ void dispose() SAL_OVERRIDE { m_pVScroll.clear(); m_pHScroll.clear(); VclBin::dispose(); }
private:
bool m_bUserManagedScrolling;
- ScrollBar m_aVScroll;
- ScrollBar m_aHScroll;
+ ScrollBarPtr m_pVScroll;
+ ScrollBarPtr m_pHScroll;
ScrollBarBox m_aScrollBarBox;
};
diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx
index 65bbca0dc2fe..db0a673842d7 100644
--- a/include/vcl/scrbar.hxx
+++ b/include/vcl/scrbar.hxx
@@ -141,6 +141,8 @@ public:
virtual Size GetOptimalSize() const SAL_OVERRIDE;
};
+typedef rtl::Reference<ScrollBar> ScrollBarPtr;
+
// - ScrollBarBox -
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 44ab2c0b5ae9..ec51588f16d1 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -36,6 +36,7 @@
#include <vcl/region.hxx>
#include <vcl/salnativewidgets.hxx>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include <cppuhelper/weakref.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <boost/shared_ptr.hpp>
@@ -399,6 +400,8 @@ private:
// OutputDevice
::OutputDevice* mpOutputDevice;
+ mutable int mnRefCnt; // reference count
+
#ifdef DBG_UTIL
friend const char* ::ImplDbgCheckWindow( const void* pObj );
#endif
@@ -478,8 +481,25 @@ public:
SAL_DLLPRIVATE static void ImplCalcSymbolRect( Rectangle& rRect );
+private:
+ template<typename T> friend class ::rtl::Reference;
+
+ inline void acquire() const
+ {
+ mnRefCnt++;
+ }
+
+ inline void release() const
+ {
+ if (!--mnRefCnt)
+ delete const_cast<Window*>(this);
+ }
+
protected:
+ /** This is intended to be used to clear any locally held references to other Window-subclass objects */
+ virtual void dispose() {}
+
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData );
SAL_DLLPRIVATE Point ImplOutputToFrame( const Point& rPos );
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 121a944a982a..aa8692522c76 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -182,7 +182,7 @@ OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* _pParentD
OFieldExpressionControl::~OFieldExpressionControl()
{
- acquire();
+ WeakImplHelper1::acquire();
uno::Reference< report::XGroups > xGroups = m_pParent->getGroups();
xGroups->removeContainerListener(this);
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index da34fcde6386..d69a207583ea 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -44,7 +44,6 @@
#include <Cocoa/Cocoa.h>
#include "postmac.h"
-using namespace ::rtl;
using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::task;
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index a0d84467386a..f0d6457c0f1a 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -344,7 +344,7 @@ void ValueSet::Format()
long nOff;
long nNoneHeight;
long nNoneSpace;
- ScrollBarPtr pDeletedScrollBar(NULL);
+ boost::scoped_ptr<ScrollBar> pDeletedScrollBar(NULL);
// consider the scrolling
if ( nStyle & WB_VSCROLL )
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 1709f34bb695..5f5ad67ce6f0 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1460,7 +1460,7 @@ const vcl::Window *VclExpander::get_child() const
{
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
- assert(pWindowImpl->mpFirstChild == &m_aDisclosureButton);
+ assert(pWindowImpl->mpFirstChild == m_pDisclosureButton.get());
return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT);
}
@@ -1479,10 +1479,10 @@ Size VclExpander::calculateRequisition() const
const vcl::Window *pChild = get_child();
const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL;
- if (pChild && pChild->IsVisible() && m_aDisclosureButton.IsChecked())
+ if (pChild && pChild->IsVisible() && m_pDisclosureButton->IsChecked())
aRet = getLayoutRequisition(*pChild);
- Size aExpanderSize = getLayoutRequisition(m_aDisclosureButton);
+ Size aExpanderSize = getLayoutRequisition(*m_pDisclosureButton.get());
if (pLabel && pLabel->IsVisible())
{
@@ -1516,7 +1516,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
vcl::Window *pChild = get_child();
vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL;
- Size aButtonSize = getLayoutRequisition(m_aDisclosureButton);
+ Size aButtonSize = getLayoutRequisition(*m_pDisclosureButton.get());
Size aLabelSize;
Size aExpanderSize = aButtonSize;
if (pLabel && pLabel->IsVisible())
@@ -1534,7 +1534,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
long nExtraExpanderHeight = aExpanderSize.Height() - aButtonSize.Height();
Point aButtonPos(aChildPos.X(), aChildPos.Y() + nExtraExpanderHeight/2);
- setLayoutAllocation(m_aDisclosureButton, aButtonPos, aButtonSize);
+ setLayoutAllocation(*m_pDisclosureButton.get(), aButtonPos, aButtonSize);
if (pLabel && pLabel->IsVisible())
{
@@ -1552,7 +1552,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
if (pChild && pChild->IsVisible())
{
- if (!m_aDisclosureButton.IsChecked())
+ if (!m_pDisclosureButton->IsChecked())
aAllocation = Size();
setLayoutAllocation(*pChild, aChildPos, aAllocation);
}
@@ -1577,7 +1577,7 @@ void VclExpander::StateChanged(StateChangedType nType)
{
vcl::Window *pChild = get_child();
if (pChild)
- pChild->Show(m_aDisclosureButton.IsChecked());
+ pChild->Show(m_pDisclosureButton->IsChecked());
}
}
@@ -1599,15 +1599,15 @@ IMPL_LINK( VclExpander, ClickHdl, DisclosureButton*, pBtn )
VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent, WinBits nStyle)
: VclBin(pParent, nStyle)
, m_bUserManagedScrolling(false)
- , m_aVScroll(this, WB_HIDE | WB_VERT)
- , m_aHScroll(this, WB_HIDE | WB_HORZ)
+ , m_pVScroll(new ScrollBar(this, WB_HIDE | WB_VERT))
+ , m_pHScroll(new ScrollBar(this, WB_HIDE | WB_HORZ))
, m_aScrollBarBox(this, WB_HIDE)
{
SetType(WINDOW_SCROLLWINDOW);
Link aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) );
- m_aVScroll.SetScrollHdl(aLink);
- m_aHScroll.SetScrollHdl(aLink);
+ m_pVScroll->SetScrollHdl(aLink);
+ m_pHScroll->SetScrollHdl(aLink);
}
IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl)
@@ -1625,14 +1625,14 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl)
Point aWinPos;
- if (m_aHScroll.IsVisible())
+ if (m_pHScroll->IsVisible())
{
- aWinPos.X() = -m_aHScroll.GetThumbPos();
+ aWinPos.X() = -m_pHScroll->GetThumbPos();
}
- if (m_aVScroll.IsVisible())
+ if (m_pVScroll->IsVisible())
{
- aWinPos.Y() = -m_aVScroll.GetThumbPos();
+ aWinPos.Y() = -m_pVScroll->GetThumbPos();
}
pChild->SetPosPixel(aWinPos);
@@ -1661,10 +1661,10 @@ Size VclScrolledWindow::calculateRequisition() const
aRet = getLayoutRequisition(*pChild);
if (GetStyle() & WB_VSCROLL)
- aRet.Width() += getLayoutRequisition(m_aVScroll).Width();
+ aRet.Width() += getLayoutRequisition(*m_pVScroll.get()).Width();
if (GetStyle() & WB_HSCROLL)
- aRet.Height() += getLayoutRequisition(m_aHScroll).Height();
+ aRet.Height() += getLayoutRequisition(*m_pHScroll.get()).Height();
return aRet;
}
@@ -1677,18 +1677,18 @@ void VclScrolledWindow::InitScrollBars(const Size &rRequest)
Size aOutSize(getVisibleChildSize());
- if (m_aVScroll.IsVisible())
+ if (m_pVScroll->IsVisible())
{
- m_aVScroll.SetRangeMax(rRequest.Height());
- m_aVScroll.SetVisibleSize(aOutSize.Height());
- m_aVScroll.SetPageSize(16);
+ m_pVScroll->SetRangeMax(rRequest.Height());
+ m_pVScroll->SetVisibleSize(aOutSize.Height());
+ m_pVScroll->SetPageSize(16);
}
- if (m_aHScroll.IsVisible())
+ if (m_pHScroll->IsVisible())
{
- m_aHScroll.SetRangeMax(rRequest.Width());
- m_aHScroll.SetVisibleSize(aOutSize.Width());
- m_aHScroll.SetPageSize(16);
+ m_pHScroll->SetRangeMax(rRequest.Width());
+ m_pHScroll->SetVisibleSize(aOutSize.Width());
+ m_pHScroll->SetPageSize(16);
}
}
@@ -1706,51 +1706,51 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
// vert. ScrollBar
if (GetStyle() & WB_AUTOVSCROLL)
{
- m_aVScroll.Show(nAvailHeight < aChildReq.Height());
+ m_pVScroll->Show(nAvailHeight < aChildReq.Height());
}
- if (m_aVScroll.IsVisible())
- nAvailWidth -= getLayoutRequisition(m_aVScroll).Width();
+ if (m_pVScroll->IsVisible())
+ nAvailWidth -= getLayoutRequisition(*m_pVScroll.get()).Width();
// horz. ScrollBar
if (GetStyle() & WB_AUTOHSCROLL)
{
bool bShowHScroll = nAvailWidth < aChildReq.Width();
- m_aHScroll.Show(bShowHScroll);
+ m_pHScroll->Show(bShowHScroll);
if (bShowHScroll)
- nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
+ nAvailHeight -= getLayoutRequisition(*m_pHScroll.get()).Height();
if (GetStyle() & WB_AUTOVSCROLL)
- m_aVScroll.Show(nAvailHeight < aChildReq.Height());
+ m_pVScroll->Show(nAvailHeight < aChildReq.Height());
}
Size aInnerSize(aChildAllocation);
long nScrollBarWidth = 0, nScrollBarHeight = 0;
- if (m_aVScroll.IsVisible())
+ if (m_pVScroll->IsVisible())
{
- nScrollBarWidth = getLayoutRequisition(m_aVScroll).Width();
+ nScrollBarWidth = getLayoutRequisition(*m_pVScroll.get()).Width();
Point aScrollPos(rAllocation.Width() - nScrollBarWidth, 0);
Size aScrollSize(nScrollBarWidth, rAllocation.Height());
- setLayoutAllocation(m_aVScroll, aScrollPos, aScrollSize);
+ setLayoutAllocation(*m_pVScroll.get(), aScrollPos, aScrollSize);
aChildAllocation.Width() -= nScrollBarWidth;
aInnerSize.Width() -= nScrollBarWidth;
aChildAllocation.Height() = aChildReq.Height();
}
- if (m_aHScroll.IsVisible())
+ if (m_pHScroll->IsVisible())
{
- nScrollBarHeight = getLayoutRequisition(m_aHScroll).Height();
+ nScrollBarHeight = getLayoutRequisition(*m_pHScroll.get()).Height();
Point aScrollPos(0, rAllocation.Height() - nScrollBarHeight);
Size aScrollSize(rAllocation.Width(), nScrollBarHeight);
- setLayoutAllocation(m_aHScroll, aScrollPos, aScrollSize);
+ setLayoutAllocation(*m_pHScroll.get(), aScrollPos, aScrollSize);
aChildAllocation.Height() -= nScrollBarHeight;
aInnerSize.Height() -= nScrollBarHeight;
aChildAllocation.Width() = aChildReq.Width();
}
- if (m_aVScroll.IsVisible() && m_aHScroll.IsVisible())
+ if (m_pVScroll->IsVisible() && m_pHScroll->IsVisible())
{
Point aBoxPos(aInnerSize.Width(), aInnerSize.Height());
m_aScrollBarBox.SetPosSizePixel(aBoxPos, Size(nScrollBarWidth, nScrollBarHeight));
@@ -1774,18 +1774,18 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
Size VclScrolledWindow::getVisibleChildSize() const
{
Size aRet(GetSizePixel());
- if (m_aVScroll.IsVisible())
- aRet.Width() -= m_aVScroll.GetSizePixel().Width();
- if (m_aHScroll.IsVisible())
- aRet.Height() -= m_aHScroll.GetSizePixel().Height();
+ if (m_pVScroll->IsVisible())
+ aRet.Width() -= m_pVScroll->GetSizePixel().Width();
+ if (m_pHScroll->IsVisible())
+ aRet.Height() -= m_pHScroll->GetSizePixel().Height();
return aRet;
}
bool VclScrolledWindow::set_property(const OString &rKey, const OString &rValue)
{
bool bRet = VclBin::set_property(rKey, rValue);
- m_aVScroll.Show((GetStyle() & WB_VSCROLL) != 0);
- m_aHScroll.Show((GetStyle() & WB_HSCROLL) != 0);
+ m_pVScroll->Show((GetStyle() & WB_VSCROLL) != 0);
+ m_pHScroll->Show((GetStyle() & WB_HSCROLL) != 0);
return bRet;
}
@@ -1800,7 +1800,7 @@ bool VclScrolledWindow::Notify(NotifyEvent& rNEvt)
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) )
{
- nDone = HandleScrollCommand(rCEvt, &m_aHScroll, &m_aVScroll);
+ nDone = HandleScrollCommand(rCEvt, m_pHScroll.get(), m_pVScroll.get());
}
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e03f98937ffc..a8617ae7a4a6 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -137,6 +137,8 @@ Window::~Window()
DBG_ASSERT( !mpWindowImpl->mbInDtor, "~Window - already in DTOR!" );
+ dispose();
+
// remove Key and Mouse events issued by Application::PostKey/MouseEvent
Application::RemoveMouseAndKeyEvents( this );
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index d73f8e3db11e..156ef30c21eb 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -36,7 +36,6 @@
using namespace com::sun::star::accessibility;
using namespace com::sun::star::uno;
-using namespace rtl;
// Construction/Destruction
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
index 7874f4706321..7b8811625754 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -40,7 +40,6 @@
using namespace com::sun::star::uno;
using namespace com::sun::star::accessibility;
-using namespace rtl;
using namespace cppu;
AccEventListener::AccEventListener(com::sun::star::accessibility::XAccessible* pAcc,
@@ -202,7 +201,7 @@ void AccEventListener::FireStatePropertyChange(short /*state*/, bool set )
*/
short AccEventListener::GetRole()
{
- Reference<com::sun::star::accessibility::XAccessibleContext> const
+ css::uno::Reference<com::sun::star::accessibility::XAccessibleContext> const
xContext(m_xAccessible->getAccessibleContext());
if(xContext.is())
{
@@ -235,7 +234,7 @@ void AccEventListener::RemoveMeFromBroadcaster()
}
try
{
- Reference<XAccessibleEventBroadcaster> const xBroadcaster(
+ css::uno::Reference<XAccessibleEventBroadcaster> const xBroadcaster(
m_xAccessible->getAccessibleContext(), UNO_QUERY);
if (xBroadcaster.is())
{
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx
index ef89bfb0299d..e18c0c346352 100644
--- a/winaccessibility/source/service/AccTopWindowListener.cxx
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -41,7 +41,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::bridge;
using namespace com::sun::star::awt;
-using namespace rtl;
using namespace cppu;
/**