summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorChristian Lippka ORACLE <christian.lippka@oracle.com>2011-03-10 16:34:44 +0100
committerChristian Lippka ORACLE <christian.lippka@oracle.com>2011-03-10 16:34:44 +0100
commitcedcd6ddfa7e0bae6477d8877644978fbd2a65ee (patch)
tree5b7880b76a0404a70b5bf410454f172063ffdf1f /sd
parentbd1e7289a8c96ea3ac844ee7e09f945e4f6ef227 (diff)
parent3a5fb547e14c0dcb5f7a71cb8c3650182cb31c91 (diff)
impress210: merge
Diffstat (limited to 'sd')
-rwxr-xr-x[-rw-r--r--]sd/inc/EffectMigration.hxx3
-rwxr-xr-xsd/source/core/CustomAnimationEffect.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/core/EffectMigration.cxx26
-rwxr-xr-xsd/source/ui/docshell/docshel4.cxx1
-rwxr-xr-xsd/source/ui/func/fupage.cxx27
-rwxr-xr-xsd/source/ui/func/futempl.cxx41
-rwxr-xr-xsd/source/ui/unoidl/unoobj.cxx27
7 files changed, 56 insertions, 70 deletions
diff --git a/sd/inc/EffectMigration.hxx b/sd/inc/EffectMigration.hxx
index eb173f495de2..3dd0e0dfe8ad 100644..100755
--- a/sd/inc/EffectMigration.hxx
+++ b/sd/inc/EffectMigration.hxx
@@ -36,6 +36,7 @@ class SdPage;
class SvxShape;
class SdAnimationInfo;
class SdrObject;
+class SdrPathObj;
namespace sd {
@@ -76,6 +77,8 @@ public:
static void UpdateSoundEffect( SvxShape* pShape, SdAnimationInfo* pInfo );
static ::rtl::OUString GetSoundFile( SvxShape* pShape );
static sal_Bool GetSoundOn( SvxShape* pShape );
+
+ static void SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj );
};
} // end of namespace sd
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 33b9c233909b..52d53426f133 100755
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1738,6 +1738,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj
SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() );
if( pObj )
{
+ pObj->RecalcBoundRect(true);
const Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
const Point aCenter( aBoundRect.Center() );
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index cbb9a1019baf..751ce0911cfc 100644..100755
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/presentation/ParagraphTarget.hpp>
#include <svx/unoshape.hxx>
#include <svx/svdotext.hxx>
+#include <svx/svdopath.hxx>
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include <CustomAnimationPreset.hxx>
@@ -1342,3 +1343,28 @@ sal_Bool EffectMigration::GetSoundOn( SvxShape* pShape )
return GetSoundFile( pShape ).getLength() != 0;
}
+// --------------------------------------------------------------------
+
+void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj )
+{
+ if( pShape && pPathObj )
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+
+ if( pObj )
+ {
+ sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->GetPage())->getMainSequence();
+
+ const Reference< XShape > xShape( pShape );
+ SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : 0 );
+ if( pPage )
+ {
+ boost::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() );
+ if( pMainSequence.get() )
+ CustomAnimationEffectPtr pCreated( pMainSequence->append( *pPathObj, makeAny( xShape ), -1.0 ) );
+ }
+ }
+ }
+}
+
+
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index f1e77526d7e3..47e8f62c6468 100755
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -298,6 +298,7 @@ sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::s
if (bRet)
{
+ mpDoc->SetDrawingLayerPoolDefaults();
if( !mbSdDataObj )
mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling
// NewOrLoadCompleted(NEW_LOADED) in
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 4d068e1fde90..d8736d9b8ccb 100755
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -38,20 +38,14 @@
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
#include <svl/itempool.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/request.hxx>
#include <svl/stritem.hxx>
#include <vcl/prntypes.hxx>
#include <svl/style.hxx>
#include <stlsheet.hxx>
-#ifndef _SVX_SVDORECT_HXX
#include <svx/svdorect.hxx>
-#endif
-#ifndef _SVX_SVDUNDO_HXX
#include <svx/svdundo.hxx>
-#endif
#include <editeng/eeitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <svx/xbtmpit.hxx>
@@ -59,6 +53,7 @@
#include <svl/itempool.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
+#include <svx/sdr/properties/properties.hxx>
#include "glob.hrc"
#include <editeng/shaditem.hxx>
@@ -393,7 +388,11 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
if(!mpPage->IsMasterPage())
{
// on normal pages, switch off fill attribute usage
- mpPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE));
+ SdrPageProperties& rPageProperties = mpPage->getSdrPageProperties();
+ rPageProperties.ClearItem( XATTR_FILLBITMAP );
+ rPageProperties.ClearItem( XATTR_FILLGRADIENT );
+ rPageProperties.ClearItem( XATTR_FILLHATCH );
+ rPageProperties.PutItem(XFillStyleItem(XFILL_NONE));
}
}
}
@@ -409,6 +408,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyleSheet, &(*pTempSet.get()));
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pStyleSheet->GetItemSet().Put( *(pTempSet.get()) );
+ sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
else if( bSetToAllPages )
@@ -430,6 +430,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyle, &(*pTempSet.get()));
pUndoGroup->AddAction(pAction);
pStyle->GetItemSet().Put( *(pTempSet.get()) );
+ sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
pStyle->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
@@ -444,7 +445,13 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
{
SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc, *pPage, rFillAttributes);
pUndoGroup->AddAction(pBackgroundObjUndoAction);
- pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE));
+
+ SdrPageProperties& rPageProperties = pPage->getSdrPageProperties();
+ rPageProperties.ClearItem( XATTR_FILLBITMAP );
+ rPageProperties.ClearItem( XATTR_FILLGRADIENT );
+ rPageProperties.ClearItem( XATTR_FILLHATCH );
+ rPageProperties.PutItem(XFillStyleItem(XFILL_NONE));
+
pPage->ActionChanged();
}
}
@@ -606,8 +613,10 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
delete mpBackgroundObjUndoAction;
mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction(
*mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet());
+ SfxItemSet aSet( *pArgs );
+ sdr::properties::CleanupFillProperties(aSet);
mpPage->getSdrPageProperties().ClearItem();
- mpPage->getSdrPageProperties().PutItemSet(*pArgs);
+ mpPage->getSdrPageProperties().PutItemSet(aSet);
}
}
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index d7a251cee531..363eba2f6dab 100755
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -49,6 +49,7 @@
#include <editeng/lrspitem.hxx>
#include <svx/svdopage.hxx>
#include <svx/svditer.hxx>
+#include <svx/sdr/properties/properties.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/xlndsit.hxx>
@@ -454,6 +455,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
sStyleName.Append( sal_Unicode( ' ' ));
pStyleSheet->GetItemSet().Put(aTempSet);
+
SdStyleSheet* pRealSheet =((SdStyleSheet*)pStyleSheet)->GetRealStyleSheet();
pRealSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
@@ -477,45 +479,8 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
SfxItemSet& rAttr = pStyleSheet->GetItemSet();
-/* #i35937#
- if ( rAttr.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON )
- {
- // SvxLRSpaceItem hart gesetzt: NumBulletItem anpassen
- if ( aOriSet.GetItemState( EE_PARA_LRSPACE ) != SFX_ITEM_ON ||
- (const SvxLRSpaceItem&) aOriSet.Get( EE_PARA_LRSPACE ) !=
- (const SvxLRSpaceItem&) rAttr.Get( EE_PARA_LRSPACE ) )
- {
- SvxNumBulletItem aNumBullet( (const SvxNumBulletItem&) rAttr.Get(EE_PARA_NUMBULLET) );
-
- sal_uInt16 nLevel = 0;
- if( (ePO >= PO_OUTLINE_2) && (ePO <= PO_OUTLINE_9) )
- nLevel = (sal_uInt16)(ePO - PO_OUTLINE_1 + 1);
-
- EditEngine::ImportBulletItem( aNumBullet, nLevel, NULL,
- &(const SvxLRSpaceItem&) rAttr.Get( EE_PARA_LRSPACE ) );
+ sdr::properties::CleanupFillProperties( rAttr );
- // the numbering bullet item is not valid in styles Outline 2 to Outline 9
- if( nLevel != 0 )
- {
- // so put it into Outline 1 then..
- String sStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE)));
- sStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " 1" ) );
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO);
-
- if(pFirstStyleSheet)
- {
- pFirstStyleSheet->GetItemSet().Put( aNumBullet);
- SdStyleSheet* pRealSheet = ((SdStyleSheet*)pFirstStyleSheet)->GetRealStyleSheet();
- pRealSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
- }
- }
- else
- {
- ( (SfxItemSet&) rAttr).Put( aNumBullet );
- }
- }
- }
-*/
// check for unique names of named items for xml
if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SFX_ITEM_SET )
{
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 681aad8f44ed..ddb115a21525 100755
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -658,36 +658,17 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
case WID_MASTERDEPEND:
SetMasterDepend( ::cppu::any2bool(aValue) );
break;
-/* todo
case WID_ANIMPATH:
{
- uno::Reference< drawing::XShape > xShape;
- aValue >>= xShape;
+ uno::Reference< drawing::XShape > xShape( aValue, uno::UNO_QUERY );
+ SdrPathObj* pObj = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL;
- SdrObject* pObj = NULL;
- if(xShape.is())
- pObj = GetSdrObjectFromXShape( xShape );
-
- if( pObj == NULL || !pObj->ISA( SdrPathObj ) )
+ if( pObj == NULL )
throw lang::IllegalArgumentException();
- pInfo->mpPathObj = (SdrPathObj*)pObj;
-
- SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL;
- if( pDoc )
- {
- pInfo = pDoc->GetAnimationInfo(pObj);
- if( pInfo == NULL )
- {
- pInfo = new SdAnimationInfo(pDoc);
- pObj->InsertUserData( pInfo );
- }
- pInfo->mbInvisibleInPresentation = sal_True;
- }
-
+ EffectMigration::SetAnimationPath( mpShape, pObj );
break;
}
-*/
case WID_IMAGEMAP:
{
SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL;