diff --git a/sd/inc/anminfo.hxx b/sd/inc/anminfo.hxx index e48eee39569f..8acb207d8065 100644 --- a/sd/inc/anminfo.hxx +++ b/sd/inc/anminfo.hxx @@ -73,16 +73,19 @@ public: String maSecondSoundFile; // fuer Objekt ausblenden BOOL mbSecondSoundOn; // fuer Objekt ausblenden BOOL mbSecondPlayFull;// fuer Objekt ausblenden - String maBookmark; // Sprung zu Objekt/Seite +// String maBookmark; // Sprung zu Objekt/Seite USHORT mnVerb; // fuer OLE-Objekt ULONG mnPresOrder; + SdrObject& mrObject; + void SetBookmark( const String& rBookmark ); + String GetBookmark(); public: - SdAnimationInfo(); - SdAnimationInfo(const SdAnimationInfo& rAnmInfo); + SdAnimationInfo(SdrObject& rObject); + SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rObject); virtual ~SdAnimationInfo(); - virtual SdrObjUserData* Clone(SdrObject* pObj) const; + virtual SdrObjUserData* Clone(SdrObject* pObject) const; }; #endif // _SD_ANMINFO_HXX diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 4a2bf0e22a05..d1852a5e9992 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -52,7 +52,6 @@ #define SID_INSERTSYMBOL (SID_SD_START+16) #define SID_ZOOM_PANNING (SID_SD_START+17) #define SID_PRESENTATION_END (SID_SD_START+18) -#define SID_BULLET (SID_SD_START+19) #define SID_TEXTFORMAT (SID_SD_START+20) #define SID_POSITION (SID_SD_START+22) #define SID_MIRROR (SID_SD_START+23) @@ -395,6 +394,8 @@ #define SID_PREVIEW_QUALITY_BLACKWHITE (SID_SD_START+371) #define SID_VECTORIZE (SID_SD_START+372) +#define SID_INSERT_FLD_PAGES (SID_SD_START+373) + #define SID_CONVERT_TO_BITMAP (SID_SD_START+378) #define SID_CONVERT_TO_METAFILE (SID_SD_START+379) @@ -459,6 +460,7 @@ #define SID_DISPLAY_MASTER_BACKGROUND (SID_SD_START+436) #define SID_DISPLAY_MASTER_OBJECTS (SID_SD_START+437) #define SID_INSERTPAGE_LAYOUT_MENU (SID_SD_START+438) +#define SID_TP_EDIT_MASTER (SID_SD_START+439) // Add companion for the SID_HIDE_SLIDE (that is defined in svx) #define SID_SHOW_SLIDE (SID_SD_START+440) diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 8117e4d55ef3..8ef84f263d98 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -205,6 +205,7 @@ private: ::std::auto_ptr mpMasterPageListWatcher; void UpdatePageObjectsInNotes(USHORT nStartPos); + void UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement); void FillOnlineSpellingList(SdPage* pPage); void SpellObject(SdrTextObj* pObj); @@ -588,6 +589,8 @@ public: /* converts the given western font height to a corresponding ctl font height, deppending on the system language */ static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight ); + void UpdatePageRelativeURLs(const String& rOldName, const String& rNewName); + private: /** This member stores the printer independent layout mode. Please refer to SetPrinterIndependentLayout() for its diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 5ade98d5ad87..a9e5fbc29f82 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -576,7 +576,6 @@ #include "svx/brshitem.hxx" #include "svx/bulitem.hxx" #include "svx/camera3d.hxx" -#include "svx/charmap.hxx" #include "svx/charreliefitem.hxx" #include "svx/clipboardctl.hxx" #include "svx/clipfmtitem.hxx" diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx index 2e5171a4b14d..bd1d5015e5f4 100644 --- a/sd/inc/pres.hxx +++ b/sd/inc/pres.hxx @@ -90,6 +90,8 @@ enum AutoLayout AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART, AUTOLAYOUT_HANDOUT9, AUTOLAYOUT_ONLY_TEXT, + AUTOLAYOUT_4CLIPART, + AUTOLAYOUT_6CLIPART, AUTOLAYOUT__END }; diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index fc579740b2f6..78d1cd42ec96 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -213,7 +213,7 @@ public: virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0; virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0; - virtual AbstractSfxSingleTabDialog* CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) = 0; + virtual SfxAbstractDialog* CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) = 0; virtual AbstractSdVectorizeDlg* CreateSdVectorizeDlg( ::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ) = 0; virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( ::Window* pWindow, DocumentType eDocType) = 0; diff --git a/sd/sdi/TaskPaneViewShell.sdi b/sd/sdi/TaskPaneViewShell.sdi index 2e37b7bf56f7..ede307b955bf 100644 --- a/sd/sdi/TaskPaneViewShell.sdi +++ b/sd/sdi/TaskPaneViewShell.sdi @@ -154,6 +154,31 @@ SfxVoidItem TaskPaneShowLargePreview SID_TP_SHOW_LARGE_PREVIEW GroupId = GID_VIEW; ] +SfxVoidItem TaskPaneEditMaster SID_TP_EDIT_MASTER +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_VIEW; +] + SfxVoidItem TaskPaneInsertPage SID_INSERTPAGE_LAYOUT_MENU [ /* flags: */ @@ -208,6 +233,12 @@ interface MasterPagesSelectorInterface StateMethod = GetState ; ] + SID_TP_EDIT_MASTER + [ + ExecMethod = Execute ; + StateMethod = GetState ; + ] + // The copy and paste slots are included here so that they later can be // disabled in order to remove them from context menus. SID_CUT diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index ea0936f269d5..8f758dda5858 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -240,7 +240,7 @@ interface DrawView Cachable , HasDialog , Export , MenuConfig , AccelConfig , ToolBoxConfig ; ] - SID_BULLET // ole : no, status : ? + SID_CHARMAP // ole : no, status : ? [ ExecMethod = FuTemporary ; StateMethod = GetMenuState ; @@ -2116,6 +2116,11 @@ interface DrawView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] + SID_INSERT_FLD_PAGES // ole : no, status : play rec + [ + ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; + ] SID_INSERT_FLD_FILE // ole : no, status : play rec [ ExecMethod = FuTemporary ; diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi index 440e77611357..3b0c49af6901 100644 --- a/sd/sdi/outlnvsh.sdi +++ b/sd/sdi/outlnvsh.sdi @@ -141,7 +141,7 @@ interface OutlineView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] - SID_BULLET // ole : no, status : ? + SID_CHARMAP // ole : no, status : ? [ ExecMethod = FuTemporaryModify ; StateMethod = GetMenuState ; @@ -391,6 +391,11 @@ interface OutlineView ExecMethod = FuTemporaryModify ; StateMethod = GetMenuState ; ] + SID_INSERT_FLD_PAGES // ole : no, status : play rec + [ + ExecMethod = FuTemporaryModify ; + StateMethod = GetMenuState ; + ] SID_INSERT_FLD_FILE // ole : no, status : play rec [ ExecMethod = FuTemporaryModify ; diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index ca064d4daa11..515b5b6b84ce 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -339,31 +339,6 @@ SfxVoidItem Break SID_BREAK GroupId = GID_MODIFY; ] -//-------------------------------------------------------------------------- -SfxVoidItem Bullet SID_BULLET -() -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = TRUE, - ReadOnlyDoc = FALSE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - /* config: */ - AccelConfig = TRUE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = GID_INSERT; -] - //-------------------------------------------------------------------------- SfxVoidItem CapturePoint SID_CAPTUREPOINT () @@ -3610,6 +3585,31 @@ SfxVoidItem InsertPageField SID_INSERT_FLD_PAGE GroupId = GID_INSERT; ] +//-------------------------------------------------------------------------- +SfxVoidItem InsertPagesField SID_INSERT_FLD_PAGES +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_INSERT; +] + //-------------------------------------------------------------------------- SfxVoidItem InsertPageQuick SID_INSERTPAGE_QUICK () diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx index 2143067681d2..8d06ae3d0fcd 100644 --- a/sd/source/core/anminfo.cxx +++ b/sd/source/core/anminfo.cxx @@ -35,7 +35,8 @@ #include "svx/xtable.hxx" #include #include - +#include +#include #include "anminfo.hxx" #include "glob.hxx" @@ -47,7 +48,7 @@ using namespace ::com::sun::star; -SdAnimationInfo::SdAnimationInfo() +SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) : SdrObjUserData(SdUDInventor, SD_ANIMATIONINFO_ID, 0), mePresObjKind (PRESOBJ_NONE), meEffect (presentation::AnimationEffect_NONE), @@ -66,13 +67,14 @@ SdAnimationInfo::SdAnimationInfo() mbSecondSoundOn (FALSE), mbSecondPlayFull (FALSE), mnVerb (0), - mnPresOrder (LIST_APPEND) + mnPresOrder (LIST_APPEND), + mrObject (rObject) { maBlueScreen = RGB_Color(COL_LIGHTMAGENTA); maDimColor = RGB_Color(COL_LIGHTGRAY); } -SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo) +SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rObject) : SdrObjUserData (rAnmInfo), mePresObjKind (PRESOBJ_NONE), meEffect (rAnmInfo.meEffect), @@ -94,9 +96,10 @@ SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo) maSecondSoundFile (rAnmInfo.maSecondSoundFile), mbSecondSoundOn (rAnmInfo.mbSecondSoundOn), mbSecondPlayFull (rAnmInfo.mbSecondPlayFull), - maBookmark (rAnmInfo.maBookmark), +// maBookmark (rAnmInfo.maBookmark), mnVerb (rAnmInfo.mnVerb), - mnPresOrder (LIST_APPEND) + mnPresOrder (LIST_APPEND), + mrObject (rObject) { // can not be copied if(meEffect == presentation::AnimationEffect_PATH) @@ -108,7 +111,45 @@ SdAnimationInfo::~SdAnimationInfo() { } -SdrObjUserData* SdAnimationInfo::Clone(SdrObject*) const +SdrObjUserData* SdAnimationInfo::Clone(SdrObject* pObject) const { - return new SdAnimationInfo(*this); + DBG_ASSERT( pObject, "SdAnimationInfo::Clone(), pObject must not be null!" ); + if( pObject == 0 ) + pObject = &mrObject; + + return new SdAnimationInfo(*this, *pObject ); +} + +void SdAnimationInfo::SetBookmark( const String& rBookmark ) +{ + if( meClickAction == ::com::sun::star::presentation::ClickAction_BOOKMARK ) + { + String sURL( '#' ); + sURL += rBookmark; + SvxFieldItem aURLItem( SvxURLField( sURL, sURL ), EE_FEATURE_FIELD ); + mrObject.SetMergedItem( aURLItem ); + } + else + { + SvxFieldItem aURLItem( SvxURLField( rBookmark, rBookmark ), EE_FEATURE_FIELD ); + mrObject.SetMergedItem( aURLItem ); + } +} + +String SdAnimationInfo::GetBookmark() +{ + String sBookmark; + + const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem* >( &mrObject.GetMergedItem( EE_FEATURE_FIELD ) ); + if( pFldItem ) + { + SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast( pFldItem->GetField() ) ); + if( pURLField ) + sBookmark = pURLField->GetURL(); + } + + if( (meClickAction == ::com::sun::star::presentation::ClickAction_BOOKMARK) && sBookmark.Len() && (sBookmark.GetChar(0) == '#') ) + sBookmark = sBookmark.Copy( 1 ); + + return sBookmark; } diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 3fb085ba651d..d144ec448e8d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -50,7 +50,8 @@ #include #include #include - +#include +#include #include #include @@ -303,6 +304,114 @@ void SdDrawDocument::UpdatePageObjectsInNotes(USHORT nStartPos) } } +void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String& rNewName) +{ + if (rNewName.Len() == 0) + return; + + SfxItemPool& pPool(GetPool()); + USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD); + for (USHORT nOff = 0; nOff < nCount; nOff++) + { + const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff); + const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem); + + if(pFldItem) + { + SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast( pFldItem->GetField() ) ); + + if(pURLField) + { + XubString aURL = pURLField->GetURL(); + + if (aURL.Len() && (aURL.GetChar(0) == 35) && (aURL.Search(rOldName, 1) == 1)) + { + if (aURL.Len() == rOldName.Len() + 1) // standard page name + { + aURL.Erase (1, aURL.Len() - 1); + aURL += rNewName; + pURLField->SetURL(aURL); + } + else + { + const XubString sNotes = SdResId(STR_NOTES); + if (aURL.Len() == rOldName.Len() + 2 + sNotes.Len() && aURL.Search(sNotes, rOldName.Len() + 2) == rOldName.Len() + 2) + { + aURL.Erase (1, aURL.Len() - 1); + aURL += rNewName; + aURL += ' '; + aURL += sNotes; + pURLField->SetURL(aURL); + } + } + } + } + } + } +} + +void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement) +{ + bool bNotes = (pPage->GetPageKind() == PK_NOTES); + + SfxItemPool& pPool(GetPool()); + USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD); + for (USHORT nOff = 0; nOff < nCount; nOff++) + { + const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff); + const SvxFieldItem* pFldItem; + + if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0) + { + SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast( pFldItem->GetField() ) ); + + if(pURLField) + { + XubString aURL = pURLField->GetURL(); + + if (aURL.Len() && (aURL.GetChar(0) == 35)) + { + XubString aHashSlide('#'); + aHashSlide += SdResId(STR_PAGE); + + if (aURL.CompareTo(aHashSlide, aHashSlide.Len()) == COMPARE_EQUAL) + { + XubString aURLCopy = aURL; + const XubString sNotes = SdResId(STR_NOTES); + + aURLCopy.Erase(0, aHashSlide.Len()); + + bool bNotesLink = (aURLCopy.Len() >= sNotes.Len() + 3 && aURLCopy.Search(sNotes, aURLCopy.Len() - sNotes.Len()) == aURLCopy.Len() - sNotes.Len()); + + if (bNotesLink ^ bNotes) + continue; // no compatible link and page + + if (bNotes) + aURLCopy.Erase(aURLCopy.Len() - sNotes.Len(), sNotes.Len()); + + sal_Int32 number = aURLCopy.ToInt32(); + USHORT realPageNumber = (nPos + 1)/ 2; + + if ( number >= realPageNumber ) + { + // update link page number + number += nIncrement; + aURL.Erase (aHashSlide.Len() + 1, aURL.Len() - aHashSlide.Len() - 1); + aURL += XubString::CreateFromInt32(number); + if (bNotes) + { + aURL += ' '; + aURL += sNotes; + } + pURLField->SetURL(aURL); + } + } + } + } + } + } +} + /************************************************************************* |* |* Seite verschieben @@ -327,11 +436,17 @@ void SdDrawDocument::MovePage(USHORT nPgNum, USHORT nNewPos) void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos) { + bool bLast = (nPos == GetPageCount()); + FmFormModel::InsertPage(pPage, nPos); ((SdPage*)pPage)->ConnectLink(); UpdatePageObjectsInNotes(nPos); + + if (!bLast) + UpdatePageRelativeURLs(static_cast( pPage ), nPos, 1); + } /************************************************************************* @@ -357,10 +472,15 @@ SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum) { SdrPage* pPage = FmFormModel::RemovePage(nPgNum); + bool bLast = ((nPgNum+1)/2 == (GetPageCount()+1)/2); + ((SdPage*)pPage)->DisconnectLink(); ReplacePageInCustomShows( dynamic_cast< SdPage* >( pPage ), 0 ); UpdatePageObjectsInNotes(nPgNum); + if (!bLast) + UpdatePageRelativeURLs((SdPage*)pPage, nPgNum, -1); + return pPage; } @@ -965,8 +1085,8 @@ SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCrea if( (pRet == 0) && bCreate ) { - pRet = new SdAnimationInfo; - rObject.InsertUserData( pRet ); + pRet = new SdAnimationInfo( rObject ); + rObject.InsertUserData( pRet); } return pRet; diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 7413644ced2f..ddb1a471d3e0 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -640,21 +640,21 @@ void SdDrawDocument::CreateDefaultCellStyles() rISet.Put( SvxFontHeightItem( 635, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 18 pt rISet.Put( SvxFontHeightItem( convertFontHeightToCTL( 635 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 18 pt - rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) ); - rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) ); - rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) ); +// rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) ); +// rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) ); +// rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) ); - rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) ); - rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) ); - rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) ); +// rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) ); +// rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) ); +// rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) ); - rISet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE )); - rISet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW )); - rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE)); - rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE)); - rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); - rISet.Put(SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK)); - rISet.Put(SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF)); +// rISet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE )); +// rISet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW )); +// rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE)); +// rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE)); +// rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); +// rISet.Put(SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK)); +// rISet.Put(SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF)); rISet.Put(SvxColorItem(Color(COL_AUTO), EE_CHAR_COLOR )); // Absatzattribute (Edit Engine) @@ -1015,18 +1015,18 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj) if (mbHasOnlineSpellErrors) { sd::ModifyGuard aGuard( this ); - SdrModel* pModel = pObj->GetModel(); - sal_Bool bLock = sal_False; - if ( pModel ) - { - bLock = pModel->isLocked(); - pModel->setLock( sal_True ); - } + SdrModel* pModel = pObj->GetModel(); + sal_Bool bLock = sal_False; + if ( pModel ) + { + bLock = pModel->isLocked(); + pModel->setLock( sal_True ); + } // taking text from the outliner ((SdrTextObj*) pObj)->SetOutlinerParaObject( pOutl->CreateParaObject() ); pObj->BroadcastObjectChange(); - if ( pModel ) + if ( pModel ) pModel->setLock( bLock ); } } diff --git a/sd/source/core/sdobjfac.cxx b/sd/source/core/sdobjfac.cxx index fcede46dfe6f..8657360a65da 100644 --- a/sd/source/core/sdobjfac.cxx +++ b/sd/source/core/sdobjfac.cxx @@ -58,7 +58,7 @@ IMPL_LINK( SdObjectFactory, MakeUserData, SdrObjFactory *, pObjFactory ) switch( pObjFactory->nIdentifier ) { case( SD_ANIMATIONINFO_ID ): - pObjFactory->pNewData = new SdAnimationInfo; + pObjFactory->pNewData = new SdAnimationInfo( *pObjFactory->pObj ); break; case( SD_IMAPINFO_ID ): diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 2aad3821d1be..8088c1ce7df5 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1058,7 +1058,7 @@ Rectangle SdPage::GetLayoutRect() const |* \*************************************************************************/ -const int MAX_PRESOBJS = 5; // maximum number of presentation objects per layout +const int MAX_PRESOBJS = 7; // maximum number of presentation objects per layout const int VERTICAL = 0x8000; struct LayoutDescriptor @@ -1067,10 +1067,10 @@ struct LayoutDescriptor PresObjKind meKind[MAX_PRESOBJS]; bool mbVertical[MAX_PRESOBJS]; - LayoutDescriptor( int nLayout, int k0 = 0, int k1 = 0, int k2 = 0, int k3 = 0, int k4 = 0 ); + LayoutDescriptor( int nLayout, int k0 = 0, int k1 = 0, int k2 = 0, int k3 = 0, int k4 = 0, int k5 = 0, int k6 = 0 ); }; -LayoutDescriptor::LayoutDescriptor( int nLayout, int k0, int k1, int k2, int k3, int k4 ) +LayoutDescriptor::LayoutDescriptor( int nLayout, int k0, int k1, int k2, int k3, int k4, int k5, int k6 ) : mnLayout( nLayout ) { meKind[0] = static_cast(k0 & (~VERTICAL)); mbVertical[0] = (k0 & VERTICAL) == VERTICAL; @@ -1078,6 +1078,8 @@ LayoutDescriptor::LayoutDescriptor( int nLayout, int k0, int k1, int k2, int k3, meKind[2] = static_cast(k2 & (~VERTICAL)); mbVertical[2] = (k2 & VERTICAL) == VERTICAL; meKind[3] = static_cast(k3 & (~VERTICAL)); mbVertical[3] = (k3 & VERTICAL) == VERTICAL; meKind[4] = static_cast(k4 & (~VERTICAL)); mbVertical[4] = (k4 & VERTICAL) == VERTICAL; + meKind[5] = static_cast(k5 & (~VERTICAL)); mbVertical[5] = (k5 & VERTICAL) == VERTICAL; + meKind[6] = static_cast(k6 & (~VERTICAL)); mbVertical[6] = (k6 & VERTICAL) == VERTICAL; } static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout ) @@ -1117,7 +1119,11 @@ static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout ) LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE LayoutDescriptor( 9, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT9 - LayoutDescriptor( 10, PRESOBJ_TEXT, PRESOBJ_NONE ) // AUTOLAYOUT_ONLY_TEXT + LayoutDescriptor( 10, PRESOBJ_TEXT, PRESOBJ_NONE ), // AUTOLAYOUT_ONLY_TEXT + LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, // AUTOLAYOUT_4CLIPART + PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC ), + LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, // AUTOLAYOUT_6CLIPART + PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC ) }; if( (eLayout < AUTOLAYOUT__START) || (eLayout >= AUTOLAYOUT__END) ) @@ -1301,11 +1307,37 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe } case 10: // onlytext { - Size aSize( rRectangle[0].GetSize().Width(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() ); - rRectangle[0].SetSize( aSize ); - rRectangle[0].SetPos( aTitlePos); + Size aSize( rRectangle[0].GetSize().Width(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() ); + rRectangle[0].SetSize( aSize ); + rRectangle[0].SetPos( aTitlePos); break; } + case 11: // title, 6 shapes + { + ULONG nX = long (aLayoutPos.X()); + + aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477); + aLayoutSize.Width() = long (aLayoutSize.Width() * 0.322); + rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize); + + aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05); + rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize); + + aLayoutPos.X() = long (nX + aLayoutSize.Width() * 2 * 1.05); + rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize); + + aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095); + rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize); + + aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05); + rRectangle[5] = Rectangle (aLayoutPos, aLayoutSize); + + aLayoutPos.X() = nX; + rRectangle[6] = Rectangle (aLayoutPos, aLayoutSize); + + break; + } + } } @@ -2753,7 +2785,9 @@ SdPage* SdPage::getImplementation( const ::com::sun::star::uno::Reference< ::com void SdPage::SetName (const String& rName) { + String aOldName = GetName(); FmFormPage::SetName (rName); + static_cast(pModel)->UpdatePageRelativeURLs(aOldName, rName); ActionChanged(); } diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 555dd965a2f5..b3e14e4bd359 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -4889,8 +4889,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a *mpStrm << (sal_uInt32)( mnTextSize + 1 ) << (sal_uInt32)1 << (sal_uInt16)0; mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer - continue; } + continue; } else { diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 747f9efb5b34..bb3c114f603f 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -398,16 +398,21 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su // detect mime type of graphic OUString aMimeType; + OUString sGraphicURL; // first try to detect from graphic object Reference< XPropertySet > xGraphicSet( xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ) ), UNO_QUERY_THROW ); - xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ) ) >>= aMimeType; + xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ) ) >>= sGraphicURL; - if( aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || !aMimeType.getLength() ) + bool bIsLinked = (sGraphicURL.getLength() != 0) && (sGraphicURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.GraphicObject:") ) != 0); + + if( !bIsLinked ) + xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ) ) >>= aMimeType; + + if( bIsLinked || aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || !aMimeType.getLength() ) { // this failed, try to detect it from graphic stream and URL - OUString aURL; - xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ) ) >>= aURL; + OUString aURL( sGraphicURL ); if( aURL.getLength() == 0 ) xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStreamURL" ) ) ) >>= aURL; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 80e76fa2a3fd..6e2a7feb5240 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1773,13 +1773,13 @@ bool HtmlExport::CreateHtmlForPresPages() case presentation::ClickAction_BOOKMARK: { BOOL bIsMasterPage; - USHORT nPgNum = mpDoc->GetPageByName( pInfo->maBookmark, bIsMasterPage ); + USHORT nPgNum = mpDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage ); SdrObject* pObj = NULL; if( nPgNum == SDRPAGE_NOTFOUND ) { // Ist das Bookmark ein Objekt? - pObj = mpDoc->GetObj(pInfo->maBookmark); + pObj = mpDoc->GetObj(pInfo->GetBookmark()); if (pObj) nPgNum = pObj->GetPage()->GetPageNum(); } @@ -1790,7 +1790,7 @@ bool HtmlExport::CreateHtmlForPresPages() break; case presentation::ClickAction_DOCUMENT: - aHRef = pInfo->maBookmark; + aHRef = pInfo->GetBookmark(); break; case presentation::ClickAction_PREVPAGE: diff --git a/sd/source/filter/pptin.cxx b/sd/source/filter/pptin.cxx index 84da311f1763..97141ecdb5d4 100644 --- a/sd/source/filter/pptin.cxx +++ b/sd/source/filter/pptin.cxx @@ -40,6 +40,7 @@ #ifndef _SVXIDS_HRC #include #endif +#include #include #include #include @@ -235,7 +236,7 @@ ImplSdPPTImport::ImplSdPPTImport( SdDrawDocument* pDocument, SvStorage& rStorage InitSvxMSDffManager( nDggContainerOfs, pStData, nSvxMSDffOLEConvFlags2 ); SetSvxMSDffSettings( SVXMSDFF_SETTINGS_CROP_BITMAPS - | SVXMSDFF_SETTINGS_IMPORT_IAS | SVXMSDFF_SETTINGS_IMPORT_PPT ); + | SVXMSDFF_SETTINGS_IMPORT_PPT ); SetModel( mpDoc, 576 ); } } @@ -2098,7 +2099,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv // Lokale Informationen in pInfo eintragen if( pIAtom->nSoundRef ) { - pInfo->maBookmark = ReadSound( pIAtom->nSoundRef ); // Pfad zum Soundfile in MSDOS-Notation + pInfo->SetBookmark( ReadSound( pIAtom->nSoundRef ) ); // Pfad zum Soundfile in MSDOS-Notation pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_SOUND; // RunProgramAction } // if ( nFlags & 0x01 ) // koennen wir nicht ( beim Anklicken markieren ) @@ -2116,7 +2117,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv case 0x02 : // RunProgramAction { pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_PROGRAM; - pInfo->maBookmark = aMacroName; // Programmname in aBookmark + pInfo->SetBookmark( aMacroName ); // Programmname in aBookmark } break; case 0x03 : // JumpAction @@ -2160,23 +2161,36 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv switch( pIAtom->nHyperlinkType ) { case 9: - case 10: - break; case 8: // hyperlink : URL { if ( pPtr->aTarget.Len() ) { - pInfo->maBookmark = String( pPtr->aTarget ); - pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_DOCUMENT; + ::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh(); + if ( pDocShell ) + { + String aBaseURL = pDocShell->GetMedium()->GetBaseURL(); + String aBookmarkURL( pInfo->GetBookmark() ); + INetURLObject aURL( pPtr->aTarget ); + if( INET_PROT_NOT_VALID == aURL.GetProtocol() ) + utl::LocalFileHelper::ConvertSystemPathToURL( pPtr->aTarget, aBaseURL, aBookmarkURL ); + if( !aBookmarkURL.Len() ) + aBookmarkURL = URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pPtr->aTarget, URIHelper::GetMaybeFileHdl(), true ); + pInfo->SetBookmark( aBookmarkURL ); + pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_PROGRAM; + } } } break; + + case 10: + break; + case 7: // hyperlink auf eine Seite { if ( pPtr->aConvSubString.Len() ) { - pInfo->maBookmark = pPtr->aConvSubString; pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_BOOKMARK; + pInfo->SetBookmark( pPtr->aConvSubString ); } } break; diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 7d386623c9b2..ab42e2bde5cb 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -107,18 +107,20 @@ sal_Bool SdPPTFilter::Import() aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentURL" ) ); aConfigData[ 0 ] = aPropValue; - MSFilterTracer aTracer( aTraceConfigPath, &aConfigData ); - aTracer.StartTracing(); - SdPPTImport* pImport = new SdPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium, &aTracer ); - if ( ( bRet = pImport->Import() ) == sal_False ) + if ( pStorage->IsStream( String( RTL_CONSTASCII_USTRINGPARAM("EncryptedSummary") ) ) ) + mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT ); + else { - if ( pStorage->IsStream( String( RTL_CONSTASCII_USTRINGPARAM("EncryptedSummary") ) ) ) - mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT ); - else + MSFilterTracer aTracer( aTraceConfigPath, &aConfigData ); + aTracer.StartTracing(); + + SdPPTImport* pImport = new SdPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium, &aTracer ); + if ( ( bRet = pImport->Import() ) == sal_False ) mrMedium.SetError( SVSTREAM_WRONGVERSION ); + + aTracer.EndTracing(); + delete pImport; } - aTracer.EndTracing(); - delete pImport; delete pDocStream; } } diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx index 8b4ec2819db2..2b9e977b073f 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx @@ -56,6 +56,7 @@ namespace accessibility { // register as listener - need to broadcast state change messages rOutliner.SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) ); + StartListening(rOutliner); } AccessibleOutlineEditSource::~AccessibleOutlineEditSource() @@ -177,13 +178,32 @@ namespace accessibility return Point(); } - void AccessibleOutlineEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint ) + void AccessibleOutlineEditSource::Notify( SfxBroadcaster& rBroadcaster, const SfxHint& rHint ) { - const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >( &rHint ); + bool bDispose = false; - if( pSdrHint && ( pSdrHint->GetKind() == HINT_MODELCLEARED ) ) + if( &rBroadcaster == mpOutliner ) + { + const SfxSimpleHint* pHint = dynamic_cast< const SfxSimpleHint * >( &rHint ); + if( pHint && (pHint->GetId() == SFX_HINT_DYING) ) + { + bDispose = true; + mpOutliner = NULL; + } + } + else + { + const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >( &rHint ); + + if( pSdrHint && ( pSdrHint->GetKind() == HINT_MODELCLEARED ) ) + { + // model is dying under us, going defunc + bDispose = true; + } + } + + if( bDispose ) { - // model is dying under us, going defunc if( mpOutliner ) mpOutliner->SetNotifyHdl( Link() ); mpOutliner = NULL; diff --git a/sd/source/ui/app/menuids_tmpl.src b/sd/source/ui/app/menuids_tmpl.src index 95f162a5aead..54696e34d9e9 100644 --- a/sd/source/ui/app/menuids_tmpl.src +++ b/sd/source/ui/app/menuids_tmpl.src @@ -540,8 +540,8 @@ #define MN_BULLET \ MenuItem\ {\ - Identifier = SID_BULLET ; \ - HelpID = SID_BULLET ; \ + Identifier = SID_CHARMAP ; \ + HelpID = SID_CHARMAP ; \ Text [ en-US ] = "S~pecial Character..." ; \ }; diff --git a/sd/source/ui/app/popup.src b/sd/source/ui/app/popup.src index c98218f9ab22..cdcf3d353dc8 100644 --- a/sd/source/ui/app/popup.src +++ b/sd/source/ui/app/popup.src @@ -355,6 +355,13 @@ Menu RID_TASKPANE_CURRENT_MASTERPAGESSELECTOR_POPUP SEPARATOR + MenuItem + { + Identifier = SID_TP_EDIT_MASTER; + HelpID = SID_TP_EDIT_MASTER; + Text[ en-US ] = "~Edit Master..."; + }; + MN_DELETE_MASTER SEPARATOR diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index 5951fddd0e1c..11c711376f2a 100644 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -229,13 +229,29 @@ Bitmap BMP_FOIL_24_H { File = "foil24_h.bmp" ; }; -Bitmap BMP_FOIL_25 -{ - File = "foil25.bmp" ; -}; -Bitmap BMP_FOIL_25_H -{ - File = "foil25_h.bmp" ; +Bitmap BMP_FOIL_25 +{ + File = "foil25.bmp" ; +}; +Bitmap BMP_FOIL_25_H +{ + File = "foil25_h.bmp" ; +}; +Bitmap BMP_FOIL_26 +{ + File = "foil26.bmp" ; +}; +Bitmap BMP_FOIL_26_H +{ + File = "foil26_h.bmp" ; +}; +Bitmap BMP_FOIL_27 +{ + File = "foil27.bmp" ; +}; +Bitmap BMP_FOIL_27_H +{ + File = "foil27_h.bmp" ; }; Bitmap BMP_FOILH_01 { diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 1b8438e808ed..bbf80e942602 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -273,6 +273,50 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo) pInfo->SetRepresentation( aRepresentation ); } + else if( dynamic_cast< const SvxPagesField* >(pField) ) + { + String aRepresentation; + aRepresentation += sal_Unicode( ' ' ); + + ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL; + if(pViewSh == NULL) + { + ::sd::ViewShellBase* pBase = PTR_CAST(::sd::ViewShellBase, SfxViewShell::Current()); + if(pBase) + pViewSh = pBase->GetMainViewShell().get(); + } + if( !pDoc && pViewSh ) + pDoc = pViewSh->GetDoc(); + + bool bMasterView; + SdPage* pPage = GetCurrentPage( pViewSh, pInfo, bMasterView ); + + USHORT nPageCount = 0; + + if( !bMasterView ) + { + if( pPage && (pPage->GetPageKind() == PK_HANDOUT) && pViewSh ) + { + nPageCount = pViewSh->GetPrintedHandoutPageCount(); + } + else if( pDoc ) + { + nPageCount = (USHORT)pDoc->GetSdPageCount(PK_STANDARD); + } + } + + if( nPageCount > 0 ) + { + aRepresentation = pDoc->CreatePageNumValue(nPageCount); + } + else + { + static String aNumberText( SdResId( STR_FIELD_PLACEHOLDER_COUNT ) ); + aRepresentation = aNumberText; + } + + pInfo->SetRepresentation( aRepresentation ); + } else if( (pURLField = dynamic_cast< const SvxURLField* >(pField)) != 0 ) { switch ( pURLField->GetFormat() ) diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src index 9b85e933bedc..364fe567f990 100644 --- a/sd/source/ui/app/strings.src +++ b/sd/source/ui/app/strings.src @@ -177,9 +177,9 @@ String STR_AUTOLAYOUT_ONLY_TITLE { Text [ en-US ] = "Title Only" ; }; -String STR_AUTOLAYOUT_ONLY_TEXT -{ - Text [ en-US ] = "Centered Text" ; +String STR_AUTOLAYOUT_ONLY_TEXT +{ + Text [ en-US ] = "Centered Text" ; }; String STR_AUTOLAYOUT_TITLE { @@ -253,6 +253,10 @@ String STR_AUTOLAYOUT_4OBJ { Text [ en-US ] = "Title, 4 Objects" ; }; +String STR_AUTOLAYOUT_4CLIPART +{ + Text [ en-US ] = "Title, 4 Cliparts" ; +}; String STR_AL_TITLE_VERT_OUTLINE { Text [ en-US ] = "Title, Vertical Text" ; @@ -269,6 +273,10 @@ String STR_AL_VERT_TITLE_VERT_OUTLINE { Text [ en-US ] = "Vertical Title, Vertical Text" ; }; +String STR_AUTOLAYOUT_6CLIPART +{ + Text [ en-US ] = "Title, 6 Cliparts" ; +}; String STR_AUTOLAYOUT_HANDOUT1 { @@ -1166,6 +1174,10 @@ String STR_FIELD_PLACEHOLDER_NUMBER { Text [ en-US ] = "" ; }; +String STR_FIELD_PLACEHOLDER_COUNT +{ + Text [ en-US ]="" ; +}; String STR_PLACEHOLDER_DESCRIPTION_NOTES { @@ -1258,4 +1270,4 @@ String STR_SET_BACKGROUND_PICTURE Text [ en-US ] = "Set Background Picture for Slide ..." ; }; - \ No newline at end of file + diff --git a/sd/source/ui/app/toolbox2_tmpl.src b/sd/source/ui/app/toolbox2_tmpl.src index afaa071ffdf7..09ccd217c89e 100644 --- a/sd/source/ui/app/toolbox2_tmpl.src +++ b/sd/source/ui/app/toolbox2_tmpl.src @@ -461,8 +461,8 @@ ToolBox RID_GRAPHIC_TEXT_TOOLBOX #endif ToolBoxItem { - Identifier = SID_BULLET; - HelpId = SID_BULLET; + Identifier = SID_CHARMAP; + HelpId = SID_CHARMAP; Hide = TRUE; }; }; @@ -670,8 +670,8 @@ ToolBox RID_GRAPHIC_TEXT_TOOLBOX #endif ToolBoxItem { - Identifier = SID_BULLET; - HelpId = SID_BULLET; + Identifier = SID_CHARMAP; + HelpId = SID_CHARMAP; Hide = TRUE; }; }; @@ -879,8 +879,8 @@ ToolBox RID_GRAPHIC_TEXT_TOOLBOX #endif ToolBoxItem { - Identifier = SID_BULLET; - HelpId = SID_BULLET; + Identifier = SID_CHARMAP; + HelpId = SID_CHARMAP; Hide = TRUE; }; }; diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 63a487b69016..ba86987ebe13 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -81,7 +81,7 @@ IMPL_ABSTDLG_BASE(AbstractMorphDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdPrintDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractSfxSingleTabDialog_Impl); +IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl); IMPL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl); @@ -343,11 +343,20 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs ) } // AbstractSdPresLayoutDlg_Impl end -//AbstractSfxSingleTabDialog_Impl begin -const SfxItemSet* AbstractSfxSingleTabDialog_Impl::GetOutputItemSet() const +//SfxAbstractDialog_Impl begin +const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const { return pDlg->GetOutputItemSet(); } +void AbstractSfxDialog_Impl::SetText( const XubString& rStr ) +{ + pDlg->SetText( rStr ); +} +String AbstractSfxDialog_Impl::GetText() const +{ + return pDlg->GetText(); +} + //AbstractSfxSingleTabDialog_Impl end //AbstractSdVectorizeDlg_Impl begin @@ -519,9 +528,9 @@ SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg( :: } // add for SdTabTemplateDlg end -AbstractSfxSingleTabDialog* SdAbstractDialogFactory_Impl::CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) +SfxAbstractDialog* SdAbstractDialogFactory_Impl::CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) { - return new AbstractSfxSingleTabDialog_Impl( new SdActionDlg( pParent, pAttr, pView ) ); + return new AbstractSfxDialog_Impl( new SdActionDlg( pParent, pAttr, pView ) ); } // add for SdVectorizeDlg begin diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index a8ec164d916f..0e25a1b683c5 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -32,6 +32,7 @@ // include --------------------------------------------------------------- #include "sdabstdlg.hxx" +#include #define DECL_ABSTDLG_BASE(Class,DialogClass) \ DialogClass* pDlg; \ @@ -229,10 +230,12 @@ class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg // add for SdActionDlg class SfxSingleTabDialog; -class AbstractSfxSingleTabDialog_Impl :public AbstractSfxSingleTabDialog +class AbstractSfxDialog_Impl : public SfxAbstractDialog { - DECL_ABSTDLG_BASE(AbstractSfxSingleTabDialog_Impl,SfxSingleTabDialog) + DECL_ABSTDLG_BASE(AbstractSfxDialog_Impl,SfxModalDialog) virtual const SfxItemSet* GetOutputItemSet() const; + virtual void SetText( const XubString& rStr ); + virtual String GetText() const; }; // add for SdVectorizeDlg @@ -285,7 +288,7 @@ public: virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ); virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs); virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ); - virtual AbstractSfxSingleTabDialog* CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ); + virtual SfxAbstractDialog* CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ); virtual AbstractSdVectorizeDlg* CreateSdVectorizeDlg( ::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ); virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( ::Window* pWindow, DocumentType eDocType); diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx index 6d2d398e0e6f..65a2bb23cb33 100644 --- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx +++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx @@ -176,6 +176,7 @@ void SAL_CALL TaskPanelFactory::initialize( xCM->getConfigurationController(), UNO_QUERY_THROW); xCC->addResourceFactory(FrameworkHelper::msMasterPagesTaskPanelURL, this); xCC->addResourceFactory(FrameworkHelper::msLayoutTaskPanelURL, this); + xCC->addResourceFactory(FrameworkHelper::msTableDesignPanelURL, this); xCC->addResourceFactory(FrameworkHelper::msCustomAnimationTaskPanelURL, this); xCC->addResourceFactory(FrameworkHelper::msSlideTransitionTaskPanelURL, this); } @@ -211,6 +212,10 @@ Reference SAL_CALL TaskPanelFactory::createResource ( { ePaneId = TaskPaneViewShell::PID_LAYOUT; } + else if (sResourceURL.equals(FrameworkHelper::msTableDesignPanelURL)) + { + ePaneId = TaskPaneViewShell::PID_TABLE_DESIGN; + } else if (sResourceURL.equals(FrameworkHelper::msCustomAnimationTaskPanelURL)) { ePaneId = TaskPaneViewShell::PID_CUSTOM_ANIMATION; diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 5d01f6e145f0..64fb3783d78d 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -48,9 +48,9 @@ #include "sdresid.hxx" #include #include -#include #include #include +#include #ifdef IRIX #include @@ -98,8 +98,8 @@ FunctionReference FuBullet::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd void FuBullet::DoExecute( SfxRequest& rReq ) { - if( rReq.GetSlot() == SID_BULLET ) - InsertSpecialCharacter(); + if( rReq.GetSlot() == SID_CHARMAP ) + InsertSpecialCharacter(rReq); else { sal_Unicode cMark = 0; @@ -173,41 +173,78 @@ void FuBullet::InsertFormattingMark( sal_Unicode cMark ) } } -void FuBullet::InsertSpecialCharacter() +void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) { - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AbstractSvxCharacterMap* pDlg = pFact ? pFact->CreateSvxCharacterMap( NULL, RID_SVXDLG_CHARMAP, FALSE ) : 0; - - if( !pDlg ) - return; - - SfxItemSet aFontAttr( mpDoc->GetPool() ); - mpView->GetAttributes( aFontAttr ); - const SvxFontItem* pFontItem = (const SvxFontItem*)aFontAttr.GetItem( SID_ATTR_CHAR_FONT ); - if( pFontItem ) - { - Font aCurrentFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), Size( 1, 1 ) ); - pDlg->SetFont( aCurrentFont ); - } - - // Wenn Zeichen selektiert ist kann es angezeigt werden - // pDLg->SetFont( ); - // pDlg->SetChar( ); - USHORT nResult = pDlg->Execute(); - - //char c; - String aString; + const SfxItemSet *pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem = 0; + if( pArgs ) + pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); + String aChars, aFontName; Font aFont; - - if( nResult == RET_OK ) + if ( pItem ) { - aFont = pDlg->GetCharFont(); - aString = pDlg->GetCharacters(); + aChars = ((const SfxStringItem*)pItem)->GetValue(); + const SfxPoolItem* pFtItem = NULL; + pArgs->GetItemState( mpDoc->GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); + const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); + if ( pFontItem ) + { + aFontName = pFontItem->GetValue(); + aFont = Font( aFontName, Size(1,1) ); + } + else + { + SfxItemSet aFontAttr( mpDoc->GetPool() ); + mpView->GetAttributes( aFontAttr ); + const SvxFontItem* pFItem = (const SvxFontItem*)aFontAttr.GetItem( SID_ATTR_CHAR_FONT ); + if( pFItem ) + aFont = Font( pFItem->GetFamilyName(), pFItem->GetStyleName(), Size( 1, 1 ) ); + } } - delete( pDlg ); - if( nResult == RET_OK ) + if (!aChars.Len() ) + { + SfxAllItemSet aSet( mpDoc->GetPool() ); + aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + + SfxItemSet aFontAttr( mpDoc->GetPool() ); + mpView->GetAttributes( aFontAttr ); + const SvxFontItem* pFontItem = (const SvxFontItem*)aFontAttr.GetItem( SID_ATTR_CHAR_FONT ); + if( pFontItem ) + aSet.Put( *pFontItem ); + + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SfxAbstractDialog* pDlg = pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, + mpView->GetViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), + RID_SVXDLG_CHARMAP ) : 0; + if( !pDlg ) + return; + + // Wenn Zeichen selektiert ist kann es angezeigt werden + // pDLg->SetFont( ); + // pDlg->SetChar( ); + USHORT nResult = pDlg->Execute(); + if( nResult == RET_OK ) + { + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + if ( pFItem ) + { + aFont.SetName( pFItem->GetFamilyName() ); + aFont.SetStyleName( pFItem->GetStyleName() ); + aFont.SetCharSet( pFItem->GetCharSet() ); + aFont.SetPitch( pFItem->GetPitch() ); + } + + if ( pCItem ) + aChars = pCItem->GetValue(); + } + + delete( pDlg ); + } + + if( aChars.Len() ) { OutlinerView* pOV = NULL; ::Outliner* pOL = NULL; @@ -248,7 +285,7 @@ void FuBullet::InsertSpecialCharacter() SfxUndoManager& rUndoMgr = pOL->GetUndoManager(); rUndoMgr.EnterListAction(String(SdResId(STR_UNDO_INSERT_SPECCHAR)), aEmptyStr ); - pOV->InsertText(aString, TRUE); + pOV->InsertText(aChars, TRUE); // attributieren (Font setzen) SfxItemSet aSet(pOL->GetEmptyItemSet()); @@ -280,7 +317,7 @@ void FuBullet::InsertSpecialCharacter() void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFrame* pViewFrame ) { - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BULLET ) || + if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHARMAP ) || SFX_ITEM_AVAILABLE == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || SFX_ITEM_AVAILABLE == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || SFX_ITEM_AVAILABLE == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || @@ -305,7 +342,7 @@ void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFra } if( !bTextEdit && (dynamic_cast( pViewShell ) == 0) ) - rSet.DisableItem(SID_BULLET); + rSet.DisableItem(SID_CHARMAP); if(!bTextEdit || !bCtlEnabled ) { diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx index 451c442cd2ce..7542aff67e7a 100644 --- a/sd/source/ui/func/fuconnct.cxx +++ b/sd/source/ui/func/fuconnct.cxx @@ -79,7 +79,7 @@ void FuConnectionDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ::std::auto_ptr pDlg( pFact ? pFact->CreateSfxSingleTabDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0); + ::std::auto_ptr pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 0a539111fb82..a0d7c47d9841 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -1006,7 +1006,7 @@ BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // jump to object/page aHelpText = String(SdResId(STR_CLICK_ACTION_BOOKMARK)); aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); - aHelpText.Append( String(INetURLObject::decode( pInfo->maBookmark, '%', INetURLObject::DECODE_WITH_CHARSET ) )); + aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) )); } break; @@ -1015,7 +1015,7 @@ BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // jump to document (object/page) aHelpText = String(SdResId(STR_CLICK_ACTION_DOCUMENT)); aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); - aHelpText.Append( String(INetURLObject::decode( pInfo->maBookmark, '%', INetURLObject::DECODE_WITH_CHARSET ) )); + aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) )); } break; @@ -1024,7 +1024,7 @@ BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // execute program aHelpText = String(SdResId(STR_CLICK_ACTION_PROGRAM)); aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); - aHelpText.Append( String(INetURLObject::decode( pInfo->maBookmark, '%', INetURLObject::DECODE_WITH_CHARSET ) )); + aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) )); } break; @@ -1034,18 +1034,19 @@ BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE aHelpText = String(SdResId(STR_CLICK_ACTION_MACRO)); aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); - if ( SfxApplication::IsXScriptURL( pInfo->maBookmark ) ) + if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) { - aHelpText.Append( pInfo->maBookmark ); + aHelpText.Append( pInfo->GetBookmark() ); } else { + String sBookmark( pInfo->GetBookmark() ); sal_Unicode cToken = '.'; - aHelpText.Append( pInfo->maBookmark.GetToken( 2, cToken ) ); + aHelpText.Append( sBookmark.GetToken( 2, cToken ) ); aHelpText.Append( cToken ); - aHelpText.Append( pInfo->maBookmark.GetToken( 1, cToken ) ); + aHelpText.Append( sBookmark.GetToken( 1, cToken ) ); aHelpText.Append( cToken ); - aHelpText.Append( pInfo->maBookmark.GetToken( 0, cToken ) ); + aHelpText.Append( sBookmark.GetToken( 0, cToken ) ); } } break; diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx index 28e4957d4208..948117b22425 100644 --- a/sd/source/ui/func/fumeasur.cxx +++ b/sd/source/ui/func/fumeasur.cxx @@ -78,7 +78,7 @@ void FuMeasureDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ::std::auto_ptr pDlg( pFact ? pFact->CreateSfxSingleTabDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 ); + ::std::auto_ptr pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 ); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index d96b65d00510..694f1ae6615a 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -186,7 +186,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) eClickAction = pInfo->meClickAction; nClickActionSet = ATTR_SET; - aBookmark = pInfo->maBookmark; + aBookmark = pInfo->GetBookmark(); nBookmarkSet = ATTR_SET; eSecondEffect = pInfo->meSecondEffect; @@ -243,7 +243,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) if( eClickAction != pInfo->meClickAction ) nClickActionSet = ATTR_MIXED; - if( aBookmark != pInfo->maBookmark ) + if( aBookmark != pInfo->GetBookmark() ) nBookmarkSet = ATTR_MIXED; if( eSecondEffect != pInfo->meSecondEffect ) @@ -353,7 +353,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) aSound = pInfo->maSoundFile; nSoundFileSet = ATTR_SET; bPlayFull = pInfo->mbPlayFull; nPlayFullSet = ATTR_SET; eClickAction = pInfo->meClickAction; nClickActionSet = ATTR_SET; - aBookmark = pInfo->maBookmark; nBookmarkSet = ATTR_SET; + aBookmark = pInfo->GetBookmark(); nBookmarkSet = ATTR_SET; eSecondEffect = pInfo->meSecondEffect; nSecondEffectSet = ATTR_SET; eSecondSpeed = pInfo->meSecondSpeed; nSecondSpeedSet = ATTR_SET; bSecondSoundOn = pInfo->mbSecondSoundOn; nSecondSoundOnSet = ATTR_SET; @@ -474,7 +474,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, FALSE)); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - AbstractSfxSingleTabDialog* pDlg = pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0; + SfxAbstractDialog* pDlg = pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0; USHORT nResult = pDlg ? pDlg->Execute() : RET_CANCEL; @@ -733,7 +733,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) pAction->SetPlayFull(pInfo->mbPlayFull, pInfo->mbPlayFull); // pAction->SetPathObj(pInfo->mpPathObj, pInfo->mpPathObj); pAction->SetClickAction(pInfo->meClickAction, pInfo->meClickAction); - pAction->SetBookmark(pInfo->maBookmark, pInfo->maBookmark); + pAction->SetBookmark(pInfo->GetBookmark(), pInfo->GetBookmark()); // pAction->SetInvisibleInPres(pInfo->mbInvisibleInPresentation, TRUE); pAction->SetVerb(pInfo->mnVerb, pInfo->mnVerb); pAction->SetSecondEffect(pInfo->meSecondEffect, pInfo->meSecondEffect); @@ -762,10 +762,10 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) pAction->SetPlayFull(pInfo->mbPlayFull, bPlayFull); pAction->SetPathObj(pInfo->mpPathObj, pPath); pAction->SetClickAction(pInfo->meClickAction, eClickAction); - pAction->SetBookmark(pInfo->maBookmark, aBookmark); + pAction->SetBookmark(pInfo->GetBookmark(), aBookmark); // pAction->SetInvisibleInPres(pInfo->mbInvisibleInPresentation, // pInfo->mbInvisibleInPresentation); - pAction->SetVerb(pInfo->mnVerb, (USHORT)pInfo->maBookmark.ToInt32() ); + pAction->SetVerb(pInfo->mnVerb, (USHORT)pInfo->GetBookmark().ToInt32() ); pAction->SetSecondEffect(pInfo->meSecondEffect, eSecondEffect); pAction->SetSecondSpeed(pInfo->meSecondSpeed, eSecondSpeed); pAction->SetSecondSoundOn(pInfo->mbSecondSoundOn, bSecondSoundOn); @@ -807,7 +807,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) pInfo->meClickAction = eClickAction; if (nBookmarkSet == ATTR_SET) - pInfo->maBookmark = aBookmark; + pInfo->SetBookmark( aBookmark ); if (nSecondEffectSet == ATTR_SET) pInfo->meSecondEffect = eSecondEffect; diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index cab26dee337e..068686d4a709 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1254,7 +1254,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_BOOKMARK: { // Sprung zu Bookmark (Seite oder Objekt) - SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->maBookmark); + SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->GetBookmark()); mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L); bAnimated = TRUE; @@ -1263,11 +1263,12 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_DOCUMENT: { + String sBookmark( pInfo->GetBookmark() ); // Sprung zu Dokument - if (pInfo->maBookmark.Len()) + if (sBookmark.Len()) { SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName()); - SfxStringItem aStrItem(SID_FILE_NAME, pInfo->maBookmark); + SfxStringItem aStrItem(SID_FILE_NAME, sBookmark); SfxViewFrame* pFrame = mpViewShell->GetViewFrame(); SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); SfxBoolItem aBrowseItem( SID_BROWSE, TRUE ); @@ -1328,7 +1329,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) { try { - mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->maBookmark ), uno::UNO_QUERY_THROW ); + mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->GetBookmark()), uno::UNO_QUERY_THROW ); mxPlayer->start(); } catch( uno::Exception& e ) @@ -1352,7 +1353,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_PROGRAM: { String aBaseURL = GetDocSh()->GetMedium()->GetBaseURL(); - INetURLObject aURL( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pInfo->maBookmark, + INetURLObject aURL( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pInfo->GetBookmark(), URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ) ); @@ -1377,7 +1378,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_MACRO: { // Execute makro - String aMacro = pInfo->maBookmark; + String aMacro = pInfo->GetBookmark(); if ( SfxApplication::IsXScriptURL( aMacro ) ) { diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index dfd50a00ec5d..28bb58538d85 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -49,6 +49,7 @@ #include "sdenumdef.hxx" #include "sdresid.hxx" #include "sdabstdlg.hxx" +#include "app.hrc" #include namespace sd { @@ -81,32 +82,52 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) USHORT nHelpLine = 0; BOOL bCreateNew = TRUE; + // Get index of snap line or snap point from the request. + SFX_REQUEST_ARG (rReq, pHelpLineIndex, SfxUInt32Item, ID_VAL_INDEX, FALSE); + if (pHelpLineIndex != NULL) + { + nHelpLine = static_cast(pHelpLineIndex->GetValue()); + // Reset the argument pointer to trigger the display of the dialog. + pArgs = NULL; + } + if ( !pArgs ) { - SfxItemSet aNewAttr(mpViewShell->GetPool(), ATTR_SNAPLINE_START, - ATTR_SNAPLINE_END); - Point aLinePos = static_cast(mpViewShell)->GetMousePos(); - static_cast(mpViewShell)->SetMousePosFreezed( FALSE ); - BOOL bLineExist = FALSE; - + SfxItemSet aNewAttr(mpViewShell->GetPool(), ATTR_SNAPLINE_START, ATTR_SNAPLINE_END); + bool bLineExist (false); pPV = mpView->GetSdrPageView(); + Point aLinePos; - if ( aLinePos.X() >= 0 ) + if (pHelpLineIndex == NULL) { - aLinePos = mpWindow->PixelToLogic(aLinePos); - USHORT nHitLog = (USHORT) mpWindow->PixelToLogic(Size(HITPIX,0)).Width(); - bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow, - nHelpLine, pPV); - if ( bLineExist ) - aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos(); - else - pPV = mpView->GetSdrPageView(); + // The index of the snap line is not provided as argument to the + // request. Determine it from the mouse position. - pPV->LogicToPagePos(aLinePos); + aLinePos = static_cast(mpViewShell)->GetMousePos(); + static_cast(mpViewShell)->SetMousePosFreezed( FALSE ); + + + if ( aLinePos.X() >= 0 ) + { + aLinePos = mpWindow->PixelToLogic(aLinePos); + USHORT nHitLog = (USHORT) mpWindow->PixelToLogic(Size(HITPIX,0)).Width(); + bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow, nHelpLine, pPV); + if ( bLineExist ) + aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos(); + else + pPV = mpView->GetSdrPageView(); + + pPV->LogicToPagePos(aLinePos); + } + else + aLinePos = Point(0,0); } else - aLinePos = Point(0,0); - + { + OSL_ASSERT(pPV!=NULL); + aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos(); + bLineExist = true; + } aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X())); aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y())); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index a6c7c6f073ae..cb6b42dfc2fb 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -120,12 +120,12 @@ static USHORT SidArray[] = { SID_SET_SUPER_SCRIPT, // 10294 SID_SET_SUB_SCRIPT, // 10295 SID_HYPERLINK_GETLINK, // 10361 + SID_CHARMAP, // 10503 SID_TEXTDIRECTION_LEFT_TO_RIGHT, // 10907 SID_TEXTDIRECTION_TOP_TO_BOTTOM, // 10908 SID_ATTR_PARA_LEFT_TO_RIGHT, // 10950 SID_ATTR_PARA_RIGHT_TO_LEFT, // 10951 FN_NUM_BULLET_ON, // 20138 - SID_BULLET, // 27019 SID_PARASPACE_INCREASE, // 27346 SID_PARASPACE_DECREASE, // 27347 0 }; @@ -982,7 +982,7 @@ BOOL FuText::KeyInput(const KeyEvent& rKEvt) } USHORT nKey = nCode.GetCode(); - KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2() ); + KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2(), nCode.IsMod3() ); KeyEvent aKEvt(rKEvt.GetCharCode(), aKeyCode); BOOL bOK = TRUE; diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx index d602fa3ee9f4..7dcd41f87339 100644 --- a/sd/source/ui/func/unoaprms.cxx +++ b/sd/source/ui/func/unoaprms.cxx @@ -74,7 +74,7 @@ SdAnimationPrmsUndoAction::SdAnimationPrmsUndoAction( pNewPathObj = pOldPathObj = pInfo->mpPathObj; eNewClickAction = eOldClickAction = pInfo->meClickAction; - aNewBookmark = aOldBookmark = pInfo->maBookmark; + aNewBookmark = aOldBookmark = pInfo->GetBookmark(); // bNewInvisibleInPres = bOldInvisibleInPres= pInfo->mbInvisibleInPresentation; nNewVerb = nOldVerb = pInfo->mnVerb; nNewPresOrder = nOldPresOrder = pInfo->mnPresOrder; @@ -115,7 +115,7 @@ void SdAnimationPrmsUndoAction::Undo() pInfo->mbPlayFull = bOldPlayFull; // pInfo->mSetPath(pOldPathObj); pInfo->meClickAction = eOldClickAction; - pInfo->maBookmark = aOldBookmark; + pInfo->SetBookmark( aOldBookmark ); // pInfo->mbInvisibleInPresentation = bOldInvisibleInPres; pInfo->mnVerb = nOldVerb; pInfo->mnPresOrder = nOldPresOrder; @@ -161,7 +161,7 @@ void SdAnimationPrmsUndoAction::Redo() pInfo->mbPlayFull = bNewPlayFull; // pInfo->mSetPath(pNewPathObj); pInfo->meClickAction = eNewClickAction; - pInfo->maBookmark = aNewBookmark; + pInfo->SetBookmark( aNewBookmark ); // pInfo->mbInvisibleInPresentation = bNewInvisibleInPres; pInfo->mnVerb = nNewVerb; pInfo->mnPresOrder = nNewPresOrder; diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 7a4ad2865140..d85b09d6ab07 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -475,6 +475,24 @@ private: */ void StopSlideShow (bool bCloseFrame); + /** Show the context menu for snap lines and points. Because snap lines + can not be selected the index of the snap line/point for which the + popup menu is opened has to be passed to the processing slot + handlers. This can be done only by manually showing the popup menu. + @param rPageView + The page view is used to access the help lines. + @param nSnapLineIndex + Index of the snap line or snap point for which to show the + context menu. + @param rMouseLocation + The mouse location defines the location at which to display the + context menu. + */ + void ShowSnapLineContextMenu ( + SdrPageView& rPageView, + const USHORT nSnapLineIndex, + const Point& rMouseLocation); + using ViewShell::Notify; }; diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx index 54cd483272d5..c508410045aa 100644 --- a/sd/source/ui/inc/PreviewRenderer.hxx +++ b/sd/source/ui/inc/PreviewRenderer.hxx @@ -78,11 +78,17 @@ public: When the actual preview can not be created for some reason, then this text is painted in an empty rectangle of the requested size instead. + @param bObeyHighContrastMode + When then the high contrast mode of the application is + ignored and the preview is rendered in normal mode. When + and high contrast mode is active then the preview is + rendered in high contrast mode. */ Image RenderPage ( const SdPage* pPage, const sal_Int32 nWidth, - const String& sSubstitutionText); + const String& sSubstitutionText, + const bool bObeyHighContrastMode = true); /** Render a page with the given pixel size. @param pPage @@ -93,11 +99,17 @@ public: When the actual preview can not be created for some reason, then this text is painted in an empty rectangle of the requested size instead. + @param bObeyHighContrastMode + When then the high contrast mode of the application is + ignored and the preview is rendered in normal mode. When + and high contrast mode is active then the preview is + rendered in high contrast mode. */ Image RenderPage ( const SdPage* pPage, const Size aPreviewPixelSize, - const String& sSubstitutionText); + const String& sSubstitutionText, + const bool bObeyHighContrastMode = true); /** Render an image that contains the given substitution text instead of a slide preview. @@ -131,7 +143,8 @@ private: bool Initialize ( const SdPage* pPage, - const Size& rPixelSize); + const Size& rPixelSize, + const bool bObeyHighContrastMode); void Cleanup (void); void PaintPage (const SdPage* pPage); void PaintSubstitutionText (const String& rSubstitutionText); diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 6ccea228c3a7..395566f0cded 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -301,6 +301,9 @@ public: USHORT GetPrintedHandoutPageNum (void) const { return mnPrintedHandoutPageNum; } void SetPrintedHandoutPageNum (USHORT nPageNumber) {mnPrintedHandoutPageNum=nPageNumber; } + USHORT GetPrintedHandoutPageCount(void) const { return mnPrintedHandoutPageCount; } + void SetPrintedHandoutPageCount (USHORT nPageCount) {mnPrintedHandoutPageCount=nPageCount; } + virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE ); void GetMenuState(SfxItemSet& rSet); @@ -496,6 +499,7 @@ protected: BOOL mbStartShowWithDialog; // Praesentation wurde ueber Dialog gestartet USHORT mnPrintedHandoutPageNum; // Page number of the handout page that is to be printed. + USHORT mnPrintedHandoutPageCount; // Page count of the handout pages that are to be printed. //af BOOL bPrintDirectSelected; // Print only selected objects in direct print //afString sPageRange; // pagerange if selected objects in direct print diff --git a/sd/source/ui/inc/fubullet.hxx b/sd/source/ui/inc/fubullet.hxx index 47c0fb1a7f23..0b41711995f2 100644 --- a/sd/source/ui/inc/fubullet.hxx +++ b/sd/source/ui/inc/fubullet.hxx @@ -58,7 +58,7 @@ private: SdDrawDocument* pDoc, SfxRequest& rReq); - void InsertSpecialCharacter(); + void InsertSpecialCharacter( SfxRequest& rReq ); void InsertFormattingMark( sal_Unicode cMark ); }; diff --git a/sd/source/ui/inc/res_bmp.hrc b/sd/source/ui/inc/res_bmp.hrc index 46787633b898..931871fd9ff7 100644 --- a/sd/source/ui/inc/res_bmp.hrc +++ b/sd/source/ui/inc/res_bmp.hrc @@ -114,6 +114,8 @@ #define BMP_COLLAPSE RID_APP_START+52 #define BMP_GRAPHIC RID_APP_START+53 +#define BMP_FOIL_26 RID_APP_START+54 + // Bimaps fuer ValueSet im EffekteWindow #define BMP_EFFECT_NONE RID_APP_START+105 #define BMP_TEXTEFFECT_DISCARD_FROM_T RID_APP_START+106 @@ -231,6 +233,9 @@ #define BMP_FOILH_09_H RID_SD_START+333 #define BMP_FOIL_25_H RID_SD_START+334 +#define BMP_FOIL_26_H RID_SD_START+335 +#define BMP_FOIL_27 RID_SD_START+336 +#define BMP_FOIL_27_H RID_SD_START+337 // ----------------------------------------------------------------------------- diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc index db2683bf5c6c..b04582046502 100644 --- a/sd/source/ui/inc/strings.hrc +++ b/sd/source/ui/inc/strings.hrc @@ -198,11 +198,13 @@ #define STR_AUTOLAYOUT_HANDOUT6 (RID_APP_START+235) #define STR_AUTOLAYOUT_NOTES (RID_APP_START+236) #define STR_AUTOLAYOUT_HANDOUT9 (RID_APP_START+237) -#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+238) - +#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+238) +#define STR_AUTOLAYOUT_4CLIPART (RID_APP_START+239) #define STR_TRANSFORM (RID_APP_START+240) +#define STR_AUTOLAYOUT_6CLIPART (RID_APP_START+241) + #define STR_EXPORT_HTML_NAME (RID_APP_START+244) #define STR_EXPORT_HTML_FILTER (RID_APP_START+245) #define STR_EXPORT_DIALOG_TITLE (RID_APP_START+261) @@ -488,6 +490,7 @@ #define STR_FIELD_PLACEHOLDER_NUMBER (RID_APP_START+695) #define STR_UNDO_HANGULHANJACONVERSION (RID_APP_START+696) +#define STR_FIELD_PLACEHOLDER_COUNT (RID_APP_START+697) #define STR_LEFT_PANE_DRAW_TITLE (RID_APP_START+700) #define STR_LEFT_PANE_IMPRESS_TITLE (RID_APP_START+701) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 48da5d474667..c0e550f69378 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -90,17 +90,6 @@ #include #include -// TODO(Q3): This breaks encapsulation. Either export -// these strings from avmedia, or provide an XManager -// factory there -#ifdef WNT -# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_DirectX" -#elif defined QUARTZ -# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_QuickTime" -#else -# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_Java" -#endif - using ::rtl::OUString; using ::rtl::OString; using ::cppu::OInterfaceContainerHelper; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 43c568b375d4..0c1cbd47f8e5 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -429,9 +429,8 @@ bool SlideSorterController::Command ( // When there is no selection, then we show the insertion // indicator so that the user knows where a page insertion // would take place. - mrView.GetOverlay().GetInsertionIndicatorOverlay() - .SetPosition( - pWindow->PixelToLogic(rEvent.GetMousePosPixel())); + mrView.GetOverlay().GetInsertionIndicatorOverlay().SetPosition( + pWindow->PixelToLogic(rEvent.GetMousePosPixel())); mrView.GetOverlay().GetInsertionIndicatorOverlay().Show(); } @@ -473,11 +472,11 @@ bool SlideSorterController::Command ( mbIsContextMenuOpen = false; if (pPage == NULL) { - // Select slide before the insertion indicator before it is - // hidden, so that a pending slide insertion slot finds the - // right place to insert a new slide. - mpPageSelector->SelectPage( - mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex()-1); + // Remember the position of the insertion indicator before + // it is hidden, so that a pending slide insertion slot call + // finds the right place to insert a new slide. + GetSelectionManager()->SetInsertionPosition( + mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex()); mrView.GetOverlay().GetInsertionIndicatorOverlay().Hide(); } bEventHasBeenHandled = true; diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 192a5b58e224..f157968d6c2d 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -251,19 +251,7 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow) } else { - model::PageEnumeration aSelectedPages - (model::PageEnumerationProvider::CreateSelectedPagesEnumeration( - mrSlideSorter.GetModel())); - // Initialize (for the case of an empty selection) with the position - // at the end of the document. - nInsertPosition = mrSlideSorter.GetModel().GetPageCount(); - while (aSelectedPages.HasMoreElements()) - { - nInsertPosition = aSelectedPages.GetNextElement()->GetPage()->GetPageNum(); - // Convert *2+1 index to straight index ((n-1)/2) after the page - // (+1). - nInsertPosition = (nInsertPosition-1)/2 + 1; - } + nInsertPosition = mrController.GetSelectionManager()->GetInsertionPosition(); } return nInsertPosition; diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 5bbef1103a6b..c3040bd48853 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -338,6 +338,10 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible) { iListener->Call(NULL); } + + // Reset the insertion position: until set again it is calculated from + // the current selection. + mnInsertionPosition = -1; } } @@ -594,6 +598,49 @@ Rectangle SelectionManager::ResolveLargeSelection ( +sal_Int32 SelectionManager::GetInsertionPosition (void) const +{ + sal_Int32 nInsertionPosition (mnInsertionPosition); + if (nInsertionPosition < 0) + { + model::PageEnumeration aSelectedPages + (model::PageEnumerationProvider::CreateSelectedPagesEnumeration( + mrSlideSorter.GetModel())); + // Initialize (for the case of an empty selection) with the position + // at the end of the document. + nInsertionPosition = mrSlideSorter.GetModel().GetPageCount(); + while (aSelectedPages.HasMoreElements()) + { + const sal_Int32 nPosition (aSelectedPages.GetNextElement()->GetPage()->GetPageNum()); + // Convert *2+1 index to straight index (n-1)/2 after the page + // (+1). + nInsertionPosition = (nPosition-1)/2 + 1; + } + + } + return nInsertionPosition; +} + + + + +void SelectionManager::SetInsertionPosition (const sal_Int32 nInsertionPosition) +{ + if (nInsertionPosition < 0) + mnInsertionPosition = -1; + else if (nInsertionPosition > mrSlideSorter.GetModel().GetPageCount()) + { + // Assert but then ignore invalid values. + OSL_ASSERT(nInsertionPosition<=mrSlideSorter.GetModel().GetPageCount()); + return; + } + else + mnInsertionPosition = nInsertionPosition; +} + + + + //===== VerticalVisibleAreaScroller =========================================== namespace { diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx index 554c2fb1911f..10b3167af563 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx @@ -132,6 +132,21 @@ public: */ void RemoveSelectionChangeListener (const Link& rListener); + /** Return the position where to insert pasted slides based on the + current selection. When there is a selection then the insert + position is behind the last slide. When the selection is empty then + most of the time the insert position is at the end of the document. + There is an exception right after the display of a popup-menu. The + position of the associated insertion marker is stored here and reset + the next time the selection changes. + */ + sal_Int32 GetInsertionPosition (void) const; + + /** Store an insertion position temporarily. It is reset when the + selection changes the next time. + */ + void SetInsertionPosition (const sal_Int32 nInsertionPosition); + private: SlideSorter& mrSlideSorter; SlideSorterController& mrController; @@ -149,6 +164,12 @@ private: */ bool mbIsMakeSelectionVisiblePending; + /** The insertion position is only temporarily valid. Negative values + indicate that the explicit insertion position is not valid. In this + case GetInsertionPosition() calculates it from the current selection. + */ + sal_Int32 mnInsertionPosition; + /** Delete the given list of normal pages. This method is a helper function for DeleteSelectedPages(). @param rSelectedNormalPages @@ -187,7 +208,6 @@ private: const model::SharedPageDescriptor& rpFirst, const model::SharedPageDescriptor& rpLast, const SelectionHint eSelectionHint); - }; } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx index 4e415eba03b2..a7652d87d35c 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx @@ -140,8 +140,9 @@ protected: private: Point maPosition; - basegfx::B2DRange maBoundingBox; - basegfx::B2DPolyPolygon maShapes; + Point maTranslation; + Rectangle maBoundingBox; + ::std::vector maShapes; }; diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index f92b0161a04d..69ef5f75be72 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -241,6 +241,9 @@ void SlideSorterView::ModelHasChanged (void) } } + + + void SlideSorterView::LocalModelHasChanged(void) { mbModelChangedWhileModifyEnabled = false; @@ -290,6 +293,7 @@ void SlideSorterView::PostModelChange (void) model::PageEnumeration aPageEnumeration ( model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel)); + UpdatePageBorders(); while (aPageEnumeration.HasMoreElements()) { SdrPageObj* pPageObject = aPageEnumeration.GetNextElement()->GetPageObject(); diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index 26811df931b4..f3d91fff96dd 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -235,7 +235,7 @@ bool Layouter::RearrangeHorizontal ( // Adapt the layout of the given output device to the new layout of // page objects. The zoom factor is set so that the page objects in - // one row fill the screen. + // one column fill the screen. Fraction aScaleFactor (nTargetHeight, nPagePixelHeight); SetZoom (aMapMode.GetScaleX() * aScaleFactor, pDevice); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 4c96c113ef1a..fbea240c5a25 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -68,6 +68,8 @@ using namespace ::sdr::contact; using namespace ::sd::slidesorter::model; +using drawinglayer::primitive2d::Primitive2DReference; +using drawinglayer::primitive2d::Primitive2DSequence; namespace sd { namespace slidesorter { namespace view { @@ -306,7 +308,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -325,7 +327,7 @@ public: DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // add bitmap primitive // to avoid scaling, use the Bitmap pixel size as primitive size @@ -341,9 +343,9 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectPageBitmapPrimitive:: aBitmapTransform.set(1L, 2L, getPageObjectRange().getMinY()); // add a BitmapPrimitive2D to the result - const drawinglayer::primitive2d::Primitive2DReference xReference( + const Primitive2DReference xReference( new drawinglayer::primitive2d::BitmapPrimitive2D(getBitmapEx(), aBitmapTransform)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return Primitive2DSequence(&xReference, 1); } SdPageObjectPageBitmapPrimitive::SdPageObjectPageBitmapPrimitive( @@ -385,7 +387,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -399,9 +401,9 @@ public: const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1); const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3); -drawinglayer::primitive2d::Primitive2DSequence SdPageObjectSelectPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectSelectPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { - drawinglayer::primitive2d::Primitive2DSequence xRetval(2); + Primitive2DSequence xRetval(2); // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -415,11 +417,12 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectSelectPrimitive::crea basegfx::B2DRange aDiscreteOuterRange(aAdaptedInnerRange); aDiscreteOuterRange.grow(mnSelectionIndicatorOffset * aDiscretePixel.getX()); - // remeber inner border. Make it one bigger in top left since polygons + // Remember inner border. Make it one bigger in top left since polygons // do not paint their lower-right corners. Since this is the inner polygon, // the top-left corders are the ones to grow here const basegfx::B2DRange aDiscreteInnerRange( - aDiscreteOuterRange.getMinimum() + aDiscretePixel, aDiscreteOuterRange.getMaximum()); + aDiscreteOuterRange.getMinimum() + aDiscretePixel, + aDiscreteOuterRange.getMaximum() - aDiscretePixel); // grow by line width aDiscreteOuterRange.grow((mnSelectionIndicatorThickness - 1) * aDiscretePixel.getX()); @@ -440,12 +443,12 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectSelectPrimitive::crea static bool bTestWithBrightColors(false); const basegfx::BColor aFrameColor(bTestWithBrightColors ? basegfx::BColor(0,1,0) : Application::GetSettings().GetStyleSettings().GetMenuHighlightColor().getBColor()); - xRetval[0] = drawinglayer::primitive2d::Primitive2DReference( + xRetval[0] = Primitive2DReference( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(aFramePolyPolygon, aFrameColor)); // add aRoundedOuterPolygon again as non-filled line polygon to get the roundungs // painted correctly - xRetval[1] = drawinglayer::primitive2d::Primitive2DReference( + xRetval[1] = Primitive2DReference( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRoundedOuterPolygon, aFrameColor)); return xRetval; @@ -469,7 +472,7 @@ class SdPageObjectBorderPrimitive : public SdPageObjectBasePrimitive { protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -480,7 +483,7 @@ public: DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SdPageObjectBorderPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectBorderPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -495,9 +498,9 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectBorderPrimitive::crea const svtools::ColorConfig aColorConfig; const basegfx::BColor aBorderColor(bTestWithBrightColors ? basegfx::BColor(1,0,0) : Color(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor).getBColor()); - const drawinglayer::primitive2d::Primitive2DReference xReference( + const Primitive2DReference xReference( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(basegfx::tools::createPolygonFromRect(aAdaptedInnerRange), aBorderColor)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return Primitive2DSequence(&xReference, 1); } SdPageObjectBorderPrimitive::SdPageObjectBorderPrimitive(const basegfx::B2DRange& rRange) @@ -522,7 +525,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -535,9 +538,9 @@ public: const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2); -drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFocusPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFocusPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { - drawinglayer::primitive2d::Primitive2DSequence xRetval(2); + Primitive2DSequence xRetval(2); // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -556,7 +559,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFocusPrimitive::creat const basegfx::B2DPolygon aIndicatorPolygon(basegfx::tools::createPolygonFromRect(aFocusIndicatorRange)); // white rectangle - xRetval[0] = drawinglayer::primitive2d::Primitive2DReference( + xRetval[0] = Primitive2DReference( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aIndicatorPolygon, Color(COL_WHITE).getBColor())); // dotted black rectangle with same geometry @@ -569,7 +572,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFocusPrimitive::creat const drawinglayer::attribute::LineAttribute aLineAttribute(Color(COL_BLACK).getBColor()); const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDotDashArray, 2.0 * aDiscretePixel.getX()); - xRetval[1] = drawinglayer::primitive2d::Primitive2DReference( + xRetval[1] = Primitive2DReference( new drawinglayer::primitive2d::PolygonStrokePrimitive2D(aIndicatorPolygon, aLineAttribute, aStrokeAttribute)); return xRetval; @@ -609,15 +612,15 @@ private: Size maPageNumberAreaModelSize; // bitfield - unsigned mbShowFadeEffectIcon : 1; - unsigned mbExcluded : 1; + bool mbShowFadeEffectIcon : 1; + bool mbExcluded : 1; // private helpers const BitmapEx& getFadeEffectIconBitmap() const; protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -665,7 +668,7 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c return *mpFadeEffectIconBitmap; } -drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { const xub_StrLen nTextLength(getPageName().Len()); const sal_uInt32 nCount( @@ -675,7 +678,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimiti (getExcluded() ? 2 : 0) // PageNumber crossed out ); sal_uInt32 nInsert(0); - drawinglayer::primitive2d::Primitive2DSequence xRetval(nCount); + Primitive2DSequence xRetval(nCount); // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -724,7 +727,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimiti aBitmapTransform.set(0L, 2L, aAdaptedInnerRange.getMinX()); aBitmapTransform.set(1L, 2L, aAdaptedInnerRange.getMaxY() + ((mnFadeEffectIndicatorOffset + 1) * aDiscretePixel.getX())); - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference( + xRetval[nInsert++] = Primitive2DReference( new drawinglayer::primitive2d::BitmapPrimitive2D(getFadeEffectIconBitmap(), aBitmapTransform)); } @@ -790,7 +793,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimiti aTextMatrix.set(1L, 2L, fStartY); // create Text primitive and add to target - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( aTextMatrix, aPageName, 0, aPageName.Len(), aDXArray, aFontAttributes, aLocale, aFontColor)); } @@ -820,7 +823,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimiti aTextMatrix.set(1L, 2L, fStartY); // create Text primitive - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( aTextMatrix, aPageNumber, 0, nNumberLen, aDXArray, aFontAttributes, aLocale, aFontColor)); if(getExcluded()) @@ -832,10 +835,10 @@ drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimiti aStrikethrough.append(aNumberRange.getMinimum()); aStrikethrough.append(aNumberRange.getMaximum()); - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( basegfx::tools::createPolygonFromRect(aNumberRange), aActiveColor)); - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( aStrikethrough, aActiveColor)); } } @@ -890,7 +893,7 @@ ImplPrimitrive2DIDBlock(SdPageObjectFadeNameNumberPrimitive, PRIMITIVE2D_ID_SDPA // This method will replace the whole painting mechanism. Task is no longer to paint stuff to an OutDev, // but to provide the necessary geometrical information using primitives. -drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::createPrimitive2DSequence(const sdr::contact::DisplayInfo& rDisplayInfo) const +Primitive2DSequence PageObjectViewObjectContact::createPrimitive2DSequence(const sdr::contact::DisplayInfo& rDisplayInfo) const { // OutputDevice* pDevice = rDisplayInfo.GetDIOutputDevice(); OutputDevice* pDevice = GetObjectContact().TryToGetOutputDevice(); @@ -1005,24 +1008,24 @@ drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::crea (bCreateSelected ? 1 : 0) // create selected ); sal_uInt32 nInsert(0); - drawinglayer::primitive2d::Primitive2DSequence xRetval(nCount); + Primitive2DSequence xRetval(nCount); if(bCreateBitmap) { // add selection indicator if used - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectPageBitmapPrimitive(aInnerRange, aBitmapEx)); + xRetval[nInsert++] = Primitive2DReference(new SdPageObjectPageBitmapPrimitive(aInnerRange, aBitmapEx)); } if(true) { // add border (always) - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectBorderPrimitive(aInnerRange)); + xRetval[nInsert++] = Primitive2DReference(new SdPageObjectBorderPrimitive(aInnerRange)); } if(true) { // add fade effext, page name and number if used - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectFadeNameNumberPrimitive( + xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFadeNameNumberPrimitive( aInnerRange, aPageName, nPageNumber, @@ -1035,13 +1038,13 @@ drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::crea if(bCreateSelected) { // add selection indicator if used - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectSelectPrimitive(aInnerRange)); + xRetval[nInsert++] = Primitive2DReference(new SdPageObjectSelectPrimitive(aInnerRange)); } if(bCreateFocused) { // add focus indicator if used - xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectFocusPrimitive(aInnerRange)); + xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFocusPrimitive(aInnerRange)); } return xRetval; diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx index cc8037bac0d9..c1f5c984d3bc 100644 --- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -267,21 +268,17 @@ void SubstitutionOverlay::Create ( EnsureRegistration(); maPosition = rPosition; + maTranslation = Point(0,0); maShapes.clear(); while (rSelection.HasMoreElements()) { const Rectangle aBox (rSelection.GetNextElement()->GetPageObject()->GetCurrentBoundRect()); - basegfx::B2DRectangle aB2DBox( - aBox.Left(), - aBox.Top(), - aBox.Right(), - aBox.Bottom()); - maShapes.append(basegfx::tools::createPolygonFromRect(aB2DBox), 4); + maShapes.push_back(aBox); + maBoundingBox.Union(aBox); } - maBoundingBox = basegfx::tools::getRange(maShapes); - setVisible(maShapes.count() > 0); + setVisible(maShapes.size() > 0); // The selection indicator may have been visible already so call // objectChange() to enforce an update. objectChange(); @@ -293,7 +290,7 @@ void SubstitutionOverlay::Create ( void SubstitutionOverlay::Clear (void) { maShapes.clear(); - maBoundingBox = basegfx::B2DRange(); + maBoundingBox.SetEmpty(); setVisible(false); } @@ -302,10 +299,8 @@ void SubstitutionOverlay::Clear (void) void SubstitutionOverlay::Move (const Point& rOffset) { - basegfx::B2DHomMatrix aTranslation; - aTranslation.translate(rOffset.X(), rOffset.Y()); - maShapes.transform(aTranslation); - maBoundingBox.transform(aTranslation); + maTranslation += rOffset; + maBoundingBox.Move(rOffset.X(), rOffset.Y()); maPosition += rOffset; @@ -327,14 +322,31 @@ void SubstitutionOverlay::drawGeometry (OutputDevice& rOutputDevice) { if (getOverlayManager() != NULL) { - const sal_uInt32 nOldStripeLength (getOverlayManager()->getStripeLengthPixel()); - getOverlayManager()->setStripeLengthPixel(gnSubstitutionStripeLength); + const sal_uInt32 nSavedStripeLength (getOverlayManager()->getStripeLengthPixel()); - const sal_uInt32 nCount (maShapes.count()); - for (sal_uInt32 nIndex=0; nIndex::const_iterator + iBox (maShapes.begin()), + iEnd (maShapes.end()); + iBox!=iEnd; + ++iBox) + { + // Reduce width and height by one pixel to make the box the same + // size as the frame of the page object. + Rectangle aScreenBox (rOutputDevice.LogicToPixel(*iBox)); + aScreenBox.Right() -= 1; + aScreenBox.Bottom() -= 1; - getOverlayManager()->setStripeLengthPixel(nOldStripeLength); + // Add accumulated translation. + Rectangle aBox (rOutputDevice.PixelToLogic(aScreenBox)); + aBox.Move(maTranslation.X(), maTranslation.Y()); + + ImpDrawPolygonStriped(rOutputDevice, + basegfx::tools::createPolygonFromRect( + basegfx::B2DRange( + basegfx::B2IRange(aBox.Left(), aBox.Top(), aBox.Right(),aBox.Bottom())))); + } + + getOverlayManager()->setStripeLengthPixel(nSavedStripeLength); } } @@ -345,7 +357,12 @@ void SubstitutionOverlay::createBaseRange (OutputDevice& rOutputDevice) { (void)rOutputDevice; - maBaseRange = maBoundingBox; + maBaseRange = basegfx::B2DRange( + basegfx::B2IRange( + maBoundingBox.Left(), + maBoundingBox.Top(), + maBoundingBox.Right(), + maBoundingBox.Bottom())); } @@ -533,7 +550,12 @@ void InsertionIndicatorOverlay::drawGeometry (OutputDevice& rOutputDevice) const Color aColor (rOutputDevice.GetSettings().GetStyleSettings().GetFontColor()); rOutputDevice.SetLineColor(aColor); rOutputDevice.SetFillColor(aColor); - rOutputDevice.DrawRect (maBoundingBox); + + // Reduce width of indicator by one pixel to be of the same width as + // the page objects. + Rectangle aBox (rOutputDevice.LogicToPixel(maBoundingBox)); + aBox.Right() -= 1; + rOutputDevice.DrawRect(rOutputDevice.PixelToLogic(aBox)); } rOutputDevice.SetFillColor(aFillColor); diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 056317ef6358..5ef45c90cf8b 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -173,7 +173,7 @@ static snewfoil_value_info standard[] = AUTOLAYOUT_2TEXT}, {BMP_FOIL_19, BMP_FOIL_19_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE}, - {BMP_FOIL_25, BMP_FOIL_25_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, + {BMP_FOIL_25, BMP_FOIL_25_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT}, {BMP_FOIL_11, BMP_FOIL_11_H, STR_AUTOLAYOUT_OBJ, WritingMode_LR_TB, AUTOLAYOUT_OBJ}, @@ -205,6 +205,9 @@ static snewfoil_value_info standard[] = AUTOLAYOUT_TEXTOVEROBJ}, {BMP_FOIL_18, BMP_FOIL_18_H, STR_AUTOLAYOUT_4OBJ, WritingMode_LR_TB, AUTOLAYOUT_4OBJ}, + {BMP_FOIL_26, BMP_FOIL_26_H, STR_AUTOLAYOUT_4CLIPART, WritingMode_LR_TB, AUTOLAYOUT_4CLIPART}, + {BMP_FOIL_27, BMP_FOIL_27_H, STR_AUTOLAYOUT_6CLIPART, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART}, + // vertical {BMP_FOIL_21, BMP_FOIL_21_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART}, diff --git a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx index de7d46d07c4e..647f2c1ad7d7 100644 --- a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx @@ -33,7 +33,7 @@ #include "AllMasterPagesSelector.hxx" #include "PreviewValueSet.hxx" - +#include "app.hrc" #include "MasterPageContainer.hxx" #include "MasterPageDescriptor.hxx" #include @@ -197,4 +197,15 @@ void AllMasterPagesSelector::UpdatePageSet (ItemList& rItemList) -} } } // end of namespace ::sd::toolpanel::controls +void AllMasterPagesSelector::GetState (SfxItemSet& rItemSet) +{ + MasterPagesSelector::GetState(rItemSet); + + if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE) + rItemSet.DisableItem(SID_TP_EDIT_MASTER); +} + + + + +} } } // end of namespace ::sd::toolpanel::control diff --git a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx index e5b06b33a9cf..375a8bc882ce 100644 --- a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx @@ -58,6 +58,8 @@ public: */ virtual void Fill (ItemList& rItemList); + virtual void GetState (SfxItemSet& rItemSet); + protected: virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent); diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx index 81ae854ad9f5..25cb015d2d1d 100644 --- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx @@ -34,6 +34,7 @@ #include "CurrentMasterPagesSelector.hxx" #include "PreviewValueSet.hxx" #include "ViewShellBase.hxx" +#include "DrawViewShell.hxx" #include "drawdoc.hxx" #include "sdpage.hxx" #include "MasterPageContainer.hxx" @@ -250,11 +251,21 @@ void CurrentMasterPagesSelector::Execute (SfxRequest& rRequest) void CurrentMasterPagesSelector::GetState (SfxItemSet& rItemSet) { // Disable the SID_DELTE_MASTER slot when there is only one master page. - if (mrDocument.GetMasterPageUserCount(GetSelectedMasterPage()) > 0) + if (rItemSet.GetItemState(SID_DELETE_MASTER_PAGE) == SFX_ITEM_AVAILABLE + && mrDocument.GetMasterPageUserCount(GetSelectedMasterPage()) > 0) { rItemSet.DisableItem(SID_DELETE_MASTER_PAGE); } + ::boost::shared_ptr pDrawViewShell ( + ::boost::dynamic_pointer_cast(mrBase.GetMainViewShell())); + if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE + && pDrawViewShell + && pDrawViewShell->GetEditMode() == EM_MASTERPAGE) + { + rItemSet.DisableItem (SID_TP_EDIT_MASTER); + } + MasterPagesSelector::GetState(rItemSet); } diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx index f247f3596ac3..d01a86a94276 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx @@ -75,7 +75,8 @@ Image PagePreviewProvider::operator () ( aPreview = rRenderer.RenderPage( pPage, nWidth, - String::CreateFromAscii("")); + String::CreateFromAscii(""), + false); } return aPreview; diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx index 135be992a1c0..9356dac3f7f9 100644 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx @@ -46,6 +46,7 @@ #include "strings.hrc" #include "showview.hxx" #include "DrawViewShell.hxx" +#include "DrawController.hxx" #include "SlideSorterViewShell.hxx" #include "PreviewValueSet.hxx" #include "ViewShellBase.hxx" @@ -570,6 +571,26 @@ void MasterPagesSelector::Execute (SfxRequest& rRequest) break; } + case SID_TP_EDIT_MASTER: + { + using namespace ::com::sun::star; + uno::Reference xSelectedMaster ( + GetSelectedMasterPage()->getUnoPage(), uno::UNO_QUERY); + SfxViewFrame* pViewFrame = mrBase.GetViewFrame(); + if (pViewFrame != NULL && xSelectedMaster.is()) + { + SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher(); + if (pDispatcher != NULL) + { + USHORT nIndex = mpPageSet->GetSelectItemId(); + pDispatcher->Execute(SID_MASTERPAGE, SFX_CALLMODE_SYNCHRON); + mpPageSet->SelectItem (nIndex); + mrBase.GetDrawController().setCurrentPage(xSelectedMaster); + } + } + break; + } + case SID_CUT: case SID_COPY: case SID_PASTE: diff --git a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx index 569f877f74c4..72dbc094de6a 100644 --- a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx @@ -39,6 +39,7 @@ #include "MasterPageObserver.hxx" #include "sdpage.hxx" #include "drawdoc.hxx" +#include "app.hrc" #include #include @@ -145,4 +146,17 @@ void RecentMasterPagesSelector::AssignMasterPageToPageList ( } } + + + +void RecentMasterPagesSelector::GetState (SfxItemSet& rItemSet) +{ + MasterPagesSelector::GetState (rItemSet); + if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE) + rItemSet.DisableItem (SID_TP_EDIT_MASTER); +} + + + + } } } // end of namespace ::sd::toolpanel::controls diff --git a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx index 04506f8575c3..84534cf97a21 100644 --- a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx @@ -51,6 +51,8 @@ public: virtual void LateInit (void); + virtual void GetState (SfxItemSet& rItemSet); + protected: DECL_LINK(MasterPageListListener, void*); virtual void Fill (ItemList& rItemList); diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 55003f33d147..770ca7fabf6c 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -86,7 +86,8 @@ PreviewRenderer::~PreviewRenderer (void) Image PreviewRenderer::RenderPage ( const SdPage* pPage, const sal_Int32 nWidth, - const String& rSubstitutionText) + const String& rSubstitutionText, + const bool bObeyHighContrastMode) { if (pPage != NULL) { @@ -96,7 +97,7 @@ Image PreviewRenderer::RenderPage ( const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0); const sal_Int32 nHeight (sal::static_int_cast( (nWidth - 2*nFrameWidth) / nAspectRatio + 2*nFrameWidth + 0.5)); - return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText); + return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText, bObeyHighContrastMode); } else return Image(); @@ -108,7 +109,8 @@ Image PreviewRenderer::RenderPage ( Image PreviewRenderer::RenderPage ( const SdPage* pPage, Size aPixelSize, - const String& rSubstitutionText) + const String& rSubstitutionText, + const bool bObeyHighContrastMode) { Image aPreview; @@ -116,7 +118,7 @@ Image PreviewRenderer::RenderPage ( { try { - if (Initialize (pPage, aPixelSize)) + if (Initialize (pPage, aPixelSize, bObeyHighContrastMode)) { PaintPage (pPage); PaintSubstitutionText (rSubstitutionText); @@ -205,7 +207,8 @@ Image PreviewRenderer::RenderSubstitution ( bool PreviewRenderer::Initialize ( const SdPage* pPage, - const Size& rPixelSize) + const Size& rPixelSize, + const bool bObeyHighContrastMode) { bool bSuccess = false; do @@ -229,8 +232,8 @@ bool PreviewRenderer::Initialize ( break; // Adjust contrast mode. - bool bUseContrast = Application::GetSettings().GetStyleSettings(). - GetHighContrastMode(); + bool bUseContrast (bObeyHighContrastMode + && Application::GetSettings().GetStyleSettings().GetHighContrastMode()); mpPreviewDevice->SetDrawMode (bUseContrast ? ViewShell::OUTPUT_DRAWMODE_CONTRAST : ViewShell::OUTPUT_DRAWMODE_COLOR); diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 5b4ac09726bc..8dbaa9a486ad 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -486,7 +486,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, if(!(aValue >>= aString)) throw lang::IllegalArgumentException(); - pInfo->maBookmark = SdDrawPage::getUiNameFromPageApiName( aString ); + pInfo->SetBookmark( SdDrawPage::getUiNameFromPageApiName( aString ) ); break; } case WID_CLICKACTION: @@ -726,13 +726,13 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; // is the bookmark a page? BOOL bIsMasterPage; - if(pDoc->GetPageByName( pInfo->maBookmark, bIsMasterPage ) != SDRPAGE_NOTFOUND) + if(pDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage ) != SDRPAGE_NOTFOUND) { - aString = SdDrawPage::getPageApiNameFromUiName( pInfo->maBookmark ); + aString = SdDrawPage::getPageApiNameFromUiName( pInfo->GetBookmark() ); } else { - aString = pInfo->maBookmark ; + aString = pInfo->GetBookmark() ; sal_Int32 nPos = aString.lastIndexOf( sal_Unicode('#') ); if( nPos >= 0 ) { @@ -909,12 +909,22 @@ sal_Bool SdXShape::IsPresObj() const throw() sal_Bool SdXShape::IsEmptyPresObj() const throw() { SdrObject* pObj = mpShape->GetSdrObject(); - if( pObj == NULL || !pObj->IsEmptyPresObj() ) - return sal_False; + if( (pObj != NULL) && pObj->IsEmptyPresObj() ) + { + // check if the object is in edit, than its temporarely not empty + SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj ); + if( pTextObj == 0 ) + return sal_True; - // check if the object is in edit, than its temporarely not empty - SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, pObj ); - return (NULL == pTextObj) || ( NULL == pTextObj->GetEditOutlinerParaObject() ); + OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject(); + if( pParaObj ) + { + delete pParaObj; + return sal_True; + } + } + + return sal_False; } /** sets/reset the empty status of a presentation object @@ -1150,7 +1160,7 @@ SdUnoEventsAccess::SdUnoEventsAccess( SdXShape* pShape ) throw() static void clearEventsInAnimationInfo( SdAnimationInfo* pInfo ) { const String aEmpty; - pInfo->maBookmark = aEmpty; + pInfo->SetBookmark( aEmpty ); pInfo->mbSecondSoundOn = sal_False; pInfo->mbSecondPlayFull = sal_False; pInfo->meClickAction = presentation::ClickAction_NONE; @@ -1334,7 +1344,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno } } - pInfo->maBookmark = aStrBookmark; + pInfo->SetBookmark( aStrBookmark ); bOk = sal_True; } break; @@ -1342,7 +1352,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno case presentation::ClickAction_MACRO: if( nFound & FOUND_MACRO ) { - pInfo->maBookmark = aStrMacro; + pInfo->SetBookmark( aStrMacro ); bOk = sal_True; } break; @@ -1369,7 +1379,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno case presentation::ClickAction_SOUND: if( nFound & FOUND_SOUNDURL ) { - pInfo->maBookmark = aStrSoundURL; + pInfo->SetBookmark( aStrSoundURL ); if( eClickAction != presentation::ClickAction_SOUND ) pInfo->mbSecondSoundOn = aStrSoundURL.getLength() != 0; pInfo->mbSecondPlayFull = nFound & FOUND_PLAYFULL ? bPlayFull : sal_False; @@ -1394,7 +1404,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno if ( SfxApplication::IsXScriptURL( aStrMacro ) ) { - pInfo->maBookmark = aStrMacro; + pInfo->SetBookmark( aStrMacro ); } else { @@ -1421,7 +1431,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno sBuffer.append( aStrLibrary ); } - pInfo->maBookmark = sBuffer.makeStringAndClear(); + pInfo->SetBookmark( sBuffer.makeStringAndClear() ); } bOk = sal_True; } @@ -1461,7 +1471,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) case presentation::ClickAction_BOOKMARK: case presentation::ClickAction_DOCUMENT: case presentation::ClickAction_MACRO: - if ( !SfxApplication::IsXScriptURL( pInfo->maBookmark ) ) + if ( !SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) nPropertyCount += 1; break; @@ -1483,7 +1493,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) if( eClickAction == presentation::ClickAction_MACRO ) { - if ( SfxApplication::IsXScriptURL( pInfo->maBookmark ) ) + if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) { // Scripting Framework URL aAny <<= maStrScript;; @@ -1493,7 +1503,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - aAny <<= OUString( pInfo->maBookmark ); + aAny <<= OUString( pInfo->GetBookmark() ); pProperties->Name = maStrScript; pProperties->Handle = -1; pProperties->Value = aAny; @@ -1510,7 +1520,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - String aMacro = pInfo->maBookmark; + String aMacro = pInfo->GetBookmark(); // aMacro has got following format: // "Macroname.Modulname.Libname.Documentname" or @@ -1569,7 +1579,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) break; case presentation::ClickAction_BOOKMARK: { - const OUString aStrBookmark( getPageApiNameFromUiName( pInfo->maBookmark ) ); + const OUString aStrBookmark( getPageApiNameFromUiName( pInfo->GetBookmark()) ); pProperties->Name = maStrBookmark; pProperties->Handle = -1; pProperties->Value <<= aStrBookmark; @@ -1580,7 +1590,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) case presentation::ClickAction_DOCUMENT: case presentation::ClickAction_PROGRAM: { - OUString aString( pInfo->maBookmark ); + OUString aString( pInfo->GetBookmark()); sal_Int32 nPos = aString.lastIndexOf( sal_Unicode('#') ); if( nPos >= 0 ) { @@ -1615,7 +1625,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) case presentation::ClickAction_SOUND: if( eClickAction == presentation::ClickAction_SOUND || pInfo->mbSecondSoundOn ) { - aAny <<= OUString( pInfo->maBookmark ); + aAny <<= OUString( pInfo->GetBookmark()); pProperties->Name = maStrSoundURL; pProperties->Handle = -1; pProperties->Value = aAny; diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 3f295e10b529..233976585e58 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1475,7 +1475,9 @@ bool Outliner::HandleFailedSearch (void) } - +#if ENABLE_LAYOUT +#define SvxSearchDialog Window +#endif /** See task #95227# for discussion about correct parent for dialogs/info boxes. */ @@ -1498,7 +1500,9 @@ bool Outliner::HandleFailedSearch (void) return pParent; } - +#if ENABLE_LAYOUT +#undef SvxSearchDialog +#endif SdrObject* Outliner::SetObject ( diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx index 774eaf2accaa..5b4fbf8eb30f 100644 --- a/sd/source/ui/view/PrintManager.cxx +++ b/sd/source/ui/view/PrintManager.cxx @@ -1128,6 +1128,8 @@ void PrintManager::PrintHandout( PrintInfo& rInfo, USHORT nPage ) if( aPageObjVector.empty() ) return; + rInfo.mrViewShell.SetPrintedHandoutPageCount( (USHORT)((aPagesVector.size() + aPageObjVector.size() - 1) / aPageObjVector.size()) ); + /* sal_Int32 nHandoutPageCount = aPagesVector.size() / aPageObjVector.size(); sal_Int32 nHandoutPage = 0; @@ -1212,6 +1214,7 @@ void PrintManager::PrintHandout( PrintInfo& rInfo, USHORT nPage ) } rInfo.mrViewShell.SetPrintedHandoutPageNum(1); + rInfo.mrViewShell.SetPrintedHandoutPageCount(0); delete pPrintView; rInfo.mrPrinter.SetMapMode(aOldMap); } diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index 0391d44cfb3a..e8337c97dfb3 100755 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -45,7 +45,7 @@ #include #undef VERBOSE -//#define VERBOSE 2 +#define VERBOSE 2 namespace sd { @@ -839,6 +839,14 @@ void ViewShellManager::Implementation::MoveToTop (const SfxShell& rShell) { ::osl::MutexGuard aGuard (maMutex); + // Check that we have access to a dispatcher. If not, then we are + // (probably) called while the view shell is still being created or + // initialized. Without dispatcher we can not rebuild the shell stack + // to move the requested shell to the top. So return right away instead + // of making a mess without being able to clean up afterwards. + if (mrBase.GetDispatcher() == NULL) + return; + ActiveShellList::iterator iShell (::std::find_if ( maActiveViewShells.begin(), maActiveViewShells.end(), diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 8c14b57fe286..9c2733c933dd 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -256,6 +256,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) { pOLV->AdjustDepth( -1 ); + // Ensure bold/italic etc. icon state updates + Invalidate(); // #96551# trigger preview refresh mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE ); } @@ -269,6 +271,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) { pOLV->AdjustDepth( 1 ); + // Ensure bold/italic etc. icon state updates + Invalidate(); // #96551# trigger preview refresh mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE ); } diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 83f896e3d5ad..229e0b8c6eb1 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -68,6 +68,7 @@ #include "drawdoc.hxx" #include "Window.hxx" #include "fupoor.hxx" +#include "fusnapln.hxx" #include "app.hxx" #include "Ruler.hxx" #include "sdresid.hxx" @@ -558,7 +559,8 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) if ( mpDrawView->PickHelpLine( aMPos, nHitLog, *GetActiveWindow(), nHelpLine, pPV) ) { nSdResId = RID_DRAW_SNAPOBJECT_POPUP; - mbMousePosFreezed = TRUE; + ShowSnapLineContextMenu(*pPV, nHelpLine, rCEvt.GetMousePosPixel()); + return; } // Klebepunkt unter dem Mauszeiger markiert? else if( mpDrawView->PickGluePoint( aMPos, pObj, nPickId, pPV ) && @@ -926,6 +928,70 @@ void DrawViewShell::UnlockInput() } + + +void DrawViewShell::ShowSnapLineContextMenu ( + SdrPageView& rPageView, + const USHORT nSnapLineIndex, + const Point& rMouseLocation) +{ + const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]); + ::boost::scoped_ptr pMenu (new PopupMenu ()); + + if (rHelpLine.GetKind() == SDRHELPLINE_POINT) + { + pMenu->InsertItem( + SID_SET_SNAPITEM, + String(SdResId(STR_POPUP_EDIT_SNAPPOINT))); + pMenu->InsertSeparator(); + pMenu->InsertItem( + SID_DELETE_SNAPITEM, + String(SdResId(STR_POPUP_DELETE_SNAPPOINT))); + } + else + { + pMenu->InsertItem( + SID_SET_SNAPITEM, + String(SdResId(STR_POPUP_EDIT_SNAPLINE))); + pMenu->InsertSeparator(); + pMenu->InsertItem( + SID_DELETE_SNAPITEM, + String(SdResId(STR_POPUP_DELETE_SNAPLINE))); + } + + pMenu->RemoveDisabledEntries(FALSE, FALSE); + + const USHORT nResult = pMenu->Execute( + GetActiveWindow(), + Rectangle(rMouseLocation, Size(10,10)), + POPUPMENU_EXECUTE_DOWN); + switch (nResult) + { + case SID_SET_SNAPITEM: + { + SfxUInt32Item aHelpLineItem (ID_VAL_INDEX, nSnapLineIndex); + const SfxPoolItem* aArguments[] = {&aHelpLineItem, NULL}; + GetViewFrame()->GetDispatcher()->Execute( + SID_SET_SNAPITEM, + SFX_CALLMODE_SLOT, + aArguments); + } + break; + + case SID_DELETE_SNAPITEM: + { + rPageView.DeleteHelpLine(nSnapLineIndex); + } + break; + + default: + break; + } +} + + + + #ifdef _MSC_VER #pragma optimize ( "", on ) #endif diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index b3f1c78c7e2c..bbdb31adf460 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1026,6 +1026,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_INSERT_FLD_TIME_VAR ); rSet.DisableItem( SID_INSERT_FLD_AUTHOR ); rSet.DisableItem( SID_INSERT_FLD_PAGE ); + rSet.DisableItem( SID_INSERT_FLD_PAGES ); rSet.DisableItem( SID_INSERT_FLD_FILE ); rSet.DisableItem( SID_INSERT_GRAPHIC ); diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index df12d7982ccb..d2ea0daf06b7 100644 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx @@ -153,7 +153,7 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq) case SID_INSERT_LRM : case SID_INSERT_ZWNBSP : case SID_INSERT_ZWSP: - case SID_BULLET: + case SID_CHARMAP: { SetCurrentFunction( FuBullet::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); Cancel(); diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 8efa756ed09c..9a94cae21983 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -502,6 +502,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) case SID_INSERT_FLD_TIME_VAR: case SID_INSERT_FLD_AUTHOR: case SID_INSERT_FLD_PAGE: + case SID_INSERT_FLD_PAGES: case SID_INSERT_FLD_FILE: { USHORT nMul = 1; @@ -543,6 +544,13 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) } break; + case SID_INSERT_FLD_PAGES: + { + pFieldItem = new SvxFieldItem( SvxPagesField(), EE_FEATURE_FIELD ); + nMul = 3; + } + break; + case SID_INSERT_FLD_FILE: { String aName; diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index bd8c7136495f..7cc9de9f611f 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1552,7 +1552,7 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText, SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pMarkedObj, true); pInfo->meClickAction = presentation::ClickAction_DOCUMENT; - pInfo->maBookmark = sTargetURL; + pInfo->SetBookmark( sTargetURL ); } } catch( uno::Exception& ) diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 0893bcb8b46c..2b1b7518666c 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -195,7 +195,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) { SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pMarkedObj); if( pInfo && (pInfo->meClickAction == presentation::ClickAction_DOCUMENT) ) - aHLinkItem.SetURL( pInfo->maBookmark ); + aHLinkItem.SetURL( pInfo->GetBookmark()); aHLinkItem.SetInsertMode(HLINK_BUTTON); } } diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index d3485b8d6a0f..068fd64908c6 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -415,7 +415,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) { rSet.DisableItem( SID_CHAR_DLG ); rSet.DisableItem( SID_PARA_DLG ); - rSet.DisableItem( SID_BULLET ); + rSet.DisableItem( SID_CHARMAP ); } */ if( bLine && !bText && !bDrawObj &&!b3dObj) diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index b6ee524d6555..99fbcb7f2eda 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -378,7 +378,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) case SID_INSERT_LRM : case SID_INSERT_ZWNBSP : case SID_INSERT_ZWSP: - case SID_BULLET: + case SID_CHARMAP: { SetCurrentFunction( FuBullet::Create( this, GetActiveWindow(), pOlView, GetDoc(), rReq ) ); Cancel(); @@ -485,6 +485,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) case SID_INSERT_FLD_TIME_VAR: case SID_INSERT_FLD_AUTHOR: case SID_INSERT_FLD_PAGE: + case SID_INSERT_FLD_PAGES: case SID_INSERT_FLD_FILE: { SvxFieldItem* pFieldItem = 0; @@ -523,6 +524,10 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) pFieldItem = new SvxFieldItem( SvxPageField(), EE_FEATURE_FIELD ); break; + case SID_INSERT_FLD_PAGES: + pFieldItem = new SvxFieldItem( SvxPagesField(), EE_FEATURE_FIELD ); + break; + case SID_INSERT_FLD_FILE: { String aName; @@ -543,7 +548,8 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) pOldFldItem->GetField()->ISA( SvxExtTimeField ) || pOldFldItem->GetField()->ISA( SvxExtFileField ) || pOldFldItem->GetField()->ISA( SvxAuthorField ) || - pOldFldItem->GetField()->ISA( SvxPageField ) ) ) + pOldFldItem->GetField()->ISA( SvxPageField ) || + pOldFldItem->GetField()->ISA( SvxPagesField )) ) { // Feld selektieren, so dass es beim Insert geloescht wird ESelection aSel = pOutlinerView->GetSelection(); diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 15539b7dd276..0c19247b14e1 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -839,7 +839,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar pAction->SetPlayFull(pInfo->mbPlayFull, pInfo->mbPlayFull); pAction->SetPathObj(pInfo->mpPathObj, pInfo->mpPathObj); pAction->SetClickAction(pInfo->meClickAction, eClickAction); - pAction->SetBookmark(pInfo->maBookmark, aBookmark); + pAction->SetBookmark(pInfo->GetBookmark(), aBookmark); // pAction->SetInvisibleInPres(pInfo->mbInvisibleInPresentation, TRUE); pAction->SetVerb(pInfo->mnVerb, pInfo->mnVerb); pAction->SetSecondEffect(pInfo->meSecondEffect, pInfo->meSecondEffect); @@ -851,7 +851,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar pAction->SetComment(aString); mpDocSh->GetUndoManager()->AddUndoAction(pAction); pInfo->meClickAction = eClickAction; - pInfo->maBookmark = aBookmark; + pInfo->SetBookmark( aBookmark ); mpDoc->SetChanged(); nRet = nDropAction; diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 6de0865217b3..c179385f1c2e 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -215,6 +215,7 @@ void ViewShell::construct(void) mpZoomList = 0; mbStartShowWithDialog = FALSE; mnPrintedHandoutPageNum = 1; + mnPrintedHandoutPageCount = 0; mpWindowUpdater.reset( new ::sd::WindowUpdater() ); mpImpl.reset(new Implementation(*this)); meShellType = ST_NONE; diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index cccca6974eb4..e34baec0f29c 100644 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -126,10 +126,11 @@ - + + - + diff --git a/sd/uiconfig/sdraw/toolbar/textobjectbar.xml b/sd/uiconfig/sdraw/toolbar/textobjectbar.xml index 53dcf7eb3b19..d364ca42e771 100644 --- a/sd/uiconfig/sdraw/toolbar/textobjectbar.xml +++ b/sd/uiconfig/sdraw/toolbar/textobjectbar.xml @@ -36,5 +36,5 @@ - + \ No newline at end of file diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index 6f3fa7703cff..ece53ad4c918 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -143,10 +143,11 @@ - + + - + diff --git a/sd/uiconfig/simpress/toolbar/textobjectbar.xml b/sd/uiconfig/simpress/toolbar/textobjectbar.xml index 798b7ff38cc6..f91767c983ed 100644 --- a/sd/uiconfig/simpress/toolbar/textobjectbar.xml +++ b/sd/uiconfig/simpress/toolbar/textobjectbar.xml @@ -39,7 +39,7 @@ - + \ No newline at end of file diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk index a55746b4ba19..3229fc486b83 100644 --- a/sd/util/makefile.mk +++ b/sd/util/makefile.mk @@ -78,7 +78,6 @@ SHL1STDLIBS+= \ $(VCLLIB) \ $(SVLLIB) \ $(SOTLIB) \ - $(CANVASTOOLSLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ @@ -169,7 +168,6 @@ SHL2STDLIBS= \ $(SOTLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(SALLIB) @@ -197,13 +195,9 @@ SHL4STDLIBS= \ $(ISDLIB) \ $(SVXLIB) \ $(SFXLIB) \ - $(BASICLIB) \ $(BASEGFXLIB) \ - $(DRAWINGLAYERLIB) \ - $(GOODIESLIB) \ $(SO2LIB) \ $(SVTOOLLIB) \ - $(TKLIB) \ $(VCLLIB) \ $(SVLLIB) \ $(SOTLIB) \ @@ -211,10 +205,8 @@ SHL4STDLIBS= \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(VOSLIB) \ $(CANVASLIB) \ $(SALLIB) diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx index 6c07065e2904..94ba2acb5682 100644 --- a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx @@ -55,7 +55,6 @@ #include #include #include -#include #include @@ -64,10 +63,16 @@ #if defined( WNT ) + #include + #include + #include #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #elif defined( OS2 ) #elif defined( QUARTZ ) + #include "premac.h" + #include + #include "postmac.h" #elif defined( UNX ) namespace unx { @@ -77,6 +82,7 @@ namespace unx #include } #endif +#include #ifdef DEBUG #include diff --git a/slideshow/source/engine/OGLTrans/makefile.mk b/slideshow/source/engine/OGLTrans/makefile.mk index 3e5f818923dc..2062b8c7d4c5 100644 --- a/slideshow/source/engine/OGLTrans/makefile.mk +++ b/slideshow/source/engine/OGLTrans/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/..$/.. PRJNAME=slideshow TARGET=OGLTrans +TARGETTYPE=GUI ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------------- @@ -58,7 +59,13 @@ DLLPRE= SHL1TARGET=$(TARGET).uno .IF "$(GUI)"=="UNX" +.IF "$(GUIBASE)"=="aqua" + SHL1STDLIBS= $(SALLIB) $(VCLLIB) $(CPPULIB) $(CPPUHELPERLIB) $(COMPHELPERLIB) $(CANVASTOOLSLIB) + OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions + CFLAGSCXX+=$(OBJCXXFLAGS) +.ELSE SHL1STDLIBS= $(SALLIB) $(VCLLIB) $(CPPULIB) $(CPPUHELPERLIB) $(COMPHELPERLIB) $(CANVASTOOLSLIB) -lGL -lGLU -lX11 +.ENDIF .ELSE SHL1STDLIBS= $(SALLIB) $(VCLLIB) $(CPPULIB) $(CPPUHELPERLIB) $(COMPHELPERLIB) $(CANVASTOOLSLIB) opengl32.lib glu32.lib gdi32.lib .ENDIF diff --git a/slideshow/util/makefile.mk b/slideshow/util/makefile.mk index 09d0363bcdb4..4b4008624c1e 100644 --- a/slideshow/util/makefile.mk +++ b/slideshow/util/makefile.mk @@ -68,7 +68,6 @@ SHL1STDLIBS= $(TOOLSLIB) \ $(CPPCANVASLIB) \ $(UNOTOOLSLIB) \ $(GOODIESLIB) \ - $(TKLIB) \ $(AVMEDIALIB) SHL1IMPLIB=i$(TARGET)