summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-08-05 17:01:07 +0000
committerRelease Engineers <releng@openoffice.org>2009-08-05 17:01:07 +0000
commitb2b908637e7bb5feb99e4b651e77485273273cc3 (patch)
treea297808512bbfcd8226d4ad59d47e61005562186 /svx/source/unodraw
parent647313428ad2ccc5a820b5f2dbb5c1715c2a35ac (diff)
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx 2009-07-29 11:40:35 +0200 wg r274445 : i103869 2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape 2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem 2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx 2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings 2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem 2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem 2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning 2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables 2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables 2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names 2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide 2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import 2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared 2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack 2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide 2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape 2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow 2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings 2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents 2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects 2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus 2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model 2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields 2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles 2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines) 2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours 2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged 2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged 2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/gluepts.cxx94
-rw-r--r--svx/source/unodraw/unomod.cxx11
2 files changed, 39 insertions, 66 deletions
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index d511dbea25..ca41fa9fe5 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -49,19 +49,15 @@ using namespace ::cppu;
const USHORT NON_USER_DEFINED_GLUE_POINTS = 4;
-class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >,
- public SfxListener
+class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >
{
private:
- SdrObject* mpObject;
+ SdrObjectWeakRef mpObject;
public:
SvxUnoGluePointAccess( SdrObject* pObject ) throw();
virtual ~SvxUnoGluePointAccess() throw();
- // SfxListener
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
-
// XIdentifierContainer
virtual sal_Int32 SAL_CALL insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
virtual void SAL_CALL removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
@@ -223,52 +219,16 @@ static void convert( const drawing::GluePoint2& rUnoGlue, SdrGluePoint& rSdrGlue
SvxUnoGluePointAccess::SvxUnoGluePointAccess( SdrObject* pObject ) throw()
: mpObject( pObject )
{
- StartListening( *mpObject->GetModel() );
-
}
SvxUnoGluePointAccess::~SvxUnoGluePointAccess() throw()
{
- if( mpObject && mpObject->GetModel())
- EndListening( *mpObject->GetModel() );
-}
-
-void SvxUnoGluePointAccess::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
-{
- const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
-
- if( pSdrHint && mpObject)
- {
- if( pSdrHint->GetKind() == HINT_OBJREMOVED )
- {
- if( mpObject == pSdrHint->GetObject() )
- mpObject = NULL;
- }
- else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
- {
- mpObject = NULL;
- }
- // #110094#-9
- //else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
- //{
- // SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
- // while( pObjList )
- // {
- // if( pSdrHint->GetObjList() == pObjList )
- // {
- // mpObject = NULL;
- // break;
- // }
- // pObjList = pObjList->GetUpList();
- // }
- //}
- }
}
// XIdentifierContainer
sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject )
+ if( mpObject.is() )
{
SdrGluePointList* pList = mpObject->ForceGluePointList();
if( pList )
@@ -298,7 +258,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) thr
void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
+ if( mpObject.is() && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
{
const USHORT nId = (USHORT)(Identifier - NON_USER_DEFINED_GLUE_POINTS) + 1;
@@ -327,7 +287,7 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier )
// XIdentifierReplace
void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject && mpObject->IsNode() )
+ if( mpObject.is() && mpObject->IsNode() )
{
struct drawing::GluePoint2 aGluePoint;
if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint))
@@ -361,7 +321,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, c
// XIdentifierAccess
uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject && mpObject->IsNode() )
+ if( mpObject.is() && mpObject->IsNode() )
{
struct drawing::GluePoint2 aGluePoint;
@@ -401,21 +361,29 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier )
uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() throw (uno::RuntimeException)
{
- const SdrGluePointList* pList = mpObject->GetGluePointList();
- const USHORT nCount = pList ? pList->GetCount() : 0;
+ if( mpObject.is() )
+ {
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ const USHORT nCount = pList ? pList->GetCount() : 0;
- USHORT i;
+ USHORT i;
- uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
- sal_Int32 *pIdentifier = aIdSequence.getArray();
-
- for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
- *pIdentifier++ = (sal_Int32)i;
+ uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
+ sal_Int32 *pIdentifier = aIdSequence.getArray();
+
+ for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
+ *pIdentifier++ = (sal_Int32)i;
- for( i = 0; i < nCount; i++ )
- *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1;
+ for( i = 0; i < nCount; i++ )
+ *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1;
- return aIdSequence;
+ return aIdSequence;
+ }
+ else
+ {
+ uno::Sequence< sal_Int32 > aEmpty;
+ return aEmpty;
+ }
}
/* deprecated */
@@ -425,7 +393,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E
throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject )
+ if( mpObject.is() )
{
SdrGluePointList* pList = mpObject->ForceGluePointList();
if( pList )
@@ -455,7 +423,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E
void SAL_CALL SvxUnoGluePointAccess::removeByIndex( sal_Int32 Index )
throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject )
+ if( mpObject.is() )
{
SdrGluePointList* pList = mpObject->ForceGluePointList();
if( pList )
@@ -487,7 +455,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIndex( sal_Int32 Index, const uno:
throw lang::IllegalArgumentException();
Index -= 4;
- if( mpObject && Index >= 0 )
+ if( mpObject.is() && Index >= 0 )
{
SdrGluePointList* pList = const_cast< SdrGluePointList* >( mpObject->GetGluePointList() );
if( pList && Index < pList->GetCount() )
@@ -509,7 +477,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
throw(uno::RuntimeException)
{
sal_Int32 nCount = 0;
- if( mpObject )
+ if( mpObject.is() )
{
// each node has a default of 4 glue points
// and any number of user defined glue points
@@ -529,7 +497,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( Index >= 0 && mpObject && mpObject->IsNode() )
+ if( Index >= 0 && mpObject.is() && mpObject->IsNode() )
{
struct drawing::GluePoint2 aGluePoint;
@@ -571,7 +539,7 @@ uno::Type SAL_CALL SvxUnoGluePointAccess::getElementType()
sal_Bool SAL_CALL SvxUnoGluePointAccess::hasElements()
throw( uno::RuntimeException)
{
- return mpObject && mpObject->IsNode();
+ return mpObject.is() && mpObject->IsNode();
}
/**
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 3d455fbec2..9b3a4ec7df 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -215,9 +215,14 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField(
{
uno::Reference< uno::XInterface > xRet;
- const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
-
- if( ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0 )
+ const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.textfield.") );
+
+ // #i93308# up to OOo 3.2 we used this wrong namespace name with the capital T & F. This is
+ // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation.
+ const OUString aTextFieldPrexit2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
+
+ if( (ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0) ||
+ (ServiceSpecifier.compareTo( aTextFieldPrexit2, aTextFieldPrexit2.getLength() ) == 0) )
{
OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) );