summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/cusshow.hxx4
-rw-r--r--sd/inc/pres.hxx90
-rw-r--r--sd/inc/sdpage.hxx2
-rw-r--r--sd/inc/shapelist.hxx4
-rwxr-xr-xsd/prj/build.lst3
-rw-r--r--sd/sdi/sdraw.sdi2
-rw-r--r--sd/source/core/cusshow.cxx10
-rw-r--r--sd/source/core/drawdoc2.cxx4
-rw-r--r--sd/source/core/glob.src2
-rw-r--r--sd/source/core/sdpage.cxx163
-rw-r--r--sd/source/core/shapelist.cxx38
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/ui/app/res_bmp.src278
-rw-r--r--sd/source/ui/app/sddll2.cxx32
-rw-r--r--sd/source/ui/app/strings.src81
-rw-r--r--sd/source/ui/controller/makefile.mk54
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx418
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.hxx (renamed from sd/source/ui/inc/SdUnoPresView.hxx)41
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx1
-rw-r--r--sd/source/ui/dlg/makefile.mk1
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationController.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationUpdater.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx131
-rw-r--r--sd/source/ui/func/smarttag.cxx14
-rw-r--r--sd/source/ui/inc/DrawController.hxx3
-rw-r--r--sd/source/ui/inc/DrawSubController.hxx23
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/inc/SdUnoDrawView.hxx7
-rw-r--r--sd/source/ui/inc/SdUnoOutlineView.hxx5
-rw-r--r--sd/source/ui/inc/SdUnoSlideView.hxx5
-rw-r--r--sd/source/ui/inc/View.hxx2
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx2
-rw-r--r--sd/source/ui/inc/ViewShellImplementation.hxx4
-rw-r--r--sd/source/ui/inc/res_bmp.hrc136
-rw-r--r--sd/source/ui/inc/smarttag.hxx1
-rw-r--r--sd/source/ui/inc/strings.hrc40
-rw-r--r--sd/source/ui/inc/view/viewoverlaymanager.hxx76
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx1
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx7
-rw-r--r--sd/source/ui/table/tablefunction.cxx46
-rw-r--r--sd/source/ui/toolpanel/LayoutMenu.cxx75
-rw-r--r--sd/source/ui/toolpanel/ToolPanel.cxx2
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx6
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx41
-rw-r--r--sd/source/ui/unoidl/SdUnoOutlineView.cxx20
-rw-r--r--sd/source/ui/unoidl/SdUnoPresView.cxx54
-rw-r--r--sd/source/ui/unoidl/SdUnoSlideView.cxx27
-rw-r--r--sd/source/ui/unoidl/facreg.cxx36
-rw-r--r--sd/source/ui/unoidl/makefile.mk1
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx14
-rw-r--r--sd/source/ui/unoidl/unopage.cxx33
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx10
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx65
-rwxr-xr-xsd/source/ui/view/ViewShellManager.cxx2
-rw-r--r--sd/source/ui/view/drawview.cxx57
-rw-r--r--sd/source/ui/view/drviews1.cxx5
-rw-r--r--sd/source/ui/view/drviews2.cxx10
-rw-r--r--sd/source/ui/view/drviews7.cxx40
-rw-r--r--sd/source/ui/view/drviewsa.cxx7
-rw-r--r--sd/source/ui/view/makefile.mk3
-rw-r--r--sd/source/ui/view/sdview4.cxx82
-rw-r--r--sd/source/ui/view/sdview5.cxx85
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx570
-rw-r--r--sd/source/ui/view/viewshe3.cxx41
-rw-r--r--sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml10
-rw-r--r--sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml6
-rw-r--r--sd/uiconfig/simpress/toolbar/commontaskbar.xml4
-rw-r--r--sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml10
-rw-r--r--sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml6
-rw-r--r--sd/uiconfig/simpress/toolbar/insertbar.xml2
-rw-r--r--sd/util/makefile.mk3
71 files changed, 2307 insertions, 759 deletions
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index 854be2161..d724a34cd 100644
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -64,8 +64,8 @@ public:
// @@@ copy ctor, but no copy assignment? @@@
SdCustomShow( const SdCustomShow& rShow );
- void SetName(const String& rName) { aName = rName; }
- String GetName() const { return aName; }
+ void SetName(const String& rName);
+ String GetName() const;
SdDrawDocument* GetDoc() const { return pDoc; }
diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index 58c9cf355..4812505a8 100644
--- a/sd/inc/pres.hxx
+++ b/sd/inc/pres.hxx
@@ -46,48 +46,66 @@ enum PresObjKind
PRESOBJ_FOOTER,
PRESOBJ_DATETIME,
PRESOBJ_SLIDENUMBER,
+ PRESOBJ_CALC,
+ PRESOBJ_MEDIA,
PRESOBJ_MAX
};
enum AutoLayout
{
- AUTOLAYOUT__START,
- AUTOLAYOUT_TITLE = AUTOLAYOUT__START,
- AUTOLAYOUT_ENUM,
- AUTOLAYOUT_CHART,
- AUTOLAYOUT_2TEXT,
- AUTOLAYOUT_TEXTCHART,
- AUTOLAYOUT_ORG,
- AUTOLAYOUT_TEXTCLIP,
- AUTOLAYOUT_CHARTTEXT,
- AUTOLAYOUT_TAB,
- AUTOLAYOUT_CLIPTEXT,
- AUTOLAYOUT_TEXTOBJ,
- AUTOLAYOUT_OBJ,
- AUTOLAYOUT_TEXT2OBJ,
- AUTOLAYOUT_OBJTEXT,
- AUTOLAYOUT_OBJOVERTEXT,
- AUTOLAYOUT_2OBJTEXT,
- AUTOLAYOUT_2OBJOVERTEXT,
- AUTOLAYOUT_TEXTOVEROBJ,
- AUTOLAYOUT_4OBJ,
- AUTOLAYOUT_ONLY_TITLE,
- AUTOLAYOUT_NONE,
- AUTOLAYOUT_NOTES,
- AUTOLAYOUT_HANDOUT1,
- AUTOLAYOUT_HANDOUT2,
- AUTOLAYOUT_HANDOUT3,
- AUTOLAYOUT_HANDOUT4,
- AUTOLAYOUT_HANDOUT6,
- AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART,
- AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE,
- AUTOLAYOUT_TITLE_VERTICAL_OUTLINE,
- AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART,
- AUTOLAYOUT_HANDOUT9,
- AUTOLAYOUT_ONLY_TEXT,
- AUTOLAYOUT_4CLIPART,
- AUTOLAYOUT_6CLIPART,
+ // new layouts with enum/text/chart/org/clip merged to content
+ AUTOLAYOUT__START = 0,
+ AUTOLAYOUT_TITLE = 0, // Title Slide
+ AUTOLAYOUT_TITLE_CONTENT = 1, // Title, Content
+ AUTOLAYOUT_TITLE_2CONTENT = 3, // Title and 2 Content
+ AUTOLAYOUT_TITLE_ONLY = 19, // Title Only
+ AUTOLAYOUT_NONE = 20, // Blank Slide
+ AUTOLAYOUT_ONLY_TEXT = 32, // Centered Text
+ AUTOLAYOUT_TITLE_CONTENT_2CONTENT = 12, // Title, Content and 2 Content
+ AUTOLAYOUT_TITLE_2CONTENT_CONTENT = 15, // Title, 2 Content and Content
+ AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT = 16,// Title, 2 Content over Content
+ AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT = 14, // Title, Content over Content
+ AUTOLAYOUT_TITLE_4CONTENT = 18, // Title, 4 Content
+ AUTOLAYOUT_TITLE_6CONTENT = 34, // Title, 6 Content
+ AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT = 27, // Vertical Title, Vertical Content over Vertical Content
+ AUTOLAYOUT_VTITLE_VCONTENT = 28, // Vertical Title, Vertical Content over Vertical Content
+ AUTOLAYOUT_TITLE_VCONTENT = 29, // Title, Vertical Content
+ AUTOLAYOUT_TITLE_2VTEXT = 30, // Title, 2 Vertical Content
+
+ // deprecated
+ AUTOLAYOUT_ENUM = 1,
+ AUTOLAYOUT_CHART = 2,
+ AUTOLAYOUT_2TEXT = 3,
+ AUTOLAYOUT_TEXTCHART = 4,
+ AUTOLAYOUT_ORG = 5,
+ AUTOLAYOUT_TEXTCLIP = 6,
+ AUTOLAYOUT_CHARTTEXT = 7,
+ AUTOLAYOUT_TAB = 8,
+ AUTOLAYOUT_CLIPTEXT = 9,
+ AUTOLAYOUT_TEXTOBJ = 10,
+ AUTOLAYOUT_OBJ = 11,
+ AUTOLAYOUT_TEXT2OBJ = 12,
+ AUTOLAYOUT_OBJTEXT = 13,
+ AUTOLAYOUT_OBJOVERTEXT = 14,
+ AUTOLAYOUT_2OBJTEXT = 15,
+ AUTOLAYOUT_2OBJOVERTEXT = 16,
+ AUTOLAYOUT_TEXTOVEROBJ = 17,
+ AUTOLAYOUT_4OBJ = 18,
+ AUTOLAYOUT_ONLY_TITLE = 19,
+ AUTOLAYOUT_NOTES = 21,
+ AUTOLAYOUT_HANDOUT1 = 22,
+ AUTOLAYOUT_HANDOUT2 = 23,
+ AUTOLAYOUT_HANDOUT3 = 24,
+ AUTOLAYOUT_HANDOUT4 = 25,
+ AUTOLAYOUT_HANDOUT6 = 26,
+ AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART = 27,
+ AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE = 28,
+ AUTOLAYOUT_TITLE_VERTICAL_OUTLINE = 29,
+ AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART = 30,
+ AUTOLAYOUT_HANDOUT9 = 31,
+ AUTOLAYOUT_4CLIPART = 33,
+ AUTOLAYOUT_6CLIPART = 34,
AUTOLAYOUT__END
};
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index fb96005f6..744c37b49 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -195,7 +195,7 @@ public:
void EnsureMasterPageDefaultBackground();
SdrObject* CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL bInsert=FALSE);
SdrObject* CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert);
- SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1 );
+ SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false );
PresObjKind GetPresObjKind(SdrObject* pObj) const;
String GetPresObjText(PresObjKind eObjKind) const;
SfxStyleSheet* GetStyleSheetForMasterPageBackground() const;
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index 97ced90d7..4b3f255e9 100644
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -47,6 +47,8 @@ namespace sd
a pointer to the next shape in list or 0*/
SdrObject* removeShape( SdrObject& rObject );
+ void replaceShape( SdrObject& rOldObject, SdrObject& rNewObject );
+
/** removes all shapes from this list */
void clear();
@@ -76,6 +78,8 @@ namespace sd
*/
bool hasMore() const;
+ const std::list< SdrObject* >& getList() const { return maShapeList; }
+
private:
virtual void ObjectInDestruction(const SdrObject& rObject);
diff --git a/sd/prj/build.lst b/sd/prj/build.lst
index bc8bf923f..c8a15328d 100755
--- a/sd/prj/build.lst
+++ b/sd/prj/build.lst
@@ -26,6 +26,7 @@ sd sd\source\ui\slidesorter\model nmake - all sd_slsmodel sd_inc NULL
sd sd\source\ui\slidesorter\view nmake - all sd_slsview sd_inc NULL
sd sd\source\ui\slidesorter\controller nmake - all sd_slscontroller sd_sdi sd_inc NULL
sd sd\source\ui\slidesorter\cache nmake - all sd_slscache sd_inc NULL
+sd sd\source\ui\controller nmake - all sd_controller sd_inc NULL
sd sd\source\ui\notes nmake - all sd_notes sd_inc NULL
sd sd\source\ui\table nmake - all sd_table sd_inc NULL
sd sd\source\filter\ppt nmake - all sd_ppt sd_inc NULL
@@ -43,4 +44,4 @@ sd sd\source\ui\framework\module nmake - all sd_framework_module sd_inc N
sd sd\source\ui\framework\factories nmake - all sd_framework_factories sd_inc NULL
sd sd\source\ui\framework\tools nmake - all sd_framework_tools sd_inc NULL
sd sd\source\ui\annotations nmake - all sd_uiannotations sd_inc NULL
-sd sd\util nmake - all sd_util sd_app sd_cgm sd_core sd_dlg sd_docsh sd_eppt sd_filt sd_func sd_grf sd_unid sd_view sd_xml sd_html sd_ppt sd_accessibility sd_animations sd_toolpanel sd_toolpanel_controls sd_tools sd_slsshell sd_slsmodel sd_slsview sd_slscontroller sd_slscache sd_notes sd_table sd_slideshow sd_presenter sd_undo sd_helper sd_framework_configuration sd_framework_module sd_framework_tools sd_framework_factories sd_text sd_annotations sd_uiannotations NULL
+sd sd\util nmake - all sd_util sd_app sd_cgm sd_core sd_dlg sd_docsh sd_eppt sd_filt sd_func sd_grf sd_unid sd_view sd_xml sd_html sd_ppt sd_accessibility sd_animations sd_toolpanel sd_toolpanel_controls sd_tools sd_slsshell sd_slsmodel sd_slsview sd_slscontroller sd_slscache sd_notes sd_controller sd_table sd_slideshow sd_presenter sd_undo sd_helper sd_framework_configuration sd_framework_module sd_framework_tools sd_framework_factories sd_text sd_annotations sd_uiannotations NULL
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 918cb2dae..e1d39e7a4 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -4391,7 +4391,7 @@ SfxVoidItem ModifyPage SID_MODIFYPAGE
GroupId = GID_MODIFY;
]
-SfxVoidItem AssignLayout SID_ASSIGN_LAYOUT
+SfxUInt32Item AssignLayout SID_ASSIGN_LAYOUT
(SfxUInt32Item WhatPage ID_VAL_WHATPAGE, SfxUInt32Item WhatLayout ID_VAL_WHATLAYOUT)
[
/* flags: */
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index 2bfe001b3..8397f4e78 100644
--- a/sd/source/core/cusshow.cxx
+++ b/sd/source/core/cusshow.cxx
@@ -124,3 +124,13 @@ void SdCustomShow::RemovePage( const SdPage* pPage )
}
}
+void SdCustomShow::SetName(const String& rName)
+{
+ aName = rName;
+}
+
+String SdCustomShow::GetName() const
+{
+ return aName;
+}
+
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index b30e70032..67040c4b6 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -731,6 +731,10 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
if( bClipboard )
pNotesMPage->SetLayoutName( pPage->GetLayoutName() );
+
+ if( !pRefPage && (meDocType != DOCUMENT_TYPE_DRAW) )
+ pPage->SetAutoLayout( AUTOLAYOUT_TITLE, TRUE, TRUE );
+
mpWorkStartupTimer = new Timer();
mpWorkStartupTimer->SetTimeoutHdl( LINK(this, SdDrawDocument, WorkStartupHdl) );
mpWorkStartupTimer->SetTimeout(2000);
diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src
index fffb6a974..24d4f2231 100644
--- a/sd/source/core/glob.src
+++ b/sd/source/core/glob.src
@@ -130,7 +130,7 @@ String STR_PRESOBJ_TITLE
};
String STR_PRESOBJ_OUTLINE
{
- Text [ en-US ] = "Click to add an outline" ;
+ Text [ en-US ] = "Click to add text" ;
};
String STR_PRESOBJ_TEXT
{
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 92a1828e5..4a46f8099 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -158,22 +158,68 @@ SdPage::~SdPage()
delete mpItems;
}
+struct OrdNumSorter
+{
+ bool operator()( SdrObject* p1, SdrObject* p2 )
+ {
+ return p1->GetOrdNum() < p2->GetOrdNum();
+ }
+};
+
/** returns the nIndex'th object from the given PresObjKind, index starts with 1 */
-SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex )
+SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearch /* = false */ )
{
- int nObjFound = 0; // index of the searched object
+ // first sort all matching shapes with z-order
+ std::vector< SdrObject* > aMatches;
+
SdrObject* pObj = 0;
while( (pObj = maPresentationShapeList.getNextShape(pObj)) != 0 )
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
- if( pInfo && (pInfo->mePresObjKind == eObjKind) )
+ if( pInfo )
{
- nObjFound++; // found one
- if( nObjFound == nIndex )
- return pObj;
+ bool bFound = false;
+ if( pInfo->mePresObjKind == eObjKind )
+ {
+ bFound = true;
+ }
+ else if( bFuzzySearch && (eObjKind == PRESOBJ_OUTLINE) )
+ {
+ switch( pInfo->mePresObjKind )
+ {
+ case PRESOBJ_GRAPHIC:
+ case PRESOBJ_OBJECT:
+ case PRESOBJ_CHART:
+ case PRESOBJ_ORGCHART:
+ case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
+ case PRESOBJ_IMAGE:
+ case PRESOBJ_MEDIA:
+ bFound = TRUE;
+ break;
+ default:
+ break;
+ }
+ }
+ if( bFound )
+ {
+ aMatches.push_back( pObj );
+ }
}
}
+ if( aMatches.size() > 1 )
+ {
+ OrdNumSorter aSortHelper;
+ std::sort( aMatches.begin(), aMatches.end(), aSortHelper );
+ }
+
+ if( nIndex > 0 )
+ nIndex--;
+
+ if( (nIndex >= 0) && ( aMatches.size() > static_cast<unsigned int>(nIndex)) )
+ return aMatches[nIndex];
+
return 0;
}
@@ -272,6 +318,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
}
break;
+ case PRESOBJ_MEDIA:
case PRESOBJ_OBJECT:
{
pSdrObj = new SdrOle2Obj();
@@ -301,6 +348,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
}
case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
{
pSdrObj = new SdrOle2Obj();
( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarCalc" )));
@@ -492,7 +540,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if ( eObjKind == PRESOBJ_OBJECT ||
eObjKind == PRESOBJ_CHART ||
eObjKind == PRESOBJ_ORGCHART ||
- eObjKind == PRESOBJ_TABLE ||
+ eObjKind == PRESOBJ_CALC ||
eObjKind == PRESOBJ_GRAPHIC )
{
SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() );
@@ -1084,24 +1132,24 @@ static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
{
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TEXT ), // AUTOLAYOUT_TITLE
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_ENUM
- LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_CHART ), // AUTOLAYOUT_CHART
+ LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHART
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2TEXT
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_CHART ), // AUTOLAYOUT_TEXTCHART
- LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_ORGCHART ), // AUTOLAYOUT_ORG
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_GRAPHIC ), // AUTOLAYOUT_TEXTCLbIP
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_CHART, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHARTTEXT
- LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TABLE ), // AUTOLAYOUT_TAB
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CLIPTEXT
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXTOBJ
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTCHART
+ LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_ORG
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTCLbIP
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHARTTEXT
+ LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TAB
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CLIPTEXT
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OBJECT ), // AUTOLAYOUT_OBJ
- LayoutDescriptor( 2, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXT2OBJ
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
- LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_OBJOVERTEXT
- LayoutDescriptor( 3, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJTEXT
- LayoutDescriptor( 5, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJOVERTEXT
- LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXTOVEROBJ
- LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, // AUTOLAYOUT_4OBJ
- PRESOBJ_OBJECT, PRESOBJ_OBJECT ),
+ LayoutDescriptor( 2, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXT2OBJ
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
+ LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_OBJOVERTEXT
+ LayoutDescriptor( 3, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJTEXT
+ LayoutDescriptor( 5, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJOVERTEXT
+ LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOVEROBJ
+ LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, // AUTOLAYOUT_4OBJ
+ PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_NONE ), // AUTOLAYOUT_ONLY_TITLE
LayoutDescriptor( 0, PRESOBJ_NONE ), // AUTOLAYOUT_NONE
LayoutDescriptor( 0, PRESOBJ_PAGE, PRESOBJ_NOTES ), // AUTOLAYOUT_NOTES
@@ -1110,16 +1158,16 @@ static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT3
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT4
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT6
- LayoutDescriptor( 7, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_CHART ),// AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART
+ LayoutDescriptor( 7, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_OUTLINE ),// AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART
LayoutDescriptor( 8, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE
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( 9, PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT9
LayoutDescriptor( 10, PRESOBJ_TEXT, PRESOBJ_NONE ), // AUTOLAYOUT_ONLY_TEXT
- LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, // AUTOLAYOUT_4CLIPART
+ LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, // AUTOLAYOUT_4CLIPART
PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC ),
- LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, // AUTOLAYOUT_6CLIPART
- PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC )
+ LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, // AUTOLAYOUT_6CLIPART
+ PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE )
};
if( (eLayout < AUTOLAYOUT__START) || (eLayout >= AUTOLAYOUT__END) )
@@ -1338,7 +1386,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
}
-void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::vector< SdrObject* >& rShapes, bool bInit )
+void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::vector< SdrObject* >& rShapes, bool bInit, bool bSwitchLayout )
{
int i;
@@ -1353,16 +1401,20 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
for( i = 0; (i < PRESOBJ_MAX) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++ )
{
PresObjKind eKind = rDescriptor.meKind[i];
- SdrObject* pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind] );
- if( pObj )
+ SdrObject* pObj = 0;
+ while( (pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind], true )) != 0 )
{
PresObjIndex[eKind]++; // on next search for eKind, find next shape with same eKind
- rShapes[i] = pObj;
+
+ if( !bSwitchLayout || !pObj->IsEmptyPresObj() )
+ {
+ rShapes[i] = pObj;
+ break;
+ }
}
- else
- {
+
+ if( !pObj )
bMissing = true;
- }
}
if( bMissing && bInit )
@@ -1402,8 +1454,16 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
case PRESOBJ_TITLE:
bFound = eSdrObjKind == OBJ_TITLETEXT;
break;
+ case PRESOBJ_TABLE:
+ bFound = eSdrObjKind == OBJ_TABLE;
+ break;
+ case PRESOBJ_MEDIA:
+ bFound = eSdrObjKind == OBJ_MEDIA;
+ break;
case PRESOBJ_OUTLINE:
- bFound = (eSdrObjKind == OBJ_OUTLINETEXT) || ((eSdrObjKind == OBJ_TEXT) && bPresStyle);
+ bFound = (eSdrObjKind == OBJ_OUTLINETEXT) ||
+ ((eSdrObjKind == OBJ_TEXT) && bPresStyle) ||
+ (eSdrObjKind == OBJ_TABLE) || (eSdrObjKind == OBJ_MEDIA) || (eSdrObjKind == OBJ_GRAF) || (eSdrObjKind == OBJ_OLE2);
break;
case PRESOBJ_GRAPHIC:
bFound = eSdrObjKind == OBJ_GRAF;
@@ -1445,7 +1505,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
}
break;
case PRESOBJ_CHART:
- case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
if( eSdrObjKind == OBJ_OLE2 )
{
SdrOle2Obj* pOle2 = dynamic_cast< SdrOle2Obj* >( pObj );
@@ -1455,7 +1515,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
((eKind == PRESOBJ_CHART) &&
( pOle2->GetProgName().EqualsAscii( "StarChart" ) || pOle2->IsChart() ) )
||
- ((eKind == PRESOBJ_TABLE) &&
+ ((eKind == PRESOBJ_CALC) &&
( pOle2->GetProgName().EqualsAscii( "StarCalc" ) || pOle2->IsCalc() ) ) )
{
bFound = true;
@@ -1463,6 +1523,10 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
}
break;
}
+ else if( eSdrObjKind == OBJ_TABLE )
+ {
+ bFound = true;
+ }
break;
case PRESOBJ_PAGE:
case PRESOBJ_HANDOUT:
@@ -1487,6 +1551,8 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
{
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
+ const bool bSwitchLayout = eLayout != GetAutoLayout();
+
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
@@ -1509,7 +1575,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, 0);
- findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit );
+ findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit, bSwitchLayout );
int i;
@@ -2047,7 +2113,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && rPage.IsInserted();
SdrObject* pNewObj = pSourceObj;
- if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() != OBJ_OUTLINETEXT) )
+ if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) )
{
pNewObj = rPage.CreatePresObj(PRESOBJ_OUTLINE, bVertical, aRect);
@@ -2106,7 +2172,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
SdrObject::Free( pSourceObj );
}
}
- else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() != OBJ_TEXT) )
+ else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() == OBJ_OUTLINETEXT) )
{
// is there an outline shape we can use to replace empty subtitle shape?
pNewObj = rPage.CreatePresObj(PRESOBJ_TEXT, bVertical, aRect);
@@ -2193,10 +2259,10 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
}
- if ( pObj->ISA(SdrGrafObj) && !pObj->IsEmptyPresObj() )
- ( (SdrGrafObj*) pObj)->AdjustToMaxRect( aRect, FALSE );
- else
- pObj->SetLogicRect(aRect);
+// if ( pObj->ISA(SdrGrafObj) && !pObj->IsEmptyPresObj() )
+ ( /*(SdrGrafObj*)*/ pObj)->AdjustToMaxRect( aRect );
+// else
+// SetLogicRect( pObj, aRect );
pObj->SetUserCall(this);
@@ -2213,7 +2279,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
pTextObject->SetMergedItem(SdrTextHorzAdjustItem( bVertical ? SDRTEXTHORZADJUST_RIGHT : SDRTEXTHORZADJUST_BLOCK ));
}
- if( !mbMaster )
+ if( !mbMaster && (pTextObject->GetObjIdentifier() != OBJ_TABLE) )
{
if ( pTextObject->IsAutoGrowHeight() )
{
@@ -2276,6 +2342,9 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
}
}
+ if ( pObj && ( pObj->IsEmptyPresObj() || !pObj->ISA(SdrGrafObj) ) )
+ pObj->AdjustToMaxRect( aRect );
+
return pObj;
}
@@ -2655,7 +2724,7 @@ String SdPage::GetPresObjText(PresObjKind eObjKind) const
{
aString = String ( SdResId( STR_PRESOBJ_ORGCHART ) );
}
- else if (eObjKind == PRESOBJ_TABLE)
+ else if (eObjKind == PRESOBJ_CALC)
{
aString = String ( SdResId( STR_PRESOBJ_TABLE ) );
}
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index 6d0f7429f..f99fc572f 100644
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -84,6 +84,44 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject )
return 0;
}
+void ShapeList::replaceShape( SdrObject& rOldObject, SdrObject& rNewObject )
+{
+ if( &rOldObject == &rNewObject )
+ return;
+
+ ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rNewObject ) );
+ if( aIter != maShapeList.end() )
+ {
+ bool bIterErased = aIter == maIter;
+ (*aIter)->RemoveObjectUser(*this);
+ aIter = maShapeList.erase( aIter );
+
+ if( bIterErased )
+ maIter = aIter;
+ }
+
+ aIter = std::find( maShapeList.begin(), maShapeList.end(), &rOldObject );
+ if( aIter != maShapeList.end() )
+ {
+ bool bIterErased = aIter == maIter;
+
+ ListImpl::iterator iNew( maShapeList.insert( aIter, &rNewObject ) );
+
+ (*aIter)->RemoveObjectUser(*this);
+ aIter = maShapeList.erase( aIter );
+
+ rNewObject.AddObjectUser( *this );
+
+ if( bIterErased )
+ maIter = iNew;
+ }
+ else
+ {
+ DBG_ERROR("sd::ShapeList::replaceShape(), given shape not part of list!");
+ addShape( rNewObject );
+ }
+}
+
/** removes all shapes from this list
NOTE: iterators will become invalid */
void ShapeList::clear()
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 913734100..9d0fcc573 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2431,7 +2431,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
case PPT_PLACEHOLDER_MEDIACLIP :
case PPT_PLACEHOLDER_OBJECT : ePresObjKind = PRESOBJ_OBJECT; break;
case PPT_PLACEHOLDER_GRAPH : ePresObjKind = PRESOBJ_CHART; break;
- case PPT_PLACEHOLDER_TABLE : ePresObjKind = PRESOBJ_TABLE; break;
+ case PPT_PLACEHOLDER_TABLE : ePresObjKind = PRESOBJ_CALC; break;
case PPT_PLACEHOLDER_CLIPART : ePresObjKind = PRESOBJ_GRAPHIC; break;
case PPT_PLACEHOLDER_ORGANISZATIONCHART : ePresObjKind = PRESOBJ_ORGCHART; break;
}
diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src
index 4a109eff4..34b9750b6 100644
--- a/sd/source/ui/app/res_bmp.src
+++ b/sd/source/ui/app/res_bmp.src
@@ -30,274 +30,236 @@
#include "glob.hrc"
#include "res_bmp.hrc"
-Bitmap BMP_FOIL_00
+// preview bitmaps for layouts
+Bitmap BMP_LAYOUT_EMPTY
{
- File = "foil00.bmp" ;
+ File = "layout_empty.png";
};
-Bitmap BMP_FOIL_00_H
+Bitmap BMP_LAYOUT_EMPTY_H
{
- File = "foil00_h.bmp" ;
+ File = "layout_empty_h.png";
};
-Bitmap BMP_FOIL_01
+Bitmap BMP_LAYOUT_HEAD01
{
- File = "foil01.bmp" ;
+ File = "layout_head01.png";
};
-Bitmap BMP_FOIL_01_H
+Bitmap BMP_LAYOUT_HEAD01_H
{
- File = "foil01_h.bmp" ;
+ File = "layout_head01_h.png";
};
-Bitmap BMP_FOIL_02
+Bitmap BMP_LAYOUT_HEAD02
{
- File = "foil02.bmp" ;
+ File = "layout_head02.png";
};
-Bitmap BMP_FOIL_02_H
+Bitmap BMP_LAYOUT_HEAD02_H
{
- File = "foil02_h.bmp" ;
+ File = "layout_head02_h.png";
};
-Bitmap BMP_FOIL_03
+Bitmap BMP_LAYOUT_HEAD02A
{
- File = "foil03.bmp" ;
+ File = "layout_head02a.png";
};
-Bitmap BMP_FOIL_03_H
+Bitmap BMP_LAYOUT_HEAD02A_H
{
- File = "foil03_h.bmp" ;
+ File = "layout_head02a_h.png";
};
-Bitmap BMP_FOIL_04
+Bitmap BMP_LAYOUT_HEAD02B
{
- File = "foil04.bmp" ;
+ File = "layout_head02b.png";
};
-Bitmap BMP_FOIL_04_H
+Bitmap BMP_LAYOUT_HEAD02B_H
{
- File = "foil04_h.bmp" ;
+ File = "layout_head02b_h.png";
};
-Bitmap BMP_FOIL_05
+Bitmap BMP_LAYOUT_HEAD03
{
- File = "foil05.bmp" ;
+ File = "layout_head03.png";
};
-Bitmap BMP_FOIL_06
+Bitmap BMP_LAYOUT_HEAD03_H
{
- File = "foil06.bmp" ;
+ File = "layout_head03_h.png";
};
-Bitmap BMP_FOIL_06_H
+Bitmap BMP_LAYOUT_HEAD03A
{
- File = "foil06_h.bmp" ;
+ File = "layout_head03a.png";
};
-Bitmap BMP_FOIL_07
+Bitmap BMP_LAYOUT_HEAD03A_H
{
- File = "foil07.bmp" ;
+ File = "layout_head03a_h.png";
};
-Bitmap BMP_FOIL_07_H
+Bitmap BMP_LAYOUT_HEAD03B
{
- File = "foil07_h.bmp" ;
+ File = "layout_head03b.png";
};
-Bitmap BMP_FOIL_08
+Bitmap BMP_LAYOUT_HEAD03B_H
{
- File = "foil08.bmp" ;
+ File = "layout_head03b_h.png";
};
-Bitmap BMP_FOIL_08_H
+Bitmap BMP_LAYOUT_HEAD03C
{
- File = "foil08_h.bmp" ;
+ File = "layout_head03c.png";
};
-Bitmap BMP_FOIL_09
+Bitmap BMP_LAYOUT_HEAD03C_H
{
- File = "foil09.bmp" ;
+ File = "layout_head03c_h.png";
};
-Bitmap BMP_FOIL_09_H
+Bitmap BMP_LAYOUT_HEAD04
{
- File = "foil09_h.bmp" ;
+ File = "layout_head04.png";
};
-Bitmap BMP_FOIL_10
+Bitmap BMP_LAYOUT_HEAD04_H
{
- File = "foil10.bmp" ;
+ File = "layout_head04_h.png";
};
-Bitmap BMP_FOIL_10_H
+Bitmap BMP_LAYOUT_HEAD06
{
- File = "foil10_h.bmp" ;
+ File = "layout_head06.png";
};
-Bitmap BMP_FOIL_11
+Bitmap BMP_LAYOUT_HEAD06_H
{
- File = "foil11.bmp" ;
+ File = "layout_head06_h.png";
};
-Bitmap BMP_FOIL_11_H
+Bitmap BMP_LAYOUT_TEXTONLY
{
- File = "foil11_h.bmp" ;
+ File = "layout_textonly.png";
};
-Bitmap BMP_FOIL_12
+Bitmap BMP_LAYOUT_TEXTONLY_H
{
- File = "foil12.bmp" ;
+ File = "layout_textonly_h.png";
};
-Bitmap BMP_FOIL_12_H
+Bitmap BMP_LAYOUT_VERTICAL01
{
- File = "foil12_h.bmp" ;
+ File = "layout_vertical01.png";
};
-Bitmap BMP_FOIL_13
+Bitmap BMP_LAYOUT_VERTICAL01_H
{
- File = "foil13.bmp" ;
+ File = "layout_vertical01_h.png";
};
-Bitmap BMP_FOIL_13_H
+Bitmap BMP_LAYOUT_VERTICAL02
{
- File = "foil13_h.bmp" ;
+ File = "layout_vertical02.png";
};
-Bitmap BMP_FOIL_14
+Bitmap BMP_LAYOUT_VERTICAL02_H
{
- File = "foil14.bmp" ;
+ File = "layout_vertical02_h.png";
};
-Bitmap BMP_FOIL_14_H
-{
- File = "foil14_h.bmp" ;
-};
-Bitmap BMP_FOIL_15
-{
- File = "foil15.bmp" ;
-};
-Bitmap BMP_FOIL_15_H
-{
- File = "foil15_h.bmp" ;
-};
-Bitmap BMP_FOIL_16
-{
- File = "foil16.bmp" ;
-};
-Bitmap BMP_FOIL_16_H
-{
- File = "foil16_h.bmp" ;
-};
-Bitmap BMP_FOIL_17
-{
- File = "foil17.bmp" ;
-};
-Bitmap BMP_FOIL_17_H
-{
- File = "foil17_h.bmp" ;
-};
-Bitmap BMP_FOIL_18
-{
- File = "foil18.bmp" ;
-};
-Bitmap BMP_FOIL_18_H
-{
- File = "foil18_h.bmp" ;
-};
-Bitmap BMP_FOIL_19
-{
- File = "foil19.bmp" ;
-};
-Bitmap BMP_FOIL_19_H
-{
- File = "foil19_h.bmp" ;
-};
-Bitmap BMP_FOIL_20
+
+Bitmap BMP_FOILH_01
{
- File = "foil20.bmp" ;
+ File = "foilh01.png";
};
-Bitmap BMP_FOIL_20_H
+Bitmap BMP_FOILH_01_H
{
- File = "foil20_h.bmp" ;
+ File = "foilh01_h.png";
};
-Bitmap BMP_FOIL_21
+Bitmap BMP_FOILH_02
{
- File = "foil21.bmp" ;
+ File = "foilh02.png";
};
-Bitmap BMP_FOIL_21_H
+Bitmap BMP_FOILH_02_H
{
- File = "foil21_h.bmp" ;
+ File = "foilh02_h.png";
};
-Bitmap BMP_FOIL_22
+Bitmap BMP_FOILH_03
{
- File = "foil22.bmp" ;
+ File = "foilh03.png";
};
-Bitmap BMP_FOIL_22_H
+Bitmap BMP_FOILH_03_H
{
- File = "foil22_h.bmp" ;
+ File = "foilh03_h.png";
};
-Bitmap BMP_FOIL_23
+Bitmap BMP_FOILH_04
{
- File = "foil23.bmp" ;
+ File = "foilh04.png";
};
-Bitmap BMP_FOIL_23_H
+Bitmap BMP_FOILH_04_H
{
- File = "foil23_h.bmp" ;
+ File = "foilh04_h.png";
};
-Bitmap BMP_FOIL_24
+Bitmap BMP_FOILH_06
{
- File = "foil24.bmp" ;
+ File = "foilh06.png";
};
-Bitmap BMP_FOIL_24_H
+Bitmap BMP_FOILH_06_H
{
- File = "foil24_h.bmp" ;
+ File = "foilh06_h.png";
};
-Bitmap BMP_FOIL_25
+Bitmap BMP_FOILH_09
{
- File = "foil25.bmp" ;
+ File = "foilh09.png";
};
-Bitmap BMP_FOIL_25_H
+Bitmap BMP_FOILH_09_H
{
- File = "foil25_h.bmp" ;
+ File = "foilh09_h.png";
};
-Bitmap BMP_FOIL_26
+
+
+Bitmap BMP_PLACEHOLDER_CHART_SMALL
{
- File = "foil26.bmp" ;
+ File = "placeholder_chart_small.png";
};
-Bitmap BMP_FOIL_26_H
+Bitmap BMP_PLACEHOLDER_CHART_SMALL_HOVER
{
- File = "foil26_h.bmp" ;
+ File = "placeholder_chart_small_hover.png";
};
-Bitmap BMP_FOIL_27
+Bitmap BMP_PLACEHOLDER_IMAGE_SMALL
{
- File = "foil27.bmp" ;
+ File = "placeholder_image_small.png";
};
-Bitmap BMP_FOIL_27_H
+Bitmap BMP_PLACEHOLDER_IMAGE_SMALL_HOVER
{
- File = "foil27_h.bmp" ;
+ File = "placeholder_image_small_hover.png";
};
-Bitmap BMP_FOILH_01
+Bitmap BMP_PLACEHOLDER_MOVIE_SMALL
{
- File = "foilh01.bmp" ;
+ File = "placeholder_movie_small.png";
};
-Bitmap BMP_FOILH_01_H
+Bitmap BMP_PLACEHOLDER_MOVIE_SMALL_HOVER
{
- File = "foilh01_h.bmp" ;
+ File = "placeholder_movie_small_hover.png";
};
-Bitmap BMP_FOILH_02
+Bitmap BMP_PLACEHOLDER_TABLE_SMALL
{
- File = "foilh02.bmp" ;
+ File = "placeholder_table_small.png";
};
-Bitmap BMP_FOILH_02_H
+Bitmap BMP_PLACEHOLDER_TABLE_SMALL_HOVER
{
- File = "foilh02_h.bmp" ;
+ File = "placeholder_table_small_hover.png";
};
-Bitmap BMP_FOILH_03
+
+Bitmap BMP_PLACEHOLDER_CHART_LARGE
{
- File = "foilh03.bmp" ;
+ File = "placeholder_chart_large.png";
};
-Bitmap BMP_FOILH_03_H
+Bitmap BMP_PLACEHOLDER_CHART_LARGE_HOVER
{
- File = "foilh03_h.bmp" ;
+ File = "placeholder_chart_large_hover.png";
};
-Bitmap BMP_FOILH_04
+Bitmap BMP_PLACEHOLDER_IMAGE_LARGE
{
- File = "foilh04.bmp" ;
+ File = "placeholder_image_large.png";
};
-Bitmap BMP_FOILH_04_H
+Bitmap BMP_PLACEHOLDER_IMAGE_LARGE_HOVER
{
- File = "foilh04_h.bmp" ;
+ File = "placeholder_image_large_hover.png";
};
-Bitmap BMP_FOILH_06
+Bitmap BMP_PLACEHOLDER_MOVIE_LARGE
{
- File = "foilh06.bmp" ;
+ File = "placeholder_movie_large.png";
};
-Bitmap BMP_FOILH_06_H
+Bitmap BMP_PLACEHOLDER_MOVIE_LARGE_HOVER
{
- File = "foilh06_h.bmp" ;
+ File = "placeholder_movie_large_hover.png";
};
-Bitmap BMP_FOILH_09
+Bitmap BMP_PLACEHOLDER_TABLE_LARGE
{
- File = "foilh09.bmp" ;
+ File = "placeholder_table_large.png";
};
-Bitmap BMP_FOILH_09_H
+Bitmap BMP_PLACEHOLDER_TABLE_LARGE_HOVER
{
- File = "foilh09_h.bmp" ;
+ File = "placeholder_table_large_hover.png";
};
+
Bitmap BMP_FOILN_01
{
File = "foiln01.bmp" ;
@@ -306,10 +268,6 @@ Bitmap BMP_FOILN_01_H
{
File = "foiln01_h.bmp" ;
};
-Bitmap BMP_FOIL_NONE
-{
- File = "foilnone.bmp" ;
-};
Bitmap BMP_PAGE
{
File = "page.bmp" ;
diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx
index 2e2cfe7c8..414add2d2 100644
--- a/sd/source/ui/app/sddll2.cxx
+++ b/sd/source/ui/app/sddll2.cxx
@@ -57,10 +57,10 @@
#include <svx/f3dchild.hxx>
#include <svx/grafctrl.hxx>
#include <svx/tbxcustomshapes.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/lboxctrl.hxx>
#include <svx/clipboardctl.hxx>
-#include <svx/extrusioncontrols.hxx>
+#include <svx/extrusioncolorcontrol.hxx>
+#include <svx/fontworkgallery.hxx>
#include <svx/tbxcolor.hxx>
#include <avmedia/mediaplayer.hxx>
#include <avmedia/mediatoolbox.hxx>
@@ -76,10 +76,7 @@
#include "AnimationChildWindow.hxx"
#include "animobjs.hxx"
#include "NavigatorChildWindow.hxx"
-#ifndef SD_LAZER_DIALOG_CHILD_WINDOW_HXX
#include "LayerDialogChildWindow.hxx"
-#endif
-//#include "3dchld.hxx"
#include "app.hrc"
#include "SpellDialogChildWindow.hxx"
#include "DrawViewShell.hxx"
@@ -121,10 +118,6 @@ void SdDLL::RegisterControllers()
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_FLOWCHART, pMod );
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod );
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod );
-// SdTbxCtlDiaEffect::RegisterControl(0, pMod);
-// SdTbxCtlDiaSpeed::RegisterControl(0, pMod);
-// SdTbxCtlDiaAuto::RegisterControl(0, pMod);
-// SdTbxCtlDiaTime::RegisterControl(0, pMod);
SdTbxCtlDiaPages::RegisterControl( SID_PAGES_PER_ROW, pMod );
SdTbxCtlGlueEscDir::RegisterControl( SID_GLUE_ESCDIR, pMod );
@@ -133,15 +126,7 @@ void SdDLL::RegisterControllers()
::sd::NavigatorChildWindow::RegisterChildWindowContext( (sal_uInt16) ::sd::DrawViewShell::GetInterfaceId(), pMod );
::sd::NavigatorChildWindow::RegisterChildWindowContext( (sal_uInt16) ::sd::GraphicViewShell::GetInterfaceId(), pMod );
::sd::LayerDialogChildWindow::RegisterChildWindow(0, pMod);
- //Sd3DChildWindow::RegisterChildWindow(0, pMod);
-/*
- SvxChildWinCustomShapesBasic::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesSymbol::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesArrow::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesFlowChart::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesCallout::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesStar::RegisterChildWindow( 0, pMod );
-*/
+
Svx3DChildWindow::RegisterChildWindow(0, pMod);
SvxFontWorkChildWindow::RegisterChildWindow(0, pMod);
SvxColorChildWindow::RegisterChildWindow(0, pMod, SFX_CHILDWIN_TASK);
@@ -210,15 +195,9 @@ void SdDLL::RegisterControllers()
SvxClipBoardControl::RegisterControl( SID_PASTE, pMod );
- svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod );
- svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod );
- svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod );
- svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod );
svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
-
svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
- svx::FontWorkAlignmentControl::RegisterControl( SID_FONTWORK_ALIGNMENT_FLOATER, pMod );
- svx::FontWorkCharacterSpacingControl::RegisterControl( SID_FONTWORK_CHARACTER_SPACING_FLOATER, pMod );
+
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pMod );
SdTemplateControl::RegisterControl( SID_STATUS_LAYOUT, pMod );
@@ -227,4 +206,7 @@ void SdDLL::RegisterControllers()
SvxFrameLineColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod );
SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod );
SvxSubToolBoxControl::RegisterControl(SID_OPTIMIZE_TABLE, pMod);
+
+// SdLayoutControl::RegisterControl( SID_ASSIGN_LAYOUT, pMod );
+// SdLayoutControl::RegisterControl( SID_INSERTPAGE, pMod );
}
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index b065e23c7..e56ec1c66 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -166,6 +166,7 @@ String STR_HANDOUT_MODE
{
Text [ en-US ] = "Handout" ;
};
+
String STR_AUTOLAYOUT_NONE
{
Text [ en-US ] = "Blank Slide" ;
@@ -182,77 +183,41 @@ String STR_AUTOLAYOUT_TITLE
{
Text [ en-US ] = "Title Slide" ;
};
-String STR_AUTOLAYOUT_OBJ
-{
- Text [ en-US ] = "Title, Object" ;
-};
-String STR_AUTOLAYOUT_ENUM
-{
- Text [ en-US ] = "Title, Text" ;
-};
-String STR_AUTOLAYOUT_CHART
-{
- Text [ en-US ] = "Title, Chart" ;
-};
-String STR_AUTOLAYOUT_TAB
-{
- Text [ en-US ] = "Title, Spreadsheet" ;
-};
-String STR_AUTOLAYOUT_CLIPTEXT
+String STR_AUTOLAYOUT_CONTENT
{
- Text [ en-US ] = "Title, Clipart, Text" ;
+ Text [ en-US ] = "Title, Content" ;
};
-String STR_AUTOLAYOUT_2TEXT
+String STR_AUTOLAYOUT_2CONTENT
{
- Text [ en-US ] = "Title, 2 Text Blocks" ;
+ Text [ en-US ] = "Title and 2 Content" ;
};
-String STR_AUTOLAYOUT_TEXTCHART
+String STR_AUTOLAYOUT_CONTENT_2CONTENT
{
- Text [ en-US ] = "Title, Text, Chart" ;
+ Text [ en-US ] = "Title, Content and 2 Content" ;
};
-String STR_AUTOLAYOUT_TEXTCLIP
+String STR_AUTOLAYOUT_2CONTENT_CONTENT
{
- Text [ en-US ] = "Title, Text, Clipart" ;
+ Text [ en-US ] = "Title, 2 Content and Content" ;
};
-String STR_AUTOLAYOUT_CHARTTEXT
+String STR_AUTOLAYOUT_CONTENT_OVER_2CONTENT
{
- Text [ en-US ] = "Title, Chart, Text" ;
+ Text [ en-US ] = "Title, Content over 2 Content" ;
};
-String STR_AUTOLAYOUT_TEXTOBJ
+String STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT
{
- Text [ en-US ] = "Title, Text, Object" ;
+ Text [ en-US ] = "Title, 2 Content over Content" ;
};
-String STR_AUTOLAYOUT_TEXT2OBJ
+String STR_AUTOLAYOUT_CONTENT_OVER_CONTENT
{
- Text [ en-US ] = "Title, Text, 2 Objects" ;
+ Text [ en-US ] = "Title, Content over Content" ;
};
-String STR_AUTOLAYOUT_OBJTEXT
+String STR_AUTOLAYOUT_4CONTENT
{
- Text [ en-US ] = "Title, Object, Text" ;
+ Text [ en-US ] = "Title, 4 Content" ;
};
-String STR_AUTOLAYOUT_OBJOVERTEXT
+String STR_AUTOLAYOUT_6CONTENT
{
- Text [ en-US ] = "Title, Object Above Text" ;
-};
-String STR_AUTOLAYOUT_2OBJTEXT
-{
- Text [ en-US ] = "Title, 2 Objects, Text" ;
-};
-String STR_AUTOLAYOUT_2OBJOVERTEXT
-{
- Text [ en-US ] = "Title, 2 Objects Above Text" ;
-};
-String STR_AUTOLAYOUT_TEXTOVEROBJ
-{
- Text [ en-US ] = "Title, Text Above Object" ;
-};
-String STR_AUTOLAYOUT_4OBJ
-{
- Text [ en-US ] = "Title, 4 Objects" ;
-};
-String STR_AUTOLAYOUT_4CLIPART
-{
- Text [ en-US ] = "Title, 4 Cliparts" ;
+ Text [ en-US ] = "Title, 6 Content" ;
};
String STR_AL_TITLE_VERT_OUTLINE
{
@@ -270,10 +235,6 @@ 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
{
@@ -1270,3 +1231,7 @@ String RID_ANNOTATIONS_START
{
Text [ en-US ] = "Comments";
};
+String STR_RESET_LAYOUT
+{
+ Text[ en-US ] = "Reset Slide Layout";
+};
diff --git a/sd/source/ui/controller/makefile.mk b/sd/source/ui/controller/makefile.mk
new file mode 100644
index 000000000..4e37fbd5e
--- /dev/null
+++ b/sd/source/ui/controller/makefile.mk
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.21 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+
+PRJ=..$/..$/..
+
+PROJECTPCH=sd
+PROJECTPCHSOURCE=$(PRJ)$/util$/sd
+PRJNAME=sd
+TARGET=controller
+ENABLE_EXCEPTIONS=TRUE
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/slidelayoutcontroller.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
new file mode 100644
index 000000000..5fe3b37d8
--- /dev/null
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -0,0 +1,418 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/frame/status/FontHeight.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/DrawViewMode.hpp>
+
+#include <memory>
+#include <boost/scoped_ptr.hpp>
+
+#include <vos/mutex.hxx>
+
+#include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
+
+#include <svl/languageoptions.hxx>
+
+#include <svtools/ctrltool.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svtools/toolbarmenu.hxx>
+#include <svtools/valueset.hxx>
+
+#include <toolkit/helper/vclunohelper.hxx>
+
+#include <sfx2/imagemgr.hxx>
+
+#include "app.hrc"
+#include "glob.hrc"
+#include "strings.hrc"
+#include "res_bmp.hrc"
+#include "sdresid.hxx"
+#include "pres.hxx"
+#include "slidelayoutcontroller.hxx"
+
+using rtl::OUString;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::beans;
+
+namespace sd
+{
+
+extern ::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const OUString& aCmdURL );
+
+// -----------------------------------------------------------------------
+
+class LayoutToolbarMenu : public svtools::ToolbarMenu
+{
+public:
+ LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, ::Window* pParent, const bool bInsertPage );
+ virtual ~LayoutToolbarMenu();
+
+protected:
+ DECL_LINK( SelectHdl, void * );
+
+private:
+ SlideLayoutController& mrController;
+ Reference< XFrame > mxFrame;
+ bool mbInsertPage;
+ ValueSet* mpLayoutSet1;
+ ValueSet* mpLayoutSet2;
+};
+
+// -----------------------------------------------------------------------
+
+struct snewfoil_value_info
+{
+ USHORT mnBmpResId;
+ USHORT mnHCBmpResId;
+ USHORT mnStrResId;
+ WritingMode meWritingMode;
+ AutoLayout maAutoLayout;
+};
+
+static snewfoil_value_info notes[] =
+{
+ {BMP_FOILN_01, BMP_FOILN_01_H, STR_AUTOLAYOUT_NOTES, WritingMode_LR_TB,
+ AUTOLAYOUT_NOTES},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+};
+
+static snewfoil_value_info handout[] =
+{
+ {BMP_FOILH_01, BMP_FOILH_01_H, STR_AUTOLAYOUT_HANDOUT1, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT1},
+ {BMP_FOILH_02, BMP_FOILH_02_H, STR_AUTOLAYOUT_HANDOUT2, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT2},
+ {BMP_FOILH_03, BMP_FOILH_03_H, STR_AUTOLAYOUT_HANDOUT3, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT3},
+ {BMP_FOILH_04, BMP_FOILH_04_H, STR_AUTOLAYOUT_HANDOUT4, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT4},
+ {BMP_FOILH_06, BMP_FOILH_06_H, STR_AUTOLAYOUT_HANDOUT6, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT6},
+ {BMP_FOILH_09, BMP_FOILH_09_H, STR_AUTOLAYOUT_HANDOUT9, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT9},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+};
+
+static snewfoil_value_info standard[] =
+{
+ {BMP_LAYOUT_EMPTY, BMP_LAYOUT_EMPTY_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {BMP_LAYOUT_HEAD03, BMP_LAYOUT_HEAD03_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT},
+ {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE},
+ {BMP_LAYOUT_TEXTONLY, BMP_LAYOUT_TEXTONLY_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT},
+ {BMP_LAYOUT_HEAD03B, BMP_LAYOUT_HEAD03B_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT},
+ {BMP_LAYOUT_HEAD03C, BMP_LAYOUT_HEAD03C_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ},
+ {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD02B, BMP_LAYOUT_HEAD02B_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ},
+ {BMP_LAYOUT_HEAD06, BMP_LAYOUT_HEAD06_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
+};
+
+static snewfoil_value_info v_standard[] =
+{
+ // vertical
+ {BMP_LAYOUT_VERTICAL02, BMP_LAYOUT_VERTICAL02_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL,AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
+ {BMP_LAYOUT_VERTICAL01, BMP_LAYOUT_VERTICAL01_H, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
+};
+
+// -----------------------------------------------------------------------
+
+static void fillLayoutValueSet( ValueSet* pValue, snewfoil_value_info* pInfo, const bool bHighContrast )
+{
+ Size aLayoutItemSize;
+ for( ; pInfo->mnBmpResId; pInfo++ )
+ {
+ String aText( SdResId( pInfo->mnStrResId ) );
+ BitmapEx aBmp( SdResId( (bHighContrast ? pInfo->mnHCBmpResId : pInfo->mnBmpResId) ) );
+
+ pValue->InsertItem( static_cast<USHORT>(pInfo->maAutoLayout)+1, aBmp, aText );
+
+ aLayoutItemSize.Width() = std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() );
+ aLayoutItemSize.Height() = std::max( aLayoutItemSize.Height(), aBmp.GetSizePixel().Height() );
+ }
+
+ aLayoutItemSize = pValue->CalcItemSizePixel( aLayoutItemSize );
+ pValue->SetSizePixel( pValue->CalcWindowSizePixel( aLayoutItemSize ) );
+}
+
+// -----------------------------------------------------------------------
+
+LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, ::Window* pParent, const bool bInsertPage )
+: svtools::ToolbarMenu(xFrame, pParent, WB_CLIPCHILDREN )
+, mrController( rController )
+, mxFrame(xFrame)
+, mbInsertPage( bInsertPage )
+, mpLayoutSet1( 0 )
+, mpLayoutSet2( 0 )
+{
+ DrawViewMode eMode = DrawViewMode_DRAW;
+
+ // find out which view is running
+ if( xFrame.is() ) try
+ {
+ Reference< XPropertySet > xControllerSet( xFrame->getController(), UNO_QUERY_THROW );
+ xControllerSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DrawViewMode" ) ) ) >>= eMode;
+ }
+ catch( Exception& e )
+ {
+ (void)e;
+ OSL_ASSERT(false);
+ }
+
+ const sal_Int32 LAYOUT_BORDER_PIX = 7;
+
+ String aTitle1( SdResId( STR_GLUE_ESCDIR_HORZ ) );
+ String aTitle2( SdResId( STR_GLUE_ESCDIR_VERT ) );
+
+ const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ SvtLanguageOptions aLanguageOptions;
+ const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled();
+
+ SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+
+ mpLayoutSet1 = createEmptyValueSetControl();
+ mpLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+
+ snewfoil_value_info* pInfo = 0;
+ sal_Int16 nColCount = 4;
+ switch( eMode )
+ {
+ case DrawViewMode_DRAW: pInfo = &standard[0]; break;
+ case DrawViewMode_HANDOUT: pInfo = &handout[0]; nColCount = 2; break;
+ case DrawViewMode_NOTES: pInfo = &notes[0]; nColCount = 1; break;
+ }
+
+ mpLayoutSet1->SetColCount( nColCount );
+
+ fillLayoutValueSet( mpLayoutSet1, pInfo, bHighContrast );
+
+ Size aSize( mpLayoutSet1->GetOutputSizePixel() );
+ aSize.Width() += (mpLayoutSet1->GetColCount() + 1) * LAYOUT_BORDER_PIX;
+ aSize.Height() += (mpLayoutSet1->GetLineCount() +1) * LAYOUT_BORDER_PIX;
+ mpLayoutSet1->SetOutputSizePixel( aSize );
+
+ if( bVerticalEnabled && (eMode == DrawViewMode_DRAW) )
+ appendEntry( -1, aTitle1 );
+ appendEntry( 0, mpLayoutSet1 );
+
+ if( bVerticalEnabled && (eMode == DrawViewMode_DRAW) )
+ {
+ mpLayoutSet2 = new ValueSet( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
+ // mpLayoutSet2->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
+
+ mpLayoutSet2->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+ mpLayoutSet2->SetColCount( 4 );
+ mpLayoutSet2->EnableFullItemMode( FALSE );
+ mpLayoutSet2->SetColor( GetControlBackground() );
+
+ fillLayoutValueSet( mpLayoutSet2, &v_standard[0], bHighContrast );
+
+ aSize = mpLayoutSet2->GetOutputSizePixel();
+ aSize.Width() += (mpLayoutSet2->GetColCount() + 1) * LAYOUT_BORDER_PIX;
+ aSize.Height() += (mpLayoutSet2->GetLineCount() + 1) * LAYOUT_BORDER_PIX;
+ mpLayoutSet2->SetOutputSizePixel( aSize );
+
+ appendEntry( -1, aTitle2 );
+ appendEntry( 1, mpLayoutSet2 );
+ }
+
+ if( eMode == DrawViewMode_DRAW )
+ {
+ appendSeparator();
+
+ OUString sSlotStr;
+ Image aSlotImage;
+ if( mxFrame.is() )
+ {
+ if( bInsertPage )
+ sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DuplicatePage" ) );
+ else
+ sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Undo" ) );
+ aSlotImage = ::GetImage( mxFrame, sSlotStr, FALSE, FALSE );
+
+ String sSlotTitle;
+ if( bInsertPage )
+ sSlotTitle = ImplRetrieveLabelFromCommand( mxFrame, sSlotStr );
+ else
+ sSlotTitle = String( SdResId( STR_RESET_LAYOUT ) );
+ appendEntry( 2, sSlotTitle, aSlotImage);
+ }
+ }
+
+ SetOutputSizePixel( getMenuSize() );
+}
+
+// -----------------------------------------------------------------------
+
+LayoutToolbarMenu::~LayoutToolbarMenu()
+{
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( LayoutToolbarMenu, SelectHdl, void *, pControl )
+{
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ Sequence< PropertyValue > aArgs;
+
+ AutoLayout eLayout = AUTOLAYOUT__END;
+
+ OUString sCommandURL( mrController.getCommandURL() );
+
+ if( pControl == mpLayoutSet1 )
+ {
+ eLayout = static_cast< AutoLayout >(mpLayoutSet1->GetSelectItemId()-1);
+ }
+ else if( pControl == mpLayoutSet2 )
+ {
+ eLayout = static_cast< AutoLayout >(mpLayoutSet2->GetSelectItemId()-1);
+ }
+
+ if( eLayout != AUTOLAYOUT__END )
+ {
+ aArgs = Sequence< PropertyValue >(1);
+ aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "WhatLayout" ) );
+ aArgs[0].Value <<= (sal_Int32)eLayout;
+ }
+ else if( mbInsertPage )
+ {
+ sCommandURL = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DuplicatePage" ) );
+ }
+
+ mrController.dispatchCommand( sCommandURL, aArgs );
+
+ return 0;
+}
+
+// ====================================================================
+
+OUString SlideLayoutController_getImplementationName()
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sd.SlideLayoutController" ));
+}
+
+// --------------------------------------------------------------------
+
+Sequence< OUString > SlideLayoutController_getSupportedServiceNames() throw( RuntimeException )
+{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
+}
+
+// --------------------------------------------------------------------
+
+Reference< XInterface > SAL_CALL SlideLayoutController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
+{
+ return *new SlideLayoutController( rSMgr, OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AssignLayout" )), false );
+}
+
+// --------------------------------------------------------------------
+
+OUString InsertSlideController_getImplementationName()
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sd.InsertSlideController" ));
+}
+
+// --------------------------------------------------------------------
+
+Sequence< OUString > InsertSlideController_getSupportedServiceNames() throw( RuntimeException )
+{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
+}
+
+// --------------------------------------------------------------------
+
+Reference< XInterface > SAL_CALL InsertSlideController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
+{
+ return *new SlideLayoutController( rSMgr, OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertPage" )), true );
+}
+
+//========================================================================
+// class SlideLayoutController
+//========================================================================
+
+SlideLayoutController::SlideLayoutController( const Reference< lang::XMultiServiceFactory >& rServiceManager, const rtl::OUString& sCommandURL, bool bInsertPage )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), sCommandURL )
+, mbInsertPage( bInsertPage )
+{
+}
+
+// --------------------------------------------------------------------
+
+::Window* SlideLayoutController::createPopupWindow( ::Window* pParent )
+{
+ return new sd::LayoutToolbarMenu( *this, m_xFrame, pParent, mbInsertPage );
+}
+
+// --------------------------------------------------------------------
+// XServiceInfo
+// --------------------------------------------------------------------
+
+OUString SAL_CALL SlideLayoutController::getImplementationName() throw( RuntimeException )
+{
+ if( mbInsertPage )
+ return InsertSlideController_getImplementationName();
+ else
+ return SlideLayoutController_getImplementationName();
+}
+
+// --------------------------------------------------------------------
+
+Sequence< OUString > SAL_CALL SlideLayoutController::getSupportedServiceNames( ) throw( RuntimeException )
+{
+ if( mbInsertPage )
+ return InsertSlideController_getSupportedServiceNames();
+ else
+ return SlideLayoutController_getSupportedServiceNames();
+}
+
+}
diff --git a/sd/source/ui/inc/SdUnoPresView.hxx b/sd/source/ui/controller/slidelayoutcontroller.hxx
index e63ffd66f..4048af942 100644
--- a/sd/source/ui/inc/SdUnoPresView.hxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -23,32 +23,31 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
+ ************************************************************************/
-#ifndef SD_UNO_PRES_VIEW_HXX
-#define SD_UNO_PRES_VIEW_HXX
+#ifndef __SD_SLIDELAYOUTCONTROLLER_HXX_
+#define __SD_SLIDELAYOUTCONTROLLER_HXX_
-#include "SdUnoDrawView.hxx"
+#include <svtools/popupwindowcontroller.hxx>
-namespace sd {
+namespace sd
+{
-/** The sub controller for the slide show (or preview?) It formerly reduced
- the property set inherited from SdUnoDrawView to just 'CurrentPage'.
- Now that we have to always support the whole set, we can as well try to
- do that as best as we can. Therefore the inherited functionality is
- provided as is.
-*/
-class SdUnoPresView
- : public SdUnoDrawView
+class SlideLayoutController : public svt::PopupWindowController
{
public:
- SdUnoPresView (
- DrawController& rController,
- DrawViewShell& rViewShell,
- View& rView) throw();
- virtual ~SdUnoPresView (void) throw();
+ SlideLayoutController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const rtl::OUString& sCommandURL, bool bInsertPage );
+
+ virtual ::Window* createPopupWindow( ::Window* pParent );
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+private:
+ bool mbInsertPage;
};
-} // end of namespace sd
+}
-#endif
+#endif // __SD_SLIDELAYOUTCONTROLLER_HXX_
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 1ce368914..0c098573b 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -42,7 +42,6 @@
#include "sdpage.hxx"
#include "cusshow.hxx"
#include "app.hxx"
-#include "optsitem.hxx"
#include <vcl/msgbox.hxx>
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index 6bc5a89a0..de3cff7b9 100644
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -74,7 +74,6 @@ SRC1FILES =\
layeroptionsdlg.src \
printdialog.src
-
SLOFILES = \
$(SLO)$/inspagob.obj \
$(SLO)$/ins_paste.obj \
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 920892fdd..d2300de97 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -56,7 +56,7 @@ using rtl::OUString;
using ::sd::framework::FrameworkHelper;
#undef VERBOSE
-#define VERBOSE 3
+//#define VERBOSE 3
namespace sd { namespace framework {
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 864090102..6b4f9e0c9 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -46,7 +46,7 @@ using ::rtl::OUString;
using ::std::vector;
#undef VERBOSE
-#define VERBOSE 2
+//#define VERBOSE 2
namespace {
static const sal_Int32 snShortTimeout (100);
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index b8ea63953..c09fed5b6 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -93,6 +93,7 @@
#include "sdgrffilter.hxx"
#include "sdxfer.hxx"
#include <vcl/svapp.hxx>
+#include "undo/undoobjects.hxx"
using namespace com::sun::star;
@@ -143,34 +144,15 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
if( mpViewShell && mpViewShell->ISA(DrawViewShell))
{
sal_Int8 nAction = DND_ACTION_COPY;
- SdrGrafObj* pEmptyGrafObj = NULL;
-
- if ( mpView->AreObjectsMarked() )
- {
- /**********************************************************
- * Is an empty graphic object available?
- **********************************************************/
- const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
-
- if (rMarkList.GetMarkCount() == 1)
- {
- SdrMark* pMark = rMarkList.GetMark(0);
- SdrObject* pObj = pMark->GetMarkedSdrObj();
-
- if (pObj->GetObjInventor() == SdrInventor &&
- pObj->GetObjIdentifier() == OBJ_GRAF)
- {
- nAction = DND_ACTION_LINK;
- pEmptyGrafObj = (SdrGrafObj*) pObj;
- }
- }
- }
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC );
+ if( pPickObj )
+ nAction = DND_ACTION_LINK;
Point aPos;
Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() );
aPos = aRect.Center();
aPos = mpWindow->PixelToLogic(aPos);
- SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pEmptyGrafObj, NULL);
+ SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, NULL);
if(pGrafObj && aDlg.IsAsLink())
{
@@ -299,6 +281,10 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
nSlotId == SID_INSERT_DIAGRAM ||
nSlotId == SID_INSERT_MATH )
{
+ PresObjKind ePresObjKind = (nSlotId == SID_INSERT_DIAGRAM) ? PRESOBJ_CHART : PRESOBJ_OBJECT;
+
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( ePresObjKind );
+
/**********************************************************************
* Diagramm oder StarCalc-Tabelle einfuegen
**********************************************************************/
@@ -317,42 +303,78 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
if ( xObj.is() )
{
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
- awt::Size aSz;
- try
+
+ MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
+
+ Rectangle aRect;
+ if( pPickObj )
{
- aSz = xObj->getVisualAreaSize( nAspect );
+ aRect = pPickObj->GetLogicRect();
+
+ awt::Size aSz;
+ aSz.Width = aRect.GetWidth();
+ aSz.Height = aRect.GetHeight();
+ xObj->setVisualAreaSize( nAspect, aSz );
}
- catch ( embed::NoVisualAreaSizeException& )
+ else
{
- // the default size will be set later
+ awt::Size aSz;
+ try
+ {
+ aSz = xObj->getVisualAreaSize( nAspect );
+ }
+ catch ( embed::NoVisualAreaSizeException& )
+ {
+ // the default size will be set later
+ }
+
+ Size aSize( aSz.Width, aSz.Height );
+
+ if (aSize.Height() == 0 || aSize.Width() == 0)
+ {
+ // Rechteck mit ausgewogenem Kantenverhaeltnis
+ aSize.Width() = 14100;
+ aSize.Height() = 10000;
+ Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
+ aSz.Width = aTmp.Width();
+ aSz.Height = aTmp.Height();
+ xObj->setVisualAreaSize( nAspect, aSz );
+ }
+ else
+ {
+ aSize = OutputDevice::LogicToLogic(aSize, aUnit, MAP_100TH_MM);
+ }
+
+ Point aPos;
+ Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() );
+ aPos = aWinRect.Center();
+ aPos = mpWindow->PixelToLogic(aPos);
+ aPos.X() -= aSize.Width() / 2;
+ aPos.Y() -= aSize.Height() / 2;
+ aRect = Rectangle(aPos, aSize);
}
- Size aSize( aSz.Width, aSz.Height );
+ SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
+ SdrPageView* pPV = mpView->GetSdrPageView();
- MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
- if (aSize.Height() == 0 || aSize.Width() == 0)
+ // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
+ if( pPickObj )
{
- // Rechteck mit ausgewogenem Kantenverhaeltnis
- aSize.Width() = 14100;
- aSize.Height() = 10000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
- aSz.Width = aTmp.Width();
- aSz.Height = aTmp.Height();
- xObj->setVisualAreaSize( nAspect, aSz );
+ SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
+ if(pPage && pPage->IsPresObj(pPickObj))
+ {
+ pPage->InsertPresObj( pOleObj, ePresObjKind );
+ pOleObj->SetUserCall(pPickObj->GetUserCall());
+ }
}
+
+ bool bRet = true;
+ if( pPickObj )
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pOleObj, TRUE );
else
- aSize = OutputDevice::LogicToLogic(aSize, aUnit, MAP_100TH_MM);
-
- Point aPos;
- Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() );
- aPos = aWinRect.Center();
- aPos = mpWindow->PixelToLogic(aPos);
- aPos.X() -= aSize.Width() / 2;
- aPos.Y() -= aSize.Height() / 2;
- Rectangle aRect (aPos, aSize);
- SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
- SdrPageView* pPV = mpView->GetSdrPageView();
- if( mpView->InsertObjectAtView(pOleObj, *pPV, SDRINSERT_SETDEFLAYER) )
+ bRet = mpView->InsertObjectAtView(pOleObj, *pPV, SDRINSERT_SETDEFLAYER);
+
+ if( bRet )
{
if (nSlotId == SID_INSERT_DIAGRAM)
{
@@ -369,10 +391,11 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
//HMHmpView->HideMarkHdl();
pOleObj->SetLogicRect(aRect);
- Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aUnit );
- aSz.Width = aTmp.Width();
- aSz.Height = aTmp.Height();
- xObj->setVisualAreaSize( nAspect, aSz );
+ Size aTmp( OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aUnit ) );
+ awt::Size aVisualSize;
+ aVisualSize.Width = aTmp.Width();
+ aVisualSize.Height = aTmp.Height();
+ xObj->setVisualAreaSize( nAspect, aVisualSize );
mpViewShell->ActivateObject(pOleObj, SVVERB_SHOW);
if (nSlotId == SID_INSERT_DIAGRAM)
diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx
index 227d394ec..ff5459e8d 100644
--- a/sd/source/ui/func/smarttag.cxx
+++ b/sd/source/ui/func/smarttag.cxx
@@ -172,6 +172,12 @@ void SmartTagSet::add( const SmartTagReference& xTag )
{
maSet.insert( xTag );
mrView.InvalidateAllWin();
+
+ if( xTag == mxMouseOverTag )
+ mxMouseOverTag.clear();
+
+ if( xTag == mxSelectedTag )
+ mxSelectedTag.clear();
}
// --------------------------------------------------------------------
@@ -182,6 +188,12 @@ void SmartTagSet::remove( const SmartTagReference& xTag )
if( aIter != maSet.end() )
maSet.erase( aIter );
mrView.InvalidateAllWin();
+
+ if( xTag == mxMouseOverTag )
+ mxMouseOverTag.clear();
+
+ if( xTag == mxSelectedTag )
+ mxSelectedTag.clear();
}
// --------------------------------------------------------------------
@@ -193,6 +205,8 @@ void SmartTagSet::Dispose()
for( std::set< SmartTagReference >::iterator aIter( aSet.begin() ); aIter != aSet.end(); )
(*aIter++)->Dispose();
mrView.InvalidateAllWin();
+ mxMouseOverTag.clear();
+ mxSelectedTag.clear();
}
// --------------------------------------------------------------------
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index 40b38748d..57f6ae01e 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -104,7 +104,8 @@ public:
PROPERTY_ACTIVE_LAYER = 5,
PROPERTY_ZOOMTYPE = 6,
PROPERTY_ZOOMVALUE = 7,
- PROPERTY_VIEWOFFSET = 8
+ PROPERTY_VIEWOFFSET = 8,
+ PROPERTY_DRAWVIEWMODE = 9
};
/** Create a new DrawController object for the given ViewShellBase.
diff --git a/sd/source/ui/inc/DrawSubController.hxx b/sd/source/ui/inc/DrawSubController.hxx
index 85539733a..cd26841a7 100644
--- a/sd/source/ui/inc/DrawSubController.hxx
+++ b/sd/source/ui/inc/DrawSubController.hxx
@@ -29,12 +29,27 @@
#define SD_DRAW_SUB_CONTROLLER_HXX
#include <com/sun/star/drawing/XDrawSubController.hpp>
-#include <cppuhelper/compbase1.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/compbase2.hxx>
namespace {
- typedef ::cppu::WeakComponentImplHelper1 <
- ::com::sun::star::drawing::XDrawSubController
- > DrawSubControllerInterfaceBase;
+
+ class DrawSubControllerInterfaceBase : public ::cppu::WeakComponentImplHelper2<
+ ::com::sun::star::drawing::XDrawSubController,
+ ::com::sun::star::lang::XServiceInfo >
+ {
+ public:
+ DrawSubControllerInterfaceBase( ::osl::Mutex& aMutex )
+ : ::cppu::WeakComponentImplHelper2<
+ ::com::sun::star::drawing::XDrawSubController,
+ ::com::sun::star::lang::XServiceInfo >( aMutex ) {}
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ };
+
}
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 837ed7803..6c6bceaa8 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -57,6 +57,7 @@ class LayerTabBar;
class Ruler;
class SdUnoDrawView;
class AnnotationManager;
+class ViewOverlayManager;
#define CHECK_RANGE(nMin, nValue, nMax) ((nValue >= nMin) && (nValue <= nMax))
@@ -496,6 +497,7 @@ private:
using ViewShell::Notify;
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
+ ::std::auto_ptr< ViewOverlayManager > mpViewOverlayManager;
};
diff --git a/sd/source/ui/inc/SdUnoDrawView.hxx b/sd/source/ui/inc/SdUnoDrawView.hxx
index ae6679c45..1a8277d0d 100644
--- a/sd/source/ui/inc/SdUnoDrawView.hxx
+++ b/sd/source/ui/inc/SdUnoDrawView.hxx
@@ -106,6 +106,11 @@ public:
css::lang::WrappedTargetException,
css::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
sal_Bool getMasterPageMode(void) const throw();
void setMasterPageMode(sal_Bool MasterPageMode_) throw();
@@ -133,6 +138,8 @@ protected:
void SetZoomType( sal_Int16 nType );
+ ::com::sun::star::uno::Any getDrawViewMode() const;
+
private:
DrawController& mrController;
DrawViewShell& mrDrawViewShell;
diff --git a/sd/source/ui/inc/SdUnoOutlineView.hxx b/sd/source/ui/inc/SdUnoOutlineView.hxx
index 1666e7f0e..be5c0960b 100644
--- a/sd/source/ui/inc/SdUnoOutlineView.hxx
+++ b/sd/source/ui/inc/SdUnoOutlineView.hxx
@@ -111,6 +111,11 @@ public:
disposing (const ::com::sun::star::lang::EventObject& rEventObject)
throw (::com::sun::star::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
private:
DrawController& mrController;
OutlineViewShell& mrOutlineViewShell;
diff --git a/sd/source/ui/inc/SdUnoSlideView.hxx b/sd/source/ui/inc/SdUnoSlideView.hxx
index 99822ed9b..14ebbb61a 100644
--- a/sd/source/ui/inc/SdUnoSlideView.hxx
+++ b/sd/source/ui/inc/SdUnoSlideView.hxx
@@ -109,6 +109,11 @@ public:
css::lang::WrappedTargetException,
css::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
private:
DrawController& mrController;
slidesorter::SlideSorter& mrSlideSorter;
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index a8e3b3891..3e060961d 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -208,6 +208,8 @@ public:
void SetMarkedPointsSmoothPossible( bool bSet ) { bSetMarkedPointsSmoothPossible = bSet; }
void SetMarkedSegmentsKindPossible( bool bSet ) { bSetMarkedSegmentsKindPossible = bSet; }
+ SdrObject* GetEmptyPresentationObject( PresObjKind eKind );
+
protected:
DECL_LINK( OnParagraphInsertedHdl, ::Outliner * );
DECL_LINK( OnParagraphRemovingHdl, ::Outliner * );
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 3cc91fb97..6cad2939f 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -28,6 +28,8 @@
#ifndef SD_VIEW_SHELL_BASE_HXX
#define SD_VIEW_SHELL_BASE_HXX
+#include <com/sun/star/frame/XFrame.hpp>
+
#include "ViewShell.hxx"
#include "glob.hxx"
diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx
index 822ba3fe0..60704da89 100644
--- a/sd/source/ui/inc/ViewShellImplementation.hxx
+++ b/sd/source/ui/inc/ViewShellImplementation.hxx
@@ -124,9 +124,7 @@ public:
@param pPage
If a NULL pointer is given then this call is ignored.
*/
- void AssignLayout (
- SdPage* pPage,
- AutoLayout aLayout);
+ void AssignLayout ( SfxRequest& rRequest, PageKind ePageKind );
/** Determine the view id of the view shell. This corresponds to the
view id stored in the SfxViewFrame class.
diff --git a/sd/source/ui/inc/res_bmp.hrc b/sd/source/ui/inc/res_bmp.hrc
index d75bbfcfa..3907b1e9b 100644
--- a/sd/source/ui/inc/res_bmp.hrc
+++ b/sd/source/ui/inc/res_bmp.hrc
@@ -67,36 +67,6 @@
#define RID_GRAFFILTERS RID_APP_START+29
#define RID_GRAFFILTERS_TBX RID_APP_START+30
-#define BMP_FOIL_00 RID_APP_START+10
-#define BMP_FOIL_01 RID_APP_START+11
-#define BMP_FOIL_02 RID_APP_START+12
-#define BMP_FOIL_03 RID_APP_START+13
-#define BMP_FOIL_04 RID_APP_START+14
-#define BMP_FOIL_05 RID_APP_START+15
-#define BMP_FOIL_06 RID_APP_START+16
-#define BMP_FOIL_07 RID_APP_START+17
-#define BMP_FOIL_08 RID_APP_START+18
-#define BMP_FOIL_09 RID_APP_START+19
-#define BMP_FOIL_10 RID_APP_START+20
-#define BMP_FOIL_11 RID_APP_START+21
-#define BMP_FOIL_12 RID_APP_START+22
-#define BMP_FOIL_13 RID_APP_START+23
-#define BMP_FOIL_14 RID_APP_START+24
-#define BMP_FOIL_15 RID_APP_START+25
-#define BMP_FOIL_16 RID_APP_START+26
-#define BMP_FOIL_17 RID_APP_START+27
-#define BMP_FOIL_18 RID_APP_START+28
-#define BMP_FOIL_19 RID_APP_START+29
-#define BMP_FOIL_20 RID_APP_START+30
-#define BMP_FOILH_01 RID_APP_START+31
-#define BMP_FOILH_02 RID_APP_START+32
-#define BMP_FOILH_03 RID_APP_START+33
-#define BMP_FOILH_04 RID_APP_START+34
-#define BMP_FOILH_06 RID_APP_START+35
-#define BMP_FOILH_09 RID_APP_START+36
-#define BMP_FOILN_01 RID_APP_START+40
-#define BMP_FOIL_25 RID_APP_START+41
-
// Bitmaps fuer Tree-ListBox im Effekte-TabDialog
#define BMP_PAGE RID_APP_START+42
#define BMP_PAGEOBJS RID_APP_START+43
@@ -111,8 +81,6 @@
#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
@@ -170,38 +138,6 @@
#define BMP_EFFECT_UNCOVER_TO_B RID_APP_START+171
#define BMP_EFFECT_UNCOVER_TO_LL RID_APP_START+172
-#define BMP_FOIL_00_H RID_SD_START+182
-#define BMP_FOIL_01_H RID_SD_START+183
-#define BMP_FOIL_02_H RID_SD_START+184
-#define BMP_FOIL_03_H RID_SD_START+185
-#define BMP_FOIL_04_H RID_SD_START+186
-#define BMP_FOIL_05_H RID_SD_START+187
-#define BMP_FOIL_06_H RID_SD_START+188
-#define BMP_FOIL_07_H RID_SD_START+189
-#define BMP_FOIL_08_H RID_SD_START+190
-#define BMP_FOIL_09_H RID_SD_START+191
-#define BMP_FOIL_10_H RID_SD_START+192
-#define BMP_FOIL_11_H RID_SD_START+193
-#define BMP_FOIL_12_H RID_SD_START+194
-#define BMP_FOIL_13_H RID_SD_START+195
-#define BMP_FOIL_14_H RID_SD_START+196
-#define BMP_FOIL_15_H RID_SD_START+197
-#define BMP_FOIL_16_H RID_SD_START+198
-#define BMP_FOIL_17_H RID_SD_START+199
-#define BMP_FOIL_18_H RID_SD_START+200
-#define BMP_FOIL_19_H RID_SD_START+201
-#define BMP_FOIL_20_H RID_SD_START+202
-#define BMP_FOIL_21_H RID_SD_START+203
-#define BMP_FOIL_22_H RID_SD_START+204
-#define BMP_FOIL_23_H RID_SD_START+205
-#define BMP_FOIL_24_H RID_SD_START+206
-#define BMP_FOILH_01_H RID_SD_START+207
-#define BMP_FOILH_02_H RID_SD_START+208
-#define BMP_FOILH_03_H RID_SD_START+209
-#define BMP_FOILH_04_H RID_SD_START+210
-#define BMP_FOILH_06_H RID_SD_START+211
-#define BMP_FOILN_01_H RID_SD_START+212
-
#define BMP_PAGE_H RID_SD_START+213
#define BMP_PAGEOBJS_H RID_SD_START+214
#define BMP_OBJECTS_H RID_SD_START+215
@@ -228,15 +164,75 @@
#define BMP_FADE_EFFECT_INDICATOR RID_SD_START+331
#define BMP_FADE_EFFECT_INDICATOR_H RID_SD_START+332
-#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
-
#define BMP_COMMENTS_INDICATOR RID_SD_START+338
#define BMP_COMMENTS_INDICATOR_H RID_SD_START+339
+#define BMP_LAYOUT_EMPTY RID_SD_START+340
+#define BMP_LAYOUT_EMPTY_H RID_SD_START+341
+#define BMP_LAYOUT_HEAD01 RID_SD_START+342
+#define BMP_LAYOUT_HEAD01_H RID_SD_START+343
+#define BMP_LAYOUT_HEAD02 RID_SD_START+344
+#define BMP_LAYOUT_HEAD02_H RID_SD_START+345
+#define BMP_LAYOUT_HEAD02A RID_SD_START+346
+#define BMP_LAYOUT_HEAD02A_H RID_SD_START+347
+#define BMP_LAYOUT_HEAD02B RID_SD_START+348
+#define BMP_LAYOUT_HEAD02B_H RID_SD_START+349
+#define BMP_LAYOUT_HEAD03 RID_SD_START+350
+#define BMP_LAYOUT_HEAD03_H RID_SD_START+351
+#define BMP_LAYOUT_HEAD03A RID_SD_START+352
+#define BMP_LAYOUT_HEAD03A_H RID_SD_START+353
+#define BMP_LAYOUT_HEAD03B RID_SD_START+354
+#define BMP_LAYOUT_HEAD03B_H RID_SD_START+355
+#define BMP_LAYOUT_HEAD03C RID_SD_START+356
+#define BMP_LAYOUT_HEAD03C_H RID_SD_START+357
+#define BMP_LAYOUT_HEAD04 RID_SD_START+358
+#define BMP_LAYOUT_HEAD04_H RID_SD_START+359
+#define BMP_LAYOUT_HEAD06 RID_SD_START+360
+#define BMP_LAYOUT_HEAD06_H RID_SD_START+361
+#define BMP_LAYOUT_TEXTONLY RID_SD_START+362
+#define BMP_LAYOUT_TEXTONLY_H RID_SD_START+363
+#define BMP_LAYOUT_VERTICAL01 RID_SD_START+364
+#define BMP_LAYOUT_VERTICAL01_H RID_SD_START+365
+#define BMP_LAYOUT_VERTICAL02 RID_SD_START+366
+#define BMP_LAYOUT_VERTICAL02_H RID_SD_START+367
+
+#define BMP_FOILH_01 RID_SD_START+388
+#define BMP_FOILH_01_H RID_SD_START+389
+#define BMP_FOILH_02 RID_SD_START+390
+#define BMP_FOILH_02_H RID_SD_START+391
+#define BMP_FOILH_03 RID_SD_START+392
+#define BMP_FOILH_03_H RID_SD_START+393
+#define BMP_FOILH_04 RID_SD_START+394
+#define BMP_FOILH_04_H RID_SD_START+395
+#define BMP_FOILH_06 RID_SD_START+396
+#define BMP_FOILH_06_H RID_SD_START+397
+#define BMP_FOILH_09 RID_SD_START+398
+#define BMP_FOILH_09_H RID_SD_START+399
+
+#define BMP_FOILN_01 RID_SD_START+400
+#define BMP_FOILN_01_H RID_SD_START+401
+
+#define BMP_PLACEHOLDER_SMALL_START (RID_SD_START+402) // these ids must stay in order!
+#define BMP_PLACEHOLDER_TABLE_SMALL (RID_SD_START+402)
+#define BMP_PLACEHOLDER_CHART_SMALL (RID_SD_START+403)
+#define BMP_PLACEHOLDER_IMAGE_SMALL (RID_SD_START+404)
+#define BMP_PLACEHOLDER_MOVIE_SMALL (RID_SD_START+405)
+#define BMP_PLACEHOLDER_TABLE_SMALL_HOVER (RID_SD_START+406)
+#define BMP_PLACEHOLDER_CHART_SMALL_HOVER (RID_SD_START+407)
+#define BMP_PLACEHOLDER_IMAGE_SMALL_HOVER (RID_SD_START+408)
+#define BMP_PLACEHOLDER_MOVIE_SMALL_HOVER (RID_SD_START+409)
+#define BMP_PLACEHOLDER_SMALL_END (RID_SD_START+410)
+#define BMP_PLACEHOLDER_LARGE_START (RID_SD_START+410)
+#define BMP_PLACEHOLDER_TABLE_LARGE (RID_SD_START+410)
+#define BMP_PLACEHOLDER_CHART_LARGE (RID_SD_START+411)
+#define BMP_PLACEHOLDER_IMAGE_LARGE (RID_SD_START+412)
+#define BMP_PLACEHOLDER_MOVIE_LARGE (RID_SD_START+413)
+#define BMP_PLACEHOLDER_TABLE_LARGE_HOVER (RID_SD_START+414)
+#define BMP_PLACEHOLDER_CHART_LARGE_HOVER (RID_SD_START+415)
+#define BMP_PLACEHOLDER_IMAGE_LARGE_HOVER (RID_SD_START+416)
+#define BMP_PLACEHOLDER_MOVIE_LARGE_HOVER (RID_SD_START+417)
+#define BMP_PLACEHOLDER_LARGE_END (RID_SD_START+418) // until here!
+
// -----------------------------------------------------------------------------
#define IMG_PIPETTE_H RID_APP_START+21
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index 450ea305d..821521555 100644
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -163,6 +163,7 @@ private:
::sd::View& mrView;
SmartTagReference mxSelectedTag;
+ SmartTagReference mxMouseOverTag;
};
/** a derivation from this handle is the visual representation for a smart tag.
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index d0b313e42..bb439c9d9 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -168,26 +168,20 @@
#define STR_DRAW_MEDIA_TOOLBOX RID_DRAW_MEDIA_TOOLBOX
// IDs fuer Praesentationsfolien
-#define STR_AUTOLAYOUT_NONE (RID_APP_START+210)
-#define STR_AUTOLAYOUT_ONLY_TITLE (RID_APP_START+211)
-#define STR_AUTOLAYOUT_TITLE (RID_APP_START+212)
-#define STR_AUTOLAYOUT_OBJ (RID_APP_START+213)
-#define STR_AUTOLAYOUT_ENUM (RID_APP_START+214)
-#define STR_AUTOLAYOUT_CHART (RID_APP_START+215)
-#define STR_AUTOLAYOUT_TAB (RID_APP_START+217)
-#define STR_AUTOLAYOUT_CLIPTEXT (RID_APP_START+218)
-#define STR_AUTOLAYOUT_2TEXT (RID_APP_START+219)
-#define STR_AUTOLAYOUT_TEXTCHART (RID_APP_START+220)
-#define STR_AUTOLAYOUT_TEXTCLIP (RID_APP_START+221)
-#define STR_AUTOLAYOUT_CHARTTEXT (RID_APP_START+222)
-#define STR_AUTOLAYOUT_TEXTOBJ (RID_APP_START+223)
-#define STR_AUTOLAYOUT_TEXT2OBJ (RID_APP_START+224)
-#define STR_AUTOLAYOUT_OBJTEXT (RID_APP_START+225)
-#define STR_AUTOLAYOUT_OBJOVERTEXT (RID_APP_START+226)
-#define STR_AUTOLAYOUT_2OBJTEXT (RID_APP_START+227)
-#define STR_AUTOLAYOUT_2OBJOVERTEXT (RID_APP_START+228)
-#define STR_AUTOLAYOUT_TEXTOVEROBJ (RID_APP_START+229)
-#define STR_AUTOLAYOUT_4OBJ (RID_APP_START+230)
+#define STR_AUTOLAYOUT_NONE (RID_APP_START+210)
+#define STR_AUTOLAYOUT_ONLY_TITLE (RID_APP_START+211)
+#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+212)
+#define STR_AUTOLAYOUT_TITLE (RID_APP_START+213)
+#define STR_AUTOLAYOUT_CONTENT (RID_APP_START+214)
+#define STR_AUTOLAYOUT_2CONTENT (RID_APP_START+215)
+#define STR_AUTOLAYOUT_CONTENT_2CONTENT (RID_APP_START+217)
+#define STR_AUTOLAYOUT_2CONTENT_CONTENT (RID_APP_START+218)
+#define STR_AUTOLAYOUT_CONTENT_OVER_2CONTENT (RID_APP_START+219)
+#define STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT (RID_APP_START+220)
+#define STR_AUTOLAYOUT_CONTENT_OVER_CONTENT (RID_APP_START+221)
+#define STR_AUTOLAYOUT_4CONTENT (RID_APP_START+222)
+#define STR_AUTOLAYOUT_6CONTENT (RID_APP_START+223)
+
#define STR_AUTOLAYOUT_HANDOUT1 (RID_APP_START+231)
#define STR_AUTOLAYOUT_HANDOUT2 (RID_APP_START+232)
#define STR_AUTOLAYOUT_HANDOUT3 (RID_APP_START+233)
@@ -195,13 +189,9 @@
#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_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)
@@ -512,6 +502,8 @@
#define STR_NAVIGATOR_SHOW_ALL_SHAPES (RID_APP_START+719)
#define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720)
+#define STR_RESET_LAYOUT (RID_APP_START+721)
+
/******************************************************************************
* The ids in glob.hrc start at RID_APP_START+750!
******************************************************************************/
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
new file mode 100644
index 000000000..0e3927e84
--- /dev/null
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SD_VIEWOVERLAYMANAGER_HXX
+#define _SD_VIEWOVERLAYMANAGER_HXX
+
+#include <vcl/image.hxx>
+#include <svl/lstner.hxx>
+#include "EventMultiplexer.hxx"
+#include "ViewShellBase.hxx"
+#include "res_bmp.hrc"
+
+namespace sd
+{
+
+typedef std::vector< rtl::Reference< SmartTag > > ViewTagVector;
+
+class ViewOverlayManager : public SfxListener
+{
+public:
+ ViewOverlayManager( ViewShellBase& rViewShellBase );
+ virtual ~ViewOverlayManager();
+
+ void onZoomChanged();
+ void UpdateTags();
+
+ DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+ DECL_LINK(UpdateTagsHdl, void *);
+
+ bool CreateTags();
+ bool DisposeTags();
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
+
+ static Image maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START];
+ static Image maSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START];
+
+private:
+ void UpdateImages();
+
+ ViewShellBase& mrBase;
+ ULONG mnUpdateTagsEvent;
+
+ ViewTagVector maTagVector;
+};
+
+}
+
+#endif // _SD_VIEWOVERLAYMANAGER_HXX
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index 6dd6be269..88a3d7e33 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -290,6 +290,7 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
pViewShell->Invalidate(SID_HIDE_SLIDE);
pViewShell->Invalidate(SID_DELETE_PAGE);
pViewShell->Invalidate(SID_DELETE_MASTER_PAGE);
+ pViewShell->Invalidate(SID_ASSIGN_LAYOUT);
// StatusBar
pViewShell->Invalidate (SID_STATUS_PAGE);
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 9bfc88b85..c8c2d1441 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -239,12 +239,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_ASSIGN_LAYOUT:
{
- SFX_REQUEST_ARG (rRequest, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
- SFX_REQUEST_ARG (rRequest, pWhatLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- pShell->mpImpl->AssignLayout(
- pDocument->GetSdPage((USHORT)pWhatPage->GetValue(),
- mrSlideSorter.GetModel().GetPageType()),
- (AutoLayout)pWhatLayout->GetValue());
+ pShell->mpImpl->AssignLayout( rRequest, mrSlideSorter.GetModel().GetPageType() );
rRequest.Done ();
}
break;
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 525826e34..3485f094a 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -70,6 +70,7 @@
#include "Window.hxx"
#include "drawview.hxx"
#include "sdresid.hxx"
+#include "undo/undoobjects.hxx"
using ::rtl::OUString;
using namespace ::sd;
@@ -147,21 +148,48 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
nRows = pDlg->getRows();
}
- Size aSize( 14100, 200 );
+ Rectangle aRect;
- Point aPos;
- Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
- aPos = aWinRect.Center();
- aPos = GetActiveWindow()->PixelToLogic(aPos);
- aPos.X() -= aSize.Width() / 2;
- aPos.Y() -= aSize.Height() / 2;
- Rectangle aRect (aPos, aSize);
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_TABLE );
+ if( pPickObj )
+ {
+ aRect = pPickObj->GetLogicRect();
+ aRect.setHeight( 200 );
+ }
+ else
+ {
+ Size aSize( 14100, 200 );
+
+ Point aPos;
+ Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
+ aPos = aWinRect.Center();
+ aPos = GetActiveWindow()->PixelToLogic(aPos);
+ aPos.X() -= aSize.Width() / 2;
+ aPos.Y() -= aSize.Height() / 2;
+ aRect = Rectangle(aPos, aSize);
+ }
::sdr::table::SdrTableObj* pObj = new ::sdr::table::SdrTableObj( GetDoc(), aRect, nColumns, nRows );
pObj->NbcSetStyleSheet( GetDoc()->GetDefaultStyleSheet(), sal_True );
apply_table_style( pObj, GetDoc(), sTableStyle );
SdrPageView* pPV = mpView->GetSdrPageView();
- mpView->InsertObjectAtView(pObj, *pPV, SDRINSERT_SETDEFLAYER);
+
+ // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
+ if( pPickObj )
+ {
+ SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
+ if(pPage && pPage->IsPresObj(pPickObj))
+ {
+ pObj->SetUserCall( pPickObj->GetUserCall() );
+ pPage->InsertPresObj( pObj, PRESOBJ_TABLE );
+ }
+ }
+
+ if( pPickObj )
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pObj, TRUE );
+ else
+ mpView->InsertObjectAtView(pObj, *pPV, SDRINSERT_SETDEFLAYER);
+
Invalidate(SID_DRAWTBX_INSERT);
rReq.Ignore();
break;
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index 3f2a7422a..64547ac66 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -161,67 +161,27 @@ static snewfoil_value_info handout[] =
static snewfoil_value_info standard[] =
{
- {BMP_FOIL_20, BMP_FOIL_20_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB,
- AUTOLAYOUT_NONE},
- {BMP_FOIL_00, BMP_FOIL_00_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB,
- AUTOLAYOUT_TITLE},
- {BMP_FOIL_01, BMP_FOIL_01_H, STR_AUTOLAYOUT_ENUM, WritingMode_LR_TB,
- AUTOLAYOUT_ENUM},
- {BMP_FOIL_03, BMP_FOIL_03_H, STR_AUTOLAYOUT_2TEXT, WritingMode_LR_TB,
- 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,
- AUTOLAYOUT_ONLY_TEXT},
- {BMP_FOIL_11, BMP_FOIL_11_H, STR_AUTOLAYOUT_OBJ, WritingMode_LR_TB,
- AUTOLAYOUT_OBJ},
- {BMP_FOIL_02, BMP_FOIL_02_H, STR_AUTOLAYOUT_CHART, WritingMode_LR_TB,
- AUTOLAYOUT_CHART},
- {BMP_FOIL_08, BMP_FOIL_08_H, STR_AUTOLAYOUT_TAB, WritingMode_LR_TB,
- AUTOLAYOUT_TAB},
- {BMP_FOIL_09, BMP_FOIL_09_H, STR_AUTOLAYOUT_CLIPTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_CLIPTEXT},
- {BMP_FOIL_04, BMP_FOIL_04_H, STR_AUTOLAYOUT_TEXTCHART, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTCHART},
- {BMP_FOIL_06, BMP_FOIL_06_H, STR_AUTOLAYOUT_TEXTCLIP, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTCLIP},
- {BMP_FOIL_07, BMP_FOIL_07_H, STR_AUTOLAYOUT_CHARTTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_CHARTTEXT},
- {BMP_FOIL_10, BMP_FOIL_10_H, STR_AUTOLAYOUT_TEXTOBJ, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTOBJ},
- {BMP_FOIL_12, BMP_FOIL_12_H, STR_AUTOLAYOUT_TEXT2OBJ, WritingMode_LR_TB,
- AUTOLAYOUT_TEXT2OBJ},
- {BMP_FOIL_13, BMP_FOIL_13_H, STR_AUTOLAYOUT_OBJTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_OBJTEXT},
- {BMP_FOIL_14, BMP_FOIL_14_H, STR_AUTOLAYOUT_OBJOVERTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_OBJOVERTEXT},
- {BMP_FOIL_15, BMP_FOIL_15_H, STR_AUTOLAYOUT_2OBJTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_2OBJTEXT},
- {BMP_FOIL_16, BMP_FOIL_16_H, STR_AUTOLAYOUT_2OBJOVERTEXT,
- WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
- {BMP_FOIL_17, BMP_FOIL_17_H, STR_AUTOLAYOUT_TEXTOVEROBJ, WritingMode_LR_TB,
- 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},
+ {BMP_LAYOUT_EMPTY, BMP_LAYOUT_EMPTY_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {BMP_LAYOUT_HEAD03, BMP_LAYOUT_HEAD03_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT},
+ {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE},
+ {BMP_LAYOUT_TEXTONLY, BMP_LAYOUT_TEXTONLY_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT},
+ {BMP_LAYOUT_HEAD03B, BMP_LAYOUT_HEAD03B_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT},
+ {BMP_LAYOUT_HEAD03C, BMP_LAYOUT_HEAD03C_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ},
+ {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD02B, BMP_LAYOUT_HEAD02B_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ},
+ {BMP_LAYOUT_HEAD06, BMP_LAYOUT_HEAD06_H, STR_AUTOLAYOUT_6CONTENT, 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},
- {BMP_FOIL_22, BMP_FOIL_22_H, STR_AL_VERT_TITLE_VERT_OUTLINE,
- WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
- {BMP_FOIL_23, BMP_FOIL_23_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL,
- AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
- {BMP_FOIL_24, BMP_FOIL_24_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART,
- WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
-
+ {BMP_LAYOUT_VERTICAL02, BMP_LAYOUT_VERTICAL02_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL,AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
+ {BMP_LAYOUT_VERTICAL01, BMP_LAYOUT_VERTICAL01_H, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
{0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
};
-
-
-
LayoutMenu::LayoutMenu (
TreeNode* pParent,
DrawDocShell& rDocumentShell,
@@ -732,7 +692,8 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
// There is a slide sorter visible so get the list of selected pages from it.
pPageSelection = pSlideSorter->GetPageSelection();
}
- else
+
+ if( (pSlideSorter == NULL) || (pPageSelection.get() == 0) || pPageSelection->empty() )
{
// No valid slide sorter available. Ask the main view shell for
// its current page.
diff --git a/sd/source/ui/toolpanel/ToolPanel.cxx b/sd/source/ui/toolpanel/ToolPanel.cxx
index e1bcdb71e..8fb0b708a 100644
--- a/sd/source/ui/toolpanel/ToolPanel.cxx
+++ b/sd/source/ui/toolpanel/ToolPanel.cxx
@@ -105,7 +105,7 @@ sal_uInt32 ToolPanel::AddControl (
}
// Replace the old links for cycling between first and last child by
- // current ones.
+ // current onems.
if (nControlCount > 0)
{
::Window* pFirst = mpControlContainer->GetControl(0)->GetWindow();
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index d67126963..eab69d637 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -699,6 +699,11 @@ void DrawController::FillPropertyTable (
PROPERTY_VIEWOFFSET,
::getCppuType((const ::com::sun::star::awt::Point*)0),
beans::PropertyAttribute::BOUND ));
+ rProperties.push_back(
+ beans::Property( OUString( RTL_CONSTASCII_USTRINGPARAM("DrawViewMode") ),
+ PROPERTY_DRAWVIEWMODE,
+ ::getCppuType((const ::com::sun::star::awt::Point*)0),
+ beans::PropertyAttribute::BOUND|beans::PropertyAttribute::READONLY|beans::PropertyAttribute::MAYBEVOID ));
}
@@ -928,3 +933,4 @@ void DrawController::ThrowIfDisposed (void) const
} // end of namespace sd
+
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index ed3e26162..d2a719974 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -38,21 +38,27 @@
#include "unomodel.hxx"
#include "unopage.hxx"
#include "Window.hxx"
+#include "pres.hxx"
#include <cppuhelper/proptypehlp.hxx>
+#include <comphelper/serviceinfohelper.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/svdpagv.hxx>
#include <svx/unoshape.hxx>
#include <svx/unoshcol.hxx>
#include <svx/zoomitem.hxx>
+#include <com/sun/star/drawing/DrawViewMode.hpp>
#include <com/sun/star/drawing/XLayerManager.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
#include <vector>
+using rtl::OUString;
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
namespace sd {
@@ -416,7 +422,6 @@ void SdUnoDrawView::setFastPropertyValue (
SetViewOffset( aOffset );
}
break;
-
default:
throw beans::UnknownPropertyException();
}
@@ -460,6 +465,10 @@ Any SAL_CALL SdUnoDrawView::getFastPropertyValue (
aValue <<= GetViewOffset();
break;
+ case DrawController::PROPERTY_DRAWVIEWMODE:
+ aValue = getDrawViewMode();
+ break;
+
default:
throw beans::UnknownPropertyException();
}
@@ -601,5 +610,35 @@ SdXImpressDocument* SdUnoDrawView::GetModel (void) const throw()
return NULL;
}
+Any SdUnoDrawView::getDrawViewMode() const
+{
+ Any aRet;
+ switch( mrDrawViewShell.GetPageKind() )
+ {
+ case PK_NOTES: aRet <<= DrawViewMode_NOTES; break;
+ case PK_HANDOUT: aRet <<= DrawViewMode_HANDOUT; break;
+ case PK_STANDARD: aRet <<= DrawViewMode_DRAW; break;
+ }
+ return aRet;
+}
+
+// XServiceInfo
+OUString SAL_CALL SdUnoDrawView::getImplementationName( ) throw (RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoDrawView") );
+}
+
+sal_Bool SAL_CALL SdUnoDrawView::supportsService( const OUString& ServiceName ) throw (RuntimeException)
+{
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+Sequence< OUString > SAL_CALL SdUnoDrawView::getSupportedServiceNames( ) throw (RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView") );
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
} // end of namespace sd
+
diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
index 998aeb3d8..5432fa36c 100644
--- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx
+++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
@@ -28,6 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+#include <comphelper/serviceinfohelper.hxx>
+
#include "SdUnoOutlineView.hxx"
#include "DrawController.hxx"
@@ -237,6 +239,8 @@ Any SAL_CALL SdUnoOutlineView::getFastPropertyValue (
aValue <<= pPage->getUnoPage();
}
break;
+ case DrawController::PROPERTY_VIEWOFFSET:
+ break;
default:
throw beans::UnknownPropertyException();
@@ -246,6 +250,22 @@ Any SAL_CALL SdUnoOutlineView::getFastPropertyValue (
}
+// XServiceInfo
+OUString SAL_CALL SdUnoOutlineView::getImplementationName( ) throw (RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoOutlineView") );
+}
+sal_Bool SAL_CALL SdUnoOutlineView::supportsService( const OUString& ServiceName ) throw (RuntimeException)
+{
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+Sequence< OUString > SAL_CALL SdUnoOutlineView::getSupportedServiceNames( ) throw (RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.OutlineView") );
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
} // end of namespace sd
diff --git a/sd/source/ui/unoidl/SdUnoPresView.cxx b/sd/source/ui/unoidl/SdUnoPresView.cxx
deleted file mode 100644
index 2561f430f..000000000
--- a/sd/source/ui/unoidl/SdUnoPresView.cxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "SdUnoPresView.hxx"
-
-
-namespace sd {
-
-
-SdUnoPresView::SdUnoPresView (
- DrawController& rController,
- DrawViewShell& rViewShell,
- View& rView) throw()
- : SdUnoDrawView (rController, rViewShell, rView)
-{
-}
-
-
-
-
-SdUnoPresView::~SdUnoPresView (void) throw()
-{
-}
-
-
-
-} // end of namespace sd
diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx
index 1fded967e..bffafb418 100644
--- a/sd/source/ui/unoidl/SdUnoSlideView.cxx
+++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx
@@ -27,6 +27,9 @@
#include "precompiled_sd.hxx"
+#include <comphelper/serviceinfohelper.hxx>
+
+#include "DrawController.hxx"
#include "SdUnoSlideView.hxx"
#include "SlideSorter.hxx"
@@ -39,6 +42,8 @@
#include "sdpage.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
+using ::rtl::OUString;
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -202,10 +207,30 @@ Any SAL_CALL SdUnoSlideView::getFastPropertyValue (
{
(void)nHandle;
- throw beans::UnknownPropertyException();
+ if( nHandle != DrawController::PROPERTY_VIEWOFFSET )
+ throw beans::UnknownPropertyException();
+
+ return Any();
+}
+
+
+// XServiceInfo
+OUString SAL_CALL SdUnoSlideView::getImplementationName( ) throw (RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoSlideView") );
}
+sal_Bool SAL_CALL SdUnoSlideView::supportsService( const OUString& ServiceName ) throw (RuntimeException)
+{
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+Sequence< OUString > SAL_CALL SdUnoSlideView::getSupportedServiceNames( ) throw (RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SlidesView") );
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
/*
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index d49a50fa4..0083bdad5 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -72,6 +72,14 @@ namespace sd
extern uno::Reference< uno::XInterface > SAL_CALL RandomNode_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
extern OUString RandomNode__getImplementationName() throw( uno::RuntimeException );
extern uno::Sequence< OUString > SAL_CALL RandomNode_getSupportedServiceNames() throw( uno::RuntimeException );
+
+extern uno::Reference< uno::XInterface > SAL_CALL SlideLayoutController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
+extern OUString SlideLayoutController_getImplementationName() throw( uno::RuntimeException );
+extern uno::Sequence< OUString > SlideLayoutController_getSupportedServiceNames() throw( uno::RuntimeException );
+
+extern uno::Reference< uno::XInterface > SAL_CALL InsertSlideController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
+extern OUString InsertSlideController_getImplementationName() throw( uno::RuntimeException );
+extern uno::Sequence< OUString > InsertSlideController_getSupportedServiceNames() throw( uno::RuntimeException );
}
namespace sd { namespace framework {
@@ -229,7 +237,9 @@ enum FactoryId
PresenterTextViewServiceFactoryId,
PresenterHelperServiceFactoryId,
PresenterPreviewCacheFactoryId,
- SlideSorterServiceFactoryId
+ SlideSorterServiceFactoryId,
+ SlideLayoutControllerFactoryId,
+ InsertSlideControllerFactoryId,
};
typedef ::std::hash_map<OUString, FactoryId, comphelper::UStringHash, comphelper::UStringEqual> FactoryMap;
@@ -261,6 +271,8 @@ static ::boost::shared_ptr<FactoryMap> spFactoryMap;
(*spFactoryMap)[PresenterHelperService_getImplementationName()] = PresenterHelperServiceFactoryId;
(*spFactoryMap)[PresenterPreviewCache_getImplementationName()] = PresenterPreviewCacheFactoryId;
(*spFactoryMap)[SlideSorterService_getImplementationName()] = SlideSorterServiceFactoryId;
+ (*spFactoryMap)[SlideLayoutController_getImplementationName()] = SlideLayoutControllerFactoryId;
+ (*spFactoryMap)[InsertSlideController_getImplementationName()] = InsertSlideControllerFactoryId;
}
return spFactoryMap;
};
@@ -365,6 +377,14 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
pKey,
sd::slidesorter::SlideSorterService_getImplementationName(),
sd::slidesorter::SlideSorterService_getSupportedServiceNames());
+ writeInfo(
+ pKey,
+ sd::SlideLayoutController_getImplementationName(),
+ sd::SlideLayoutController_getSupportedServiceNames());
+ writeInfo(
+ pKey,
+ sd::InsertSlideController_getImplementationName(),
+ sd::InsertSlideController_getSupportedServiceNames());
}
catch (registry::InvalidRegistryException &)
{
@@ -540,6 +560,20 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sd::slidesorter::SlideSorterService_getSupportedServiceNames());
break;
+ case SlideLayoutControllerFactoryId:
+ xFactory = ::cppu::createSingleFactory(
+ xMSF,
+ sd::SlideLayoutController_getImplementationName(),
+ sd::SlideLayoutController_createInstance,
+ sd::SlideLayoutController_getSupportedServiceNames());
+ break;
+
+ case InsertSlideControllerFactoryId:
+ xFactory = ::cppu::createSingleFactory(
+ xMSF,
+ sd::InsertSlideController_getImplementationName(),
+ sd::InsertSlideController_createInstance,
+ sd::InsertSlideController_getSupportedServiceNames());
default:
break;
}
diff --git a/sd/source/ui/unoidl/makefile.mk b/sd/source/ui/unoidl/makefile.mk
index b3e71df86..66d80e1a5 100644
--- a/sd/source/ui/unoidl/makefile.mk
+++ b/sd/source/ui/unoidl/makefile.mk
@@ -50,7 +50,6 @@ NOOPTFILES= $(SLO)$/unowcntr.obj
SLO1FILES = \
$(SLO)$/DrawController.obj \
- $(SLO)$/SdUnoPresView.obj\
$(SLO)$/SdUnoSlideView.obj\
$(SLO)$/SdUnoOutlineView.obj\
$(SLO)$/SdUnoDrawView.obj \
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index ea6d67198..83c713c1f 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1071,10 +1071,14 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
{
nType = OBJ_OLE2;
}
- else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ else if( aType.EqualsAscii( "CalcShape", 26, 9 ) )
{
nType = OBJ_OLE2;
}
+ else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ {
+ nType = OBJ_TABLE;
+ }
else if( aType.EqualsAscii( "OrgChartShape", 26, 13 ) )
{
nType = OBJ_OLE2;
@@ -1103,9 +1107,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
{
nType = OBJ_TEXT;
}
- else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ else if( aType.EqualsAscii( "MediaShape", 26, 10 ) )
{
- nType = OBJ_TABLE;
+ nType = OBJ_MEDIA;
}
else
{
@@ -1156,7 +1160,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
- uno::Sequence< OUString > aSNS( mbImpressDoc ? (34) : (19) );
+ uno::Sequence< OUString > aSNS( mbImpressDoc ? (36) : (19) );
sal_uInt16 i(0);
@@ -1199,6 +1203,8 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.HeaderShape"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SlideNumberShape"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.DateTimeShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.CalcShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.MediaShape"));
}
else
{
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 11f3154fe..bb7f2a1f0 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -403,7 +403,7 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
String aType( xShape->getShapeType() );
const String aPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.") );
- if(aType.CompareTo( aPrefix, aPrefix.Len() ) != 0)
+ if( aType.CompareTo( aPrefix, aPrefix.Len() ) != 0 )
{
SdrObject* pObj = SvxFmDrawPage::_CreateSdrObject( xShape );
if( pObj && ( (pObj->GetObjInventor() != SdrInventor) || (pObj->GetObjIdentifier() != OBJ_PAGE) ) )
@@ -439,6 +439,10 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{
eObjKind = PRESOBJ_CHART;
}
+ else if( aType.EqualsAscii( "CalcShape" ) )
+ {
+ eObjKind = PRESOBJ_CALC;
+ }
else if( aType.EqualsAscii( "TableShape" ) )
{
eObjKind = PRESOBJ_TABLE;
@@ -486,6 +490,10 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{
eObjKind = PRESOBJ_DATETIME;
}
+ else if( aType.EqualsAscii( "MediaShape" ) )
+ {
+ eObjKind = PRESOBJ_MEDIA;
+ }
Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() );
@@ -495,7 +503,22 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
const awt::Size aSize( aRect.GetWidth(), aRect.GetHeight() );
xShape->setSize( aSize );
- SdrObject *pPresObj = GetPage()->CreatePresObj( eObjKind, FALSE, aRect, sal_True );
+ SdrObject *pPresObj = 0;
+ if( (eObjKind == PRESOBJ_TABLE) || (eObjKind == PRESOBJ_MEDIA) )
+ {
+ pPresObj = SvxFmDrawPage::_CreateSdrObject( xShape );
+ if( pPresObj )
+ {
+ SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
+ if( pDoc )
+ pPresObj->NbcSetStyleSheet( pDoc->GetDefaultStyleSheet(), sal_True );
+ GetPage()->InsertPresObj( pPresObj, eObjKind );
+ }
+ }
+ else
+ {
+ pPresObj = GetPage()->CreatePresObj( eObjKind, FALSE, aRect, sal_True );
+ }
if( pPresObj )
pPresObj->SetUserCall( GetPage() );
@@ -1380,9 +1403,15 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj )
case PRESOBJ_ORGCHART:
aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("OrgChartShape") );
break;
+ case PRESOBJ_CALC:
+ aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("CalcShape") );
+ break;
case PRESOBJ_TABLE:
aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("TableShape") );
break;
+ case PRESOBJ_MEDIA:
+ aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("MediaShape") );
+ break;
case PRESOBJ_PAGE:
aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("PageShape") );
break;
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 8f6f5aeef..8d1d8e221 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1257,7 +1257,7 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
return *mpImpl->mpCustomHandleManager.get();
}
-::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
+::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const ::rtl::OUString& aCmdURL )
{
::rtl::OUString aLabel;
@@ -1266,7 +1266,7 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW );
- Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW );
+ Reference< XInterface > xIfac( xFrame, UNO_QUERY_THROW );
::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
@@ -1298,6 +1298,12 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
return aLabel;
}
+::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
+{
+ Reference< XFrame > xFrame( GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY );
+ return ImplRetrieveLabelFromCommand( xFrame, aCmdURL );
+}
+
//===== ViewShellBase::Implementation =========================================
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index da9393f61..40a34aed7 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -319,30 +319,53 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
rRequest.Done ();
}
+void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind ePageKind )
+{
+ const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATPAGE, FALSE, TYPE(SfxUInt32Item) ) );
+ const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATLAYOUT, FALSE, TYPE(SfxUInt32Item) ) );
+ SdDrawDocument* pDocument = mrViewShell.GetDoc();
+ if( !pDocument )
+ return;
+ SdPage* pPage = 0;
+ if( pWhatPage )
+ {
+ pPage = pDocument->GetSdPage(static_cast<USHORT>(pWhatPage->GetValue()), ePageKind);
+ }
+
+ if( pPage == 0 )
+ pPage = mrViewShell.getCurrentPage();
-void ViewShell::Implementation::AssignLayout (
- SdPage* pPage,
- AutoLayout aLayout)
-{
- // Transform the given request into the four argument form that is
- // understood by ProcessModifyPageSlot().
- SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin());
- BYTE aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE));
- BYTE aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
- SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers());
- SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
- aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
- aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
- aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
- aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
-
- // Forward the call with the new arguments.
- ProcessModifyPageSlot (
- aRequest,
- pPage,
- pPage->GetPageKind());
+ if( pPage )
+ {
+ AutoLayout eLayout = pPage->GetAutoLayout();
+
+ if( pWhatLayout )
+ eLayout = static_cast< AutoLayout >( pWhatLayout->GetValue() );
+
+ // Transform the given request into the four argument form that is
+ // understood by ProcessModifyPageSlot().
+ SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin());
+ BYTE aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE));
+ BYTE aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
+
+ SetOfByte aVisibleLayers;
+
+ if( pPage->GetPageKind() == PK_HANDOUT )
+ aVisibleLayers.SetAll();
+ else
+ pPage->TRG_GetMasterPageVisibleLayers();
+
+ SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
+ aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
+ aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, eLayout));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
+
+ // Forward the call with the new arguments.
+ ProcessModifyPageSlot( aRequest, pPage, pPage->GetPageKind());
+ }
}
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 2ad5ff9bc..26e37bc00 100755
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -42,7 +42,7 @@
#include <hash_map>
#undef VERBOSE
-#define VERBOSE 2
+//#define VERBOSE 2
namespace sd {
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 7a53d5299..76f6f71e3 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -1,4 +1,4 @@
-/*************************************************************************
+ /*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -578,6 +578,8 @@ void DrawView::HideSdrPage()
void DrawView::DeleteMarked()
{
+ OSL_TRACE( "DrawView::DeleteMarked() - enter" );
+
sd::UndoManager* pUndoManager = mpDoc->GetUndoManager();
DBG_ASSERT( pUndoManager, "sd::DrawView::DeleteMarked(), ui action without undo manager!?" );
@@ -590,33 +592,60 @@ void DrawView::DeleteMarked()
}
SdPage* pPage = 0;
+ bool bResetLayout = false;
- const SdrMarkList& rList = GetMarkedObjectList();
- ULONG nMarkCount = rList.GetMarkCount();
- for (ULONG nMark = 0; nMark < nMarkCount; nMark++)
+ const ULONG nMarkCount = GetMarkedObjectList().GetMarkCount();
+ if( nMarkCount )
{
- SdrObject* pObj = rList.GetMark(nMark)->GetMarkedSdrObj();
- if( pObj && !pObj->IsEmptyPresObj() && pObj->GetUserCall() )
+ SdrMarkList aList( GetMarkedObjectList() );
+ for (ULONG nMark = 0; nMark < nMarkCount; nMark++)
{
- pPage = dynamic_cast< SdPage* >( pObj->GetPage() );
- PresObjKind ePresObjKind;
- if( pPage && ((ePresObjKind = pPage->GetPresObjKind(pObj)) != PRESOBJ_NONE))
+ SdrObject* pObj = aList.GetMark(nMark)->GetMarkedSdrObj();
+ if( pObj && !pObj->IsEmptyPresObj() && pObj->GetUserCall() )
{
- SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
- bool bVertical = pTextObj && pTextObj->IsVerticalWriting();
- Rectangle aRect( pObj->GetLogicRect() );
- pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true );
+ pPage = static_cast< SdPage* >( pObj->GetPage() );
+ PresObjKind ePresObjKind;
+ if( pPage && ((ePresObjKind = pPage->GetPresObjKind(pObj)) != PRESOBJ_NONE))
+ {
+ switch( ePresObjKind )
+ {
+ case PRESOBJ_GRAPHIC:
+ case PRESOBJ_OBJECT:
+ case PRESOBJ_CHART:
+ case PRESOBJ_ORGCHART:
+ case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
+ case PRESOBJ_IMAGE:
+ case PRESOBJ_MEDIA:
+ ePresObjKind = PRESOBJ_OUTLINE;
+ break;
+ default:
+ break;
+ }
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ bool bVertical = pTextObj && pTextObj->IsVerticalWriting();
+ Rectangle aRect( pObj->GetLogicRect() );
+ SdrObject* pNewObj = pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true );
+
+ pPage->SetObjectOrdNum( pNewObj->GetOrdNum(), pObj->GetOrdNum() );
+
+ bResetLayout = true;
+
+ OSL_TRACE( "DrawView::InsertAutoLayoutShape() - InsertAutoLayoutShape" );
+ }
}
}
}
::sd::View::DeleteMarked();
- if( pPage )
+ if( pPage && bResetLayout )
pPage->SetAutoLayout( pPage->GetAutoLayout() );
if( pUndoManager )
pUndoManager->LeaveListAction();
+
+ OSL_TRACE( "DrawView::InsertAutoLayoutShape() - leave" );
}
} // end of namespace sd
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index ee15f26af..40c7577ee 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -68,6 +68,8 @@
#include <svx/dialogs.hrc>
+#include "view/viewoverlaymanager.hxx"
+
#include "glob.hrc"
#include "app.hrc"
#include "res_bmp.hrc"
@@ -292,6 +294,7 @@ void DrawViewShell::SetZoom( long nZoom )
ViewShell::SetZoom( nZoom );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
+ mpViewOverlayManager->onZoomChanged();
}
/*************************************************************************
@@ -305,6 +308,7 @@ void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect )
ViewShell::SetZoomRect( rZoomRect );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
+ mpViewOverlayManager->onZoomChanged();
}
/*************************************************************************
@@ -1218,6 +1222,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
rBindings.Invalidate(SID_STATUS_PAGE, TRUE, FALSE);
rBindings.Invalidate(SID_DELETE_MASTER_PAGE, TRUE, FALSE);
rBindings.Invalidate(SID_DELETE_PAGE, TRUE, FALSE);
+ rBindings.Invalidate(SID_ASSIGN_LAYOUT,TRUE,FALSE);
UpdatePreview( mpActualPage );
mpDrawView->AdjustMarkHdl();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 713c8a554..28fc8b73b 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -425,18 +425,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ASSIGN_LAYOUT:
{
- if (mePageKind==PK_STANDARD
- || mePageKind==PK_NOTES
- || (mePageKind==PK_HANDOUT && meEditMode==EM_MASTERPAGE))
+ if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES || (mePageKind==PK_HANDOUT && meEditMode==EM_MASTERPAGE))
{
if ( mpDrawView->IsTextEdit() )
mpDrawView->SdrEndTextEdit();
- SFX_REQUEST_ARG (rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
- SFX_REQUEST_ARG (rReq, pWhatLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- ::sd::ViewShell::mpImpl->AssignLayout (
- GetDoc()->GetSdPage((USHORT)pWhatPage->GetValue(), mePageKind),
- (AutoLayout)pWhatLayout->GetValue());
+ ::sd::ViewShell::mpImpl->AssignLayout(rReq, mePageKind);
}
Cancel();
rReq.Done ();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 0618cda8b..f1ddf7238 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -294,6 +294,26 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
GetMenuStateSel(rSet);
+ if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT))
+ {
+ bool bDisable = true;
+ if( pPageView )
+ {
+ SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
+
+ if( pPage )
+ {
+ rSet.Put( SfxUInt32Item( SID_ASSIGN_LAYOUT, static_cast< sal_uInt32 >(pPage->GetAutoLayout()) ) );
+ bDisable = false;
+ }
+ }
+
+ if(bDisable)
+ {
+ rSet.DisableItem(SID_EXPAND_PAGE);
+ }
+ }
+
if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_EXPAND_PAGE))
{
bool bDisable = true;
@@ -342,6 +362,26 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
}
+ if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT))
+ {
+ bool bDisable = true;
+ if( pPageView )
+ {
+ SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
+
+ if( pPage && !pPage->IsMasterPage() )
+ {
+ rSet.Put( SfxUInt32Item(SID_ASSIGN_LAYOUT, pPage->GetAutoLayout()) );
+ bDisable = false;
+ }
+ }
+
+ if(bDisable)
+ {
+ rSet.DisableItem(SID_ASSIGN_LAYOUT);
+ }
+ }
+
// Starten der Praesentation moeglich?
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) )
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 71aa624a2..dce0d3f23 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -62,6 +62,7 @@
#include <svtools/cliplistener.hxx>
#include <svx/float3d.hxx>
+#include "view/viewoverlaymanager.hxx"
#include "app.hrc"
#include "helpids.h"
#include "strings.hrc"
@@ -171,7 +172,8 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ::Window* pParentWindow, con
DrawViewShell::~DrawViewShell()
{
- mpAnnotationManager.release();
+ mpAnnotationManager.reset();
+ mpViewOverlayManager.reset();
OSL_ASSERT (GetViewShell()!=NULL);
@@ -415,7 +417,8 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
}
}
- mpAnnotationManager.reset( new AnnotationManager( GetViewShellBase() ) );
+ mpAnnotationManager.reset( new AnnotationManager( GetViewShellBase() ) );
+ mpViewOverlayManager.reset( new ViewOverlayManager( GetViewShellBase() ) );
}
diff --git a/sd/source/ui/view/makefile.mk b/sd/source/ui/view/makefile.mk
index 074497ca1..2cc2a96d4 100644
--- a/sd/source/ui/view/makefile.mk
+++ b/sd/source/ui/view/makefile.mk
@@ -114,7 +114,8 @@ SLOFILES = \
$(SLO)$/ViewShellManager.obj \
$(SLO)$/ViewShellHint.obj \
$(SLO)$/ViewTabBar.obj \
- $(SLO)$/WindowUpdater.obj
+ $(SLO)$/WindowUpdater.obj \
+ $(SLO)$/viewoverlaymanager.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index a2270e11a..51636659b 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -114,11 +114,25 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if( mnAction == DND_ACTION_LINK && pPickObj && pPV )
{
- if( pPickObj->ISA( SdrGrafObj ) )
+ const bool bIsGraphic = pPickObj->ISA( SdrGrafObj );
+ if( bIsGraphic || pObj->IsEmptyPresObj() )
{
- // Das Objekt wird mit der Bitmap gefuellt
- pNewGrafObj = (SdrGrafObj*) pPickObj->Clone();
- pNewGrafObj->SetGraphic(rGraphic);
+ if( IsUndoEnabled() )
+ BegUndo(String(SdResId(STR_INSERTGRAPHIC)));
+
+ SdPage* pPage = (SdPage*) pPickObj->GetPage();
+
+ if( bIsGraphic )
+ {
+ // Das Objekt wird mit der Bitmap gefuellt
+ pNewGrafObj = (SdrGrafObj*) pPickObj->Clone();
+ pNewGrafObj->SetGraphic(rGraphic);
+ }
+ else
+ {
+ pNewGrafObj = new SdrGrafObj( rGraphic, pPickObj->GetLogicRect() );
+ pNewGrafObj->SetEmptyPresObj(TRUE);
+ }
if ( pNewGrafObj->IsEmptyPresObj() )
{
@@ -128,28 +142,11 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
pNewGrafObj->SetEmptyPresObj(FALSE);
}
- const bool bUndo = IsUndoEnabled();
- if( bUndo )
- BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
-
- SdPage* pPage = (SdPage*) pPickObj->GetPage();
-
- if (pPage && pPage->GetPresObjKind(pPickObj) == PRESOBJ_GRAPHIC)
+ if (pPage && pPage->IsPresObj(pPickObj))
{
// Neues PresObj in die Liste eintragen
+ pPage->InsertPresObj( pNewGrafObj, PRESOBJ_GRAPHIC );
pNewGrafObj->SetUserCall(pPickObj->GetUserCall());
- if( bUndo )
- {
- AddUndo( new sd::UndoObjectPresentationKind( *pPickObj ) );
- AddUndo( new sd::UndoObjectPresentationKind( *pNewGrafObj ) );
- }
- pPage->RemovePresObj(pPickObj);
- pPage->InsertPresObj(pNewGrafObj, PRESOBJ_GRAPHIC);
-
- if( !bUndo )
- {
- SdrObject::Free( pPickObj );
- }
}
if (pImageMap)
@@ -157,7 +154,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj); // maybe ReplaceObjectAtView
- if( bUndo )
+ if( IsUndoEnabled() )
EndUndo();
}
else if (pPickObj->IsClosedObj() && !pPickObj->ISA(SdrOle2Obj))
@@ -295,7 +292,7 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc
SdrMediaObj* pNewMediaObj = NULL;
SdrPageView* pPV = GetSdrPageView();
- SdrObject* pPickObj = NULL;
+ SdrObject* pPickObj = GetEmptyPresentationObject( PRESOBJ_MEDIA );
if(pPV && this->ISA(::sd::slidesorter::view::SlideSorterView ))
{
@@ -320,10 +317,37 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc
}
else if( pPV )
{
- pNewMediaObj = new SdrMediaObj( Rectangle( rPos, rSize ) );
-
- if( pPV && InsertObjectAtView( pNewMediaObj, *pPV, SDRINSERT_SETDEFLAYER ) )
- pNewMediaObj->setURL( rMediaURL );
+ Rectangle aRect( rPos, rSize );
+ if( pPickObj )
+ aRect = pPickObj->GetLogicRect();
+
+
+ pNewMediaObj = new SdrMediaObj( aRect );
+
+ bool bIsPres = false;
+ if( pPickObj )
+ {
+ SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
+ bIsPres = pPage && pPage->IsPresObj(pPickObj);
+ if( bIsPres )
+ {
+ pPage->InsertPresObj( pNewMediaObj, PRESOBJ_MEDIA );
+ }
+ }
+
+ if( pPickObj )
+ ReplaceObjectAtView(pPickObj, *pPV, pNewMediaObj);
+ else
+ InsertObjectAtView( pNewMediaObj, *pPV, SDRINSERT_SETDEFLAYER );
+
+ pNewMediaObj->setURL( rMediaURL );
+
+ if( pPickObj )
+ {
+ pNewMediaObj->AdjustToMaxRect( pPickObj->GetLogicRect() );
+ if( bIsPres )
+ pNewMediaObj->SetUserCall(pPickObj->GetUserCall());
+ }
}
rAction = mnAction;
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
index 06a876c71..47882e459 100644
--- a/sd/source/ui/view/sdview5.cxx
+++ b/sd/source/ui/view/sdview5.cxx
@@ -27,3 +27,88 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+
+#include "sdpage.hxx"
+#include "View.hxx"
+#include "pres.hxx"
+
+namespace sd {
+
+static bool implIsMultiPresObj( PresObjKind eKind )
+{
+ switch( eKind )
+ {
+ case PRESOBJ_OUTLINE:
+ case PRESOBJ_GRAPHIC:
+ case PRESOBJ_OBJECT:
+ case PRESOBJ_CHART:
+ case PRESOBJ_ORGCHART:
+ case PRESOBJ_TABLE:
+ case PRESOBJ_IMAGE:
+ case PRESOBJ_MEDIA:
+ return true;
+ default:
+ return false;
+ }
+}
+
+SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind )
+{
+ SdrObject* pEmptyObj = 0;
+
+ SdrPageView* pPV = GetSdrPageView();
+ if( pPV )
+ {
+ SdPage* pPage = static_cast< SdPage* >( pPV->GetPage() );
+ if( pPage )
+ {
+ // first try selected shape
+ if ( AreObjectsMarked() )
+ {
+ /**********************************************************
+ * Is an empty graphic object available?
+ **********************************************************/
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrMark* pMark = rMarkList.GetMark(0);
+ SdrObject* pObj = pMark->GetMarkedSdrObj();
+
+ if( pObj->IsEmptyPresObj() && implIsMultiPresObj( pPage->GetPresObjKind(pObj) ) )
+ pEmptyObj = pObj;
+ }
+ }
+
+ // try to find empty pres obj of same type
+ if( !pEmptyObj )
+ {
+ int nIndex = 1;
+ do
+ {
+ pEmptyObj = pPage->GetPresObj(eKind, nIndex++ );
+ }
+ while( (pEmptyObj != 0) && (!pEmptyObj->IsEmptyPresObj()) );
+ }
+
+ // last try to find empty pres obj of multiple type
+ if( !pEmptyObj )
+ {
+ const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
+
+ for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); iter++ )
+ {
+ if( (*iter)->IsEmptyPresObj() && implIsMultiPresObj(pPage->GetPresObjKind(*iter)) )
+ {
+ pEmptyObj = (*iter);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return pEmptyObj;
+}
+
+}
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
new file mode 100644
index 000000000..856d4868e
--- /dev/null
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -0,0 +1,570 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include "sddll.hxx"
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <sfx2/imagemgr.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include <tools/rcid.h>
+
+#include <vcl/help.hxx>
+#include <vcl/imagerepository.hxx>
+
+#include <svx/sdrpagewindow.hxx>
+#include <svx/sdrpaintwindow.hxx>
+#include <svx/sdr/overlay/overlayanimatedbitmapex.hxx>
+#include <svx/sdr/overlay/overlaybitmapex.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <svx/svxids.hrc>
+
+#include "view/viewoverlaymanager.hxx"
+
+#include "res_bmp.hrc"
+#include "DrawDocShell.hxx"
+#include "DrawViewShell.hxx"
+#include "DrawController.hxx"
+#include "glob.hrc"
+#include "sdresid.hxx"
+#include "EventMultiplexer.hxx"
+#include "ViewShellManager.hxx"
+#include "helpids.h"
+#include "sdpage.hxx"
+#include "drawdoc.hxx"
+#include "smarttag.hxx"
+
+using ::rtl::OUString;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+
+namespace sd {
+
+class ImageButtonHdl;
+
+// --------------------------------------------------------------------
+
+Image ViewOverlayManager::maSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START];
+Image ViewOverlayManager::maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START];
+
+static USHORT gButtonSlots[] = { SID_INSERT_TABLE, SID_INSERT_DIAGRAM, SID_INSERT_GRAPHIC, SID_INSERT_AVMEDIA };
+
+// --------------------------------------------------------------------
+
+static Image loadImageResource( USHORT nId )
+{
+ /*
+ OUString sURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/sd/bitmap/" ) ) );
+ sURL += OUString::valueOf( (sal_Int32)nId );
+
+ BitmapEx aBmpEx;
+ vcl::ImageRepository::loadImage( sURL, aBmpEx, false );
+ return Image( aBmpEx );
+ */
+
+ SdResId aResId( nId );
+ aResId.SetRT( RSC_BITMAP );
+
+ return Image( BitmapEx( aResId ) );
+}
+
+// --------------------------------------------------------------------
+
+const sal_uInt32 SMART_TAG_HDL_NUM = SAL_MAX_UINT32;
+
+class ChangePlaceholderTag : public SmartTag
+{
+ friend class ImageButtonHdl;
+public:
+ ChangePlaceholderTag( ViewOverlayManager& rManager, ::sd::View& rView, SdrObject& rPlaceholderObj );
+ virtual ~ChangePlaceholderTag();
+
+ /** returns true if the SmartTag handled the event. */
+ virtual bool MouseButtonDown( const MouseEvent&, SmartHdl& );
+
+ /** returns true if the SmartTag consumes this event. */
+ virtual bool KeyInput( const KeyEvent& rKEvt );
+
+ /** returns true if the SmartTag consumes this event. */
+ virtual bool RequestHelp( const HelpEvent& rHEvt );
+
+protected:
+ virtual void addCustomHandles( SdrHdlList& rHandlerList );
+ virtual void disposing();
+ virtual void select();
+ virtual void deselect();
+
+private:
+ ViewOverlayManager& mrManager;
+ SdrObjectWeakRef mxPlaceholderObj;
+};
+
+class ImageButtonHdl : public SmartHdl
+{
+public:
+ ImageButtonHdl( const SmartTagReference& xTag, USHORT nSID, const Image& rImage, const Image& rImageMO, const Point& rPnt );
+ virtual ~ImageButtonHdl();
+ virtual void CreateB2dIAObject();
+ virtual BOOL IsFocusHdl() const;
+ virtual Pointer GetPointer() const;
+ virtual bool isMarkable() const;
+
+ virtual void onMouseEnter();
+ virtual void onMouseLeave();
+
+ USHORT getSlotId() const { return mnSID; }
+
+private:
+ rtl::Reference< ChangePlaceholderTag > mxTag;
+ Image maImage;
+ Image maImageMO;
+ USHORT mnSID;
+};
+
+// --------------------------------------------------------------------
+
+ImageButtonHdl::ImageButtonHdl( const SmartTagReference& xTag, USHORT nSID, const Image& rImage, const Image& rImageMO, const Point& rPnt )
+: SmartHdl( xTag, rPnt )
+, mxTag( dynamic_cast< ChangePlaceholderTag* >( xTag.get() ) )
+, maImage( rImage )
+, maImageMO( rImageMO )
+, mnSID( nSID )
+{
+}
+
+// --------------------------------------------------------------------
+
+ImageButtonHdl::~ImageButtonHdl()
+{
+}
+
+// --------------------------------------------------------------------
+
+void ImageButtonHdl::onMouseEnter()
+{
+ Touch();
+}
+
+// --------------------------------------------------------------------
+
+void ImageButtonHdl::onMouseLeave()
+{
+ Touch();
+}
+
+// --------------------------------------------------------------------
+
+void ImageButtonHdl::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ const Point aTagPos( GetPos() );
+ basegfx::B2DPoint aPosition( aTagPos.X(), aTagPos.Y() );
+
+ BitmapEx aBitmapEx( isMouseOver() ? maImageMO.GetBitmapEx() : maImage.GetBitmapEx() );
+
+ if(pHdlList)
+ {
+ SdrMarkView* pView = pHdlList->GetView();
+
+ if(pView && !pView->areMarkHandlesHidden())
+ {
+ SdrPageView* pPageView = pView->GetSdrPageView();
+
+ if(pPageView)
+ {
+ for(sal_uInt32 b = 0; b < pPageView->PageWindowCount(); b++)
+ {
+ const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b);
+
+ SdrPaintWindow& rPaintWindow = rPageWindow.GetPaintWindow();
+ if(rPaintWindow.OutputToWindow() && rPageWindow.GetOverlayManager() )
+ {
+ ::sdr::overlay::OverlayObject* pOverlayObject = 0;
+
+ pOverlayObject = new ::sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 );
+ rPageWindow.GetOverlayManager()->add(*pOverlayObject);
+ maOverlayGroup.append(*pOverlayObject);
+ }
+ }
+ }
+ }
+ }
+}
+
+// --------------------------------------------------------------------
+
+BOOL ImageButtonHdl::IsFocusHdl() const
+{
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+bool ImageButtonHdl::isMarkable() const
+{
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+Pointer ImageButtonHdl::GetPointer() const
+{
+ return Pointer( POINTER_ARROW );
+}
+
+// ====================================================================
+
+ChangePlaceholderTag::ChangePlaceholderTag( ViewOverlayManager& rManager, ::sd::View& rView, SdrObject& rPlaceholderObj )
+: SmartTag( rView )
+, mrManager( rManager )
+, mxPlaceholderObj( &rPlaceholderObj )
+{
+}
+
+// --------------------------------------------------------------------
+
+ChangePlaceholderTag::~ChangePlaceholderTag()
+{
+}
+
+// --------------------------------------------------------------------
+
+/** returns true if the ChangePlaceholderTag handled the event. */
+bool ChangePlaceholderTag::MouseButtonDown( const MouseEvent& /*rMEvt*/, SmartHdl& rHdl )
+{
+ USHORT nSID = static_cast< ImageButtonHdl& >(rHdl).getSlotId();
+
+ if( mxPlaceholderObj.get() )
+ {
+ SdrPageView* pPV = mrView.GetSdrPageView();
+ mrView.MarkObj(mxPlaceholderObj.get(), pPV, FALSE);
+ }
+
+ mrView.GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSID, SFX_CALLMODE_ASYNCHRON);
+
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+/** returns true if the SmartTag consumes this event. */
+bool ChangePlaceholderTag::KeyInput( const KeyEvent& rKEvt )
+{
+ USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ switch( nCode )
+ {
+ case KEY_DOWN:
+ case KEY_UP:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_ESCAPE:
+ case KEY_TAB:
+ case KEY_RETURN:
+ case KEY_SPACE:
+ default:
+ return false;
+ }
+}
+
+/** returns true if the SmartTag consumes this event. */
+bool ChangePlaceholderTag::RequestHelp( const HelpEvent& /*rHEvt*/ )
+{
+/*
+ Rectangle aItemRect( rHEvt.GetMousePosPixel(), Size(1,1) );
+ String aHelpText(RTL_CONSTASCII_USTRINGPARAM("I'm a help text"));
+ if( rHEvt.GetMode() == HELPMODE_BALLOON )
+ Help::ShowBalloon( static_cast< ::Window* >(mrView.GetFirstOutputDevice()), aItemRect.Center(), aItemRect, aHelpText);
+ else
+ Help::ShowQuickHelp( static_cast< ::Window* >(mrView.GetFirstOutputDevice()), aItemRect, aHelpText );
+*/
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList )
+{
+ if( mxPlaceholderObj.is() )
+ {
+ SdrObject* pPlaceholder = mxPlaceholderObj.get();
+ SmartTagReference xThis( this );
+ const Rectangle& rSnapRect = pPlaceholder->GetSnapRect();
+ const Point aPoint;
+
+ OutputDevice* pDev = mrView.GetFirstOutputDevice();
+ if( pDev == 0 )
+ pDev = Application::GetDefaultDevice();
+
+ Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
+ long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height());
+ if( 50 > nShapeSizePix )
+ return;
+
+ Image* pImages = (nShapeSizePix > 250) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
+
+ Size aButtonSize( pDev->PixelToLogic(pImages[0].GetSizePixel()) );
+/*
+ if( 100 > nShapeSizePix )
+ {
+ aButtonSize.Width() >>= 1; aButtonSize.Height() >>= 1;
+ }
+*/
+ const int nColumns = 2;
+ const int nRows = 2;
+
+ long all_width = nColumns * aButtonSize.Width();
+ long all_height = nRows * aButtonSize.Height();
+
+ Point aPos( rSnapRect.Center() );
+ aPos.X() -= all_width >> 1;
+ aPos.Y() -= all_height >> 1;
+
+ long nStartX = aPos.X();
+
+ for( int i = 0, c = 0; i < 4; i++ )
+ {
+ Image aImg( pImages[i] );
+ Image aImgMO( pImages[i+4] );
+/*
+ if( 100 > nShapeSizePix )
+ {
+ BitmapEx b( aImg.GetBitmapEx() );
+ const double scale = 0.5;
+ b.Scale( scale, scale );
+ aImg = Image(b);
+
+ b = aImgMO.GetBitmapEx();
+ b.Scale( scale, scale );
+ aImgMO = Image(b);
+ }
+*/
+ ImageButtonHdl* pHdl = new ImageButtonHdl( xThis, gButtonSlots[i], aImg, aImgMO, aPoint );
+ pHdl->SetObjHdlNum( SMART_TAG_HDL_NUM );
+ pHdl->SetPageView( mrView.GetSdrPageView() );
+
+ pHdl->SetPos( aPos );
+
+ rHandlerList.AddHdl( pHdl );
+
+ if( ++c == nColumns )
+ {
+ aPos.X() = nStartX;
+ aPos.Y() += aButtonSize.Height();
+ c = 0;
+ }
+ else
+ {
+ aPos.X() += aButtonSize.Width();
+ }
+ }
+ }
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::disposing()
+{
+ SmartTag::disposing();
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::select()
+{
+ SmartTag::select();
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::deselect()
+{
+ SmartTag::deselect();
+}
+
+// --------------------------------------------------------------------
+
+ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
+: mrBase( rViewShellBase )
+, mnUpdateTagsEvent( 0 )
+{
+ Link aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
+ mrBase.GetEventMultiplexer()->AddEventListener(aLink, tools::EventMultiplexerEvent::EID_CURRENT_PAGE
+ | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
+ | tools::EventMultiplexerEvent::EID_VIEW_ADDED
+ | tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT
+ | tools::EventMultiplexerEvent::EID_END_TEXT_EDIT );
+
+ StartListening( *mrBase.GetDocShell() );
+}
+
+// --------------------------------------------------------------------
+
+ViewOverlayManager::~ViewOverlayManager()
+{
+ Link aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
+ mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
+
+ if( mnUpdateTagsEvent )
+ {
+ Application::RemoveUserEvent( mnUpdateTagsEvent );
+ mnUpdateTagsEvent = 0;
+ }
+
+ DisposeTags();
+}
+
+// --------------------------------------------------------------------
+
+void ViewOverlayManager::UpdateImages()
+{
+ for( sal_uInt16 i = 0; i < (BMP_PLACEHOLDER_SMALL_END-BMP_PLACEHOLDER_SMALL_START); i++ )
+ {
+ maSmallButtonImages[i] = loadImageResource( BMP_PLACEHOLDER_SMALL_START + i );
+ maLargeButtonImages[i] = loadImageResource( BMP_PLACEHOLDER_LARGE_START + i );
+ }
+}
+
+// --------------------------------------------------------------------
+
+void ViewOverlayManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
+{
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pSimpleHint != NULL)
+ {
+ if (pSimpleHint->GetId() == SFX_HINT_DOCCHANGED)
+ {
+ UpdateTags();
+ }
+ }
+}
+
+void ViewOverlayManager::onZoomChanged()
+{
+ if( !maTagVector.empty() )
+ {
+ UpdateTags();
+ }
+}
+
+void ViewOverlayManager::UpdateTags()
+{
+ if( !mnUpdateTagsEvent )
+ mnUpdateTagsEvent = Application::PostUserEvent( LINK( this, ViewOverlayManager, UpdateTagsHdl ) );
+}
+
+IMPL_LINK(ViewOverlayManager,UpdateTagsHdl, void *, EMPTYARG)
+{
+ OSL_TRACE("ViewOverlayManager::UpdateTagsHdl");
+
+ mnUpdateTagsEvent = 0;
+ bool bChanges = DisposeTags();
+ bChanges |= CreateTags();
+
+ if( bChanges && mrBase.GetDrawView() )
+ static_cast< ::sd::View* >( mrBase.GetDrawView() )->updateHandles();
+ return 0;
+}
+
+bool ViewOverlayManager::CreateTags()
+{
+ bool bChanges = false;
+
+ SdPage* pPage = mrBase.GetMainViewShell()->getCurrentPage();
+
+ if( pPage )
+ {
+ if( !maSmallButtonImages[0] )
+ UpdateImages();
+
+ const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
+
+ for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); iter++ )
+ {
+ if( (*iter)->IsEmptyPresObj() && ((*iter)->GetObjIdentifier() == OBJ_OUTLINETEXT) && (mrBase.GetDrawView()->GetTextEditObject() != (*iter)) )
+ {
+ rtl::Reference< SmartTag > xTag( new ChangePlaceholderTag( *this, *mrBase.GetMainViewShell()->GetView(), *(*iter) ) );
+ maTagVector.push_back(xTag);
+ bChanges = true;
+ }
+ }
+ }
+
+ return bChanges;
+}
+
+// --------------------------------------------------------------------
+
+bool ViewOverlayManager::DisposeTags()
+{
+ if( !maTagVector.empty() )
+ {
+ ViewTagVector vec;
+ vec.swap( maTagVector );
+
+ ViewTagVector::iterator iter = vec.begin();
+ do
+ {
+ (*iter++)->Dispose();
+ }
+ while( iter != vec.end() );
+ return true;
+ }
+
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+IMPL_LINK(ViewOverlayManager,EventMultiplexerListener,
+ tools::EventMultiplexerEvent*,pEvent)
+{
+ switch (pEvent->meEventId)
+ {
+ case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
+ case tools::EventMultiplexerEvent::EID_VIEW_ADDED:
+ case tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT:
+ case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
+ case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
+ UpdateTags();
+ break;
+ }
+ return 0;
+}
+
+}
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 7ad44a148..07fd54ec9 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -246,6 +246,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
const SfxItemSet* pArgs = rRequest.GetArgs();
if (! pArgs)
{
+/*
// Make the layout menu visible in the tool pane.
const ViewShellBase& rBase (GetViewShellBase());
if (rBase.GetMainViewShell()!=NULL
@@ -255,6 +256,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
framework::FrameworkHelper::msLayoutTaskPanelURL);
}
+*/
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -263,23 +265,31 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if (pTemplatePage != NULL)
{
eStandardLayout = pTemplatePage->GetAutoLayout();
+ if( eStandardLayout == AUTOLAYOUT_TITLE )
+ eStandardLayout = AUTOLAYOUT_ENUM;
+
SdPage* pNotesTemplatePage = static_cast<SdPage*>(pDocument->GetPage(pTemplatePage->GetPageNum()+1));
if (pNotesTemplatePage != NULL)
eNotesLayout = pNotesTemplatePage->GetAutoLayout();
}
}
- else if (pArgs->Count () != 4)
+ else if (pArgs->Count() == 1)
{
- Cancel();
-
- if(HasCurrentFunction(SID_BEZIER_EDIT) )
- GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON);
-
- StarBASIC::FatalError (SbERR_WRONG_ARGS);
- rRequest.Ignore ();
- return NULL;
+ pDocument->StopWorkStartupDelay();
+ SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
+ if( pLayout )
+ {
+ if (ePageKind == PK_NOTES)
+ {
+ eNotesLayout = (AutoLayout) pLayout->GetValue ();
+ }
+ else
+ {
+ eStandardLayout = (AutoLayout) pLayout->GetValue ();
+ }
+ }
}
- else
+ else if (pArgs->Count() == 4)
{
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -317,6 +327,17 @@ SdPage* ViewShell::CreateOrDuplicatePage (
return NULL;
}
}
+ else
+ {
+ Cancel();
+
+ if(HasCurrentFunction(SID_BEZIER_EDIT) )
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON);
+
+ StarBASIC::FatalError (SbERR_WRONG_ARGS);
+ rRequest.Ignore ();
+ return NULL;
+ }
// 2. Create a new page or duplicate an existing one.
View* pDrView = GetView();
diff --git a/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml b/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml
index 1f212226c..148849db6 100644
--- a/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml b/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml
index 3ac334e0e..32de62147 100644
--- a/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly"/>
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/toolbar/commontaskbar.xml b/sd/uiconfig/simpress/toolbar/commontaskbar.xml
index 5e4ce1cff..c64a4b935 100644
--- a/sd/uiconfig/simpress/toolbar/commontaskbar.xml
+++ b/sd/uiconfig/simpress/toolbar/commontaskbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="27014"/>
- <toolbar:toolbaritem xlink:href=".uno:ModifyPage" toolbar:visible="false" toolbar:helpid="27046"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="27014" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:AssignLayout" toolbar:helpid="27435" toolbar:style="dropdownonly"/>
<toolbar:toolbaritem xlink:href=".uno:PresentationLayout" toolbar:helpid="27064"/>
<toolbar:toolbaritem xlink:href=".uno:DuplicatePage" toolbar:visible="false" toolbar:helpid="27342"/>
<toolbar:toolbaritem xlink:href=".uno:ExpandPage" toolbar:visible="false" toolbar:helpid="27343"/>
diff --git a/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml b/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml
index 1f212226c..148849db6 100644
--- a/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml
+++ b/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml b/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml
index 3ac334e0e..28687d66e 100644
--- a/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml
+++ b/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/toolbar/insertbar.xml b/sd/uiconfig/simpress/toolbar/insertbar.xml
index 2efa9c7d4..4ba1344cf 100644
--- a/sd/uiconfig/simpress/toolbar/insertbar.xml
+++ b/sd/uiconfig/simpress/toolbar/insertbar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="helpid:27014" />
+ <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="helpid:27014" toolbar:style="radio dropdown" />
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:InsertObjectFloatingFrame" toolbar:helpid="helpid:5563" toolbar:visible="false" />
<toolbar:toolbarseparator/>
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index 9b04aa743..b0d0b133a 100644
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -124,7 +124,8 @@ LIB3FILES= \
$(SLB)$/cgm.lib \
$(SLB)$/uitable.lib \
$(SLB)$/uiannotations.lib\
- $(SLB)$/grf.lib
+ $(SLB)$/grf.lib \
+ $(SLB)$/controller.lib
LIB5TARGET=$(SLB)$/sdraw3_2.lib
LIB5FILES= \