summaryrefslogtreecommitdiff
path: root/sd/source/ui
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/source/ui
parentbd1e7289a8c96ea3ac844ee7e09f945e4f6ef227 (diff)
parent3a5fb547e14c0dcb5f7a71cb8c3650182cb31c91 (diff)
impress210: merge
Diffstat (limited to 'sd/source/ui')
-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
4 files changed, 26 insertions, 70 deletions
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;