[Libreoffice-commits] .: 3 commits - desktop/unx framework/source xmloff/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Mar 24 04:07:04 PDT 2011
desktop/unx/source/start.c | 8 +--
framework/source/uiconfiguration/imagemanager.cxx | 2
framework/source/uiconfiguration/imagemanagerimpl.cxx | 40 +++++++++---------
framework/source/uiconfiguration/imagemanagerimpl.hxx | 4 -
xmloff/source/text/txtparae.cxx | 3 -
5 files changed, 29 insertions(+), 28 deletions(-)
New commits:
commit 88a895ab8c4509a9f4b52edb168f7a305426822b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 24 11:06:56 2011 +0000
there might not be one set of course
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 988c1c3..7c2ed55 100755
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -768,11 +768,10 @@ static void extend_library_path (const char *new_element)
#endif
rtl_uString_newFromAscii( &pEnvName, pathname );
+ rtl_uString_newFromAscii( &pNewEnvVar, new_element );
osl_getEnvironment( pEnvName, &pOrigEnvVar );
-
- rtl_uString_newFromAscii( &pNewEnvVar, new_element );
- if (pOrigEnvVar->length)
+ if (pOrigEnvVar && pOrigEnvVar->length)
{
rtl_uString *pDelim = NULL;
rtl_uString_newFromAscii( &pDelim, ":" );
@@ -783,8 +782,9 @@ static void extend_library_path (const char *new_element)
osl_setEnvironment( pEnvName, pNewEnvVar );
+ if (pOrigEnvVar)
+ rtl_uString_release( pOrigEnvVar );
rtl_uString_release( pNewEnvVar );
- rtl_uString_release( pOrigEnvVar );
rtl_uString_release( pEnvName );
}
commit 10024bfcfb55213bf74cca116152aaf6e926bc9a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 23 20:08:04 2011 +0000
WaE: variable set but unused
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 40a0eb1..d5962ec 100755
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2168,9 +2168,8 @@ void XMLTextParagraphExport::exportParagraph(
if( bAutoStyles )
{
- sal_Bool bPrevCharIsSpace = sal_True;
if( bHasContentEnum )
- bPrevCharIsSpace = !exportTextContentEnumeration(
+ exportTextContentEnumeration(
xContentEnum, bAutoStyles, xSection,
bIsProgress, sal_True, 0, sal_True );
if ( bHasPortions )
commit 6b06f2241700e15368835fda43e1f55c3a05436c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 23 17:09:54 2011 +0000
fix circular depend
diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx
index a29e80c..4e35c95 100755
--- a/framework/source/uiconfiguration/imagemanager.cxx
+++ b/framework/source/uiconfiguration/imagemanager.cxx
@@ -108,7 +108,7 @@ DEFINE_INIT_SERVICE ( ImageManager, {} )
ImageManager::ImageManager( uno::Reference< XMultiServiceFactory > xServiceManager ) :
ThreadHelpBase( &Application::GetSolarMutex() )
- , m_pImpl( new ImageManagerImpl(xServiceManager,static_cast< OWeakObject* >(this),false) )
+ , m_pImpl( new ImageManagerImpl(xServiceManager,this,false) )
{
}
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 12134c7..a2c21b1 100755
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -689,10 +689,10 @@ CmdImageList* ImageManagerImpl::implts_getDefaultImageList()
return m_pDefaultImageList;
}
-ImageManagerImpl::ImageManagerImpl( const uno::Reference< XMultiServiceFactory >& xServiceManager,const uno::Reference< XInterface >& _xOwner,bool _bUseGlobal ) :
+ImageManagerImpl::ImageManagerImpl( const uno::Reference< XMultiServiceFactory >& xServiceManager,::cppu::OWeakObject* pOwner,bool _bUseGlobal ) :
ThreadHelpBase( &Application::GetSolarMutex() )
, m_xServiceManager( xServiceManager )
- , m_xOwner(_xOwner)
+ , m_pOwner(pOwner)
, m_pDefaultImageList( 0 )
, m_aXMLPostfix( RTL_CONSTASCII_USTRINGPARAM( ".xml" ))
, m_aResourceString( RTL_CONSTASCII_USTRINGPARAM( ModuleImageList ))
@@ -718,7 +718,8 @@ ImageManagerImpl::~ImageManagerImpl()
void ImageManagerImpl::dispose()
{
- css::lang::EventObject aEvent( m_xOwner );
+ uno::Reference< uno::XInterface > xOwner(static_cast< OWeakObject* >(m_pOwner));
+ css::lang::EventObject aEvent( xOwner );
m_aListenerContainer.disposeAndClear( aEvent );
{
@@ -738,8 +739,6 @@ void ImageManagerImpl::dispose()
}
delete m_pDefaultImageList;
m_pDefaultImageList = 0;
-
- m_xOwner.clear();
}
}
@@ -1020,13 +1019,14 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
}
}
+ uno::Reference< uno::XInterface > xOwner(static_cast< OWeakObject* >(m_pOwner));
// Notify listeners
if ( pInsertedImages != 0 )
{
ConfigurationEvent aInsertEvent;
aInsertEvent.aInfo <<= nImageType;
- aInsertEvent.Accessor <<= m_xOwner;
- aInsertEvent.Source = m_xOwner;
+ aInsertEvent.Accessor <<= xOwner;
+ aInsertEvent.Source = xOwner;
aInsertEvent.ResourceURL = m_aResourceString;
aInsertEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pInsertedImages ), UNO_QUERY ));
@@ -1036,8 +1036,8 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
{
ConfigurationEvent aReplaceEvent;
aReplaceEvent.aInfo <<= nImageType;
- aReplaceEvent.Accessor <<= m_xOwner;
- aReplaceEvent.Source = m_xOwner;
+ aReplaceEvent.Accessor <<= xOwner;
+ aReplaceEvent.Source = xOwner;
aReplaceEvent.ResourceURL = m_aResourceString;
aReplaceEvent.ReplacedElement = Any();
aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
@@ -1124,12 +1124,13 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
}
// Notify listeners
+ uno::Reference< uno::XInterface > xOwner(static_cast< OWeakObject* >(m_pOwner));
if ( pRemovedImages != 0 )
{
ConfigurationEvent aRemoveEvent;
aRemoveEvent.aInfo = uno::makeAny( nImageType );
- aRemoveEvent.Accessor = uno::makeAny( m_xOwner );
- aRemoveEvent.Source = m_xOwner;
+ aRemoveEvent.Accessor = uno::makeAny( xOwner );
+ aRemoveEvent.Source = xOwner;
aRemoveEvent.ResourceURL = m_aResourceString;
aRemoveEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pRemovedImages ), UNO_QUERY ));
@@ -1139,8 +1140,8 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
{
ConfigurationEvent aReplaceEvent;
aReplaceEvent.aInfo = uno::makeAny( nImageType );
- aReplaceEvent.Accessor = uno::makeAny( m_xOwner );
- aReplaceEvent.Source = m_xOwner;
+ aReplaceEvent.Accessor = uno::makeAny( xOwner );
+ aReplaceEvent.Source = xOwner;
aReplaceEvent.ResourceURL = m_aResourceString;
aReplaceEvent.ReplacedElement = Any();
aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
@@ -1269,12 +1270,13 @@ throw ( ::com::sun::star::uno::Exception,
aGuard.unlock();
// Now notify our listeners. Unlock mutex to prevent deadlocks
+ uno::Reference< uno::XInterface > xOwner(static_cast< OWeakObject* >(m_pOwner));
if ( pInsertedImages != 0 )
{
ConfigurationEvent aInsertEvent;
aInsertEvent.aInfo = uno::makeAny( i );
- aInsertEvent.Accessor = uno::makeAny( m_xOwner );
- aInsertEvent.Source = m_xOwner;
+ aInsertEvent.Accessor = uno::makeAny( xOwner );
+ aInsertEvent.Source = xOwner;
aInsertEvent.ResourceURL = m_aResourceString;
aInsertEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pInsertedImages ), UNO_QUERY ));
@@ -1284,8 +1286,8 @@ throw ( ::com::sun::star::uno::Exception,
{
ConfigurationEvent aReplaceEvent;
aReplaceEvent.aInfo = uno::makeAny( i );
- aReplaceEvent.Accessor = uno::makeAny( m_xOwner );
- aReplaceEvent.Source = m_xOwner;
+ aReplaceEvent.Accessor = uno::makeAny( xOwner );
+ aReplaceEvent.Source = xOwner;
aReplaceEvent.ResourceURL = m_aResourceString;
aReplaceEvent.ReplacedElement = Any();
aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
@@ -1296,8 +1298,8 @@ throw ( ::com::sun::star::uno::Exception,
{
ConfigurationEvent aRemoveEvent;
aRemoveEvent.aInfo = uno::makeAny( i );
- aRemoveEvent.Accessor = uno::makeAny( m_xOwner );
- aRemoveEvent.Source = m_xOwner;
+ aRemoveEvent.Accessor = uno::makeAny( xOwner );
+ aRemoveEvent.Source = xOwner;
aRemoveEvent.ResourceURL = m_aResourceString;
aRemoveEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pRemovedImages ), UNO_QUERY ));
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx b/framework/source/uiconfiguration/imagemanagerimpl.hxx
index 20cfd5d..d03bd67 100755
--- a/framework/source/uiconfiguration/imagemanagerimpl.hxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx
@@ -131,7 +131,7 @@ namespace framework
public:
ImageManagerImpl(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager
- ,const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& _xOwner
+ ,::cppu::OWeakObject *pOwner
,bool _bUseGlobal);
~ImageManagerImpl();
@@ -202,7 +202,7 @@ namespace framework
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserBitmapsStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xOwner;
+ ::cppu::OWeakObject* m_pOwner;
rtl::Reference< GlobalImageList > m_pGlobalImageList;
CmdImageList* m_pDefaultImageList;
rtl::OUString m_aXMLPostfix;
More information about the Libreoffice-commits
mailing list