[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 5 commits - basic/source comphelper/source dbaccess/source filter/source forms/source framework/source scripting/source sd/source svx/source sw/source ucb/source unotools/source vcl/source vcl/unx xmloff/source
Michael Stahl
mstahl at redhat.com
Sun Jun 29 14:50:29 PDT 2014
basic/source/basmgr/basicmanagerrepository.cxx | 3
basic/source/uno/dlgcont.cxx | 2
basic/source/uno/namecont.cxx | 10 +-
comphelper/source/processfactory/processfactory.cxx | 4
dbaccess/source/core/dataaccess/connection.cxx | 2
filter/source/svg/svgexport.cxx | 6 -
filter/source/svg/svgwriter.cxx | 10 +-
forms/source/misc/InterfaceContainer.cxx | 2
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 23 ++--
framework/source/uiconfiguration/uiconfigurationmanager.cxx | 17 ++-
framework/source/uifactory/menubarfactory.cxx | 2
framework/source/uifactory/uielementfactorymanager.cxx | 2
scripting/source/dlgprov/dlgprov.cxx | 4
scripting/source/stringresource/stringresource.cxx | 4
sd/source/core/sdpage2.cxx | 4
sd/source/ui/view/ViewShellBase.cxx | 2
svx/source/form/fmobj.cxx | 2
svx/source/form/fmshimp.cxx | 4
svx/source/form/fmtools.cxx | 2
svx/source/form/fmundo.cxx | 4
svx/source/form/fmvwimp.cxx | 2
svx/source/form/formcontroller.cxx | 6 -
svx/source/form/navigatortree.cxx | 2
sw/source/core/frmedt/feshview.cxx | 2
ucb/source/ucp/file/bc.cxx | 2
ucb/source/ucp/file/filglob.cxx | 8 -
ucb/source/ucp/ftp/ftpcontent.cxx | 2
unotools/source/config/configitem.cxx | 2
vcl/source/gdi/bitmap3.cxx | 28 +++--
vcl/unx/generic/gdi/salgdi2.cxx | 50 +++++-----
xmloff/source/style/XMLClipPropertyHandler.cxx | 7 +
xmloff/source/text/txtparai.cxx | 2
32 files changed, 128 insertions(+), 94 deletions(-)
New commits:
commit f443923eaa3b24757a399bbb66cd66b54dd80c75
Author: Michael Stahl <mstahl at redhat.com>
Date: Sat Jun 28 00:09:43 2014 +0200
fdo#80009: xmloff: ignore excessive fo:clip values
These cause problems in drawinglayer, and nobody needs a 5km clip.
Change-Id: Ic485250413194adbcd0ccf855f12e89e532d7120
(cherry picked from commit 924a28a7b1dc2f89e6940630057557f5f03494df)
Reviewed-on: https://gerrit.libreoffice.org/9947
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx
index 92f145f..ea5518d 100644
--- a/xmloff/source/style/XMLClipPropertyHandler.cxx
+++ b/xmloff/source/style/XMLClipPropertyHandler.cxx
@@ -81,6 +81,13 @@ bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::Any&
!rUnitConverter.convertMeasureToCore( nVal, aToken ) )
break;
+ // fdo#80009 such nonsense could be written via WW8 import fdo#77454
+ if (abs(nVal) > 400000)
+ {
+ SAL_INFO("xmloff.style", "ignoring excessive clip " << aToken);
+ nVal = 0;
+ }
+
switch( nPos )
{
case 0: aCrop.Top = nVal; break;
commit 4db014a70efbf6f25a63348390c79827caf1c12d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 26 21:06:35 2014 +0100
Resolves: fdo#80160 PNG with 1-bit colormap only show black and white
Change-Id: If0c9950c18e6091fafea47954a4654db436a3a44
(cherry picked from commit 986c0451d05e7bb6ff7edd9f27d0e45532bcd22c)
(cherry picked from commit c1df0c41b602ac144fdde4efcf546549443afa86)
Reviewed-on: https://gerrit.libreoffice.org/9929
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index 5c53635..b92657f 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -445,6 +445,32 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY,
copyBits ( aPosAry, 0 );
}
+namespace
+{
+ void setForeBack(XGCValues& rValues, const SalColormap& rColMap, const SalBitmap& rSalBitmap)
+ {
+ rValues.foreground = rColMap.GetWhitePixel();
+ rValues.background = rColMap.GetBlackPixel();
+
+ //fdo#33455 and fdo#80160 handle 1 bit depth pngs with palette entries
+ //to set fore/back colors
+ SalBitmap& rBitmap = const_cast<SalBitmap&>(rSalBitmap);
+ if (BitmapBuffer* pBitmapBuffer = rBitmap.AcquireBuffer(true))
+ {
+ const BitmapPalette& rPalette = pBitmapBuffer->maPalette;
+ if (rPalette.GetEntryCount() == 2)
+ {
+ const BitmapColor aWhite(rPalette[rPalette.GetBestIndex(Color(COL_WHITE))]);
+ rValues.foreground = rColMap.GetPixel(ImplColorToSal(aWhite));
+
+ const BitmapColor aBlack(rPalette[rPalette.GetBestIndex(Color(COL_BLACK))]);
+ rValues.background = rColMap.GetPixel(ImplColorToSal(aBlack));
+ }
+ rBitmap.ReleaseBuffer(pBitmapBuffer, true);
+ }
+ }
+}
+
void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
{
const SalDisplay* pSalDisp = GetDisplay();
@@ -460,24 +486,7 @@ void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSa
{
// set foreground/background values for 1Bit bitmaps
XGetGCValues( pXDisp, aGC, nValues, &aOldVal );
-
- aNewVal.foreground = rColMap.GetWhitePixel();
- aNewVal.background = rColMap.GetBlackPixel();
-
- //fdo#33455 handle 1 bit depth pngs with palette entries
- //to set fore/back colors
- if (const BitmapBuffer* pBitmapBuffer = const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(true))
- {
- const BitmapPalette& rPalette = pBitmapBuffer->maPalette;
- if (rPalette.GetEntryCount() == 2)
- {
- const BitmapColor aBlack( rPalette[rPalette.GetBestIndex( Color( COL_BLACK ) )] );
- const BitmapColor aWhite( rPalette[rPalette.GetBestIndex( Color( COL_WHITE ) )] );
- aNewVal.foreground = rColMap.GetPixel(ImplColorToSal(aWhite));
- aNewVal.background = rColMap.GetPixel(ImplColorToSal(aBlack));
- }
- }
-
+ setForeBack(aNewVal, rColMap, rSalBitmap);
XChangeGC( pXDisp, aGC, nValues, &aNewVal );
}
@@ -530,13 +539,12 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect& rPosAry,
{
GC aTmpGC;
XGCValues aValues;
- const SalColormap& rColMap = pSalDisp->GetColormap( m_nXScreen );
- const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel();
+ setForeBack(aValues, pSalDisp->GetColormap(m_nXScreen), rSalBitmap);
const int nValues = GCFunction | GCForeground | GCBackground;
SalTwoRect aTmpRect( rPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0;
// draw paint bitmap in pixmap #1
- aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack;
+ aValues.function = GXcopy;
aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues );
static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aFG, m_nXScreen, nDepth, aTmpRect, aTmpGC );
DBG_TESTTRANS( aFG );
commit c97f745f328dd2cfccfcda5ed6460aae0085251a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 25 16:36:28 2014 +0100
Related: fdo#33455 retain color on scaling of 1 bit depth pngs
load test doc and zoom in and out and at certain zoom levels
its correctly black and at others its red
(cherry picked from commit be9d65bb5f5a83c19eec02a037b8f808de70ecb8)
Change-Id: I445ce672742ddb6d6592ef419bf5e14c5f09a5b5
Reviewed-on: https://gerrit.libreoffice.org/9923
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 4fbe1b8..ede020c 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -857,9 +857,7 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32
{
bool bRetval(false);
-#ifdef DBG_UTIL
const sal_uInt16 nStartCount(GetBitCount());
-#endif
if(basegfx::fTools::equalZero(rScaleX) || basegfx::fTools::equalZero(rScaleY))
{
@@ -873,6 +871,22 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32
bRetval = true;
}
+ //fdo#33455
+ //
+ //If we start with a 1 bit image, then after scaling it in any mode except
+ //BMP_SCALE_FAST we have a a 24bit image which is perfectly correct, but we
+ //are going to down-shift it to mono again and Bitmap::ImplMakeMono just
+ //has "Bitmap aNewBmp( GetSizePixel(), 1 );" to create a 1 bit bitmap which
+ //will default to black/white and the colors mapped to which ever is closer
+ //to black/white
+ //
+ //So the easiest thing to do to retain the colors of 1 bit bitmaps is to
+ //just use the fast scale rather than attempting to count unique colors in
+ //the other converters and pass all the info down through
+ //Bitmap::ImplMakeMono
+ if (nStartCount == 1 && nScaleFlag != BMP_SCALE_NONE)
+ nScaleFlag = BMP_SCALE_FAST;
+
switch(nScaleFlag)
{
case BMP_SCALE_NONE :
@@ -892,7 +906,7 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32
}
case BMP_SCALE_SUPER :
{
- if(GetSizePixel().Width() < 2 || GetSizePixel().Height() < 2)
+ if (GetSizePixel().Width() < 2 || GetSizePixel().Height() < 2)
{
// fallback to ImplScaleFast
bRetval = ImplScaleFast( rScaleX, rScaleY );
@@ -934,13 +948,7 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32
}
}
-#ifdef DBG_UTIL
- if(bRetval && nStartCount != GetBitCount())
- {
- OSL_ENSURE(false, "Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)");
- }
-#endif
-
+ OSL_ENSURE(!bRetval || nStartCount == GetBitCount(), "Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)");
return bRetval;
}
commit 22a09c25c8f56e3aab3ac1de6009461b4f063862
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 25 08:43:20 2014 +0200
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 at 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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 4aece49..7228b8b 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -381,9 +381,10 @@ namespace basic
//--------------------------------------------------------------------
BasicManagerPointer& ImplRepository::impl_getLocationForModel( const Reference< XModel >& _rxDocumentModel )
{
+ Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY );
DBG_ASSERT( _rxDocumentModel.is(), "ImplRepository::impl_getLocationForModel: invalid model!" );
- BasicManagerPointer& location = m_aStore[ _rxDocumentModel ];
+ BasicManagerPointer& location = m_aStore[ xNormalized ];
return location;
}
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 1190f2d..c3ee643 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -240,7 +240,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
UNO_QUERY );
::xmlscript::importDialogModel( xInput, xDialogModel, mxContext, mxOwnerDocument );
std::vector< OUString > vEmbeddedImageURLs;
- GraphicObject::InspectForGraphicObjectImageURL( xDialogModel, vEmbeddedImageURLs );
+ GraphicObject::InspectForGraphicObjectImageURL( Reference<XInterface>(xDialogModel, UNO_QUERY), vEmbeddedImageURLs );
if ( !vEmbeddedImageURLs.empty() )
{
// Export the images to the storage
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 28efa64..dfdb2c9 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -297,7 +297,7 @@ void SAL_CALL NameContainer::addContainerListener( const Reference< XContainerLi
throw RuntimeException("addContainerListener called with null xListener",
static_cast< cppu::OWeakObject * >(this));
}
- maContainerListeners.addInterface( xListener );
+ maContainerListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) );
}
void SAL_CALL NameContainer::removeContainerListener( const Reference< XContainerListener >& xListener )
@@ -307,7 +307,7 @@ void SAL_CALL NameContainer::removeContainerListener( const Reference< XContaine
{
throw RuntimeException();
}
- maContainerListeners.removeInterface( xListener );
+ maContainerListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
}
// Methods XChangesNotifier
@@ -318,7 +318,7 @@ void SAL_CALL NameContainer::addChangesListener( const Reference< XChangesListen
{
throw RuntimeException();
}
- maChangesListeners.addInterface( xListener );
+ maChangesListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) );
}
void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesListener >& xListener )
@@ -328,7 +328,7 @@ void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesLis
{
throw RuntimeException();
}
- maChangesListeners.removeInterface( xListener );
+ maChangesListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
}
//============================================================================
@@ -2992,7 +2992,7 @@ void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifie
leaveMethod();
Reference< XModel > xModel = mxOwnerDocument; // weak-ref -> ref
- vba::VBAScriptEvent aEvent( xModel, nIdentifier, rModuleName );
+ vba::VBAScriptEvent aEvent( Reference<XInterface>(xModel, UNO_QUERY), nIdentifier, rModuleName );
maVBAScriptListeners.notify( aEvent );
}
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 32aff0f..c93f966 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -80,14 +80,14 @@ Reference< XComponentContext > getComponentContext(
catch (beans::UnknownPropertyException & e) {
throw DeploymentException(
"unknown service factory DefaultContext property: " + e.Message,
- factory );
+ Reference<XInterface>(factory, UNO_QUERY) );
}
}
if ( !xRet.is() )
{
throw DeploymentException(
"no service factory DefaultContext",
- factory );
+ Reference<XInterface>(factory, UNO_QUERY) );
}
return xRet;
}
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 6f3b682..96eebd0 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -692,7 +692,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s
return aFind->second;
}
}
- return xRet;
+ return Reference<XInterface>(xRet, UNO_QUERY);
}
Reference< XInterface > SAL_CALL OConnection::createInstanceWithArguments( const OUString& _sServiceSpecifier, const Sequence< Any >& /*Arguments*/ ) throw (Exception, RuntimeException)
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 59b8ae4..a9cfc01 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1150,7 +1150,7 @@ void SVGFilter::implExportTextShapeIndex()
{
OUString sTextShapeIdList = mTextShapeIdListMap[xDrawPage].trim();
- const OUString& rPageId = implGetValidIDFromInterface( xDrawPage );
+ const OUString& rPageId = implGetValidIDFromInterface( Reference<XInterface>(xDrawPage, UNO_QUERY) );
if( !rPageId.isEmpty() && !sTextShapeIdList.isEmpty() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, rPageId );
@@ -1710,7 +1710,7 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape,
}
- const OUString& rShapeId = implGetValidIDFromInterface( rxShape );
+ const OUString& rShapeId = implGetValidIDFromInterface( Reference<XInterface>(rxShape, UNO_QUERY) );
if( !rShapeId.isEmpty() )
{
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", rShapeId );
@@ -1892,7 +1892,7 @@ sal_Bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & r
{
// We create a map of text shape ids.
implRegisterInterface( rxShape );
- const OUString& rShapeId = implGetValidIDFromInterface( rxShape );
+ const OUString& rShapeId = implGetValidIDFromInterface( Reference<XInterface>(rxShape, UNO_QUERY) );
if( !rShapeId.isEmpty() )
{
mTextShapeIdListMap[rxPage] += rShapeId;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 3a26b52..b08037f 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -842,7 +842,7 @@ sal_Bool SVGTextWriter::createParagraphEnumeration()
{
if( mrTextShape.is() )
{
- msShapeId = implGetValidIDFromInterface( mrTextShape );
+ msShapeId = implGetValidIDFromInterface( Reference<XInterface>(mrTextShape, UNO_QUERY) );
Reference< XEnumerationAccess > xEnumerationAccess( mrTextShape, UNO_QUERY_THROW );
Reference< XEnumeration > xEnumeration( xEnumerationAccess->createEnumeration(), UNO_QUERY_THROW );
@@ -1006,7 +1006,7 @@ sal_Bool SVGTextWriter::nextParagraph()
return sal_False;
}
- const OUString& rParagraphId = implGetValidIDFromInterface( xTextContent );
+ const OUString& rParagraphId = implGetValidIDFromInterface( Reference<XInterface>(xTextContent, UNO_QUERY) );
if( !rParagraphId.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
@@ -1114,7 +1114,7 @@ sal_Bool SVGTextWriter::nextTextPortion()
{
implRegisterInterface( xPortionTextRange );
- const OUString& rTextPortionId = implGetValidIDFromInterface( xPortionTextRange );
+ const OUString& rTextPortionId = implGetValidIDFromInterface( Reference<XInterface>(xPortionTextRange, UNO_QUERY) );
if( !rTextPortionId.isEmpty() )
{
msHyperlinkIdList += rTextPortionId;
@@ -1566,7 +1566,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
implRegisterInterface( mrCurrentTextParagraph );
// Add the needed info to the BulletListItemMap
- OUString sId = implGetValidIDFromInterface( mrCurrentTextParagraph );
+ OUString sId = implGetValidIDFromInterface( Reference<XInterface>(mrCurrentTextParagraph, UNO_QUERY) );
if( !sId.isEmpty() )
{
sId += ".bp";
@@ -1585,7 +1585,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
}
}
- const OUString& rTextPortionId = implGetValidIDFromInterface( mrCurrentTextPortion );
+ const OUString& rTextPortionId = implGetValidIDFromInterface( Reference<XInterface>(mrCurrentTextPortion, UNO_QUERY) );
if( !rTextPortionId.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rTextPortionId );
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index bab4df8..76bba25 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -261,7 +261,7 @@ void OInterfaceContainer::disposing()
// revoke event knittings
if ( m_xEventAttacher.is() )
{
- m_xEventAttacher->detach( i - 1, xSet );
+ m_xEventAttacher->detach( i - 1, Reference<XInterface>(xSet, UNO_QUERY) );
m_xEventAttacher->removeEntry( i - 1 );
}
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index f67b5c4..6c14f2b 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -490,6 +490,7 @@ void ModuleUIConfigurationManager::impl_resetElementTypeData(
UIElementDataHashMap::iterator pIter = rHashMap.begin();
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY );
sal_Int16 nType = rUserElementType.nElementType;
@@ -509,7 +510,7 @@ void ModuleUIConfigurationManager::impl_resetElementTypeData(
ConfigurationEvent aReplaceEvent;
aReplaceEvent.ResourceURL = rElement.aResourceURL;
aReplaceEvent.Accessor <<= xThis;
- aReplaceEvent.Source = xThis;
+ aReplaceEvent.Source = xIfac;
aReplaceEvent.ReplacedElement <<= xOldSettings;
aReplaceEvent.Element <<= rElement.xSettings;
@@ -526,7 +527,7 @@ void ModuleUIConfigurationManager::impl_resetElementTypeData(
ConfigurationEvent aEvent;
aEvent.ResourceURL = rElement.aResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.Element <<= rElement.xSettings;
rRemoveNotifyContainer.push_back( aEvent );
@@ -559,6 +560,7 @@ void ModuleUIConfigurationManager::impl_reloadElementTypeData(
Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY );
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
sal_Int16 nType = rUserElementType.nElementType;
while ( pIter != rHashMap.end() )
@@ -577,7 +579,7 @@ void ModuleUIConfigurationManager::impl_reloadElementTypeData(
aReplaceEvent.ResourceURL = rElement.aResourceURL;
aReplaceEvent.Accessor <<= xThis;
- aReplaceEvent.Source = xThis;
+ aReplaceEvent.Source = xIfac;
aReplaceEvent.ReplacedElement <<= xOldSettings;
aReplaceEvent.Element <<= rElement.xSettings;
rReplaceNotifyContainer.push_back( aReplaceEvent );
@@ -595,7 +597,7 @@ void ModuleUIConfigurationManager::impl_reloadElementTypeData(
aReplaceEvent.ResourceURL = rElement.aResourceURL;
aReplaceEvent.Accessor <<= xThis;
- aReplaceEvent.Source = xThis;
+ aReplaceEvent.Source = xIfac;
aReplaceEvent.ReplacedElement <<= xOldSettings;
aReplaceEvent.Element <<= rElement.xSettings;
rReplaceNotifyContainer.push_back( aReplaceEvent );
@@ -612,7 +614,7 @@ void ModuleUIConfigurationManager::impl_reloadElementTypeData(
aRemoveEvent.ResourceURL = rElement.aResourceURL;
aRemoveEvent.Accessor <<= xThis;
- aRemoveEvent.Source = xThis;
+ aRemoveEvent.Source = xIfac;
aRemoveEvent.Element <<= rElement.xSettings;
rRemoveNotifyContainer.push_back( aRemoveEvent );
@@ -1094,12 +1096,13 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la
rElementType.bModified = true;
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Create event to notify listener about replaced element settings
ConfigurationEvent aEvent;
aEvent.ResourceURL = ResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.ReplacedElement <<= xOldSettings;
aEvent.Element <<= pDataSettings->xSettings;
@@ -1141,13 +1144,14 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la
rElements.insert( UIElementDataHashMap::value_type( ResourceURL, aUIElementData ));
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Create event to notify listener about replaced element settings
ConfigurationEvent aEvent;
aEvent.ResourceURL = ResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.ReplacedElement <<= pDataSettings->xSettings;
aEvent.Element <<= aUIElementData.xSettings;
@@ -1200,6 +1204,7 @@ throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException
rElementType.bModified = true;
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Check if we have settings in the default layer which replaces the user-defined one!
UIElementData* pDefaultDataSettings = impl_findUIElementData( ResourceURL, nElementType );
@@ -1210,7 +1215,7 @@ throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException
aEvent.ResourceURL = ResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.Element <<= xRemovedSettings;
aEvent.ReplacedElement <<= pDefaultDataSettings->xSettings;
@@ -1225,7 +1230,7 @@ throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException
aEvent.ResourceURL = ResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.Element <<= xRemovedSettings;
aGuard.unlock();
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 82dfc41..feeb95f 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -419,6 +419,7 @@ void UIConfigurationManager::impl_resetElementTypeData(
UIElementDataHashMap::iterator pIter = rHashMap.begin();
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Make copies of the event structures to be thread-safe. We have to unlock our mutex before calling
// our listeners!
@@ -431,7 +432,7 @@ void UIConfigurationManager::impl_resetElementTypeData(
ConfigurationEvent aEvent;
aEvent.ResourceURL = rElement.aResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.Element <<= rElement.xSettings;
rRemoveNotifyContainer.push_back( aEvent );
@@ -460,6 +461,7 @@ void UIConfigurationManager::impl_reloadElementTypeData(
Reference< XStorage > xElementStorage( rDocElementType.xStorage );
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
sal_Int16 nType = rDocElementType.nElementType;
while ( pIter != rHashMap.end() )
@@ -478,7 +480,7 @@ void UIConfigurationManager::impl_reloadElementTypeData(
aReplaceEvent.ResourceURL = rElement.aResourceURL;
aReplaceEvent.Accessor <<= xThis;
- aReplaceEvent.Source = xThis;
+ aReplaceEvent.Source = xIfac;
aReplaceEvent.ReplacedElement <<= xOldSettings;
aReplaceEvent.Element <<= rElement.xSettings;
rReplaceNotifyContainer.push_back( aReplaceEvent );
@@ -492,7 +494,7 @@ void UIConfigurationManager::impl_reloadElementTypeData(
aRemoveEvent.ResourceURL = rElement.aResourceURL;
aRemoveEvent.Accessor <<= xThis;
- aRemoveEvent.Source = xThis;
+ aRemoveEvent.Source = xIfac;
aRemoveEvent.Element <<= rElement.xSettings;
rRemoveNotifyContainer.push_back( aRemoveEvent );
@@ -866,13 +868,14 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la
rElementType.bModified = true;
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Create event to notify listener about replaced element settings
ConfigurationEvent aEvent;
aEvent.ResourceURL = ResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.ReplacedElement <<= xOldSettings;
aEvent.Element <<= pDataSettings->xSettings;
@@ -923,13 +926,14 @@ throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException
rElementType.bModified = true;
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Create event to notify listener about removed element settings
ConfigurationEvent aEvent;
aEvent.ResourceURL = ResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.Element <<= xRemovedSettings;
aGuard.unlock();
@@ -999,13 +1003,14 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException,
Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings );
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ Reference< XInterface > xIfac( xThis, UNO_QUERY );
// Create event to notify listener about removed element settings
ConfigurationEvent aEvent;
aEvent.ResourceURL = NewResourceURL;
aEvent.Accessor <<= xThis;
- aEvent.Source = xThis;
+ aEvent.Source = xIfac;
aEvent.Element <<= xInsertSettings;
aGuard.unlock();
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index cbda3ce..a4317ee 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -146,7 +146,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
if ( !bHasSettings )
{
- OUString aModuleIdentifier = _xModuleManager->identify( xFrame );
+ OUString aModuleIdentifier = _xModuleManager->identify( Reference<XInterface>( xFrame, UNO_QUERY ) );
if ( !aModuleIdentifier.isEmpty() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index d1dd274..7f14c98 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -422,7 +422,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
try
{
if ( xFrame.is() && xManager.is() )
- aModuleId = xManager->identify( xFrame );
+ aModuleId = xManager->identify( Reference<XInterface>( xFrame, UNO_QUERY ) );
Reference< XUIElementFactory > xUIElementFactory = getFactory( ResourceURL, aModuleId );
if ( xUIElementFactory.is() )
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index a0c0480..b19ae84 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -539,11 +539,11 @@ static OUString aResourceResolverPropName("ResourceResolver");
Reference< XInterface >* pObjects = aObjects.getArray();
for ( sal_Int32 i = 0; i < nControlCount; ++i )
{
- pObjects[i] = pControls[i];
+ pObjects[i] = Reference<XInterface>( pControls[i], UNO_QUERY );
}
// also add the dialog control itself to the sequence
- pObjects[nControlCount] = rxControl;
+ pObjects[nControlCount] = Reference<XInterface>( rxControl, UNO_QUERY );
Reference< XScriptEventsAttacher > xScriptEventsAttacher = new DialogEventsAttacherImpl
( m_xContext, m_xModel, rxControl, rxHandler, rxIntrospectionAccess,
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index f245f02..b59a9f0 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -159,7 +159,7 @@ void StringResourceImpl::addModifyListener( const Reference< XModifyListener >&
throw RuntimeException();
::osl::MutexGuard aGuard( getMutex() );
- m_aListenerContainer.addInterface( aListener );
+ m_aListenerContainer.addInterface( Reference<XInterface>( aListener, UNO_QUERY ) );
}
void StringResourceImpl::removeModifyListener( const Reference< XModifyListener >& aListener )
@@ -169,7 +169,7 @@ void StringResourceImpl::removeModifyListener( const Reference< XModifyListener
throw RuntimeException();
::osl::MutexGuard aGuard( getMutex() );
- m_aListenerContainer.removeInterface( aListener );
+ m_aListenerContainer.removeInterface( Reference<XInterface>( aListener, UNO_QUERY ) );
}
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 994727d..0b9a552 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -615,7 +615,7 @@ void SdPage::addAnnotation( const Reference< XAnnotation >& xAnnotation, int nIn
if( pModel )
{
pModel->SetChanged();
- NotifyDocumentEvent( static_cast< SdDrawDocument* >( pModel ), "OnAnnotationInserted" , xAnnotation );
+ NotifyDocumentEvent( static_cast< SdDrawDocument* >( pModel ), "OnAnnotationInserted", Reference<XInterface>( xAnnotation, UNO_QUERY ) );
}
}
@@ -635,7 +635,7 @@ void SdPage::removeAnnotation( const Reference< XAnnotation >& xAnnotation )
if( pModel )
{
pModel->SetChanged();
- NotifyDocumentEvent( static_cast< SdDrawDocument* >( pModel ), OUString( "OnAnnotationRemoved" ), xAnnotation );
+ NotifyDocumentEvent( static_cast< SdDrawDocument* >( pModel ), "OnAnnotationRemoved", Reference<XInterface>( xAnnotation, UNO_QUERY ) );
}
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 86a1888..57af114 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1106,7 +1106,7 @@ OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const
Reference< XModuleManager2 > xModuleManager( ModuleManager::create(xContext) );
- OUString aModuleIdentifier( xModuleManager->identify( xFrame ) );
+ OUString aModuleIdentifier( xModuleManager->identify( Reference<XInterface>( xFrame, UNO_QUERY_THROW ) ) );
if( !aModuleIdentifier.isEmpty() )
{
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index f4321fb..b658a8b 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 2865dbd..5e5d4d4 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 3cbc674..fb1a30f 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 3137572..c1c53d0 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 4d6ee1a..6b24c35 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 69cd855..add1ef3 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 5d47a21..4db6eaf 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);
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 73f734d..f5b9576 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -743,7 +743,7 @@ BaseContent::getParent(
try
{
- return m_pMyShell->m_pProvider->queryContent( Identifier );
+ return Reference<XInterface>( m_pMyShell->m_pProvider->queryContent( Identifier ), UNO_QUERY );
}
catch (const IllegalIdentifierException&)
{
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 143724b..588730f 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -554,7 +554,7 @@ namespace fileaccess {
NameClashException excep;
excep.Name = getTitle(aUncPath);
excep.Classification = InteractionClassification_ERROR;
- excep.Context = xComProc;
+ excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "file exists and overwrite forbidden";
aAny <<= excep;
cancelCommandExecution( aAny,xEnv );
@@ -576,7 +576,7 @@ namespace fileaccess {
seq[0] <<= prop;
excep.Arguments = seq;
excep.Classification = InteractionClassification_ERROR;
- excep.Context = xComProc;
+ excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "the name contained invalid characters";
if(isHandled)
throw excep;
@@ -853,7 +853,7 @@ namespace fileaccess {
NameClashException excep;
excep.Name = getTitle(aUncPath);
excep.Classification = InteractionClassification_ERROR;
- excep.Context = xComProc;
+ excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "name clash during copy or move";
aAny <<= excep;
@@ -864,7 +864,7 @@ namespace fileaccess {
{
UnsupportedNameClashException excep;
excep.NameClash = minorCode;
- excep.Context = xComProc;
+ excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "name clash value not supported during copy or move";
aAny <<= excep;
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 4f456d1..cdf6428 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -673,7 +673,7 @@ FTPContent::getParent( )
{
Reference<XContentIdentifier>
xIdent(new FTPContentIdentifier(m_aFTPURL.parent(false)));
- return m_xProvider->queryContent(xIdent);
+ return Reference<XInterface>( m_xProvider->queryContent(xIdent), UNO_QUERY );
}
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index d3127c8..c8b1ce7 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -388,7 +388,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
}
else
{
- xNode = xHierarchyAccess;
+ xNode = Reference<XInterface>( xHierarchyAccess, UNO_QUERY );
}
xSet = Reference< XPropertySet >(xNode, UNO_QUERY);
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 2867e5d..9be6cef 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -1959,7 +1959,7 @@ XMLParaContext::~XMLParaContext()
{
xIdCursor->gotoRange( xEnd, sal_True );
GetImport().getInterfaceToIdentifierMapper().registerReference(
- m_sXmlId, xIdCursor);
+ m_sXmlId, Reference<XInterface>( xIdCursor, UNO_QUERY ));
}
}
commit f206f0d5b0409573f003f141c1c5d519ba7d74c8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Jun 25 21:58:47 2014 +0200
Resolves fdo#54155: Crash when playing with a Group inside a Group
Cherry-picked from 7bd94d73ec56622685d0e23f8b5133ba110524be
Change-Id: I89c80fca1cdc8bc88172eaf8057141d5e42a06dc
Reviewed-on: https://gerrit.libreoffice.org/9910
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index fd0b09a..782c645 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1218,7 +1218,7 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
// Don't select header / footer objects in body edition and vice-versa
SwContact* pContact = static_cast<SwContact*>(pObj->GetUserCall());
- if ( !pContact->ObjAnchoredAtPage() )
+ if (pContact && !pContact->ObjAnchoredAtPage() )
{
const SwPosition& rPos = pContact->GetCntntAnchor();
bool bInHdrFtr = GetDoc()->IsInHeaderFooter( rPos.nNode );
More information about the Libreoffice-commits
mailing list