summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-12 14:03:59 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-12 14:03:59 +0000
commitf7ec70b1dace57cc641ea7a7fb7e23268f7012f7 (patch)
treea9c485115b430fedf8caad2a9d2b187fd3843869 /sfx2
parenta9d6b3e89964ce7d508de56e57ffa8ab393cc777 (diff)
CWS-TOOLING: integrate CWS fwk99
2009-01-20 17:39:31 +0100 pb r266605 : fix: #i98280# new 'More templates'-URL 2009-01-15 20:17:58 +0100 mst r266391 : #i95702# convert wizards to DocumentProperties (partially based on patch by cmc) 2009-01-12 07:35:44 +0100 pb r266131 : fix: #i96851# HID_PASTE_DLG and HID_LINKDLG_TABLB added 2009-01-09 10:40:48 +0100 pb r266061 : fix: #i97386# Execute_Impl() while sub-dialog is open this could be deleted; #i68415# patch from cmc 2009-01-09 10:35:24 +0100 pb r266059 : fix: #i97386# struct Deleted added 2009-01-09 10:05:17 +0100 pb r266057 : fix: #i97365# ModalDialog RID_SVXPAGE_IMPROVEMENT removed 2009-01-09 10:02:39 +0100 pb r266056 : fix: #i97841# new: set InfoURL and HandleHyperLink() 2009-01-09 09:59:13 +0100 pb r266053 : fix: #i97391# MinWidth re-calculated; #i97365# SvxImprovementDialog2 removed 2009-01-09 09:55:00 +0100 pb r266051 : fix: #i97841# new: HandleHyperLink(); #i97365# SvxImprovementDialog2 removed 2009-01-06 14:24:24 +0100 cd r265921 : #i96831# Fix build problem with gcc 4.3.2 using the return value of link correctly. 2009-01-06 12:18:41 +0100 cd r265907 : #i96831# Fix build problem with gcc 4.3.2 2009-01-06 12:02:59 +0100 mst r265905 : fix #i97775# - xmloff/source/core/nmspmap.cxx: + SvXMLNamespaceMap::GetQNameByKey does not handle default namespace correctly
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/templdlg.cxx26
-rw-r--r--sfx2/source/inc/templdgi.hxx14
2 files changed, 29 insertions, 11 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4200c62ad7..df4b45db01 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -758,6 +758,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
pCurObjShell ( NULL ),
xModuleManager ( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY ),
+ pbDeleted ( NULL ),
aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT ),
aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ),
@@ -801,6 +802,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
pStyleSheetPool ( NULL ),
pTreeBox ( NULL ),
pCurObjShell ( NULL ),
+ pbDeleted ( NULL ),
aFmtLb ( this, SfxResId( BT_VLIST ) ),
aFilterLb ( pW, SfxResId( BT_FLIST ) ),
@@ -1013,6 +1015,11 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
pStyleSheetPool = NULL;
delete pTreeBox;
delete pTimer;
+ if ( pbDeleted )
+ {
+ pbDeleted->bDead = true;
+ pbDeleted = NULL;
+ }
}
//-------------------------------------------------------------------------
@@ -1632,7 +1639,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// es kann sein, da\s sich ein neuer erst anmeldet, nachdem der Timer
// abgelaufen ist - macht sich schlecht in UpdateStyles_Impl() !
- ULONG nId = ((SfxSimpleHint&) rHint).GetId();
+ ULONG nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0;
if(!bDontUpdate && nId != SFX_HINT_DYING &&
(rHint.Type() == TYPE(SfxStyleSheetPoolHint)||
@@ -1717,13 +1724,14 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
pItems[ nCount++ ] = 0;
- const SfxPoolItem* pItem;
+ Deleted aDeleted;
+ pbDeleted = &aDeleted;
USHORT nModi = pModifier ? *pModifier : 0;
- pItem = rDispatcher.Execute(
+ const SfxPoolItem* pItem = rDispatcher.Execute(
nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
pItems, nModi );
- if ( !pItem )
+ if ( !pItem || aDeleted() )
return FALSE;
if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
@@ -1907,9 +1915,9 @@ static rtl::OUString getModuleIdentifier( const Reference< XModuleManager >& i_x
{
DBG_ASSERT( i_xModMgr.is(), "getModuleIdentifier(): no XModuleManager" );
DBG_ASSERT( i_pObjSh, "getModuleIdentifier(): no ObjectShell" );
-
+
::rtl::OUString sIdentifier;
-
+
try
{
sIdentifier = i_xModMgr->identify( i_pObjSh->GetModel() );
@@ -1922,7 +1930,7 @@ static rtl::OUString getModuleIdentifier( const Reference< XModuleManager >& i_x
{
DBG_ERRORFILE( "getModuleIdentifier(): exception of XModuleManager::identify()" );
}
-
+
return sIdentifier;
}
@@ -1932,7 +1940,7 @@ sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell*
{
DBG_ASSERT( i_pObjSh, "SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter(): no ObjectShell" );
sal_Int32 nFilter = -1;
-
+
Sequence< PropertyValue > lProps;
Reference< ::com::sun::star::container::XNameAccess > xContainer( xModuleManager, UNO_QUERY );
if ( xContainer.is() )
@@ -1942,7 +1950,7 @@ sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell*
sal_Int32 nDefault = -1;
nFilter = aFactoryProps.getUnpackedValueOrDefault( DEFINE_CONST_UNICODE("ooSetupFactoryStyleFilter"), nDefault );
}
-
+
return nFilter;
}
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index a7996eea0b..55e7a317d2 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,6 +110,15 @@ public:
// class SfxCommonTemplateDialog_Impl ------------------------------------
+struct Deleted
+{
+ bool bDead;
+
+ Deleted() : bDead(false) {}
+
+ inline bool operator()() { return bDead; }
+};
+
class SfxCommonTemplateDialog_Impl : public SfxListener
{
private:
@@ -154,6 +163,7 @@ protected:
SfxObjectShell* pCurObjShell;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >
xModuleManager;
+ Deleted* pbDeleted;
SfxActionListBox aFmtLb;
ListBox aFilterLb;
@@ -234,7 +244,7 @@ protected:
sal_Int32 LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh );
void SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter );
-
+
public:
TYPEINFO();