summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-25 08:43:20 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-27 07:52:36 +0000
commitb0c1ad45408de8d328ce4c6d707ec7ab3b62dbc6 (patch)
treeeec5174099499774f16b50176636252cda7c17bc /svx
parent01ee29125610a0fe4d6dcb080da09e3961f1236a (diff)
fixes for up-casting to Reference<XInterface>
Fix regressions introduced with 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new type-checking Reference constructor to reduce code noise" Signed-off-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 533c6cb6bad6ef0432e8eebbfd4daf90ef71f3b4) Conflicts: framework/source/uifactory/menubarfactory.cxx Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687 Reviewed-on: https://gerrit.libreoffice.org/9921 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmobj.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmtools.cxx2
-rw-r--r--svx/source/form/fmundo.cxx4
-rw-r--r--svx/source/form/fmvwimp.cxx2
-rw-r--r--svx/source/form/formcontroller.cxx6
-rw-r--r--svx/source/form/navigatortree.cxx2
7 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index f4321fb62a41..b658a8b70fc7 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -586,7 +586,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
}
while ( nTokIndex >= 0 );
- return xDestContainer;
+ return Reference<XInterface>( xDestContainer, UNO_QUERY );
}
//------------------------------------------------------------------
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 2865dbdd0b7f..5e5d4d4639b9 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2523,7 +2523,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
m_arrRelativeGridColumn.push_back(-1);
// and for the formatted search...
- pfmscContextInfo->arrFields.push_back(xControl);
+ pfmscContextInfo->arrFields.push_back(Reference<XInterface>( xControl, UNO_QUERY ));
}
}
}
@@ -2712,7 +2712,7 @@ void FmXFormShell::selectionChanged(const EventObject& rEvent) throw(::com::sun:
Reference< XForm > xNewForm( GetForm( rEvent.Source ) );
InterfaceBag aNewSelection;
- aNewSelection.insert( xSelObj );
+ aNewSelection.insert( Reference<XInterface>( xSelObj, UNO_QUERY ) );
if ( setCurrentSelection( aNewSelection ) && IsPropBrwOpen() )
ShowSelectionProperties( sal_True );
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 3cbc67471b9d..fb1a30fdf94a 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -176,7 +176,7 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce
Reference< XInterface > xNormalized( xElement, UNO_QUERY );
- DBG_ASSERT( xElement.is(), "getElementPos: invalid element!" );
+ DBG_ASSERT( xNormalized.is(), "getElementPos: invalid element!" );
if ( xNormalized.is() )
{
// Feststellen an welcher Position sich das Kind befindet
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 313757217c61..c1c53d02fc15 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -794,7 +794,7 @@ void SAL_CALL FmXUndoEnvironment::modified( const EventObject& /*aEvent*/ ) thro
void FmXUndoEnvironment::AddForms(const Reference< XNameContainer > & rForms)
{
Lock();
- AddElement(rForms);
+ AddElement(Reference<XInterface>( rForms, UNO_QUERY ));
UnLock();
}
@@ -802,7 +802,7 @@ void FmXUndoEnvironment::AddForms(const Reference< XNameContainer > & rForms)
void FmXUndoEnvironment::RemoveForms(const Reference< XNameContainer > & rForms)
{
Lock();
- RemoveElement(rForms);
+ RemoveElement(Reference<XInterface>( rForms, UNO_QUERY ));
UnLock();
}
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 4d6ee1a54752..6b24c357bd00 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -370,7 +370,7 @@ void FormViewPageWindowAdapter::setController(const Reference< XForm > & xForm,
// attaching the events
Reference< XEventAttacherManager > xEventManager( xForm->getParent(), UNO_QUERY );
- xEventManager->attach(m_aControllerList.size() - 1, xController, makeAny(xController) );
+ xEventManager->attach(m_aControllerList.size() - 1, Reference<XInterface>( xController, UNO_QUERY ), makeAny(xController) );
}
// jetzt die Subforms durchgehen
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 69cd8553676f..add1ef3b08fa 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -2009,7 +2009,7 @@ void FormController::addToEventAttacher(const Reference< XControl > & xControl)
m_xModelAsIndex->getByIndex(--nPos) >>= xTemp;
if ((XFormComponent*)xComp.get() == (XFormComponent*)xTemp.get())
{
- m_xModelAsManager->attach( nPos, xControl, makeAny(xControl) );
+ m_xModelAsManager->attach( nPos, Reference<XInterface>( xControl, UNO_QUERY ), makeAny(xControl) );
break;
}
}
@@ -2036,7 +2036,7 @@ void FormController::removeFromEventAttacher(const Reference< XControl > & xCont
m_xModelAsIndex->getByIndex(--nPos) >>= xTemp;
if ((XFormComponent*)xComp.get() == (XFormComponent*)xTemp.get())
{
- m_xModelAsManager->detach( nPos, xControl );
+ m_xModelAsManager->detach( nPos, Reference<XInterface>( xControl, UNO_QUERY ) );
break;
}
}
@@ -3043,7 +3043,7 @@ void SAL_CALL FormController::addChildController( const Reference< XFormControll
m_xModelAsIndex->getByIndex(--nPos) >>= xTemp;
if ( xFormOfChild == xTemp )
{
- m_xModelAsManager->attach( nPos, _ChildController, makeAny( _ChildController) );
+ m_xModelAsManager->attach( nPos, Reference<XInterface>( _ChildController, UNO_QUERY ), makeAny( _ChildController) );
break;
}
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 5d47a219118c..4db6eafe835b 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1370,7 +1370,7 @@ namespace svxform
if( pFormShell )
{
InterfaceBag aSelection;
- aSelection.insert( xNewForm );
+ aSelection.insert( Reference<XInterface>( xNewForm, UNO_QUERY ) );
pFormShell->GetImpl()->setCurrentSelection( aSelection );
pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_PROPERTIES,sal_True,sal_True);