summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-01 15:55:01 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-02 00:50:02 +0200
commit526d192333615e8b3b10f144faad987519be1044 (patch)
treeef0553226c3d5aec08de8c6258da725dc541ab0c /sc/source
parent9d17e1250acb7c5c60cdf8d71476c5873b8b4a9b (diff)
Unwind odd reference handling with csvcontrol.
Change-Id: I5002ae13455825b0b7516e228b1e3bad7adc669a
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx41
-rw-r--r--sc/source/ui/inc/csvcontrol.hxx7
2 files changed, 23 insertions, 25 deletions
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 72a437720e3e..b53b5bc5549d 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -59,7 +59,7 @@ ScCsvDiff ScCsvLayoutData::GetDiff( const ScCsvLayoutData& rData ) const
ScCsvControl::ScCsvControl( ScCsvControl& rParent ) :
Control( &rParent, WB_TABSTOP | WB_NODIALOGCONTROL ),
mrData( rParent.GetLayoutData() ),
- mpAccessible( NULL ),
+ mxAccessible( NULL ),
mbValidGfx( false )
{
}
@@ -67,7 +67,7 @@ ScCsvControl::ScCsvControl( ScCsvControl& rParent ) :
ScCsvControl::ScCsvControl( vcl::Window* pParent, const ScCsvLayoutData& rData, WinBits nBits ) :
Control( pParent, nBits ),
mrData( rData ),
- mpAccessible( NULL ),
+ mxAccessible( NULL ),
mbValidGfx( false )
{
}
@@ -79,8 +79,8 @@ ScCsvControl::~ScCsvControl()
void ScCsvControl::dispose()
{
- if( mpAccessible )
- mpAccessible->dispose();
+ if( mxAccessible.is() )
+ mxAccessible->dispose();
Control::dispose();
}
@@ -100,44 +100,44 @@ void ScCsvControl::LoseFocus()
void ScCsvControl::AccSendFocusEvent( bool bFocused )
{
- if( mpAccessible )
- mpAccessible->SendFocusEvent( bFocused );
+ if( mxAccessible.is() )
+ mxAccessible->SendFocusEvent( bFocused );
}
void ScCsvControl::AccSendCaretEvent()
{
- if( mpAccessible )
- mpAccessible->SendCaretEvent();
+ if( mxAccessible.is() )
+ mxAccessible->SendCaretEvent();
}
void ScCsvControl::AccSendVisibleEvent()
{
- if( mpAccessible )
- mpAccessible->SendVisibleEvent();
+ if( mxAccessible.is() )
+ mxAccessible->SendVisibleEvent();
}
void ScCsvControl::AccSendSelectionEvent()
{
- if( mpAccessible )
- mpAccessible->SendSelectionEvent();
+ if( mxAccessible.is() )
+ mxAccessible->SendSelectionEvent();
}
void ScCsvControl::AccSendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows )
{
- if( mpAccessible )
- mpAccessible->SendTableUpdateEvent( nFirstColumn, nLastColumn, bAllRows );
+ if( mxAccessible.is() )
+ mxAccessible->SendTableUpdateEvent( nFirstColumn, nLastColumn, bAllRows );
}
void ScCsvControl::AccSendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
{
- if( mpAccessible )
- mpAccessible->SendInsertColumnEvent( nFirstColumn, nLastColumn );
+ if( mxAccessible.is() )
+ mxAccessible->SendInsertColumnEvent( nFirstColumn, nLastColumn );
}
void ScCsvControl::AccSendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
{
- if( mpAccessible )
- mpAccessible->SendRemoveColumnEvent( nFirstColumn, nLastColumn );
+ if( mxAccessible.is() )
+ mxAccessible->SendRemoveColumnEvent( nFirstColumn, nLastColumn );
}
// repaint helpers ------------------------------------------------------------
@@ -300,9 +300,8 @@ ScMoveMode ScCsvControl::GetVertDirection( sal_uInt16 nCode, bool bHomeEnd )
ScCsvControl::XAccessibleRef ScCsvControl::CreateAccessible()
{
- mpAccessible = ImplCreateAccessible();
- mxAccessible = mpAccessible;
- return mxAccessible;
+ mxAccessible = ImplCreateAccessible();
+ return XAccessibleRef(mxAccessible.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index 3639d6f93eaf..e2fbc49ab943 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -225,16 +225,15 @@ protected:
typedef ::std::vector< OUString > StringVec;
typedef ::std::vector< StringVec > StringVecVec;
- typedef ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible > XAccessibleRef;
+ typedef ::css::uno::Reference<
+ ::css::accessibility::XAccessible > XAccessibleRef;
private:
Link<> maCmdHdl; /// External command handler.
ScCsvCmd maCmd; /// Data of last command.
const ScCsvLayoutData& mrData; /// Shared layout data.
- XAccessibleRef mxAccessible; /// The accessible object of the control.
- ScAccessibleCsvControl* mpAccessible; /// Pointer to the accessible implementation object.
+ rtl::Reference<ScAccessibleCsvControl> mxAccessible; /// Reference to the accessible implementation object.
bool mbValidGfx; /// Content of virtual devices valid?
public: