diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 0c14dec72583..dfc7e3e3bf88 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -179,13 +179,6 @@ public:
enum ChangeHint { CH_VIEW_SHELL_INVALID, CH_VIEW_SHELL_VALID };
- /** Handle a change outside the outliner which may affect the outliner.
- At the moment this is restricted to changes of the main view shell
- but later may include any changes that are detected now by
- DetectChange().
- */
- void HandleOutsideChange (ChangeHint eHint);
-
int GetIgnoreCurrentPageChangesLevel() const { return mnIgnoreCurrentPageChangesLevel; };
void IncreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel++; };
void DecreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel--; };
@@ -421,15 +414,6 @@ private:
*/
void EndOfSearch (void);
- /** Prepare to commence searching/spell checking on the specified page.
- This also creates a proper page iterator.
- @param nPageIndex
- Index of the page to prepare for searching. The default value
- of -1 is a flag for using the first/last page of the current
- edit mode/view mode depending on the search direction.
- */
- void InitPage (USHORT nPageIndex = (USHORT)-1);
-
/** Show a dialog that tells the user that the search has ended either
because there are no more matches after finding at least one or that
no match has been found at all.
@@ -521,11 +505,6 @@ private:
*/
bool HandleFailedSearch (void);
- /** Return a parent window for a dialog. The returned window depends on
- the search mode.
- */
- ::Window* GetParentForDialog (void);
-
/** Take a position as returned by an object iterator and switch to the
view and page on which the object specified by this position is
located.
diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx
index ce291a6f5a00..92301f06289c 100644
--- a/sd/inc/OutlinerIterator.hxx
+++ b/sd/inc/OutlinerIterator.hxx
@@ -109,13 +109,6 @@ public:
*/
explicit Iterator (IteratorImplBase* pObject);
- /** Create a new iterator with the implementation object being the copy
- of the provided one.
- @param rObject
- A copy of this object will become the implementation object.
- */
- explicit Iterator (const IteratorImplBase& rObject);
-
~Iterator (void);
/** Assign the iterator from the given one. The implementation object
@@ -240,9 +233,8 @@ private:
This specifies whether the returned iterator points to the
first, (one past the) last, or current object.
@return
- Returns an iterator as constructed by one of the
+ Returns an iterator as constructed by
CreateSelectionIterator(),
- CreateViewIterator(), or CreateDocumentIterator().
*/
Iterator CreateIterator (IteratorLocation aLocation);
@@ -269,24 +261,6 @@ private:
bool bDirectionIsForward=true,
IteratorLocation aLocation=BEGIN);
- /** Create an iterator that iterates over all SdrObjects
- objects of the mpOutliner outliner that belong to
- the current view.
- @param pDocument
- The document to which the objects belong.
- @param pViewShell
- The view shell which displays the objects.
- @param bDirectionIsForward
- The direction of iteration. It defaults to forward.
- @param aLocation
- This specifies at which object the iterator points initially.
- */
- Iterator CreateViewIterator (
- SdDrawDocument* pDocument,
- const boost::shared_ptr& rpViewShell,
- bool bDirectionIsForward=true,
- IteratorLocation aLocation=BEGIN);
-
/** Create an iterator that iterates over all SdrObjects
objects of the mpOutliner outliner.
@param pDocument
@@ -356,9 +330,6 @@ public:
assigned to the data members of this object.
*/
IteratorPosition (const IteratorPosition& aPosition);
- /** Create a new object and set its data members to the given values.
- */
- IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode);
/// The destructor is a no-op at the moment.
~IteratorPosition (void);
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 53223fa5ff1b..65aec562f084 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -430,7 +430,7 @@
#define SID_LEFT_PANE_IMPRESS (SID_SD_START+414)
#define SID_LEFT_PANE_DRAW (SID_SD_START+415)
-#define SID_RIGHT_PANE (SID_SD_START+416)
+ // FREE
#define SID_NOTES_WINDOW (SID_SD_START+417)
#define SID_SWITCH_SHELL_PANE (SID_SD_START+418)
#define SID_LAYER_DIALOG_WIN (SID_SD_START+419)
@@ -446,7 +446,7 @@
#define SID_TP_USE_FOR_NEW_PRESENTATIONS (SID_SD_START+427)
#define SID_TP_SHOW_LARGE_PREVIEW (SID_SD_START+428)
#define SID_TP_SHOW_SMALL_PREVIEW (SID_SD_START+429)
-#define SID_TASK_PANE (SID_SD_START+430)
+#define SID_SHOW_TOOL_PANEL (SID_SD_START+430)
#define SID_INSERT_MASTER_PAGE (SID_SD_START+431)
#define SID_DELETE_MASTER_PAGE (SID_SD_START+432)
#define SID_RENAME_MASTER_PAGE (SID_SD_START+433)
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index d0b2a899e5db..e2aae99cf673 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/drawdoc.hxx b/sd/inc/drawdoc.hxx
index c413175dca8c..7cdee6a4efa5 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -441,7 +441,6 @@ public:
CharClass* GetCharClass() const { return mpCharClass; }
void RestoreLayerNames();
- void MakeUniqueLayerNames();
void UpdateAllLinks();
@@ -465,18 +464,6 @@ public:
static SdDrawDocument* pDocLockedInsertingLinks; // static to prevent recursions while resolving links
- /** This method acts as a simplified front end for the more complex
- CreatePage() method.
- @param nPageNum
- The page number as passed to the GetSdPage()
- method from which to use certain properties for the new pages.
- These include the auto layout.
- @return
- Returns an index of the inserted pages that can be used with the
- GetSdPage() method.
- */
- USHORT CreatePage (USHORT nPageNum);
-
/** Create and insert a set of two new pages: a standard (draw) page and
the associated notes page. The new pages are inserted direclty
after the specified page set.
@@ -698,7 +685,6 @@ namespace sd
class ModifyGuard
{
public:
- ModifyGuard( DrawDocShell* pDocShell );
ModifyGuard( SdDrawDocument* pDoc );
~ModifyGuard();
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc
index cb72965398cc..89b2b670adf9 100644
--- a/sd/inc/glob.hrc
+++ b/sd/inc/glob.hrc
@@ -138,6 +138,7 @@
#define STR_LEFT_IMPRESS_PANE_SHELL RID_GLOB_START+113
#define STR_LEFT_DRAW_PANE_SHELL RID_GLOB_START+114
#define STR_RIGHT_PANE_SHELL RID_GLOB_START+115
+#define STR_TOOL_PANEL_SHELL RID_GLOB_START+116
#define RID_CUSTOMANIMATION_START RID_GLOB_START+120
#define RID_CUSTOMANIMATION_END RID_GLOB_START+199
@@ -150,6 +151,8 @@
#define DLG_TABLEDESIGNPANE RID_GLOB_START+224
#define STR_TABLEOBJECTBARSHELL RID_GLOB_START+225
#define RID_TABPAGE_PARA_NUMBERING RID_GLOB_START+226
+#define STR_CUSTOMANIMATIONPANE RID_GLOB_START+227
+#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
#define RID_SLIDESORTER_ICONS RID_GLOB_START+227
diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index 12b63c74b310..278aef490fdb 100644
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -66,6 +66,8 @@
#define SD_IF_SDRIGHTPANESHELL SFX_INTERFACE_SD_START + 26
#define SD_IF_SDDRAWTABLEOBJECTBAR SFX_INTERFACE_SD_START + 27
#define SD_IF_SDANNOTATIONSHELL SFX_INTERFACE_SD_START + 28
+#define SD_IF_SDTOOLPANELPANESHELL SFX_INTERFACE_SD_START + 29
+#define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + 30
// Inventor-Id fuer StarDraw UserData
const UINT32 SdUDInventor=UINT32('S')*0x00000001+
diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index 6efd1cbe89f2..a51083133185 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/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index e9ae8df1a192..f265314fa6e9 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -153,12 +153,6 @@ public:
virtual void GetAttr( SfxItemSet& rOutAttrs ) = 0;
};
-class AbstractSdPrintDlg : public VclAbstractDialog //add for SdPrintDlg
-{
-public:
- virtual USHORT GetAttr() = 0;
-};
-
class AbstractSdPresLayoutDlg : public VclAbstractDialog //add for SdPresLayoutDlg
{
public:
@@ -206,7 +200,6 @@ public:
virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0;
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0;
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList ) = 0;
- virtual AbstractSdPrintDlg* CreateSdPrintDlg( ::Window* pWindow ) = 0; //add for SdPrintDlg
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0;
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0;
virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0;
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 0dad3ca237cb..f0d5cc64a3c4 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -141,8 +141,6 @@ public:
SD_DLLPUBLIC SvNumberFormatter* GetNumberFormatter();
- ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
-
//virtuelle Methoden fuer den Optionendialog
virtual SfxItemSet* CreateItemSet( USHORT nId );
virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 51a1a03d838a..e4125051c526 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 553f438669d2..1b87a6a9e10f 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();
@@ -60,10 +62,6 @@ namespace sd
returns the first shape if pObj is 0 */
SdrObject* getNextShape(SdrObject* pObj) const;
- /** returns the shape prior to the given shape in the list or 0
- returns the last shape if pObj is 0 */
- SdrObject* getPreviousShape( SdrObject* pObj ) const;
-
/**
*/
SdrObject* getNextShape();
@@ -76,6 +74,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/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 7dfeac99121b..fd9dbeae5977 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -68,7 +68,6 @@ public:
SfxStyleSheetBase* GetActualStyleSheet() { return mpActualStyleSheet; }
SfxStyleSheetBase* GetTitleSheet(const String& rLayoutName);
- String GetLayoutName() const;
// Caller muss Liste loeschen
List* CreateOutlineSheetList(const String& rLayoutName);
@@ -82,7 +81,6 @@ public:
when styles are missing.
*/
SD_DLLPUBLIC void CreateLayoutStyleSheets(const String& rLayoutName, sal_Bool bCheck = sal_False );
- void EraseLayoutStyleSheets(const String& rLayoutName);
List* CreateLayoutSheetNames(const String& rLayoutName) const;
void CreateLayoutSheetList(const String& rLayoutName, SdStyleSheetVector& rLayoutSheets);
void CopyLayoutSheets(const String& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets );
diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx
index ced8a48c5bb6..6fa186596fba 100644
--- a/sd/inc/textapi.hxx
+++ b/sd/inc/textapi.hxx
@@ -53,7 +53,6 @@ public:
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
OutlinerParaObject* CreateText();
- void SetString( const String& rText );
void SetText( OutlinerParaObject& rText );
String GetText();
diff --git a/sd/prj/build.lst b/sd/prj/build.lst
index 87204261b200..381e9bc6a3a2 100644
--- 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,5 +44,5 @@ 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
sd sd\qa\unoapi nmake - all sd_qa_unoapi NULL
diff --git a/sd/prj/d.lst b/sd/prj/d.lst
index fd21f7cd4b5b..14f85e982eab 100644
--- a/sd/prj/d.lst
+++ b/sd/prj/d.lst
@@ -8,16 +8,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\toolbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\fr
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\statusbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\statusbar
@@ -62,15 +52,6 @@ mkdir: %_DEST%\inc%_EXT%\sd
..\uiconfig\simpress\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\menubar\*.xml
..\uiconfig\sdraw\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\toolbar\*.xml
..\uiconfig\simpress\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\toolbar\*.xml
-..\uiconfig\sdraw\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\en-US\*.xml
-..\uiconfig\sdraw\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\de\*.xml
-..\uiconfig\sdraw\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\es\*.xml
-..\uiconfig\sdraw\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\fr\*.xml
-..\uiconfig\simpress\accelerator\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\*.xml
-..\uiconfig\simpress\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\en-US\*.xml
-..\uiconfig\simpress\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\de\*.xml
-..\uiconfig\simpress\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\es\*.xml
-..\uiconfig\simpress\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\fr\*.xml
..\uiconfig\sdraw\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\statusbar\*.xml
..\uiconfig\simpress\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\statusbar\*.xml
diff --git a/sd/sdi/TaskPaneViewShell.sdi b/sd/sdi/ToolPanelViewShell.sdi
similarity index 98%
rename from sd/sdi/TaskPaneViewShell.sdi
rename to sd/sdi/ToolPanelViewShell.sdi
index 22f0fba21265..a72342c52da5 100644
--- a/sd/sdi/TaskPaneViewShell.sdi
+++ b/sd/sdi/ToolPanelViewShell.sdi
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,7 +22,7 @@
*
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
+************************************************************************/
SfxVoidItem TaskPaneApplyToAllSlides SID_TP_APPLY_TO_ALL_SLIDES
[
@@ -302,7 +301,7 @@ shell LayoutMenu
import TaskPaneLayoutMenuInterface[Automation];
}
-shell TaskPaneViewShell
+shell ToolPanelViewShell
{
}
diff --git a/sd/sdi/ViewShellBase.sdi b/sd/sdi/ViewShellBase.sdi
index e9cb7119fa89..3602e711db1b 100644
--- a/sd/sdi/ViewShellBase.sdi
+++ b/sd/sdi/ViewShellBase.sdi
@@ -135,32 +135,6 @@ SfxBoolItem LeftPaneDraw SID_LEFT_PANE_DRAW
GroupId = GID_MODIFY;
]
-SfxBoolItem RightPane SID_RIGHT_PANE
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_MODIFY;
-]
-
SfxVoidItem NotesChildWindow SID_NOTES_WINDOW
[
@@ -239,7 +213,7 @@ SfxBoolItem SlideSorterMultiPaneGUI SID_SLIDE_SORTER_MULTI_PANE_GUI
GroupId = GID_MODIFY;
]
-SfxVoidItem TaskPaneShowPanel SID_TASK_PANE (
+SfxVoidItem TaskPaneShowPanel SID_SHOW_TOOL_PANEL (
SfxBoolItem IsPanelVisible ID_VAL_ISVISIBLE,
SfxUInt32Item PanelId ID_VAL_PANEL_INDEX)
[
@@ -280,7 +254,7 @@ interface ViewShellBaseView
ExecMethod = Execute;
StateMethod = GetState;
]
- SID_RIGHT_PANE
+ SID_TASKPANE
[
ExecMethod = Execute;
StateMethod = GetState;
@@ -325,7 +299,7 @@ interface ViewShellBaseView
ExecMethod = Execute;
StateMethod = GetState;
]
- SID_TASK_PANE
+ SID_SHOW_TOOL_PANEL
[
ExecMethod = Execute;
StateMethod = GetState;
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 53813365a686..6d0d3ef33ce9 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2173,6 +2173,21 @@ interface DrawView
ExecMethod = FuSupport ;
StateMethod = GetCtrlState ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
SID_TRANSLITERATE_LOWER // ole : no, status : ?
[
ExecMethod = FuSupport ;
diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi
index 4e2ca49c0b82..f4133f0f4643 100644
--- a/sd/sdi/drtxtob.sdi
+++ b/sd/sdi/drtxtob.sdi
@@ -202,5 +202,11 @@ shell TextObjectBar
ExecMethod = Execute;
StateMethod = GetAttrState;
]
+ SID_THES
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ ]
+
}
diff --git a/sd/sdi/makefile.mk b/sd/sdi/makefile.mk
index ab128c378afc..a950aad5d7a5 100644
--- a/sd/sdi/makefile.mk
+++ b/sd/sdi/makefile.mk
@@ -66,7 +66,7 @@ SVSDI1DEPEND= \
outlnvsh.sdi \
SlideSorterController.sdi \
ViewShellBase.sdi \
- TaskPaneViewShell.sdi \
+ ToolPanelViewShell.sdi \
sdslots.hrc \
$(PRJ)$/inc$/app.hrc
@@ -88,7 +88,7 @@ SVSDI2DEPEND= \
mediaob.sdi \
outlnvsh.sdi \
ViewShellBase.sdi \
- TaskPaneViewShell.sdi \
+ ToolPanelViewShell.sdi \
sdslots.hrc \
$(PRJ)$/inc$/app.hrc
diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi
index 1632b2fa4163..9639f1adc9dc 100644
--- a/sd/sdi/outlnvsh.sdi
+++ b/sd/sdi/outlnvsh.sdi
@@ -433,6 +433,21 @@ interface OutlineView
ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
SID_TRANSLITERATE_UPPER // ole : no, status : ?
[
ExecMethod = FuSupport ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 7c37e455276c..0e91fb2c9134 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/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi
index 21e60e6a1a79..fbfc8da1903b 100644
--- a/sd/sdi/sdslots.sdi
+++ b/sd/sdi/sdslots.sdi
@@ -104,5 +104,5 @@ ModulePrefix( "Sd" )
include "ViewShellBase.sdi"
include "mediaob.sdi"
include "tables.sdi"
- include "TaskPaneViewShell.sdi"
+ include "ToolPanelViewShell.sdi"
}
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 7852f7cc8fcf..33b9c233909b 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1809,15 +1809,6 @@ void EffectSequenceHelper::append( const CustomAnimationEffectPtr& pEffect )
// --------------------------------------------------------------------
-void EffectSequenceHelper::insert( EffectSequence::iterator& rPos, const CustomAnimationEffectPtr& pEffect )
-{
- pEffect->setEffectSequence( this );
- maEffects.insert( rPos, pEffect );
- rebuild();
-}
-
-// --------------------------------------------------------------------
-
CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPresetPtr& pPreset, const Any& rTarget, double fDuration /* = -1.0 */ )
{
CustomAnimationEffectPtr pEffect;
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index 3dcab46dce32..b9f23daedd90 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 708cf19aadd4..6ccf0d2f73cb 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);
@@ -1342,37 +1346,6 @@ void SdDrawDocument::CheckMasterPages()
}
}
-
-
-
-USHORT SdDrawDocument::CreatePage (USHORT nPageNum)
-{
- PageKind ePageKind = PK_STANDARD;
-
- // Get current page.
- SdPage* pActualPage = GetSdPage(nPageNum, ePageKind);
-
- // Get background flags.
- SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
- SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
-
- // Get layout from current page.
- AutoLayout eAutoLayout = pActualPage->GetAutoLayout();
-
- return CreatePage (
- pActualPage, ePageKind,
- // No names for the new slides.
- String(), String(),
- eAutoLayout, eAutoLayout,
- aVisibleLayers.IsSet(aBckgrnd),
- aVisibleLayers.IsSet(aBckgrndObj));
-}
-
-
-
-
USHORT SdDrawDocument::CreatePage (
SdPage* pActualPage,
PageKind ePageKind,
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index b615c7e76c05..89f74de30494 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -242,26 +242,6 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE));
- // only change paragraph text direction,
- // if this is a new document and
- // text direction is set explicitly to RTL
-/*
- if( mpDocSh &&
- mpDocSh->IsNewDocument() &&
- SD_MOD()->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB )
- {
- SvxAdjustItem aAdjust( SVX_ADJUST_RIGHT );
- SvxFrameDirectionItem aFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR );
-
- rISet.Put( aAdjust );
- rISet.Put( aFrameDirectionItem );
-
- pItemPool->SetPoolDefaultItem( aAdjust );
- pItemPool->SetPoolDefaultItem( aFrameDirectionItem );
- }
- else
- rISet.Put( SvxAdjustItem() );
-*/
rISet.Put( SdrTextLeftDistItem( 250 ) ); // sj: (i33745) using text frame distances seems to be a better default
rISet.Put( SdrTextRightDistItem( 250 ) );
rISet.Put( SdrTextUpperDistItem( 125 ) );
@@ -1119,57 +1099,6 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
}
}
-/*************************************************************************
-|*
-|* Sprachabhaengige Namen der StandardLayer durch eindeutigen Namen ersetzen
-|*
-\************************************************************************/
-
-void SdDrawDocument::MakeUniqueLayerNames()
-{
- String aLayerLayout(SdResId(STR_LAYER_LAYOUT));
- String aLayerBckgrnd(SdResId(STR_LAYER_BCKGRND));
- String aLayerBckgrndObj(SdResId(STR_LAYER_BCKGRNDOBJ));
- String aLayerControls(SdResId(STR_LAYER_CONTROLS));
- String aLayerMeasurelines(SdResId(STR_LAYER_MEASURELINES));
- SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- USHORT nStandardLayer = 5;
- USHORT nLayerCount = Min(rLayerAdmin.GetLayerCount(), nStandardLayer);
-
- for (USHORT nLayer = 0; nLayer < nLayerCount; nLayer++)
- {
- // Die sprachabhaengigen Namen der Default-Layer werden nicht mehr
- // gespeichert. Es werden stattdessen eindeutige Namen verwendet.
- SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer);
-
- if (pLayer)
- {
- String aLayerName(pLayer->GetName());
-
- if (aLayerName == aLayerLayout)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_LAYOUT" )));
- }
- else if (aLayerName == aLayerBckgrnd)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BCKGRND" )));
- }
- else if (aLayerName == aLayerBckgrndObj)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BACKGRNDOBJ" )));
- }
- else if (aLayerName == aLayerControls)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_CONTROLS" )));
- }
- else if (aLayerName == aLayerMeasurelines)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_MEASURELINES" )));
- }
- }
- }
-}
-
/*************************************************************************
|*
|* Eindeutige Namen der StandardLayer durch sprachabhaengige Namen ersetzen
@@ -1545,12 +1474,6 @@ SdStyleSheetPool* SdDrawDocument::GetSdStyleSheetPool() const
return dynamic_cast< SdStyleSheetPool* >( GetStyleSheetPool() );
}
-ModifyGuard::ModifyGuard( DrawDocShell* pDocShell )
-: mpDocShell( pDocShell ), mpDoc( 0 )
-{
- init();
-}
-
ModifyGuard::ModifyGuard( SdDrawDocument* pDoc )
: mpDocShell( 0 ), mpDoc( pDoc )
{
diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src
index e235ad266c3c..f1c7058ddf79 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 950d98a487e9..76450cf76760 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -60,6 +60,7 @@
#include
#include
#include
+#include
#include
@@ -158,22 +159,68 @@ SdPage::~SdPage()
delete mpItems;
}
-/** returns the nIndex'th object from the given PresObjKind, index starts with 1 */
-SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex )
+struct OrdNumSorter
{
- int nObjFound = 0; // index of the searched object
+ 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, bool bFuzzySearch /* = false */ )
+{
+ // 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(nIndex)) )
+ return aMatches[nIndex];
+
return 0;
}
@@ -272,6 +319,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
}
break;
+ case PRESOBJ_MEDIA:
case PRESOBJ_OBJECT:
{
pSdrObj = new SdrOle2Obj();
@@ -301,6 +349,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" )));
@@ -316,7 +365,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
pSdrObj = new SdrPageObj(0);
- pSdrObj->SetResizeProtect(TRUE);
+// pSdrObj->SetResizeProtect(TRUE);
}
break;
@@ -492,7 +541,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 +1133,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 +1159,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 +1387,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 +1402,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 +1455,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 +1506,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 +1516,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 +1524,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 +1552,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(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
@@ -1509,7 +1576,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;
@@ -1543,6 +1610,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
if( !bUndo )
SdrObject::Free( pObj );
}
+/* #i108541# keep non empty pres obj as pres obj even if they are not part of the current layout
else
{
if( bUndo )
@@ -1554,6 +1622,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
maPresentationShapeList.removeShape( *pObj );
pObj->SetUserCall(0);
}
+*/
}
pObj = pNext;
}
@@ -2047,7 +2116,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 +2175,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 +2262,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 +2282,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 +2345,9 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
}
}
+ if ( pObj && ( pObj->IsEmptyPresObj() || !pObj->ISA(SdrGrafObj) ) )
+ pObj->AdjustToMaxRect( aRect );
+
return pObj;
}
@@ -2655,7 +2727,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 ) );
}
@@ -2868,146 +2940,160 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
{
SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PK_HANDOUT );
- Size aArea = rHandoutMaster.GetSize();
-
- const long nGapW = 1000; // gap is 1cm
- const long nGapH = 1000;
-
- long nLeftBorder = rHandoutMaster.GetLftBorder();
- long nRightBorder = rHandoutMaster.GetRgtBorder();
- long nTopBorder = rHandoutMaster.GetUppBorder();
- long nBottomBorder = rHandoutMaster.GetLwrBorder();
-
- const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
-
- nTopBorder += nHeaderFooterHeight;
- nBottomBorder += nHeaderFooterHeight;
-
- long nX = nGapW + nLeftBorder;
- long nY = nGapH + nTopBorder;
-
- aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
- aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
-
- const bool bLandscape = aArea.Width() > aArea.Height();
-
- static sal_uInt16 aOffsets[5][9] =
+ if( eLayout == AUTOLAYOUT_NONE )
{
- { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, // AUTOLAYOUT_HANDOUT9, Portrait, Horizontal order
- { 0, 2, 4, 1, 3, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT3, Landscape, Vertical
- { 0, 2, 1, 3, 0, 0, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Landscape, Vertical
- { 0, 3, 1, 4, 2, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Portrait, Vertical
- { 0, 3, 6, 1, 4, 7, 2, 5, 8 }, // AUTOLAYOUT_HANDOUT9, Landscape, Vertical
- };
-
- sal_uInt16* pOffsets = aOffsets[0];
- USHORT nColCnt = 0, nRowCnt = 0;
- switch ( eLayout )
- {
- case AUTOLAYOUT_HANDOUT1:
- nColCnt = 1; nRowCnt = 1;
- break;
-
- case AUTOLAYOUT_HANDOUT2:
- if( bLandscape )
- {
- nColCnt = 2; nRowCnt = 1;
- }
- else
- {
- nColCnt = 1; nRowCnt = 2;
- }
- break;
-
- case AUTOLAYOUT_HANDOUT3:
- if( bLandscape )
- {
- nColCnt = 3; nRowCnt = 2;
- }
- else
- {
- nColCnt = 2; nRowCnt = 3;
- }
- pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
- break;
-
- case AUTOLAYOUT_HANDOUT4:
- nColCnt = 2; nRowCnt = 2;
- pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
- break;
-
- case AUTOLAYOUT_HANDOUT6:
- if( bLandscape )
- {
- nColCnt = 3; nRowCnt = 2;
- }
- else
- {
- nColCnt = 2; nRowCnt = 3;
- }
- if( !bHorizontal )
- pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
- break;
-
- default:
- case AUTOLAYOUT_HANDOUT9:
- nColCnt = 3; nRowCnt = 3;
-
- if( !bHorizontal )
- pOffsets = aOffsets[4];
- break;
- }
-
- rAreas.resize( nColCnt * nRowCnt );
-
- Size aPartArea, aSize;
- aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
- aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
-
- SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
- if ( pFirstPage )
- {
- // scale actual size into handout rect
- double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWdt();
-
- aSize.Height() = (long)(fScale * pFirstPage->GetHgt() );
- if( aSize.Height() > aPartArea.Height() )
+ // use layout from handout master
+ SdrObjListIter aShapeIter (rHandoutMaster);
+ while (aShapeIter.IsMore())
{
- fScale = (double)aPartArea.Height() / (double)pFirstPage->GetHgt();
- aSize.Height() = aPartArea.Height();
- aSize.Width() = (long)(fScale * pFirstPage->GetWdt());
+ SdrPageObj* pPageObj = dynamic_cast(aShapeIter.Next());
+ if (pPageObj)
+ rAreas.push_back( pPageObj->GetCurrentBoundRect() );
}
- else
- {
- aSize.Width() = aPartArea.Width();
- }
-
- nX += (aPartArea.Width() - aSize.Width()) / 2;
- nY += (aPartArea.Height()- aSize.Height())/ 2;
}
else
{
- aSize = aPartArea;
- }
+ Size aArea = rHandoutMaster.GetSize();
- Point aPos( nX, nY );
+ const long nGapW = 1000; // gap is 1cm
+ const long nGapH = 1000;
- const bool bRTL = rModel.GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB;
+ long nLeftBorder = rHandoutMaster.GetLftBorder();
+ long nRightBorder = rHandoutMaster.GetRgtBorder();
+ long nTopBorder = rHandoutMaster.GetUppBorder();
+ long nBottomBorder = rHandoutMaster.GetLwrBorder();
- const long nOffsetX = (aPartArea.Width() + nGapW) * (bRTL ? -1 : 1);
- const long nOffsetY = aPartArea.Height() + nGapH;
- const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) - nX : nX;
+ const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
- for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
- {
- aPos.X() = nStartX;
- for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++)
+ nTopBorder += nHeaderFooterHeight;
+ nBottomBorder += nHeaderFooterHeight;
+
+ long nX = nGapW + nLeftBorder;
+ long nY = nGapH + nTopBorder;
+
+ aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
+ aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
+
+ const bool bLandscape = aArea.Width() > aArea.Height();
+
+ static sal_uInt16 aOffsets[5][9] =
{
- rAreas[*pOffsets++] = Rectangle(aPos, aSize);
- aPos.X() += nOffsetX;
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, // AUTOLAYOUT_HANDOUT9, Portrait, Horizontal order
+ { 0, 2, 4, 1, 3, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT3, Landscape, Vertical
+ { 0, 2, 1, 3, 0, 0, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Landscape, Vertical
+ { 0, 3, 1, 4, 2, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Portrait, Vertical
+ { 0, 3, 6, 1, 4, 7, 2, 5, 8 }, // AUTOLAYOUT_HANDOUT9, Landscape, Vertical
+ };
+
+ sal_uInt16* pOffsets = aOffsets[0];
+ USHORT nColCnt = 0, nRowCnt = 0;
+ switch ( eLayout )
+ {
+ case AUTOLAYOUT_HANDOUT1:
+ nColCnt = 1; nRowCnt = 1;
+ break;
+
+ case AUTOLAYOUT_HANDOUT2:
+ if( bLandscape )
+ {
+ nColCnt = 2; nRowCnt = 1;
+ }
+ else
+ {
+ nColCnt = 1; nRowCnt = 2;
+ }
+ break;
+
+ case AUTOLAYOUT_HANDOUT3:
+ if( bLandscape )
+ {
+ nColCnt = 3; nRowCnt = 2;
+ }
+ else
+ {
+ nColCnt = 2; nRowCnt = 3;
+ }
+ pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
+ break;
+
+ case AUTOLAYOUT_HANDOUT4:
+ nColCnt = 2; nRowCnt = 2;
+ pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
+ break;
+
+ case AUTOLAYOUT_HANDOUT6:
+ if( bLandscape )
+ {
+ nColCnt = 3; nRowCnt = 2;
+ }
+ else
+ {
+ nColCnt = 2; nRowCnt = 3;
+ }
+ if( !bHorizontal )
+ pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
+ break;
+
+ default:
+ case AUTOLAYOUT_HANDOUT9:
+ nColCnt = 3; nRowCnt = 3;
+
+ if( !bHorizontal )
+ pOffsets = aOffsets[4];
+ break;
}
- aPos.Y() += nOffsetY;
+ rAreas.resize( nColCnt * nRowCnt );
+
+ Size aPartArea, aSize;
+ aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
+ aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
+
+ SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
+ if ( pFirstPage )
+ {
+ // scale actual size into handout rect
+ double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWdt();
+
+ aSize.Height() = (long)(fScale * pFirstPage->GetHgt() );
+ if( aSize.Height() > aPartArea.Height() )
+ {
+ fScale = (double)aPartArea.Height() / (double)pFirstPage->GetHgt();
+ aSize.Height() = aPartArea.Height();
+ aSize.Width() = (long)(fScale * pFirstPage->GetWdt());
+ }
+ else
+ {
+ aSize.Width() = aPartArea.Width();
+ }
+
+ nX += (aPartArea.Width() - aSize.Width()) / 2;
+ nY += (aPartArea.Height()- aSize.Height())/ 2;
+ }
+ else
+ {
+ aSize = aPartArea;
+ }
+
+ Point aPos( nX, nY );
+
+ const bool bRTL = rModel.GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB;
+
+ const long nOffsetX = (aPartArea.Width() + nGapW) * (bRTL ? -1 : 1);
+ const long nOffsetY = aPartArea.Height() + nGapH;
+ const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) - nX : nX;
+
+ for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
+ {
+ aPos.X() = nStartX;
+ for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++)
+ {
+ rAreas[*pOffsets++] = Rectangle(aPos, aSize);
+ aPos.X() += nOffsetX;
+ }
+
+ aPos.Y() += nOffsetY;
+ }
}
}
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index daefe45c3cb1..bf5b98471b53 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()
@@ -132,25 +170,6 @@ SdrObject* ShapeList::getNextShape(SdrObject* pObj) const
return 0;
}
-SdrObject* ShapeList::getPreviousShape( SdrObject* pObj ) const
-{
- if( pObj )
- {
- ListImpl::const_iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), pObj ) );
- if( (aIter != maShapeList.end()) && (aIter != maShapeList.begin()) )
- {
- aIter--;
- return (*aIter);
- }
- }
- else if( !maShapeList.empty() )
- {
- return (*--maShapeList.end());
- }
-
- return 0;
-}
-
void ShapeList::ObjectInDestruction(const SdrObject& rObject)
{
ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rObject ) );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index c91fee735954..138863cc313a 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -144,30 +144,6 @@ SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const String& rLayoutName)
return pResult;
}
-// ----------------------------------------------------------
-// find layout name of first layout
-// ----------------------------------------------------------
-
-String SdStyleSheetPool::GetLayoutName() const
-{
- String aName( SdResId(STR_LAYOUT_DEFAULT_NAME ) );
- sal_uInt32 nCount = aStyles.size();
-
- for( sal_uInt32 n = 0; n < nCount; n++ )
- {
- aName = aStyles[n]->GetName();
- sal_uInt16 nPos = aName.SearchAscii( SD_LT_SEPARATOR );
- if( nPos != STRING_NOTFOUND )
- break;
- }
-
- sal_uInt16 nPos = aName.Search( sal_Unicode( ' ' ));
- if( nPos != STRING_NOTFOUND )
- aName.Erase( nPos ); // removing blanks and number (e.g. "Gliederung 1")
-
- return aName;
-}
-
/*************************************************************************
|*
|* eine Liste der Gliederungstextvorlagen fuer ein Praesentationlayout
@@ -571,32 +547,6 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
DBG_ASSERT( !bCheck || !bCreated, "missing layout style sheets detected!" );
}
-/*************************************************************************
-|*
-|* StyleSheets des genannten Praesentationslayouts loeschen
-|*
-\************************************************************************/
-
-void SdStyleSheetPool::EraseLayoutStyleSheets(const String& rLayoutName)
-{
- SfxStyleSheetBase* pSheet = NULL;
-
- List* pNameList = CreateLayoutSheetNames(rLayoutName);
-
- String* pName = (String*)pNameList->First();
- while (pName)
- {
- pSheet = Find(*pName, SD_STYLE_FAMILY_MASTERPAGE);
- DBG_ASSERT(pSheet, "EraseLayoutStyleSheets: Vorlage nicht gefunden");
- if (pSheet)
- Remove(pSheet);
- delete pName;
- pName = (String*)pNameList->Next();
- }
- delete pNameList;
-}
-
-
/*************************************************************************
|*
|* Graphik-StyleSheets aus dem Quellpool in diesen Pool kopieren
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index 0856e867f4e1..ab6c69ee8fdc 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -118,7 +118,6 @@ public:
void Dispose();
void SetText( OutlinerParaObject& rText );
- void SetString( const String& rText );
OutlinerParaObject* CreateText();
String GetText();
SdDrawDocument* GetDoc() { return pImpl->mpDoc; }
@@ -177,16 +176,6 @@ OutlinerParaObject* TextApiObject::CreateText()
return mpSource->CreateText();
}
-void TextApiObject::SetString( const String& rText )
-{
- SdrModel* pModel = mpSource->GetDoc();
- if( pModel && pModel->IsUndoEnabled() )
- pModel->AddUndo( new UndoTextAPIChanged( *pModel, this ) );
-
- mpSource->SetString( rText );
- maSelection.nStartPara = 0xffff;
-}
-
void TextApiObject::SetText( OutlinerParaObject& rText )
{
SdrModel* pModel = mpSource->GetDoc();
@@ -288,22 +277,6 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText )
}
}
-void TextAPIEditSource::SetString( const String& rText )
-{
- if ( pImpl->mpDoc )
- {
- if( !pImpl->mpOutliner )
- {
- //init draw model first
- pImpl->mpOutliner = new Outliner( pImpl->mpDoc, OUTLINERMODE_TEXTOBJECT );
- pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
- }
- else
- pImpl->mpOutliner->Clear();
- pImpl->mpOutliner->Insert( rText );
- }
-}
-
OutlinerParaObject* TextAPIEditSource::CreateText()
{
if ( pImpl->mpDoc && pImpl->mpOutliner )
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index f3ec27d8093c..3d8797beb328 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -476,7 +476,6 @@ class GroupTable
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > &
GetCurrentGroupAccess() const { return mpGroupEntry[ mnCurrentGroupEntry - 1 ]->mXIndexAccess; };
sal_uInt32 GetGroupsClosed();
- void SkipCurrentGroup();
void ResetGroupTable( sal_uInt32 nCount );
void ClearGroupTable();
sal_Bool EnterGroup( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex );
@@ -534,7 +533,7 @@ class PortionObj : public PropStateValue
protected :
void ImplClear();
- void ImplConstruct( PortionObj& rPortionObj );
+ void ImplConstruct( const PortionObj& rPortionObj );
sal_uInt32 ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, String& rURL );
sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
@@ -567,13 +566,13 @@ class PortionObj : public PropStateValue
sal_Bool bLast, FontCollection& rFontCollection );
PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
FontCollection& rFontCollection );
- PortionObj( PortionObj& rPortionObj );
+ PortionObj( const PortionObj& rPortionObj );
~PortionObj();
void Write( SvStream* pStrm, sal_Bool bLast );
sal_uInt32 Count() const { return mnTextSize; };
- PortionObj& operator=( PortionObj& rPortionObj );
+ PortionObj& operator=( const PortionObj& rPortionObj );
};
struct ParaFlags
@@ -594,10 +593,9 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
protected :
- void ImplConstruct( ParagraphObj& rParagraphObj );
+ void ImplConstruct( const ParagraphObj& rParagraphObj );
void ImplClear();
sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
- ::com::sun::star::awt::Size ImplMapSize( const ::com::sun::star::awt::Size& rSize );
void ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue = FALSE );
void ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue = FALSE );
@@ -631,7 +629,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContentRef,
ParaFlags, FontCollection& rFontCollection,
PPTExBulletProvider& rBuProv );
- ParagraphObj( ParagraphObj& rParargraphObj );
+ ParagraphObj( const ParagraphObj& rParargraphObj );
ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
PPTExBulletProvider& rBuProv );
@@ -641,7 +639,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
void Write( SvStream* pStrm );
sal_uInt32 Count() const { return mnTextSize; };
- ParagraphObj& operator=( ParagraphObj& rParagraphObj );
+ ParagraphObj& operator=( const ParagraphObj& rParagraphObj );
};
struct ImplTextObj
@@ -659,13 +657,13 @@ struct ImplTextObj
class TextObj
{
- ImplTextObj* mpImplTextObj;
+ mutable ImplTextObj* mpImplTextObj;
void ImplCalculateTextPositions();
public :
TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > &
rXText, int nInstance, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv );
- TextObj( TextObj& rTextObj );
+ TextObj( const TextObj& rTextObj );
~TextObj();
void Write( SvStream* pStrm );
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index c9d083db86d9..f4462da6b8b8 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -312,14 +312,6 @@ sal_Bool GroupTable::GetNextGroupEntry()
// ---------------------------------------------------------------------------------------------
-void GroupTable::SkipCurrentGroup()
-{
- if ( mnCurrentGroupEntry )
- delete ( mpGroupEntry[ --mnCurrentGroupEntry ] );
-}
-
-// ---------------------------------------------------------------------------------------------
-
FontCollectionEntry::~FontCollectionEntry()
{
}
@@ -1869,7 +1861,7 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text
}
}
-PortionObj::PortionObj( PortionObj& rPortionObj )
+PortionObj::PortionObj( const PortionObj& rPortionObj )
: PropStateValue( rPortionObj )
{
ImplConstruct( rPortionObj );
@@ -2097,7 +2089,7 @@ void PortionObj::ImplClear()
delete[] mpText;
}
-void PortionObj::ImplConstruct( PortionObj& rPortionObj )
+void PortionObj::ImplConstruct( const PortionObj& rPortionObj )
{
mbLastPortion = rPortionObj.mbLastPortion;
mnTextSize = rPortionObj.mnTextSize;
@@ -2291,7 +2283,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
return nRetValue;
}
-PortionObj& PortionObj::operator=( PortionObj& rPortionObj )
+PortionObj& PortionObj::operator=( const PortionObj& rPortionObj )
{
if ( this != &rPortionObj )
{
@@ -2369,7 +2361,7 @@ ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::
}
}
-ParagraphObj::ParagraphObj( ParagraphObj& rObj )
+ParagraphObj::ParagraphObj( const ParagraphObj& rObj )
: List()
, PropStateValue()
, SOParagraph()
@@ -2878,7 +2870,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo
meBiDi = ePropState;
}
-void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
+void ParagraphObj::ImplConstruct( const ParagraphObj& rParagraphObj )
{
mnTextSize = rParagraphObj.mnTextSize;
mnTextAdjust = rParagraphObj.mnTextAdjust;
@@ -2891,8 +2883,9 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
mbForbiddenRules = rParagraphObj.mbForbiddenRules;
mnBiDi = rParagraphObj.mnBiDi;
- for ( void* pPtr = rParagraphObj.First(); pPtr; pPtr = rParagraphObj.Next() )
- Insert( new PortionObj( *(PortionObj*)pPtr ), LIST_APPEND );
+ ParagraphObj& rOther = const_cast(rParagraphObj);
+ for ( const void* pPtr = rOther.First(); pPtr; pPtr = rOther.Next() )
+ Insert( new PortionObj( *(const PortionObj*)pPtr ), LIST_APPEND );
maTabStop = rParagraphObj.maTabStop;
bExtendedParameters = rParagraphObj.bExtendedParameters;
@@ -2917,16 +2910,6 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
nBulletId = rParagraphObj.nBulletId;
}
-::com::sun::star::awt::Size ParagraphObj::ImplMapSize( const ::com::sun::star::awt::Size& rSize )
-{
- Size aSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) );
- if ( !aSize.Width() )
- aSize.Width()++;
- if ( !aSize.Height() )
- aSize.Height()++;
- return ::com::sun::star::awt::Size( aSize.Width(), aSize.Height() );
-}
-
sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition )
{
mnTextSize = 0;
@@ -2935,7 +2918,7 @@ sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosi
return mnTextSize;
}
-ParagraphObj& ParagraphObj::operator=( ParagraphObj& rParagraphObj )
+ParagraphObj& ParagraphObj::operator=( const ParagraphObj& rParagraphObj )
{
if ( this != &rParagraphObj )
{
@@ -2998,7 +2981,7 @@ TextObj::TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSim
ImplCalculateTextPositions();
}
-TextObj::TextObj( TextObj& rTextObj )
+TextObj::TextObj( const TextObj& rTextObj )
{
mpImplTextObj = rTextObj.mpImplTextObj;
mpImplTextObj->mnRefCount++;
@@ -4155,6 +4138,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag
ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, NULL, aExtBu, &aPropOpt );
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
*mpStrm << (sal_Int16)maRect.Top() << (sal_Int16)maRect.Left() << (sal_Int16)maRect.Right() << (sal_Int16)maRect.Bottom(); // oben, links, rechts, unten ????
@@ -5406,6 +5390,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
maRect.Justify();
if ( mnAngle )
ImplFlipBoundingBox( aPropOpt );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddClientAnchor( maRect );
@@ -5475,6 +5460,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
SvMemoryStream aExtBu( 0x200, 0x200 );
ImplWriteTextStyleAtom( *pClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOpt );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddClientAnchor( maRect );
@@ -5652,6 +5638,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x1000100 );
aPropOpt2.AddOpt( ESCHER_Prop_tableProperties, 1 );
aPropOpt2.AddOpt( ESCHER_Prop_tableRowProperties, sal_True, aMemStrm.Tell(), static_cast< sal_uInt8* >( const_cast< void* >( aMemStrm.GetData() ) ), aMemStrm.Tell() );
+ aPropOpt.CreateShapeProperties( rXShape );
aPropOpt.Commit( *mpStrm );
aPropOpt2.Commit( *mpStrm, 3, ESCHER_UDefProp );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx
index 5adcbd5fc56a..4bcb73535ba1 100644
--- a/sd/source/filter/html/htmlattr.cxx
+++ b/sd/source/filter/html/htmlattr.cxx
@@ -100,15 +100,3 @@ void SdHtmlAttrPreview::SetColors( Color& aBack, Color& aText, Color& aLink,
m_aVLinkColor = aVLink;
m_aALinkColor = aALink;
}
-
-// =====================================================================
-// =====================================================================
-void SdHtmlAttrPreview::GetColors( Color& aBack, Color& aText, Color& aLink,
- Color& aVLink, Color& aALink ) const
-{
- aBack = m_aBackColor;
- aText = m_aTextColor;
- aLink = m_aLinkColor;
- aVLink = m_aVLinkColor;
- aALink = m_aALinkColor;
-}
diff --git a/sd/source/filter/html/htmlattr.hxx b/sd/source/filter/html/htmlattr.hxx
index b076b2a29307..1caa16822ab1 100644
--- a/sd/source/filter/html/htmlattr.hxx
+++ b/sd/source/filter/html/htmlattr.hxx
@@ -46,8 +46,6 @@ public:
void SetColors( Color& aBack, Color& aText, Color& aLink,
Color& aVLink, Color& aALink );
- void GetColors( Color& aBack, Color& aText, Color& aLink,
- Color& aVLink, Color& aALink ) const;
};
#endif // _SD_HTMLATTR_HXX
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 82fabc73aed2..9de46771e14c 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3371,15 +3371,6 @@ BOOL HtmlErrorContext::GetString( ULONG, String& rCtxStr )
// =====================================================================
-void HtmlErrorContext::SetContext( USHORT nResId )
-{
- mnResId = nResId;
- maURL1.Erase();
- maURL2.Erase();
-}
-
-// =====================================================================
-
void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL )
{
mnResId = nResId;
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 34ca8182d22f..43bc12419f84 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -88,7 +88,6 @@ public:
virtual BOOL GetString( ULONG nErrId, String& rCtxStr );
- void SetContext( USHORT nResId );
void SetContext( USHORT nResId, const String& rURL );
void SetContext( USHORT nResId, const String& rURL1, const String& rURL2 );
};
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index a4a3564d35b0..25ac858ca319 100644
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -84,11 +84,6 @@ Ppt97Animation::Ppt97Animation( SvStream& rInputStream )
m_aAtom.ReadStream( rInputStream );
}
-Ppt97Animation::Ppt97Animation()
- : MEMBER_CONSTRUCTOR_LIST()
-{
-}
-
Ppt97Animation::Ppt97Animation( const Ppt97Animation& rAnimation )
: MEMBER_CONSTRUCTOR_LIST()
{
@@ -163,11 +158,12 @@ bool Ppt97Animation::HasAfterEffect_DimAtNextEffect() const
{
return m_aAtom.nAfterEffect == 2;
}
+#ifdef FUTURE
bool Ppt97Animation::HasAfterEffect_DimAfterEffect() const
{
return m_aAtom.nAfterEffect == 3;
}
-
+#endif
UINT32 Ppt97Animation::GetSoundRef() const
{
return m_aAtom.nSoundRef;
diff --git a/sd/source/filter/ppt/ppt97animations.hxx b/sd/source/filter/ppt/ppt97animations.hxx
index 4aa24ab12de8..c68ba9a19382 100644
--- a/sd/source/filter/ppt/ppt97animations.hxx
+++ b/sd/source/filter/ppt/ppt97animations.hxx
@@ -95,7 +95,6 @@ class Ppt97Animation
public: //public methods
Ppt97Animation( SvStream& rIn );
- Ppt97Animation();
Ppt97Animation( const Ppt97Animation& rAnimation );
Ppt97Animation& operator= ( const Ppt97Animation& rAnimation );
bool operator < ( const Ppt97Animation& rAnimation ) const;//later is greater
@@ -129,7 +128,9 @@ private: //private methods
bool HasAfterEffect() const;
bool HasAfterEffect_ChangeColor() const;
bool HasAfterEffect_DimAtNextEffect() const;
+#ifdef FUTURE
bool HasAfterEffect_DimAfterEffect() const;
+#endif
bool HasStopPreviousSound() const;
bool HasReverseOrder() const; //true if the text paragraphs should be animated in reverse order
sal_Int32 GetParagraphLevel() const; //paragraph level that is animated ( that paragraph and higher levels )
diff --git a/sd/source/filter/ppt/pptatom.cpp b/sd/source/filter/ppt/pptatom.cpp
index 21a0c3c3f9f8..0bd31c2119d5 100644
--- a/sd/source/filter/ppt/pptatom.cpp
+++ b/sd/source/filter/ppt/pptatom.cpp
@@ -49,7 +49,15 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream )
Atom* pLastAtom = NULL;
- while( (mrStream.GetError() == 0 ) && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
+ // retrieve file size (to allow sanity checks)
+ const sal_Size nStreamPos = mrStream.Tell();
+ mrStream.Seek( STREAM_SEEK_TO_END );
+ const sal_Size nStreamSize = mrStream.Tell();
+ mrStream.Seek( nStreamPos );
+
+ while( (mrStream.GetError() == 0 )
+ && ( mrStream.Tell() < nStreamSize )
+ && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
{
mrStream >> aChildHeader;
@@ -109,15 +117,3 @@ const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) co
return pChild;
}
-
-/** returns the next child atom after pLast with nRecType and nRecInstance or NULL */
-const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const
-{
- const Atom* pChild = pLast != NULL ? pLast->mpNextAtom : mpFirstChild;
- while( pChild && (pChild->maRecordHeader.nRecType != nRecType) && (pChild->maRecordHeader.nRecInstance != nRecInstance) )
- {
- pChild = findNextChildAtom( pChild );
- }
-
- return pChild;
-}
diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx
index 0b13dc314584..d430b7bffb7a 100644
--- a/sd/source/filter/ppt/pptatom.hxx
+++ b/sd/source/filter/ppt/pptatom.hxx
@@ -49,21 +49,12 @@ public:
/** returns true if at least one atim with the given nRecType is found */
inline bool hasChildAtom( sal_uInt16 nRecType ) const;
- /** returns true if at least one atim with the given nRecType and nRecInstnace is found */
- inline bool hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const;
-
/** returns the first child atom with nRecType or NULL */
inline const Atom* findFirstChildAtom( sal_uInt16 nRecType ) const;
/** returns the next child atom after pLast with nRecType or NULL */
const Atom* findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) const;
- /** returns the first child atom with nRecType and nRecInstance or NULL */
- inline const Atom* findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const;
-
- /** returns the next child atom after pLast with nRecType and nRecInstance or NULL */
- const Atom* findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const;
-
/** returns the first child atom or NULL */
inline const Atom* findFirstChildAtom() const;
@@ -99,11 +90,6 @@ inline bool Atom::hasChildAtom( sal_uInt16 nRecType ) const
return findFirstChildAtom( nRecType ) != NULL;
}
-inline bool Atom::hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const
-{
- return findFirstChildAtom( nRecType, nRecInstance ) != NULL;
-}
-
inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType ) const
{
return findNextChildAtom( nRecType, NULL );
@@ -114,11 +100,6 @@ inline const DffRecordHeader& Atom::getHeader() const
return maRecordHeader;
}
-inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const
-{
- return findNextChildAtom( nRecType, nRecInstance, NULL );
-}
-
inline const Atom* Atom::findFirstChildAtom() const
{
return mpFirstChild;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 59d5b5e0b98a..6a5ce08bc912 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/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 16fc1a99dd8a..10b0b152b8f4 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -1522,52 +1522,6 @@ void AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference<
// --------------------------------------------------------------------
-/* todo: for now we dump sub containers into its parent container, what else to do with it? */
-void AnimationImporter::importAnimationSubContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
-{
- DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importTimeContainer()!");
- if( pAtom && xNode.is() )
- {
- // import sub containers
- const Atom* pChildAtom = pAtom->findFirstChildAtom();
-
- while( pChildAtom )
- {
- switch( pChildAtom->getType() )
- {
- case DFF_msofbtAnimNode:
- case DFF_msofbtAnimEvent:
- case DFF_msofbtAnimValue:
- case DFF_msofbtAnimAction:
- case DFF_msofbtAnimPropertySet:
- break;
- case DFF_msofbtAnimCommand:
- {
- const OUString aServiceName( OUString::createFromAscii("com.sun.star.animations.Command") );
- Reference< XAnimationNode > xChildNode( ::comphelper::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY );
- importAnimationNodeContainer( pChildAtom, xChildNode );
- Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY );
- if( xParentContainer.is() && xChildNode.is() )
- xParentContainer->appendChild( xChildNode );
- }
- break;
-
- default:
- {
- dump_atom_header( pChildAtom, true, false );
- dump_atom( pChildAtom );
- dump_atom_header( pChildAtom, false, false );
- }
- break;
- }
-
- pChildAtom = pAtom->findNextChildAtom( pChildAtom );
- }
- }
-}
-
-// --------------------------------------------------------------------
-
void AnimationImporter::importAnimationNodeContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
{
DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importAnimationNodeContainer()!");
@@ -3894,14 +3848,6 @@ void AnimationImporter::dump_atom( const Atom* , bool )
{
}
-void AnimationImporter::dump( sal_uInt32 , bool )
-{
-}
-
-void AnimationImporter::dump_anim_group( const Atom* , const AnimationNode& , const PropertySet& , bool )
-{
-}
-
void AnimationImporter::dump_target( ::com::sun::star::uno::Any& )
{
}
@@ -3922,10 +3868,6 @@ void AnimationImporter::dump( const char * )
{
}
-void AnimationImporter::dump( const rtl::OUString& )
-{
-}
-
void AnimationImporter::dump( const char * , sal_Int32 )
{
}
diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx
index d29449361861..24f423029e82 100644
--- a/sd/source/filter/ppt/pptinanimations.hxx
+++ b/sd/source/filter/ppt/pptinanimations.hxx
@@ -62,7 +62,6 @@ private:
void importAnimationContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParent );
void importTimeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimationNodeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
- void importAnimationSubContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimateSetContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimateFilterContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
@@ -109,18 +108,18 @@ private:
#ifdef DBG_ANIM_LOG
FILE * mpFile;
+ void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
+ void dump( const rtl::OUString& rString );
+ void dump( sal_uInt32 nLen, bool bNewLine = true );
#endif
void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend );
void dump_atom( const Atom* pAtom, bool bNewLine = true );
- void dump( sal_uInt32 nLen, bool bNewLine = true );
- void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
void dump_target( ::com::sun::star::uno::Any& rAny );
void dump( ::com::sun::star::uno::Any& rAny );
void dump( const PropertySet& rSet );
void dump( const AnimationNode& rNode );
void dump( const char * pText );
- void dump( const rtl::OUString& rString );
void dump( const char * pText, sal_Int32 nInt );
void dump( const char * pText, double fDouble );
void dump( const char * pText, const char * pText2 );
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index e35eefbe3d10..510f0233667c 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -257,25 +257,21 @@ Reference SAL_CALL
if (mxParent.is())
{
- // SELECTABLE
+ // Unconditional states.
pStateSet->AddState(AccessibleStateType::SELECTABLE);
-
- // SELECTED
- if (mrSlideSorter.GetController().GetPageSelector().IsPageSelected(mnPageNumber))
- pStateSet->AddState(AccessibleStateType::SELECTED);
-
- // FOCUSABLE
pStateSet->AddState(AccessibleStateType::FOCUSABLE);
-
- // FOCUSED
- if (mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex() == mnPageNumber)
- if (mrSlideSorter.GetController().GetFocusManager().IsFocusShowing())
- pStateSet->AddState(AccessibleStateType::FOCUSED);
-
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::VISIBLE);
pStateSet->AddState(AccessibleStateType::SHOWING);
pStateSet->AddState(AccessibleStateType::ACTIVE);
+ pStateSet->AddState(AccessibleStateType::SENSITIVE);
+
+ // Conditional states.
+ if (mrSlideSorter.GetController().GetPageSelector().IsPageSelected(mnPageNumber))
+ pStateSet->AddState(AccessibleStateType::SELECTED);
+ if (mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex() == mnPageNumber)
+ if (mrSlideSorter.GetController().GetFocusManager().IsFocusShowing())
+ pStateSet->AddState(AccessibleStateType::FOCUSED);
}
return pStateSet;
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 5cf595fced13..91c09b55697d 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -65,7 +65,7 @@ namespace accessibility {
/** Inner implementation class of the AccessibleSlideSorterView.
Note that some event broadcasting is done asynchronously because
- otherwise it could lead to deadlocks on (at lease) some Solaris
+ otherwise it could lead to deadlocks on (at least) some Solaris
machines. Probably (but unverified) this can happen on all GTK based
systems. The asynchronous broadcasting is just a workaround for a
poorly understood problem.
diff --git a/sd/source/ui/accessibility/AccessibleTaskPane.cxx b/sd/source/ui/accessibility/AccessibleTaskPane.cxx
deleted file mode 100644
index c2a2dafef296..000000000000
--- a/sd/source/ui/accessibility/AccessibleTaskPane.cxx
+++ /dev/null
@@ -1,94 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "AccessibleTaskPane.hxx"
-
-#include "AccessibleTreeNode.hxx"
-
-#include "taskpane/ToolPanel.hxx"
-#include "taskpane/ControlContainer.hxx"
-#include "taskpane/TitledControl.hxx"
-#include
-
-#include
-#include
-
-using namespace ::rtl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-namespace accessibility {
-
-AccessibleTaskPane::AccessibleTaskPane (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> & rxParent,
- const OUString& rsName,
- const OUString& rsDescription,
- ::sd::toolpanel::ToolPanel& rTaskPane)
- : AccessibleTreeNode(
- rxParent,
- rTaskPane,
- rsName,
- rsDescription,
- AccessibleRole::PANEL)
-{
-}
-
-
-
-
-AccessibleTaskPane::~AccessibleTaskPane (void)
-{
-}
-
-
-
-
-//===== XServiceInfo ========================================================
-
-OUString SAL_CALL
- AccessibleTaskPane::getImplementationName (void)
- throw (RuntimeException)
-{
- return OUString(RTL_CONSTASCII_USTRINGPARAM("AccessibleTaskPane"));
-}
-
-
-
-
-void AccessibleTaskPane::UpdateStateSet (void)
-{
- // The task pane itself can not be focused.
- UpdateState(AccessibleStateType::FOCUSED, false);
-}
-
-
-} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
index ad8d8facf9da..5c7462581d0b 100644
--- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx
+++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
@@ -714,6 +714,7 @@ IMPL_LINK(AccessibleTreeNode, WindowEventListener, VclWindowEvent*, pEvent)
case VCLEVENT_WINDOW_GETFOCUS:
case VCLEVENT_WINDOW_LOSEFOCUS:
UpdateStateSet();
+ break;
}
return 1;
}
diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
index 70734ac23198..de5342afd23f 100644
--- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
+++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
@@ -44,18 +44,6 @@ namespace accessibility {
May change in the future.
*/
-AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId)
- : mpView (pView),
- mnWindowId (nWindowId),
- mrDevice (pView->GetPaintWindow((sal_uInt32)nWindowId)->GetOutputDevice())
-{
- OSL_ASSERT (mpView != NULL);
- // empty
-}
-
-
-
-
AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice)
: mpView (pView),
mnWindowId (0),
@@ -86,15 +74,6 @@ AccessibleViewForwarder::~AccessibleViewForwarder (void)
-void AccessibleViewForwarder::SetView (SdrPaintView* pView)
-{
- mpView = pView;
- OSL_ASSERT (mpView != NULL);
-}
-
-
-
-
sal_Bool AccessibleViewForwarder::IsValid (void) const
{
return sal_True;
diff --git a/sd/source/ui/accessibility/makefile.mk b/sd/source/ui/accessibility/makefile.mk
index d5eb47b06149..25d79aa7f8da 100755
--- a/sd/source/ui/accessibility/makefile.mk
+++ b/sd/source/ui/accessibility/makefile.mk
@@ -56,7 +56,6 @@ SLOFILES = \
$(SLO)$/AccessibleScrollPanel.obj \
$(SLO)$/AccessibleSlideSorterView.obj \
$(SLO)$/AccessibleSlideSorterObject.obj \
- $(SLO)$/AccessibleTaskPane.obj \
$(SLO)$/AccessibleTreeNode.obj \
$(SLO)$/SdShapeTypes.obj
diff --git a/sd/source/ui/animations/AnimationSchemesPane.cxx b/sd/source/ui/animations/AnimationSchemesPane.cxx
deleted file mode 100644
index 337dc64331fd..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.cxx
+++ /dev/null
@@ -1,443 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-#include "AnimationSchemesPane.hxx"
-#include "AnimationSchemesPane.hrc"
-#include "CustomAnimation.hrc"
-
-#include "TransitionPreset.hxx"
-#include "sdresid.hxx"
-#include "ViewShellBase.hxx"
-#include "DrawDocShell.hxx"
-#include "SlideSorterViewShell.hxx"
-#include "drawdoc.hxx"
-#include "filedlg.hxx"
-#include "strings.hrc"
-#include "EventMultiplexer.hxx"
-#include
-
-#ifndef _SVT_CONTROLDIMS_HRC_
-#include
-#endif
-#include
-#include
-#include
-#include
-
-#include
-
-
-using namespace ::com::sun::star;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::rtl::OUString;
-using ::com::sun::star::uno::RuntimeException;
-
-// ______________________
-//
-// Local Helper Functions
-// ______________________
-
-namespace
-{
-
-typedef ::boost::shared_ptr
- SharedPageSelection;
-SharedPageSelection lcl_getSelectedPages (::sd::ViewShellBase& rBase)
-{
- ::sd::slidesorter::SlideSorterViewShell*pSlideSorterViewShell
- = ::sd::slidesorter::SlideSorterViewShell::GetSlideSorter(rBase);
- DBG_ASSERT( pSlideSorterViewShell, "No Slide-Sorter available" );
-
- if (pSlideSorterViewShell != NULL)
- {
- return pSlideSorterViewShell->GetPageSelection();
- }
- else
- {
- return SharedPageSelection(new sd::slidesorter::SlideSorterViewShell::PageSelection());
- }
-}
-
-// void lcl_ApplyToPages( ::std::vector< SdPage * > aPages, const ::sd::impl::TransitionEffect & rEffect )
-// {
-// ::std::vector< SdPage * >::const_iterator aIt( aPages.begin());
-// const ::std::vector< SdPage * >::const_iterator aEndIt( aPages.end());
-// for( ; aIt != aEndIt; ++aIt )
-// {
-// rEffect.applyTo( *(*aIt) );
-// }
-// }
-
-} // anonymous namespace
-
-namespace sd
-{
-
-// ____________________
-//
-// AnimationSchemesPane
-// ____________________
-
-AnimationSchemesPane::AnimationSchemesPane(
- ::Window * pParent,
- ViewShellBase & rBase,
- SdDrawDocument* pDoc ) :
- Control( pParent, SdResId( DLG_ANIMATION_SCHEMES_PANE ) ),
-
- mrBase( rBase ),
- mpDrawDoc( pDoc ),
- maFL_APPLY_SCHEME( this, SdResId( FL_APPLY_SCHEME ) ),
- maLB_ANIMATION_SCHEMES( this, SdResId( LB_ANIMATION_SCHEMES ) ),
- maFL_EMPTY1( this, SdResId( FL_EMPTY1 ) ),
- maPB_APPLY_TO_ALL( this, SdResId( PB_APPLY_TO_ALL ) ),
- maPB_PLAY( this, SdResId( PB_PLAY ) ),
- maPB_SLIDE_SHOW( this, SdResId( PB_SLIDE_SHOW ) ),
- maFL_EMPTY2( this, SdResId( FL_EMPTY2 ) ),
- maCB_AUTO_PREVIEW( this, SdResId( CB_AUTO_PREVIEW ) ),
-
- maSTR_NO_SCHEME( SdResId( STR_NO_SCHEME ) ),
- mbHasSelection( false ),
- mbUpdatingControls( false ),
- mbIsMainViewChangePending( false )
-{
- // use no resource ids from here on
- FreeResource();
-
- if( pDoc )
- mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY );
- // TODO: get correct view
- if( mxModel.is())
- mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY );
-
- // fill list box of slide transitions
- maLB_ANIMATION_SCHEMES.InsertEntry( maSTR_NO_SCHEME );
-
- // set defaults
- maCB_AUTO_PREVIEW.Check(); // automatic preview on
-
- // update control states before adding handlers
- updateLayout();
- updateControls();
-
- // set handlers
- maPB_APPLY_TO_ALL.SetClickHdl( LINK( this, AnimationSchemesPane, ApplyToAllButtonClicked ));
- maPB_PLAY.SetClickHdl( LINK( this, AnimationSchemesPane, PlayButtonClicked ));
- maPB_SLIDE_SHOW.SetClickHdl( LINK( this, AnimationSchemesPane, SlideShowButtonClicked ));
-
- maLB_ANIMATION_SCHEMES.SetSelectHdl( LINK( this, AnimationSchemesPane, SchemeSelected ));
-
- addListener();
-}
-
-AnimationSchemesPane::~AnimationSchemesPane()
-{
- removeListener();
-}
-
-void AnimationSchemesPane::Resize()
-{
- updateLayout();
-}
-
-void AnimationSchemesPane::onSelectionChanged()
-{
- updateControls();
-}
-
-void AnimationSchemesPane::onChangeCurrentPage()
-{
- updateControls();
-}
-
-void AnimationSchemesPane::updateLayout()
-{
- ::Size aPaneSize( GetSizePixel() );
-
- // start layouting elements from bottom to top. The remaining space is used
- // for the topmost list box
- ::Point aOffset( LogicToPixel( Point( 3, 3 ), MAP_APPFONT ) );
- long nOffsetX = aOffset.getX();
- long nOffsetY = aOffset.getY();
- long nOffsetBtnX = LogicToPixel( Point( 6, 1 ), MAP_APPFONT ).getX();
-
- ::Point aUpperLeft( nOffsetX, aPaneSize.getHeight() - nOffsetY );
- long nMaxWidth = aPaneSize.getWidth() - 2 * nOffsetX;
-
- // auto preview check-box
- ::Size aCtrlSize = maCB_AUTO_PREVIEW.GetSizePixel();
- aCtrlSize.setWidth( maCB_AUTO_PREVIEW.CalcMinimumSize( nMaxWidth ).getWidth());
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maCB_AUTO_PREVIEW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above check-box
- aCtrlSize = maFL_EMPTY2.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY2.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // buttons "Play" and "Slide Show"
- long nPlayButtonWidth = maPB_PLAY.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
- long nSlideShowButtonWidth = maPB_SLIDE_SHOW.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
-
- if( (nPlayButtonWidth + nSlideShowButtonWidth + nOffsetX) <= nMaxWidth )
- {
- // place buttons side by side
- aCtrlSize = maPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nPlayButtonWidth );
- maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aUpperLeft.setX( aUpperLeft.getX() + nPlayButtonWidth + nOffsetX );
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
- aUpperLeft.setX( nOffsetX );
- }
- else
- {
- // place buttons on top of each other
- aCtrlSize = maPB_SLIDE_SHOW.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = maPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- aCtrlSize.setWidth( nPlayButtonWidth );
- maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
- }
-
- // "Apply to All Slides" button
- aCtrlSize = maPB_APPLY_TO_ALL.GetSizePixel();
- aCtrlSize.setWidth( maPB_APPLY_TO_ALL.CalcMinimumSize( nMaxWidth ).getWidth() + 2 * nOffsetBtnX );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- maPB_APPLY_TO_ALL.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above "Apply to All Slides" button
- aCtrlSize = maFL_EMPTY1.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY1.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line "Apply to selected slides"
- aCtrlSize = maFL_APPLY_SCHEME.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- ::Point aUpperLeftCorner( nOffsetX, nOffsetY );
- maFL_APPLY_SCHEME.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
- aUpperLeftCorner.setY( aUpperLeftCorner.getY() + aCtrlSize.getHeight() + nOffsetY );
- aUpperLeft.setY( aUpperLeft.getY() - nOffsetY );
-
- // list box animation scheme
- aCtrlSize.setWidth( nMaxWidth );
- aCtrlSize.setHeight( aUpperLeft.getY() - aUpperLeftCorner.getY() );
- maLB_ANIMATION_SCHEMES.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
-}
-
-void AnimationSchemesPane::updateControls()
-{
- SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase ));
- if( aSelectedPages->empty())
- {
- mbHasSelection = false;
- return;
- }
- mbHasSelection = true;
-
- DBG_ASSERT( ! mbUpdatingControls, "Multiple Control Updates" );
- mbUpdatingControls = true;
-
- // get model data for first page
-#ifdef DBG_UTIL
- SdPage * pFirstPage = aSelectedPages->front();
- DBG_ASSERT( pFirstPage, "Invalid Page" );
-#endif
-
-// // merge with other pages
-// ::std::vector< SdPage * >::const_iterator aIt( aSelectedPages.begin());
-// const ::std::vector< SdPage * >::const_iterator aEndIt( aSelectedPages.end());
-
-// // start with second page (note aIt != aEndIt, because ! aSelectedPages.empty())
-// for( ++aIt ;aIt != aEndIt; ++aIt )
-// {
-// if( *aIt )
-// // merge
-// }
-
- mbUpdatingControls = false;
-
- updateControlState();
-}
-
-void AnimationSchemesPane::updateControlState()
-{
- maLB_ANIMATION_SCHEMES.Enable( mbHasSelection );
-
- maPB_APPLY_TO_ALL.Enable( mbHasSelection );
- maPB_PLAY.Enable( mbHasSelection );
-// maPB_SLIDE_SHOW.Enable( TRUE );
- maCB_AUTO_PREVIEW.Enable( mbHasSelection );
-}
-
-void AnimationSchemesPane::getAnimationSchemeFromControls() const
-{
- // TODO: Implement
-}
-
-void AnimationSchemesPane::applyToSelectedPages()
-{
- if( ! mbUpdatingControls )
- {
- SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase ));
- if( ! aSelectedPages->empty())
- {
-// lcl_ApplyToPages( aSelectedPages, getAnimationSchemeFromControls() );
- }
- if( maCB_AUTO_PREVIEW.IsEnabled() &&
- maCB_AUTO_PREVIEW.IsChecked())
- {
- playCurrentScheme();
- }
- }
-}
-
-void AnimationSchemesPane::playCurrentScheme()
-{
- // TODO: Implement a preview in the center view
-}
-
-void AnimationSchemesPane::addListener()
-{
- Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) );
- mrBase.GetEventMultiplexer()->AddEventListener(
- aLink,
- tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
- | tools::EventMultiplexerEvent::EID_CURRENT_PAGE
- | tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
- | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
- | tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED);
-}
-
-void AnimationSchemesPane::removeListener()
-{
- Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) );
- mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
-}
-
-IMPL_LINK(AnimationSchemesPane,EventMultiplexerListener,
- tools::EventMultiplexerEvent*,pEvent)
-{
- switch (pEvent->meEventId)
- {
- case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
- onSelectionChanged();
- break;
-
- case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
- onChangeCurrentPage();
- break;
-
- case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = Reference();
- onSelectionChanged();
- onChangeCurrentPage();
- break;
-
- case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
- mbIsMainViewChangePending = true;
- break;
-
- case tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED:
- if (mbIsMainViewChangePending)
- {
- mbIsMainViewChangePending = false;
- mxView = Reference::query( mxModel->getCurrentController() );
- onSelectionChanged();
- onChangeCurrentPage();
- }
- break;
- }
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, ApplyToAllButtonClicked, void *, EMPTYARG )
-{
- DBG_ASSERT( mpDrawDoc, "Invalid Draw Document!" );
- if( !mpDrawDoc )
- return 0;
-
- ::std::vector< SdPage * > aPages;
-
- sal_uInt16 nPageCount = mpDrawDoc->GetSdPageCount( PK_STANDARD );
- aPages.reserve( nPageCount );
- for( sal_uInt16 i=0; iGetSdPage( i, PK_STANDARD );
- if( pPage )
- aPages.push_back( pPage );
- }
-
-// if( ! aPages.empty())
-// lcl_ApplyToPages( aPages, getAnimationSchemeFromControls() );
-
- return 0;
-}
-
-
-IMPL_LINK( AnimationSchemesPane, PlayButtonClicked, void *, EMPTYARG )
-{
- playCurrentScheme();
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, SlideShowButtonClicked, void *, EMPTYARG )
-{
- mrBase.StartPresentation();
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, SchemeSelected, void *, EMPTYARG )
-{
- applyToSelectedPages();
- return 0;
-}
-
-::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase )
-{
- ::Window* pWindow = 0;
-
- DrawDocShell* pDocSh = rBase.GetDocShell();
- if( pDocSh )
- pWindow = new AnimationSchemesPane( pParent, rBase, pDocSh->GetDoc() );
-
- return pWindow;
-}
-
-
-} // namespace sd
diff --git a/sd/source/ui/animations/AnimationSchemesPane.hrc b/sd/source/ui/animations/AnimationSchemesPane.hrc
deleted file mode 100644
index 2b9ec9be3611..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.hrc
+++ /dev/null
@@ -1,50 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SD_ANIMATIONSCHEMESPANE_HRC
-#define _SD_ANIMATIONSCHEMESPANE_HRC
-
-#define FL_APPLY_SCHEME 1
-// spec: 1
-#define LB_ANIMATION_SCHEMES 2
-
-#define FL_EMPTY1 3
-// spec: 2
-#define PB_APPLY_TO_ALL 4
-// spec: 3
-#define PB_PLAY 5
-// spec: 4
-#define PB_SLIDE_SHOW 6
-
-#define FL_EMPTY2 7
-// spec: 5
-#define CB_AUTO_PREVIEW 8
-
-#define STR_NO_SCHEME 9
-
-
-#endif // _SD_ANIMATIONSCHEMESPANE_HRC
diff --git a/sd/source/ui/animations/AnimationSchemesPane.hxx b/sd/source/ui/animations/AnimationSchemesPane.hxx
deleted file mode 100644
index 8528e5e6ef64..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.hxx
+++ /dev/null
@@ -1,114 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef SD_ANIMATIONSCHEMESPANE_HXX
-#define SD_ANIMATIONSCHEMESPANE_HXX
-
-#include
-#include
-#include
-#ifndef _SV_BUTTON_HXX
-#include
-#endif
-#include
-#include
-#include
-
-#include
-
-class SdDrawDocument;
-class SdPage;
-
-namespace sd { namespace tools {
-class EventMultiplexerEvent;
-} }
-
-namespace sd
-{
-
-class ViewShellBase;
-
-class AnimationSchemesPane : public Control
-{
-public:
- explicit AnimationSchemesPane(
- ::Window * pParent,
- ViewShellBase & rBase,
- SdDrawDocument* pDoc );
- virtual ~AnimationSchemesPane();
-
- virtual void Resize();
-
- void onSelectionChanged();
- void onChangeCurrentPage();
-
-private:
- void updateLayout();
- void updateControls();
- void updateControlState();
-
- void applyToSelectedPages();
- void playCurrentScheme();
-
- void addListener();
- void removeListener();
-
- void getAnimationSchemeFromControls() const;
-
- DECL_LINK( ApplyToAllButtonClicked, void * );
- DECL_LINK( PlayButtonClicked, void * );
- DECL_LINK( SlideShowButtonClicked, void * );
-
- DECL_LINK( SchemeSelected, void * );
- DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
-
-private:
- ViewShellBase & mrBase;
- SdDrawDocument * mpDrawDoc;
-
- FixedLine maFL_APPLY_SCHEME;
- ListBox maLB_ANIMATION_SCHEMES;
- FixedLine maFL_EMPTY1;
- PushButton maPB_APPLY_TO_ALL;
- PushButton maPB_PLAY;
- PushButton maPB_SLIDE_SHOW;
- FixedLine maFL_EMPTY2;
- CheckBox maCB_AUTO_PREVIEW;
-
- String maSTR_NO_SCHEME;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
-
- bool mbHasSelection;
- bool mbUpdatingControls;
- bool mbIsMainViewChangePending;
-};
-
-} // namespace sd
-
-// SD_ANIMATIONSCHEMESPANE_HXX
-#endif
diff --git a/sd/source/ui/animations/AnimationSchemesPane.src b/sd/source/ui/animations/AnimationSchemesPane.src
deleted file mode 100644
index 12447c917930..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.src
+++ /dev/null
@@ -1,113 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "CustomAnimation.hrc"
-#include "AnimationSchemesPane.hrc"
-#include "helpids.h"
-
-#ifndef _SVT_CONTROLDIMS_HRC_
-#include
-#endif
-
-// Note: Sizes of 1 usually mean they are auto-calculated
-
-Control DLG_ANIMATION_SCHEMES_PANE
-{
- OutputSize = TRUE;
- Size = MAP_APPFONT( 1, 1 );
-
- Text [ en-US ] = "Animation Schemes";
-
- FixedLine FL_APPLY_SCHEME
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Apply to selected slides ";
- };
-
- ListBox LB_ANIMATION_SCHEMES
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES;
- Border = TRUE ;
- TabStop = TRUE ;
-
- Size = MAP_APPFONT( 1, 1 );
- };
-
- FixedLine FL_EMPTY1
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- PushButton PB_APPLY_TO_ALL
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Apply to All Slides";
- };
-
-
- PushButton PB_PLAY
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Play";
- };
-
- PushButton PB_SLIDE_SHOW
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Slide Show";
- };
-
- FixedLine FL_EMPTY2
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- Checkbox CB_AUTO_PREVIEW
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW;
- Size = MAP_APPFONT( 1, RSC_CD_CHECKBOX_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Automatic preview";
- };
-
- // --------------------
-
- String STR_NO_SCHEME
- {
- Text [ en-US ] = "No Animation";
- };
-};
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 3ac3d1f24a07..f76b84d29826 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -92,7 +92,6 @@ extern void fillDurationComboBox( ComboBox* pBox );
class CategoryListBox : public ListBox
{
public:
- CategoryListBox( Window* pParent, WinBits nStyle = WB_BORDER );
CategoryListBox( Window* pParent, const ResId& rResId );
~CategoryListBox();
@@ -110,12 +109,6 @@ private:
Link maDoubleClickHdl;
};
-CategoryListBox::CategoryListBox( Window* pParent, WinBits nStyle /* = WB_BORDER */ )
-: ListBox( pParent, nStyle )
-{
- EnableUserDraw( TRUE );
-}
-
CategoryListBox::CategoryListBox( Window* pParent, const ResId& rResId )
: ListBox( pParent, rResId )
{
diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc b/sd/source/ui/animations/CustomAnimationSchemesPane.hrc
deleted file mode 100644
index 70168d2662cf..000000000000
--- a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc
+++ /dev/null
@@ -1,32 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
-#define _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
-
-
-#endif // _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
\ No newline at end of file
diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.src b/sd/source/ui/animations/CustomAnimationSchemesPane.src
deleted file mode 100644
index 1499b79bbb4b..000000000000
--- a/sd/source/ui/animations/CustomAnimationSchemesPane.src
+++ /dev/null
@@ -1,71 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "CustomAnimation.hrc"
-
-ModalDialog DLG_CUSTOMANIMATION_SCHEMES_PANE
-{
- DialogControl = TRUE;
-
- Text [ en-US ] = "Animation Schemes";
-
- Fixedline 1
- {
- Text [ en-US ] = "Apply to selected slides";
- };
-
- PushButton 1
- {
- Text [ en-US ] = "Apply to All Slides";
- };
-
- PushButton 2
- {
- Text [ en-US ] = "Play";
- };
-
- PushButton 3
- {
- Text [ en-US ] = "Slide Show";
- };
-
- Checkbox 4
- {
- Text [ en-US ] = "Automatic preview";
- };
-
- String 2
- {
- Text [ en-US ] = "No Animation";
- };
-
- String 3
- {
- Text [ en-US ] = "Recently used Schemes";
- };
-};
-
diff --git a/sd/source/ui/animations/makefile.mk b/sd/source/ui/animations/makefile.mk
index 2194dad6eafc..db010bf4ef23 100644
--- a/sd/source/ui/animations/makefile.mk
+++ b/sd/source/ui/animations/makefile.mk
@@ -42,16 +42,13 @@ ENABLE_EXCEPTIONS=TRUE
SRS1NAME=$(TARGET)
SRC1FILES =\
- AnimationSchemesPane.src\
CustomAnimationPane.src\
CustomAnimationDialog.src\
CustomAnimationCreateDialog.src\
SlideTransitionPane.src\
- CustomAnimationSchemesPane.src\
CustomAnimation.src
SLOFILES = \
- $(SLO)$/AnimationSchemesPane.obj \
$(SLO)$/CustomAnimationCreateDialog.obj\
$(SLO)$/CustomAnimationDialog.obj\
$(SLO)$/CustomAnimationPane.obj \
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index aa42fec50f9c..1e64617edab8 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -971,7 +971,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
}
return 0;
}
-
+#if 0
OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation )
{
OUString sRet;
@@ -994,7 +994,7 @@ OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< :
return sRet;
}
-
+#endif
void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation > xAnnotation, ::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ )
{
diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx
index 43b53d8467f9..70b95c2a509b 100755
--- a/sd/source/ui/annotations/annotationmanagerimpl.hxx
+++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx
@@ -99,9 +99,9 @@ public:
void onTagDeselected( AnnotationTag& rTag );
void onSelectionChanged();
-
+#if 0
rtl::OUString GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation );
-
+#endif
void addListener();
void removeListener();
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index ad6709c776ce..a4642bb68096 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -136,14 +136,25 @@ AnnotationTextWindow::~AnnotationTextWindow()
void AnnotationTextWindow::Paint( const Rectangle& rRect)
{
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ if ( !bHighContrast )
{
DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
Gradient(GRADIENT_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
}
if( mpOutlinerView )
+ {
+ Color aBackgroundColor( mpAnnotationWindow->maColor );
+ if( bHighContrast )
+ {
+ aBackgroundColor = GetSettings().GetStyleSettings().GetWindowColor();
+ }
+
+ mpOutlinerView->SetBackgroundColor( aBackgroundColor );
+
mpOutlinerView->Paint( rRect );
+ }
}
void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt )
@@ -493,12 +504,6 @@ void AnnotationWindow::ResizeIfNeccessary(long aOldHeight, long aNewHeight)
}
}
-void AnnotationWindow::SetReadonly(bool bSet)
-{
- mbReadonly = bSet;
- getView()->SetReadOnly(bSet);
-}
-
void AnnotationWindow::SetLanguage(const SvxLanguageItem aNewItem)
{
Engine()->SetModifyHdl( Link() );
@@ -615,16 +620,34 @@ void AnnotationWindow::SetColor()
{
sal_uInt16 nAuthorIdx = mpDoc->GetAnnotationAuthorIndex( mxAnnotation->getAuthor() );
- maColor = mrManager.GetColor( nAuthorIdx );
- maColorDark = mrManager.GetColorDark( nAuthorIdx );
- maColorLight = mrManager.GetColorLight( nAuthorIdx );
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ if( bHighContrast )
+ {
+ StyleSettings aStyleSettings = GetSettings().GetStyleSettings();
+
+ maColor = aStyleSettings.GetWindowColor();
+ maColorDark = maColor;
+ maColorLight = aStyleSettings.GetWindowTextColor();
+ }
+ else
+ {
+ maColor = mrManager.GetColor( nAuthorIdx );
+ maColorDark = mrManager.GetColorDark( nAuthorIdx );
+ maColorLight = mrManager.GetColorLight( nAuthorIdx );
+ }
mpOutlinerView->SetBackgroundColor(maColor);
+ Engine()->SetBackgroundColor(maColor);
+
+ {
+ SvtAccessibilityOptions aOptions;
+ Engine()->ForceAutoColor( bHighContrast || aOptions.GetIsAutomaticFontColor() );
+ }
mpMeta->SetControlBackground(maColor);
AllSettings aSettings = mpMeta->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- aStyleSettings.SetFieldTextColor(maColorDark);
+ aStyleSettings.SetFieldTextColor( bHighContrast ? maColorLight : maColorDark);
aSettings.SetStyleSettings(aStyleSettings);
mpMeta->SetSettings(aSettings);
@@ -641,59 +664,35 @@ void AnnotationWindow::SetColor()
void AnnotationWindow::Deactivate()
{
Reference< XAnnotation > xAnnotation( mxAnnotation );
-/*
- // check if text is empty
- Paragraph* p1stPara=Engine()->GetParagraph( 0 );
- ULONG nParaAnz=Engine()->GetParagraphCount();
- if(p1stPara==NULL)
- nParaAnz=0;
- if(nParaAnz==1)
+ // write changed text back to annotation
+ if ( Engine()->IsModified() )
{
- // if it is only one paragraph, check if that paragraph is empty
- XubString aStr(Engine()->GetText(p1stPara));
+ TextApiObject* pTextApi = getTextApiObject( xAnnotation );
- if(!aStr.Len())
- nParaAnz = 0;
- }
-
- if( nParaAnz == 0 )
- {
- // text is empty, delete postit
- DeleteAnnotation( xAnnotation );
- }
- else
-*/
- {
- // write changed text back to annotation
- if ( Engine()->IsModified() )
+ if( pTextApi )
{
- TextApiObject* pTextApi = getTextApiObject( xAnnotation );
-
- if( pTextApi )
+ OutlinerParaObject* pOPO = Engine()->CreateParaObject();
+ if( pOPO )
{
- OutlinerParaObject* pOPO = Engine()->CreateParaObject();
- if( pOPO )
- {
- if( mpDoc->IsUndoEnabled() )
- mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) );
+ if( mpDoc->IsUndoEnabled() )
+ mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) );
- pTextApi->SetText( *pOPO );
- delete pOPO;
+ pTextApi->SetText( *pOPO );
+ delete pOPO;
- // set current time to changed annotation
- xAnnotation->setDateTime( getCurrentDateTime() );
+ // set current time to changed annotation
+ xAnnotation->setDateTime( getCurrentDateTime() );
- if( mpDoc->IsUndoEnabled() )
- mpDoc->EndUndo();
-
- DocView()->GetDocSh()->SetModified(sal_True);
- }
+ if( mpDoc->IsUndoEnabled() )
+ mpDoc->EndUndo();
+ DocView()->GetDocSh()->SetModified(sal_True);
}
+
}
- Engine()->ClearModifyFlag();
}
+ Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
}
@@ -704,15 +703,16 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
if(mpMeta->IsVisible() && !mbReadonly)
{
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
//draw left over space
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if ( bHighContrast )
SetFillColor(COL_BLACK);
else
SetFillColor(maColor);
SetLineColor();
DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height()))));
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ if ( bHighContrast )
{
//draw rect around button
SetFillColor(COL_BLACK);
@@ -734,7 +734,7 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
DrawRect(maRectMetaButton);
//draw arrow
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if( bHighContrast )
SetFillColor(COL_WHITE);
else
SetFillColor(COL_BLACK);
diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx
index ba82d4e862d3..264cb2fa1afe 100644
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -144,7 +144,6 @@ class AnnotationWindow : public FloatingWindow
void Rescale();
- void SetReadonly(bool bSet);
bool IsReadOnly() { return mbReadonly;}
bool IsProtected() { return mbProtected; }
diff --git a/sd/source/ui/app/makefile.mk b/sd/source/ui/app/makefile.mk
index d64d9b672f7e..b0ac26018877 100644
--- a/sd/source/ui/app/makefile.mk
+++ b/sd/source/ui/app/makefile.mk
@@ -73,8 +73,11 @@ SLOFILES = \
$(SLO)$/tmplctrl.obj
EXCEPTIONSFILES= \
+ $(SLO)$/sddll1.obj \
+ $(SLO)$/sddll2.obj \
$(SLO)$/sdxfer.obj \
$(SLO)$/sdmod1.obj \
+ $(SLO)$/tbxww.obj \
$(SLO)$/tmplctrl.obj
.IF "$(GUI)" == "WNT"
diff --git a/sd/source/ui/app/menuids2_tmpl.src b/sd/source/ui/app/menuids2_tmpl.src
index 54b9ed6ba44c..21d906bfedf0 100644
--- a/sd/source/ui/app/menuids2_tmpl.src
+++ b/sd/source/ui/app/menuids2_tmpl.src
@@ -983,40 +983,5 @@
Text [ en-US ] = "Pre~view Mode" ; \
};
-#define MN_MULTI_PANE_GUI \
- MenuItem\
- {\
- Identifier = SID_MULTI_PANE_GUI ; \
- HelpID = SID_MULTI_PANE_GUI ; \
- Text = "Multi Pane GUI" ; \
- SubMenu = Menu \
- {\
- ItemList =\
- {\
- MenuItem\
- {\
- Identifier = SID_TOOLPANEL ; \
- HelpID = SID_TOOLPANEL ; \
- Check = TRUE ; \
- Text = "Tool Panel" ; \
- };\
- MenuItem\
- {\
- Identifier = SID_SLIDE_BROWSER ; \
- HelpID = SID_SLIDE_BROWSER ; \
- Check = TRUE ; \
- Text = "Slide Browser" ; \
- };\
- MenuItem\
- {\
- Identifier = SID_NOTES_WINDOW ; \
- HelpID = SID_NOTES_WINDOW ; \
- Check = TRUE ; \
- Text = "Notes Window" ; \
- };\
- };\
- };\
- };
-
#endif // _MENUIDS2_SRC
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index e3181f792d04..4355da3011c9 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -222,22 +222,6 @@ SdOptionsLayout::SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsLayout::SetDefaults()
-{
- SetRulerVisible( TRUE );
- SetHelplines( TRUE );
- SetHandlesBezier( FALSE );
- SetMoveOutline( TRUE );
- SetDragStripes( FALSE );
- if ( isMetricSystem() )
- SetMetric( FUNIT_CM ); // default for countries with metric system
- else
- SetMetric( FUNIT_INCH ); // default for others
- SetDefTab( 1250 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
{
return( IsRulerVisible() == rOpt.IsRulerVisible() &&
@@ -406,12 +390,6 @@ SdOptionsContents::SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsContents::SetDefaults()
-{
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsContents::operator==(const SdOptionsContents&) const
{
return true;
@@ -459,14 +437,6 @@ BOOL SdOptionsContents::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsContentsItem::SdOptionsContentsItem( USHORT _nWhich )
-: SfxPoolItem ( _nWhich )
-, maOptionsContents ( 0, FALSE )
-{
-}
-
-// ----------------------------------------------------------------------
-
SdOptionsContentsItem::SdOptionsContentsItem(USHORT _nWhich, SdOptions*, ::sd::FrameView*)
: SfxPoolItem ( _nWhich )
, maOptionsContents ( 0, FALSE )
@@ -542,40 +512,6 @@ SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsMisc::SetDefaults()
-{
- SetStartWithTemplate( TRUE );
- SetMarkedHitMovesAlways( TRUE );
- SetMoveOnlyDragging( FALSE );
- SetCrookNoContortion( FALSE );
- SetQuickEdit( GetConfigId() != SDCFG_DRAW );
- SetMasterPagePaintCaching( TRUE );
- SetDragWithCopy( FALSE );
- SetPickThrough( TRUE );
- SetBigHandles( FALSE );
- SetDoubleClickTextEdit( TRUE );
- SetClickChangeRotation( FALSE );
- SetStartWithActualPage( FALSE );
- SetSummationOfParagraphs( FALSE );
- SetSolidDragging( TRUE );
- SetSolidMarkHdl( TRUE );
- // #90356#
- SetShowUndoDeleteWarning( TRUE );
- // The default for 6.1-and-above documents is to use printer-independent
- // formatting.
- SetPrinterIndependentLayout (1);
- // #97016#
- SetDefaultObjectSizeWidth(8000);
- SetDefaultObjectSizeHeight(5000);
- SetPreviewNewEffects(true);
- SetPreviewChangedEffects(false);
- SetPreviewTransitions(true);
- SetDisplay(0);
- SetShowComments(true);
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
{
return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
@@ -909,22 +845,6 @@ SdOptionsSnap::SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsSnap::SetDefaults()
-{
- SetSnapHelplines( TRUE );
- SetSnapBorder( TRUE );
- SetSnapFrame( FALSE );
- SetSnapPoints( FALSE );
- SetOrtho( FALSE );
- SetBigOrtho( TRUE );
- SetRotate( FALSE );
- SetSnapArea( 5 );
- SetAngle( 1500 );
- SetEliminatePolyPointLimitAngle( 1500 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
{
return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
@@ -1098,13 +1018,6 @@ SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsZoom::SetDefaults()
-{
- SetScale( 1, 1 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
{
INT32 nX1, nX2, nY1, nY2;
@@ -1158,63 +1071,6 @@ BOOL SdOptionsZoom::WriteData( Any* pValues ) const
return TRUE;
}
-/*************************************************************************
-|*
-|* SdOptionsZoomItem
-|*
-\************************************************************************/
-
-SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich )
-: SfxPoolItem ( _nWhich )
-, maOptionsZoom ( 0, FALSE )
-{
-}
-
-// ----------------------------------------------------------------------
-
-SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* )
-: SfxPoolItem ( _nWhich )
-, maOptionsZoom ( 0, FALSE )
-{
- if( pOpts )
- {
- INT32 nX, nY;
-
- pOpts->GetScale( nX, nY );
- maOptionsZoom.SetScale( nX, nY );
- }
-}
-
-// ----------------------------------------------------------------------
-
-SfxPoolItem* SdOptionsZoomItem::Clone( SfxItemPool* ) const
-{
- return new SdOptionsZoomItem( *this );
-}
-
-
-// ----------------------------------------------------------------------
-
-int SdOptionsZoomItem::operator==( const SfxPoolItem& rAttr ) const
-{
- const bool bSameType = SfxPoolItem::operator==(rAttr);
- DBG_ASSERT( bSameType, "SdOptionsZoomItem::operator==(), differen pool item type!" );
- return bSameType && ( maOptionsZoom == static_cast< const SdOptionsZoomItem& >(rAttr).maOptionsZoom );
-}
-
-// -----------------------------------------------------------------------
-
-void SdOptionsZoomItem::SetOptions( SdOptions* pOpts ) const
-{
- if( pOpts )
- {
- INT32 nX, nY;
-
- maOptionsZoom.GetScale( nX, nY );
- pOpts->SetScale( nX, nY );
- }
-}
-
/*************************************************************************
|*
|* SdOptionsGrid
@@ -1366,13 +1222,6 @@ BOOL SdOptionsGrid::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich ) :
- SvxGridItem( _nWhich )
-{
-}
-
-// -----------------------------------------------------------------------------
-
SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) :
SvxGridItem( _nWhich )
{
@@ -1458,33 +1307,6 @@ SdOptionsPrint::SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsPrint::SetDefaults()
-{
- SetDraw( TRUE );
- SetNotes( FALSE );
- SetHandout( FALSE );
- SetOutline( FALSE );
- SetDate( FALSE );
- SetTime( FALSE );
- SetPagename( FALSE );
- SetHiddenPages( TRUE );
- SetPagesize( FALSE );
- SetPagetile( FALSE );
- SetWarningPrinter( TRUE );
- SetWarningSize( FALSE );
- SetWarningOrientation( FALSE );
- SetBooklet( FALSE );
- SetFrontPage( TRUE );
- SetBackPage( TRUE );
- SetCutPage( FALSE );
- SetPaperbin( FALSE );
- SetOutputQuality( 0 );
- SetHandoutHorizontal( TRUE );
- SetHandoutPages( 6 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
{
return( IsDraw() == rOpt.IsDraw() &&
@@ -1630,31 +1452,6 @@ BOOL SdOptionsPrint::WriteData( Any* pValues ) const
return TRUE;
}
-void SdOptionsPrint::SetPrinterOptions( const SdOptionsPrint* pOptions )
-{
- bDraw = pOptions->bDraw;
- bNotes = pOptions->bNotes;
- bHandout = pOptions->bHandout;
- bOutline = pOptions->bOutline;
- bDate = pOptions->bDate;
- bTime = pOptions->bTime;
- bPagename = pOptions->bPagename;
- bHiddenPages = pOptions->bHiddenPages;
- bPagesize = pOptions->bPagesize;
- bPagetile = pOptions->bPagetile;
- bWarningPrinter = pOptions->bWarningPrinter;
- bWarningSize = pOptions->bWarningSize;
- bWarningOrientation = pOptions->bWarningOrientation;
- bBooklet = pOptions->bBooklet;
- bFront = pOptions->bFront;
- bBack = pOptions->bBack;
- bCutPage = pOptions->bCutPage;
- bPaperbin = pOptions->bPaperbin;
- nQuality = pOptions->nQuality;
- mnHandoutPages = pOptions->mnHandoutPages;
- mbHandoutHorizontal = pOptions->mbHandoutHorizontal;
-}
-
/*************************************************************************
|*
|* SdOptionsPrintItem
@@ -1766,32 +1563,6 @@ SdOptions::~SdOptions()
// ----------------------------------------------------------------------
-void SdOptions::SetRangeDefaults( ULONG nOptionsRange )
-{
- if( nOptionsRange & SD_OPTIONS_LAYOUT )
- SdOptionsLayout::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_CONTENTS )
- SdOptionsContents::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_MISC )
- SdOptionsMisc::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_SNAP )
- SdOptionsSnap::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_ZOOM )
- SdOptionsZoom::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_GRID )
- SdOptionsGrid::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_PRINT )
- SdOptionsPrint::SetDefaults();
-}
-
-// ----------------------------------------------------------------------
-
void SdOptions::StoreConfig( ULONG nOptionsRange )
{
if( nOptionsRange & SD_OPTIONS_LAYOUT )
diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src
index bc6858f66ea5..0901e53df0ed 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" ;
-};
-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
-{
- File = "foil20.bmp" ;
-};
-Bitmap BMP_FOIL_20_H
-{
- File = "foil20_h.bmp" ;
-};
-Bitmap BMP_FOIL_21
-{
- File = "foil21.bmp" ;
-};
-Bitmap BMP_FOIL_21_H
-{
- File = "foil21_h.bmp" ;
-};
-Bitmap BMP_FOIL_22
-{
- File = "foil22.bmp" ;
-};
-Bitmap BMP_FOIL_22_H
-{
- File = "foil22_h.bmp" ;
-};
-Bitmap BMP_FOIL_23
-{
- File = "foil23.bmp" ;
-};
-Bitmap BMP_FOIL_23_H
-{
- File = "foil23_h.bmp" ;
-};
-Bitmap BMP_FOIL_24
-{
- File = "foil24.bmp" ;
-};
-Bitmap BMP_FOIL_24_H
-{
- File = "foil24_h.bmp" ;
-};
-Bitmap BMP_FOIL_25
-{
- File = "foil25.bmp" ;
-};
-Bitmap BMP_FOIL_25_H
-{
- File = "foil25_h.bmp" ;
-};
-Bitmap BMP_FOIL_26
-{
- File = "foil26.bmp" ;
-};
-Bitmap BMP_FOIL_26_H
-{
- File = "foil26_h.bmp" ;
-};
-Bitmap BMP_FOIL_27
-{
- File = "foil27.bmp" ;
-};
-Bitmap BMP_FOIL_27_H
-{
- File = "foil27_h.bmp" ;
+ File = "layout_vertical02_h.png";
};
+
Bitmap BMP_FOILH_01
{
- File = "foilh01.bmp" ;
+ File = "foilh01.png";
};
Bitmap BMP_FOILH_01_H
{
- File = "foilh01_h.bmp" ;
+ File = "foilh01_h.png";
};
Bitmap BMP_FOILH_02
{
- File = "foilh02.bmp" ;
+ File = "foilh02.png";
};
Bitmap BMP_FOILH_02_H
{
- File = "foilh02_h.bmp" ;
+ File = "foilh02_h.png";
};
Bitmap BMP_FOILH_03
{
- File = "foilh03.bmp" ;
+ File = "foilh03.png";
};
Bitmap BMP_FOILH_03_H
{
- File = "foilh03_h.bmp" ;
+ File = "foilh03_h.png";
};
Bitmap BMP_FOILH_04
{
- File = "foilh04.bmp" ;
+ File = "foilh04.png";
};
Bitmap BMP_FOILH_04_H
{
- File = "foilh04_h.bmp" ;
+ File = "foilh04_h.png";
};
Bitmap BMP_FOILH_06
{
- File = "foilh06.bmp" ;
+ File = "foilh06.png";
};
Bitmap BMP_FOILH_06_H
{
- File = "foilh06_h.bmp" ;
+ File = "foilh06_h.png";
};
Bitmap BMP_FOILH_09
{
- File = "foilh09.bmp" ;
+ File = "foilh09.png";
};
Bitmap BMP_FOILH_09_H
{
- File = "foilh09_h.bmp" ;
+ File = "foilh09_h.png";
};
+
+
+Bitmap BMP_PLACEHOLDER_CHART_SMALL
+{
+ File = "placeholder_chart_small.png";
+};
+Bitmap BMP_PLACEHOLDER_CHART_SMALL_HOVER
+{
+ File = "placeholder_chart_small_hover.png";
+};
+Bitmap BMP_PLACEHOLDER_IMAGE_SMALL
+{
+ File = "placeholder_image_small.png";
+};
+Bitmap BMP_PLACEHOLDER_IMAGE_SMALL_HOVER
+{
+ File = "placeholder_image_small_hover.png";
+};
+Bitmap BMP_PLACEHOLDER_MOVIE_SMALL
+{
+ File = "placeholder_movie_small.png";
+};
+Bitmap BMP_PLACEHOLDER_MOVIE_SMALL_HOVER
+{
+ File = "placeholder_movie_small_hover.png";
+};
+Bitmap BMP_PLACEHOLDER_TABLE_SMALL
+{
+ File = "placeholder_table_small.png";
+};
+Bitmap BMP_PLACEHOLDER_TABLE_SMALL_HOVER
+{
+ File = "placeholder_table_small_hover.png";
+};
+
+Bitmap BMP_PLACEHOLDER_CHART_LARGE
+{
+ File = "placeholder_chart_large.png";
+};
+Bitmap BMP_PLACEHOLDER_CHART_LARGE_HOVER
+{
+ File = "placeholder_chart_large_hover.png";
+};
+Bitmap BMP_PLACEHOLDER_IMAGE_LARGE
+{
+ File = "placeholder_image_large.png";
+};
+Bitmap BMP_PLACEHOLDER_IMAGE_LARGE_HOVER
+{
+ File = "placeholder_image_large_hover.png";
+};
+Bitmap BMP_PLACEHOLDER_MOVIE_LARGE
+{
+ File = "placeholder_movie_large.png";
+};
+Bitmap BMP_PLACEHOLDER_MOVIE_LARGE_HOVER
+{
+ File = "placeholder_movie_large_hover.png";
+};
+Bitmap BMP_PLACEHOLDER_TABLE_LARGE
+{
+ File = "placeholder_table_large.png";
+};
+Bitmap BMP_PLACEHOLDER_TABLE_LARGE_HOVER
+{
+ 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" ;
@@ -519,30 +477,6 @@ Bitmap BMP_WAIT_ICON
// ----------------------------------------
-Bitmap BMP_CLOSE_DOC
-{
- File = "closedoc.bmp";
-};
-Bitmap BMP_CLOSE_DOC_H
-{
- File = "closedochc.bmp";
-};
-Bitmap BMP_TRIANGLE_RIGHT
-{
- File = "triangle_right.bmp";
-};
-Bitmap BMP_TRIANGLE_RIGHT_H
-{
- File = "triangle_right_hc.bmp";
-};
-Bitmap BMP_TRIANGLE_DOWN
-{
- File = "triangle_down.bmp";
-};
-Bitmap BMP_TRIANGLE_DOWN_H
-{
- File = "triangle_down_hc.bmp";
-};
Bitmap BMP_FADE_EFFECT_INDICATOR
{
File = "fade_effect_indicator.bmp";
diff --git a/sd/source/ui/app/sddll1.cxx b/sd/source/ui/app/sddll1.cxx
index 30aea6cba7b1..53a2b4e9b1e9 100644
--- a/sd/source/ui/app/sddll1.cxx
+++ b/sd/source/ui/app/sddll1.cxx
@@ -48,12 +48,8 @@
#include "GraphicViewShellBase.hxx"
#include "DrawDocShell.hxx"
#include "GraphicDocShell.hxx"
-#ifndef SD_SLIDEBROWSER_SLIDE_SORTER_VIEW_SHELL_HXX
#include "SlideSorterViewShell.hxx"
-#endif
-#ifndef SD_SLIDEBROWSER_TASK_PANE_VIEW_SHELL_HXX
-#include "TaskPaneViewShell.hxx"
-#endif
+#include "taskpane/ToolPanelViewShell.hxx"
#include "FactoryIds.hxx"
#include "sdmod.hxx"
#include "app.hrc"
@@ -131,8 +127,8 @@ void SdDLL::RegisterInterfaces()
// View shells for the side panes.
::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod);
- ::sd::toolpanel::TaskPaneViewShell::RegisterInterface(pMod);
- // Tell the task pane view shell to register the interfaces of its
+ ::sd::toolpanel::ToolPanelViewShell::RegisterInterface(pMod);
+ // Tell the tool panel view shell to register the interfaces of its
// controls.
- ::sd::toolpanel::TaskPaneViewShell::RegisterControls();
+ ::sd::toolpanel::ToolPanelViewShell::RegisterControls();
}
diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx
index 50143367944a..3b576c8c668b 100644
--- a/sd/source/ui/app/sddll2.cxx
+++ b/sd/source/ui/app/sddll2.cxx
@@ -57,10 +57,10 @@
#include
#include
#include
-#include
#include
#include
-#include
+#include
+#include
#include
#include
#include
@@ -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);
@@ -155,7 +140,7 @@ void SdDLL::RegisterControllers()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod);
::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod);
- ::sd::RightPaneChildWindow::RegisterChildWindow(0, pMod);
+ ::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod);
SvxFillToolBoxControl::RegisterControl(0, pMod);
SvxLineStyleToolBoxControl::RegisterControl(0, pMod);
@@ -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/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index fb180509cff9..ccbc7c8f5665 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -336,20 +336,3 @@ OutputDevice* SdModule::GetRefDevice (::sd::DrawDocShell& )
{
return GetVirtualRefDevice();
}
-
-
-/*************************************************************************
-|*
-\************************************************************************/
-
-::com::sun::star::text::WritingMode SdModule::GetDefaultWritingMode() const
-{
-/*
- const SvtLanguageOptions aLanguageOptions;
-
- return( aLanguageOptions.IsCTLFontEnabled() ?
- ::com::sun::star::text::WritingMode_RL_TB :
- ::com::sun::star::text::WritingMode_LR_TB );
-*/
- return ::com::sun::star::text::WritingMode_LR_TB;
-}
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 743b7a35610d..3c1abc0c7d22 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -68,7 +68,6 @@
#include "sdresid.hxx"
#include "OutlineViewShell.hxx"
#include "ViewShellBase.hxx"
-#include "TaskPaneViewShell.hxx"
#ifndef SD_FRAMW_VIEW_HXX
#include "FrameView.hxx"
#endif
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 9aa36ddd3f82..58aba6823d3a 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -171,9 +171,10 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
::sd::DrawDocShell* pDocShell = NULL;
SdDrawDocument* pDoc = 0;
- if( pInfo->GetOutliner() )
+ SdrOutliner* pSdrOutliner = dynamic_cast< SdrOutliner* >( pInfo->GetOutliner() );
+ if( pSdrOutliner )
{
- const SdrTextObj* pTextObj = static_cast< SdrOutliner* >( pInfo->GetOutliner() )->GetTextObj();
+ const SdrTextObj* pTextObj = pSdrOutliner->GetTextObj();
if( pTextObj )
pDoc = dynamic_cast< SdDrawDocument* >( pTextObj->GetModel() );
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 3066355ef95e..e992e7016f04 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
+String STR_AUTOLAYOUT_CONTENT
{
- Text [ en-US ] = "Title, Object" ;
+ Text [ en-US ] = "Title, Content" ;
};
-String STR_AUTOLAYOUT_ENUM
+String STR_AUTOLAYOUT_2CONTENT
{
- Text [ en-US ] = "Title, Text" ;
+ Text [ en-US ] = "Title and 2 Content" ;
};
-String STR_AUTOLAYOUT_CHART
+String STR_AUTOLAYOUT_CONTENT_2CONTENT
{
- Text [ en-US ] = "Title, Chart" ;
+ Text [ en-US ] = "Title, Content and 2 Content" ;
};
-String STR_AUTOLAYOUT_TAB
+String STR_AUTOLAYOUT_2CONTENT_CONTENT
{
- Text [ en-US ] = "Title, Spreadsheet" ;
+ Text [ en-US ] = "Title, 2 Content and Content" ;
};
-String STR_AUTOLAYOUT_CLIPTEXT
+String STR_AUTOLAYOUT_CONTENT_OVER_2CONTENT
{
- Text [ en-US ] = "Title, Clipart, Text" ;
+ Text [ en-US ] = "Title, Content over 2 Content" ;
};
-String STR_AUTOLAYOUT_2TEXT
+String STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT
{
- Text [ en-US ] = "Title, 2 Text Blocks" ;
+ Text [ en-US ] = "Title, 2 Content over Content" ;
};
-String STR_AUTOLAYOUT_TEXTCHART
+String STR_AUTOLAYOUT_CONTENT_OVER_CONTENT
{
- Text [ en-US ] = "Title, Text, Chart" ;
+ Text [ en-US ] = "Title, Content over Content" ;
};
-String STR_AUTOLAYOUT_TEXTCLIP
+String STR_AUTOLAYOUT_4CONTENT
{
- Text [ en-US ] = "Title, Text, Clipart" ;
+ Text [ en-US ] = "Title, 4 Content" ;
};
-String STR_AUTOLAYOUT_CHARTTEXT
+String STR_AUTOLAYOUT_6CONTENT
{
- Text [ en-US ] = "Title, Chart, Text" ;
-};
-String STR_AUTOLAYOUT_TEXTOBJ
-{
- Text [ en-US ] = "Title, Text, Object" ;
-};
-String STR_AUTOLAYOUT_TEXT2OBJ
-{
- Text [ en-US ] = "Title, Text, 2 Objects" ;
-};
-String STR_AUTOLAYOUT_OBJTEXT
-{
- Text [ en-US ] = "Title, Object, Text" ;
-};
-String STR_AUTOLAYOUT_OBJOVERTEXT
-{
- 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
{
@@ -1250,6 +1211,14 @@ String DLG_TABLEDESIGNPANE
{
Text [ en-US ] = "Table Designs";
};
+String STR_CUSTOMANIMATIONPANE
+{
+ Text [ en-US ] = "Custom Animation";
+};
+String STR_SLIDE_TRANSITION_PANE
+{
+ Text [ en-US ] = "Slide Transition";
+};
String STR_NAVIGATOR_SHOW_NAMED_SHAPES
{
Text [ en-US ] = "Named shapes";
@@ -1270,3 +1239,27 @@ String RID_ANNOTATIONS_START
{
Text [ en-US ] = "Comments";
};
+String STR_RESET_LAYOUT
+{
+ Text[ en-US ] = "Reset Slide Layout";
+};
+
+String STR_INSERT_TABLE
+{
+ Text [ en-US ] = "Insert Table";
+};
+
+String STR_INSERT_CHART
+{
+ Text [ en-US ] = "Insert Chart";
+};
+
+String STR_INSERT_PICTURE
+{
+ Text [ en-US ] = "Insert Picture";
+};
+
+String STR_INSERT_MOVIE
+{
+ Text [ en-US ] = "Insert Movie";
+};
diff --git a/sd/source/ui/controller/makefile.mk b/sd/source/ui/controller/makefile.mk
new file mode 100644
index 000000000000..4e37fbd5ea88
--- /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
+#
+# 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 000000000000..1a9201af6555
--- /dev/null
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -0,0 +1,419 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+
+#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(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 = ¬es[0]; nColCount = 1; break;
+ default: 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, bHighContrast );
+
+ 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/toolpanel/TitleToolBox.hxx b/sd/source/ui/controller/slidelayoutcontroller.hxx
similarity index 57%
rename from sd/source/ui/toolpanel/TitleToolBox.hxx
rename to sd/source/ui/controller/slidelayoutcontroller.hxx
index 9433706579df..5e76d3ad74c7 100644
--- a/sd/source/ui/toolpanel/TitleToolBox.hxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.hxx
@@ -25,46 +25,30 @@
*
************************************************************************/
-#ifndef SD_TOOLBOX_TITLETOOLBOX_HXX
-#define SD_TOOLBOX_TITLETOOLBOX_HXX
+#ifndef __SD_SLIDELAYOUTCONTROLLER_HXX_
+#define __SD_SLIDELAYOUTCONTROLLER_HXX_
-#include
+#include
-class PushButton;
+namespace sd
+{
-namespace sd { namespace toolpanel {
-
-/** Copied from vcl/menu.cxx
-// To get the transparent mouse-over look, the TitleToolBox is actually a toolbox
-// overload DataChange to handle style changes correctly
-*/
-class TitleToolBox
- : public ToolBox
+class SlideLayoutController : public svt::PopupWindowController
{
public:
- enum ToolBoxId {
- TBID_DOCUMENT_CLOSE = 1,
- TBID_PANEL_MENU = 2,
- TBID_TRIANGLE_RIGHT = 3,
- TBID_TRIANGLE_DOWN = 4,
- TBID_TEST
- };
+ SlideLayoutController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const rtl::OUString& sCommandURL, bool bInsertPage );
- TitleToolBox (::Window* pParent, WinBits nStyle = 0);
+ virtual ::Window* createPopupWindow( ::Window* pParent );
- void AddItem (ToolBoxId aId);
-
- void DataChanged (const DataChangedEvent& rDCEvt);
+ // 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 );
+ using svt::PopupWindowController::createPopupWindow;
private:
- Image maImage;
- Image maImageHC;
- Image maTriangleRight;
- Image maTriangleDown;
-
- long lastSize;
+ bool mbInsertPage;
};
-} } // end of namespace ::sd::toolbox
+}
-#endif
+#endif // __SD_SLIDELAYOUTCONTROLLER_HXX_
diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx
index 7420319ab491..975d277c7dff 100644
--- a/sd/source/ui/dlg/LayerDialogContent.cxx
+++ b/sd/source/ui/dlg/LayerDialogContent.cxx
@@ -86,14 +86,6 @@ LayerDialogContent::~LayerDialogContent (void)
-LayerTabBar& LayerDialogContent::GetLayerTabBar (void)
-{
- return maLayerTabBar;
-}
-
-
-
-
BOOL LayerDialogContent::Close (void)
{
return SfxDockingWindow::Close();
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index ca8ee8724037..6a6d515822f8 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -29,28 +29,26 @@
#include "precompiled_sd.hxx"
#include "PaneChildWindows.hxx"
#include "PaneDockingWindow.hrc"
+#include "PaneDockingWindow.hxx"
+#include "ViewShellBase.hxx"
+#include "framework/FrameworkHelper.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "app.hrc"
#include "strings.hrc"
#include "sdresid.hxx"
+
#include
#include
#include
#include
-
-namespace sd
-{
- SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
- SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
- SFX_IMPL_DOCKINGWINDOW(RightPaneChildWindow, SID_RIGHT_PANE)
-}
-
-
-#include "PaneDockingWindow.hxx"
-#include "ViewShellBase.hxx"
-#include "framework/FrameworkHelper.hxx"
+#include
namespace sd {
+SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
+SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
+SFX_IMPL_DOCKINGWINDOW( ToolPanelChildWindow, SID_TASKPANE)
+
//===== PaneChildWindow =======================================================
PaneChildWindow::PaneChildWindow (
@@ -58,8 +56,8 @@ PaneChildWindow::PaneChildWindow (
USHORT nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const ResId& rResId,
- const ::rtl::OUString& rsTitle,
+ const USHORT nDockWinTitleResId,
+ const USHORT nTitleBarResId,
SfxChildAlignment eAlignment)
: SfxChildWindow (pParentWindow, nId)
{
@@ -67,9 +65,8 @@ PaneChildWindow::PaneChildWindow (
pBindings,
this,
pParentWindow,
- rResId,
- framework::FrameworkHelper::msLeftImpressPaneURL,
- rsTitle);
+ SdResId( nDockWinTitleResId ),
+ String( SdResId( nTitleBarResId ) ) );
eChildAlignment = eAlignment;
static_cast(pWindow)->Initialize(pInfo);
SetHideNotDelete(TRUE);
@@ -112,8 +109,8 @@ LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
nId,
pBindings,
pInfo,
- SdResId(FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW),
- String(SdResId(STR_LEFT_PANE_IMPRESS_TITLE)),
+ FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW,
+ STR_LEFT_PANE_IMPRESS_TITLE,
SFX_ALIGN_LEFT)
{
}
@@ -133,8 +130,8 @@ LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
nId,
pBindings,
pInfo,
- SdResId(FLT_LEFT_PANE_DRAW_DOCKING_WINDOW),
- String(SdResId(STR_LEFT_PANE_DRAW_TITLE)),
+ FLT_LEFT_PANE_DRAW_DOCKING_WINDOW,
+ STR_LEFT_PANE_DRAW_TITLE,
SFX_ALIGN_LEFT)
{
}
@@ -142,23 +139,40 @@ LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
-//===== RightPaneChildWindow ==================================================
-
-RightPaneChildWindow::RightPaneChildWindow (
- ::Window* pParentWindow,
- USHORT nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo)
- : PaneChildWindow(
- pParentWindow,
- nId,
- pBindings,
- pInfo,
- SdResId(FLT_RIGHT_PANE_DOCKING_WINDOW),
- String(SdResId(STR_RIGHT_PANE_TITLE)),
- SFX_ALIGN_RIGHT)
+//======================================================================================================================
+//= ToolPanelChildWindow
+//======================================================================================================================
+//----------------------------------------------------------------------------------------------------------------------
+ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, USHORT i_nId, SfxBindings* i_pBindings,
+ SfxChildWinInfo* i_pChildWindowInfo )
+ :PaneChildWindow( i_pParentWindow, i_nId, i_pBindings, i_pChildWindowInfo,
+ FLT_TOOL_PANEL_DOCKING_WINDOW, STR_RIGHT_PANE_TITLE, SFX_ALIGN_RIGHT )
{
}
+//----------------------------------------------------------------------------------------------------------------------
+void ToolPanelChildWindow::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
+{
+ SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() );
+ ViewShellBase* pViewShellBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame() );
+ ENSURE_OR_RETURN_VOID( pViewShellBase != NULL, "ToolPanelChildWindow::ActivateToolPanel: no view shell access!" );
+
+ const ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper( framework::FrameworkHelper::Instance( *pViewShellBase ) );
+
+ if ( i_rPanelURL.indexOf( framework::FrameworkHelper::msTaskPanelURLPrefix ) == 0 )
+ {
+ // it's one of our standard panels known to the drawing framework
+ pFrameworkHelper->RequestTaskPanel( i_rPanelURL );
+ }
+ else
+ {
+ // TODO: it would be nice if the drawing framework were able to handle non-standard panels, installed by
+ // extensions, too. As long as this is not the case, we need to take the direct way ...
+ ::boost::shared_ptr< ViewShell > pViewShell = pFrameworkHelper->GetViewShell( framework::FrameworkHelper::msRightPaneURL );
+ toolpanel::ToolPanelViewShell* pToolPanelViewShell = dynamic_cast< toolpanel::ToolPanelViewShell* >( pViewShell.get() );
+ ENSURE_OR_RETURN_VOID( pToolPanelViewShell != NULL, "ToolPanelChildWindow::ActivateToolPanel: no tool panel view shell access!" );
+ pToolPanelViewShell->ActivatePanel( i_rPanelURL );
+ }
+}
} // end of namespace ::sd
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index cb700f7f97ba..ced567f4f6f6 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -45,282 +45,22 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
+using ::sfx2::TitledDockingWindow;
namespace sd {
-PaneDockingWindow::PaneDockingWindow (
- SfxBindings *_pBindings,
- SfxChildWindow *pChildWindow,
- ::Window* pParent,
- const ResId& rResId,
- const ::rtl::OUString& rsPaneURL,
- const ::rtl::OUString& rsTitle)
- : SfxDockingWindow (_pBindings, pChildWindow, pParent, rResId),
- msPaneURL(rsPaneURL),
- msTitle(rsTitle),
- mpTitleToolBox(),
- maBorder (3,1,3,3),
- mnChildWindowId(pChildWindow->GetType()),
- mpContentWindow(new ::Window(this)),
- mbIsLayoutPending(false)
+PaneDockingWindow::PaneDockingWindow(
+ SfxBindings *_pBindings, SfxChildWindow *pChildWindow, ::Window* pParent,
+ const ResId& rResId, const ::rtl::OUString& rsTitle )
+ :TitledDockingWindow( _pBindings, pChildWindow, pParent, rResId )
{
- SetBackground (Wallpaper());
-
- InitializeTitleToolBox();
-
- // Tell the system window about the new docking window so that it can be
- // reached via the keyboard.
- SystemWindow* pSystemWindow = GetSystemWindow();
- if (pSystemWindow != NULL)
- pSystemWindow->GetTaskPaneList()->AddWindow(this);
-
- mpContentWindow->Show();
+ SetTitle( rsTitle );
}
-
-
-
PaneDockingWindow::~PaneDockingWindow (void)
{
- // Tell the next system window that the docking window is no longer
- // available.
- SystemWindow* pSystemWindow = GetSystemWindow();
- if (pSystemWindow != NULL)
- pSystemWindow->GetTaskPaneList()->RemoveWindow(this);
- mpTitleToolBox.reset();
}
-
-
-
-void PaneDockingWindow::SetTitle (const String& rsTitle)
-{
- msTitle = rsTitle;
- Invalidate();
-}
-
-
-
-
-void PaneDockingWindow::Resize (void)
-{
- SfxDockingWindow::Resize();
- mbIsLayoutPending = true;
-}
-
-
-
-
-void PaneDockingWindow::Layout (void)
-{
- mbIsLayoutPending = false;
-
- Size aWindowSize (GetOutputSizePixel());
- Size aToolBoxSize (0,0);
- mnTitleBarHeight = GetSettings().GetStyleSettings().GetTitleHeight();
-
- // Place the title tool box.
- if (mpTitleToolBox.get() != NULL)
- {
- if (IsFloatingMode())
- mpTitleToolBox->HideItem (1);
- else
- mpTitleToolBox->ShowItem (1);
-
- aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel();
- if (aToolBoxSize.Height() > mnTitleBarHeight)
- mnTitleBarHeight = aToolBoxSize.Height();
- mpTitleToolBox->SetPosSizePixel (
- Point(aWindowSize.Width()-aToolBoxSize.Width(),
- (mnTitleBarHeight-aToolBoxSize.Height())/2),
- aToolBoxSize);
- }
-
- // Place the content window.
- if (mnTitleBarHeight < aToolBoxSize.Height())
- mnTitleBarHeight = aToolBoxSize.Height();
- aWindowSize.Height() -= mnTitleBarHeight;
- mpContentWindow->SetPosSizePixel(
- Point(maBorder.Left(),mnTitleBarHeight+maBorder.Top()),
- Size (aWindowSize.Width()-maBorder.Left()-maBorder.Right(),
- aWindowSize.Height()-maBorder.Top()-maBorder.Bottom()));
-}
-
-
-
-
-void PaneDockingWindow::Paint (const Rectangle& rRectangle)
-{
- if (mbIsLayoutPending)
- Layout();
-
- SfxDockingWindow::Paint (rRectangle);
- Color aOriginalLineColor (GetLineColor());
- Color aOriginalFillColor (GetFillColor());
- SetFillColor (GetSettings().GetStyleSettings().GetDialogColor());
- SetLineColor ();
-
- // Make font bold.
- const Font& rOriginalFont (GetFont());
- Font aFont (rOriginalFont);
- aFont.SetWeight (WEIGHT_BOLD);
- SetFont (aFont);
-
- // Set border values.
- Size aWindowSize (GetOutputSizePixel());
- int nOuterLeft = 0;
- int nInnerLeft = nOuterLeft + maBorder.Left() - 1;
- int nOuterRight = aWindowSize.Width() - 1;
- int nInnerRight = nOuterRight - maBorder.Right() + 1;
- int nInnerTop = mnTitleBarHeight + maBorder.Top() - 1;
- int nOuterBottom = aWindowSize.Height() - 1;
- int nInnerBottom = nOuterBottom - maBorder.Bottom() + 1;
-
- // Paint title bar background.
- Rectangle aTitleBarBox (Rectangle(
- nOuterLeft,
- 0,
- nOuterRight,
- nInnerTop-1));
- DrawRect (aTitleBarBox);
-
- if (nInnerLeft > nOuterLeft)
- DrawRect (
- Rectangle (nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom));
- if (nOuterRight > nInnerRight)
- DrawRect (
- Rectangle (nInnerRight, nInnerTop, nOuterRight, nInnerBottom));
- if (nInnerBottom < nOuterBottom)
- DrawRect (
- Rectangle (nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom));
-
- // Paint bevel border.
- SetFillColor ();
- SetLineColor (GetSettings().GetStyleSettings().GetShadowColor());
- if (maBorder.Top() > 0)
- DrawLine (
- Point(nInnerLeft,nInnerTop),
- Point(nInnerLeft,nInnerBottom));
- if (maBorder.Left() > 0)
- DrawLine (
- Point(nInnerLeft,nInnerTop),
- Point(nInnerRight,nInnerTop));
- SetLineColor (GetSettings().GetStyleSettings().GetLightColor());
- if (maBorder.Bottom() > 0)
- DrawLine (
- Point(nInnerRight,nInnerBottom),
- Point(nInnerLeft,nInnerBottom));
- if (maBorder.Right() > 0)
- DrawLine (
- Point(nInnerRight,nInnerBottom),
- Point(nInnerRight,nInnerTop));
-
- // Paint title bar text.
- SetLineColor (GetSettings().GetStyleSettings().GetActiveTextColor());
- SetFillColor ();
- aTitleBarBox.Left() += 3;
- DrawText (aTitleBarBox, msTitle,
- TEXT_DRAW_LEFT
- | TEXT_DRAW_VCENTER
- | TEXT_DRAW_MULTILINE
- | TEXT_DRAW_WORDBREAK);
-
- // Restore original values of the output device.
- SetFont (rOriginalFont);
- SetFillColor (aOriginalFillColor);
-}
-
-
-
-
-void PaneDockingWindow::InitializeTitleToolBox (void)
-{
- if (mpTitleToolBox.get() == NULL)
- {
- // Initialize the title tool box.
- mpTitleToolBox.reset (new ToolBox(this));
- mpTitleToolBox->SetSelectHdl (
- LINK(this, PaneDockingWindow, ToolboxSelectHandler));
- mpTitleToolBox->SetOutStyle (TOOLBOX_STYLE_FLAT);
- mpTitleToolBox->SetBackground (Wallpaper (
- GetSettings().GetStyleSettings().GetDialogColor()));
- mpTitleToolBox->Show();
- }
- else
- mpTitleToolBox->Clear();
-
- // Get the closer bitmap and set it as right most button.
- Bitmap aBitmap (SdResId (BMP_CLOSE_DOC));
- Bitmap aBitmapHC (SdResId (BMP_CLOSE_DOC_H));
- Image aImage = Image (aBitmap, Color (COL_LIGHTMAGENTA));
- Image aImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST));
- mpTitleToolBox->InsertItem (1,
- GetSettings().GetStyleSettings().GetHighContrastMode()
- ? aImageHC
- : aImage);
- mpTitleToolBox->ShowItem (1);
-}
-
-
-
-
-USHORT PaneDockingWindow::AddMenu (
- const String& rsMenuName,
- ULONG nHelpId,
- const Link& rCallback)
-{
- // Add the menu before the closer button.
- USHORT nItemCount (mpTitleToolBox->GetItemCount());
- USHORT nItemId (nItemCount+1);
- mpTitleToolBox->InsertItem (
- nItemId,
- rsMenuName,
- TIB_DROPDOWNONLY,
- nItemCount>0 ? nItemCount-1 : (USHORT)-1);
- mpTitleToolBox->SetHelpId( nItemId, nHelpId );
- mpTitleToolBox->SetClickHdl (rCallback);
- mpTitleToolBox->SetDropdownClickHdl (rCallback);
-
- // The tool box has likely changed its size. The title bar has to be
- // resized.
- Resize();
- Invalidate();
-
- return nItemCount+1;
-}
-
-
-
-
-IMPL_LINK(PaneDockingWindow, ToolboxSelectHandler, ToolBox*, pToolBox)
-{
- USHORT nId = pToolBox->GetCurItemId();
-
- if (nId == 1)
- {
- EndTracking();
- SfxBoolItem aVisibility (mnChildWindowId, FALSE);
- GetBindings().GetDispatcher()->Execute (
- mnChildWindowId,
- SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aVisibility,
- NULL);
- }
-
- return 0;
-}
-
-
-
-
-long PaneDockingWindow::Notify( NotifyEvent& rNEvt )
-{
- return SfxDockingWindow::Notify (rNEvt);
-}
-
-
-
-
void PaneDockingWindow::StateChanged( StateChangedType nType )
{
switch (nType)
@@ -347,49 +87,6 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
SfxDockingWindow::StateChanged (nType);
}
-
-
-
-void PaneDockingWindow::DataChanged (const DataChangedEvent& rEvent)
-{
- SfxDockingWindow::DataChanged (rEvent);
-
- switch (rEvent.GetType())
- {
- case DATACHANGED_SETTINGS:
- if ((rEvent.GetFlags() & SETTINGS_STYLE) == 0)
- break;
- // else fall through.
- case DATACHANGED_FONTS:
- case DATACHANGED_FONTSUBSTITUTION:
- {
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
- // Font.
- Font aFont = rStyleSettings.GetAppFont();
- if (IsControlFont())
- aFont.Merge(GetControlFont());
- SetZoomedPointFont(aFont);
-
- // Color.
- Color aColor;
- if (IsControlForeground())
- aColor = GetControlForeground();
- else
- aColor = rStyleSettings.GetButtonTextColor();
- SetTextColor(aColor);
- SetTextFillColor();
-
- Resize();
- Invalidate();
- }
- break;
- }
-}
-
-
-
-
void PaneDockingWindow::MouseButtonDown (const MouseEvent& rEvent)
{
if (rEvent.GetButtons() == MOUSE_LEFT && mpContentWindow)
@@ -408,18 +105,6 @@ void PaneDockingWindow::MouseButtonDown (const MouseEvent& rEvent)
-::Window* PaneDockingWindow::GetContentWindow (void)
-{
- return mpContentWindow.get();
-}
-
-
-
-
-::boost::shared_ptr PaneDockingWindow::GetTitleToolBox (void) const
-{
- return mpTitleToolBox;
-}
@@ -458,6 +143,4 @@ PaneDockingWindow::Orientation PaneDockingWindow::GetOrientation (void) const
return VerticalOrientation;
}
-
-
} // end of namespace ::sd
diff --git a/sd/source/ui/dlg/PaneDockingWindow.src b/sd/source/ui/dlg/PaneDockingWindow.src
index 41df4de7f978..7754283332cd 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.src
+++ b/sd/source/ui/dlg/PaneDockingWindow.src
@@ -57,7 +57,7 @@ DockingWindow FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
Text [ en-US ] = "Page Pane" ;
};
-DockingWindow FLT_RIGHT_PANE_DOCKING_WINDOW
+DockingWindow FLT_TOOL_PANEL_DOCKING_WINDOW
{
Border = TRUE ;
Hide = TRUE ;
diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx
index 2e8032926846..bb1023482ea0 100644
--- a/sd/source/ui/dlg/PaneShells.cxx
+++ b/sd/source/ui/dlg/PaneShells.cxx
@@ -109,36 +109,30 @@ LeftDrawPaneShell::~LeftDrawPaneShell (void)
-//===== RightPaneShell ========================================================
+//===== ToolPanelPaneShell ========================================================
#undef ShellClass
-#define ShellClass RightPaneShell
+#define ShellClass ToolPanelPaneShell
-SFX_SLOTMAP(RightPaneShell)
+SFX_SLOTMAP( ToolPanelPaneShell )
{
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
-SFX_IMPL_INTERFACE(RightPaneShell, SfxShell, SdResId(STR_RIGHT_PANE_SHELL))
+SFX_IMPL_INTERFACE( ToolPanelPaneShell, SfxShell, SdResId( STR_TOOL_PANEL_SHELL ) )
{
- SFX_CHILDWINDOW_REGISTRATION(
- ::sd::RightPaneChildWindow::GetChildWindowId());
+ SFX_CHILDWINDOW_REGISTRATION( ::sd::ToolPanelChildWindow::GetChildWindowId() );
}
-TYPEINIT1(RightPaneShell, SfxShell);
+TYPEINIT1( ToolPanelPaneShell, SfxShell );
-
-
-RightPaneShell::RightPaneShell (void)
- : SfxShell()
+ToolPanelPaneShell::ToolPanelPaneShell()
+ :SfxShell()
{
- SetName(rtl::OUString::createFromAscii("RightPane"));
+ SetName( ::rtl::OUString::createFromAscii( "ToolPanel" ) );
}
-
-
-
-RightPaneShell::~RightPaneShell (void)
+ToolPanelPaneShell::~ToolPanelPaneShell(void)
{
}
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 95d4277f8f42..7aee12f23bbd 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -96,14 +96,14 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
-::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence (void)
+::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck*/ )
{
::svx::SpellPortions aResult;
if (mpSdOutliner != NULL)
{
ProvideOutliner();
- aResult = mpSdOutliner->GetNextSpellSentence ();
+ aResult = mpSdOutliner->GetNextSpellSentence();
}
// Close the spell check dialog when there are no more sentences to
@@ -125,7 +125,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
void SpellDialogChildWindow::ApplyChangedSentence (
- const ::svx::SpellPortions& rChanged)
+ const ::svx::SpellPortions& rChanged, bool bRecheck )
{
if (mpSdOutliner != NULL)
{
@@ -133,7 +133,7 @@ void SpellDialogChildWindow::ApplyChangedSentence (
if (pOutlinerView != NULL)
mpSdOutliner->ApplyChangedSentence (
pOutlinerView->GetEditView(),
- rChanged, false);
+ rChanged, bRecheck);
}
}
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2ac4801aba0c..e179a0ba9f86 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -691,19 +691,6 @@ void AnimationWindow::ResetAttrs()
// -----------------------------------------------------------------------
-void AnimationWindow::WaitInEffect( ULONG nMilliSeconds ) const
-{
- ULONG nEnd = Time::GetSystemTicks() + nMilliSeconds;
- ULONG nCurrent = Time::GetSystemTicks();
- while (nCurrent < nEnd)
- {
- nCurrent = Time::GetSystemTicks();
- Application::Reschedule();
- }
-}
-
-// -----------------------------------------------------------------------
-
void AnimationWindow::WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
SfxProgress* pProgress ) const
{
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 2a04f56d2a61..b8c92dee3a6e 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
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index d398724a3074..1eb3a3d0cedc 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1928,21 +1928,6 @@ SfxObjectShellLock AssistentDlg::GetDocument()
return mpImpl->GetDocument();
}
-String AssistentDlg::GetTopic() const
-{
- return mpImpl->mpPage4AskTopicEDT->GetText();
-}
-
-String AssistentDlg::GetUserName() const
-{
- return mpImpl->mpPage4AskNameEDT->GetText();
-}
-
-String AssistentDlg::GetInformation() const
-{
- return mpImpl->mpPage4AskInfoEDT->GetText();
-}
-
OutputType AssistentDlg::GetOutputMedium() const
{
if(mpImpl->mpPage2Medium1RB->IsChecked())
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index 40bfae16c2a4..f9dcf5046189 100644
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -207,287 +207,3 @@ void SdPageListControl::DataChanged( const DataChangedEvent& rDCEvt )
SvTreeListBox::DataChanged( rDCEvt );
}
-// ====================================================================
-// TemplateCache
-// ====================================================================
-
-// Kennung fuer die Config Datei mit den Cache Daten
-static const UINT16 nMagic = (UINT16)0x4127;
-
-TemplateCacheInfo::TemplateCacheInfo()
-{
- m_bImpress = FALSE;
- m_bValid = FALSE;
- m_bModified = TRUE;
-}
-
-TemplateCacheInfo::TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress )
-{
- m_aFile = rFile;
- m_aDateTime = rDateTime;
- m_bImpress = bImpress;
- m_bValid = FALSE;
- m_bModified = TRUE;
-}
-
-SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo)
-{
- rIn.ReadByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 );
- USHORT nDay, nMonth, nYear;
- rIn >> nDay;
- rIn >> nMonth;
- rIn >> nYear;
- rInfo.m_aDateTime.SetDay( nDay );
- rInfo.m_aDateTime.SetMonth( nMonth );
- rInfo.m_aDateTime.SetYear( nYear);
-
- USHORT nHour, nMin, nSec, n100Sec;
-
- rIn >> nHour;
- rIn >> nMin;
- rIn >> nSec;
- rIn >> n100Sec;
-
- rInfo.m_aDateTime.SetHour( nHour );
- rInfo.m_aDateTime.SetMin( nMin );
- rInfo.m_aDateTime.SetSec( nSec );
- rInfo.m_aDateTime.Set100Sec( n100Sec );
-
- rIn >> rInfo.m_bImpress;
-
- rInfo.m_bModified = FALSE;
-
- return rIn;
-}
-
-SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo)
-{
- USHORT nTemp;
-
- rOut.WriteByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 );
-
- nTemp = rInfo.m_aDateTime.GetDay();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetMonth();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetYear();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetHour();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetMin();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetSec();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.Get100Sec();
- rOut << nTemp;
-
- rOut << rInfo.m_bImpress;
-
- return rOut;
-}
-
-TemplateCache::TemplateCache()
-{
-}
-
-TemplateCache::~TemplateCache()
-{
- Clear();
-}
-
-void TemplateCache::Clear()
-{
- for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- delete pEntry;
- delete pDir;
- }
-}
-
-void TemplateCache::Load()
-{
- INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE ); // Download
- SvStream* pStream = aMedium.GetInStream();
-
- if( !pStream )
- return;
-
- UINT16 aCheck;
- *pStream >> aCheck;
-
- if(aCheck != nMagic)
- return;
-
- UINT16 nDirs;
- *pStream >> nDirs;
-
- for( UINT16 nDir = 0; pStream->GetError() == SVSTREAM_OK && nDir < nDirs; nDir++ )
- {
- TemplateCacheDirEntry* pDir = new TemplateCacheDirEntry();
- m_aDirs.Insert(pDir);
-
- pStream->ReadByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 );
-
- UINT16 nFiles;
- *pStream >> nFiles;
-
- for( UINT16 nFile = 0; pStream->GetError() == SVSTREAM_OK && nFile < nFiles; nFile++ )
- {
- TemplateCacheInfo* pEntry = new TemplateCacheInfo();
- *pStream >> *pEntry;
- pDir->m_aFiles.Insert(pEntry);
- }
- }
-
- if( pStream->GetError() != SVSTREAM_OK )
- {
- // Ein I/O Problem ist doch kein Beinbruch, dann wird der Cache halt neu erzeugt
- Clear();
- }
-}
-
-void TemplateCache::Save()
-{
- INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, FALSE ); // Download
- SvStream* pStream = aMedium.GetInStream();
-
- if( !pStream )
- return;
-
- UINT16 nCheck = nMagic;
- *pStream << nCheck;
-
- const UINT16 nDirs = (UINT16) m_aDirs.Count();
- *pStream << nDirs;
-
- for( TemplateCacheDirEntry* pDir = m_aDirs.First();
- pStream->GetError() == SVSTREAM_OK && pDir;
- pDir = m_aDirs.Next() )
- {
- pStream->WriteByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 );
-
- const UINT16 nFiles = (UINT16) pDir->m_aFiles.Count();
- *pStream << nFiles;
-
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First();
- pStream->GetError() == SVSTREAM_OK && pEntry;
- pEntry = pDir->m_aFiles.Next() )
- {
- *pStream << *pEntry;
- }
- }
-}
-
-TemplateCacheDirEntry* TemplateCache::GetDirEntry( const String& rPath )
-{
- TemplateCacheDirEntry* pDir = m_aDirs.GetCurObject();
- if( pDir && pDir->m_aPath == rPath )
- return pDir;
-
- for( pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- if( pDir->m_aPath == rPath )
- return pDir;
- }
-
- return NULL;
-}
-
-TemplateCacheInfo* TemplateCache::GetFileInfo( const String& rPath )
-{
- INetURLObject aUrl( rPath );
- String aPath( aUrl.GetPath() );
- String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
-
- DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
-
- if( NULL != pDir )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if( pEntry->GetFile() == aName )
- return pEntry;
- }
- }
-
- return NULL;
-}
-
-TemplateCacheInfo* TemplateCache::AddFileInfo( const String& rPath )
-{
- INetURLObject aUrl( rPath );
- String aPath( aUrl.GetPath() );
- String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
-
- DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
- TemplateCacheInfo* pEntry = NULL;
-
- if( pDir == NULL )
- {
- pDir = new TemplateCacheDirEntry();
- pDir->m_aPath = aPath;
- m_aDirs.Insert(pDir);
- }
-
- if( NULL != pDir )
- {
- for( pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if( pEntry->GetFile() == aName)
- return pEntry;
- }
-
- pEntry = new TemplateCacheInfo();
- pEntry->SetFile( aName );
- pDir->m_aFiles.Insert(pEntry);
- }
-
- return pEntry;
-}
-
-BOOL TemplateCache::ClearInvalidEntrys()
-{
- BOOL bModified = FALSE;
-
- for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if(!pEntry->IsValid())
- {
- pDir->m_aFiles.Remove(pEntry);
- delete pEntry;
- bModified = TRUE;
- }
- else if( pEntry->IsModified() )
- {
- bModified = TRUE;
- }
- }
-
- if( pDir->m_aFiles.Count() == 0 )
- {
- m_aDirs.Remove(pDir);
- delete pDir;
- }
- }
-
- return bModified;
-}
-
-
diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx
index dc3e7f636e8d..35bbd41de448 100644
--- a/sd/source/ui/dlg/dlgassim.hxx
+++ b/sd/source/ui/dlg/dlgassim.hxx
@@ -56,37 +56,7 @@ public:
};
-class TemplateCacheInfo
-{
-private:
- DateTime m_aDateTime;
- String m_aFile;
- BOOL m_bImpress;
- BOOL m_bValid;
- BOOL m_bModified;
-
-public:
- TemplateCacheInfo();
- TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress );
-
- BOOL IsValid() const { return m_bValid; }
- void SetValid( BOOL bValid = TRUE ) { m_bValid = bValid; }
-
- BOOL IsImpress() const { return m_bImpress; }
- void SetImpress( BOOL bImpress = TRUE ) { m_bImpress = bImpress; }
-
- const String& GetFile() const { return m_aFile; }
- void SetFile( const String& rFile ) { m_aFile = rFile; }
-
- const DateTime& GetDateTime() const { return m_aDateTime; }
- void SetDateTime( const DateTime& rDateTime ) { m_aDateTime = rDateTime; }
-
- BOOL IsModified() const { return m_bModified; }
- void SetModified( BOOL bModified = TRUE ) { m_bModified = bModified; }
-
- friend SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo);
- friend SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo);
-};
+class TemplateCacheInfo;
DECLARE_LIST( TemplateCacheInfoList, TemplateCacheInfo * )
@@ -98,22 +68,3 @@ public:
};
DECLARE_LIST( TemplateCacheDirEntryList, TemplateCacheDirEntry * )
-
-class TemplateCache
-{
-private:
- TemplateCacheDirEntryList m_aDirs;
- TemplateCacheDirEntry* GetDirEntry( const String& rPath );
- void Clear();
-public:
- TemplateCache();
- ~TemplateCache();
-
- void Load();
- void Save();
-
- TemplateCacheInfo* GetFileInfo( const String& rPath );
- TemplateCacheInfo* AddFileInfo( const String& rPath );
-
- BOOL ClearInvalidEntrys();
-};
diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx
index 14c1209875ef..1a5a612d37ad 100644
--- a/sd/source/ui/dlg/dlgctrls.cxx
+++ b/sd/source/ui/dlg/dlgctrls.cxx
@@ -51,12 +51,6 @@ FadeEffectLB::FadeEffectLB( Window* pParent, SdResId Id )
{
}
-FadeEffectLB::FadeEffectLB( Window* pParent, WinBits aWB )
-: ListBox( pParent, aWB ),
- mpImpl( new FadeEffectLBImpl )
-{
-}
-
FadeEffectLB::~FadeEffectLB()
{
delete mpImpl;
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 2b78a649eaef..6cd220d5a5bc 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -96,27 +96,35 @@ SdSnapLineDlg::SdSnapLineDlg(
DBG_ASSERT( pPool, "Wo ist der Pool?" );
SfxMapUnit ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
- // Hier werden die Max- und MinWerte in Ahaengigkeit von der
+ // #i48497# Consider page origin
+ SdrPageView* pPV = pView->GetSdrPageView();
+ Point aLeftTop(aWorkArea.Left()+1, aWorkArea.Top()+1);
+ pPV->LogicToPagePos(aLeftTop);
+ Point aRightBottom(aWorkArea.Right()-2, aWorkArea.Bottom()-2);
+ pPV->LogicToPagePos(aRightBottom);
+
+ // Hier werden die Max- und MinWerte in Abhaengigkeit von der
// WorkArea, PoolUnit und der FieldUnit:
- SetMetricValue( aMtrFldX, aWorkArea.Left(), ePoolUnit );
+ SetMetricValue( aMtrFldX, aLeftTop.X(), ePoolUnit );
+
long nValue = static_cast(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMin( nValue );
aMtrFldX.SetFirst( nValue );
- SetMetricValue( aMtrFldX, aWorkArea.Right()+1, ePoolUnit );
+ SetMetricValue( aMtrFldX, aRightBottom.X(), ePoolUnit );
nValue = static_cast(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMax( nValue );
aMtrFldX.SetLast( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Top(), ePoolUnit );
+ SetMetricValue( aMtrFldY, aLeftTop.Y(), ePoolUnit );
nValue = static_cast(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMin( nValue );
aMtrFldY.SetFirst( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Bottom()+1, ePoolUnit );
+ SetMetricValue( aMtrFldY, aRightBottom.Y(), ePoolUnit );
nValue = static_cast(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMax( nValue );
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 71a7145425b7..a42ce43a2c6d 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -45,7 +45,6 @@
#include "DrawDocShell.hxx"
#include "ViewShell.hxx"
#include "ViewShellBase.hxx"
-#include "showview.hxx"
#include "drawview.hxx"
#include "sdpage.hxx"
#include "sfx2/viewfrm.hxx"
@@ -81,17 +80,6 @@ SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId )
SetBackground( aEmpty );
}
-SdDocPreviewWin::SdDocPreviewWin( Window* pParent )
-: Control(pParent, 0 ), pMetaFile( 0 ), bInEffect(FALSE), mpObj(NULL), mnShowPage(0)
-{
- SetBorderStyle( WINDOW_BORDER_MONO );
- svtools::ColorConfig aColorConfig;
- Wallpaper aEmpty;
- SetBackground( aEmpty );
- Resize();
- Show();
-}
-
SdDocPreviewWin::~SdDocPreviewWin()
{
delete pMetaFile;
@@ -104,13 +92,6 @@ void SdDocPreviewWin::Resize()
mxSlideShow->resize( GetSizePixel() );
}
-void SdDocPreviewWin::SetGDIFile( GDIMetaFile* pFile )
-{
- delete pMetaFile;
- pMetaFile = pFile;
- Invalidate();
-}
-
void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint )
{
Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 182c70954111..71fad02f24a7 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -69,7 +69,6 @@ private:
using sfx2::FileDialogHelper::Execute;
#endif
- friend class SdExportFileDialog;
friend class SdOpenSoundFileDialog;
css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess;
@@ -95,8 +94,6 @@ public:
// overwritten from FileDialogHelper, to receive user feedback
virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
-
- sal_Bool SelectionBoxState() const;
};
// ------------------------------------------------------------------------
@@ -313,91 +310,6 @@ ErrCode SdFileDialog_Imp::Execute()
return FileDialogHelper::Execute();
}
-// ------------------------------------------------------------------------
-sal_Bool SdFileDialog_Imp::SelectionBoxState() const
-{
- if ( !mbUsableSelection || !mxControlAccess.is() )
- return sal_False;
-
- sal_Bool bState(0);
- try
- {
- mxControlAccess->getValue( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 ) >>= bState;
- }
- catch( css::lang::IllegalArgumentException )
- {
-#ifdef DBG_UTIL
- DBG_ERROR( "Cannot access \"selection\" checkbox" );
-#endif
- }
-
- return bState;
-}
-
-
-// --------------------------------------------------------------------
-// ----------- SdExportFileDialog ---------------------------
-// --------------------------------------------------------------------
-
-// these are simple forwarders
-SdExportFileDialog::SdExportFileDialog(BOOL bHaveCheckbox) :
- mpImpl( new SdFileDialog_Imp( css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION,
- bHaveCheckbox ) )
-{
- // setup filter
- const String aHTMLFilter( SdResId( STR_EXPORT_HTML_NAME ) );
- GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
- const USHORT nFilterCount = pFilter->GetExportFormatCount();
-
- // add HTML filter
- mpImpl->AddFilter( aHTMLFilter, String( SdResId( STR_EXPORT_HTML_FILTER ) ) );
-
- // add other graphic filters
- for ( USHORT i = 0; i < nFilterCount; i++ )
- {
- mpImpl->AddFilter( pFilter->GetExportFormatName( i ),
- pFilter->GetExportWildcard( i ) );
- }
-
- // set dialog title
- mpImpl->SetTitle( String( SdResId( STR_EXPORT_DIALOG_TITLE ) ) );
-}
-
-// ------------------------------------------------------------------------
-SdExportFileDialog::~SdExportFileDialog()
-{
-}
-
-// ------------------------------------------------------------------------
-ErrCode SdExportFileDialog::Execute()
-{
- return mpImpl->Execute();
-}
-
-String SdExportFileDialog::GetPath() const
-{
- return mpImpl->GetPath();
-}
-
-// ------------------------------------------------------------------------
-void SdExportFileDialog::SetPath( const String& rPath )
-{
- mpImpl->SetDisplayDirectory( rPath );
-}
-
-// ------------------------------------------------------------------------
-String SdExportFileDialog::ReqCurrentFilter() const
-{
- return mpImpl->GetCurrentFilter();
-}
-
-// ------------------------------------------------------------------------
-BOOL SdExportFileDialog::IsExportSelection() const
-{
- return mpImpl->SelectionBoxState();
-}
-
-
// --------------------------------------------------------------------
// ----------- SdOpenSoundFileDialog -----------------------
// --------------------------------------------------------------------
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 294e61f3fe40..b48a1682bba6 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -291,12 +291,6 @@ HeaderFooterDialog::~HeaderFooterDialog()
// -----------------------------------------------------------------------
-void HeaderFooterDialog::initTabPages()
-{
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
const USHORT nId = pTabCtrl->GetCurPageId();
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index f16e90dd7791..5d260367f383 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -142,7 +142,6 @@ List* SdInsertPagesObjsDlg::GetList( USHORT nType )
// wird das gesamte Dokument (und nicht mehr!) eingefuegt.
if( aLbTree.GetSelectionCount() == 0 ||
( aLbTree.IsSelected( aLbTree.First() ) ) )
- //return( aLbTree.GetBookmarkList( nType ) );
return( NULL ); // #37350#
}
return( aLbTree.GetSelectEntryList( nType ) );
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index 6bc5a89a08ed..ef763dc87f5f 100644
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -63,7 +63,6 @@ SRC1FILES =\
navigatr.src\
sdpreslt.src\
morphdlg.src\
- printdlg.src\
dlgfield.src\
custsdlg.src\
brkdlg.src\
@@ -71,9 +70,7 @@ SRC1FILES =\
dlgolbul.src \
LayerDialog.src \
PaneDockingWindow.src \
- layeroptionsdlg.src \
- printdialog.src
-
+ layeroptionsdlg.src
SLOFILES = \
$(SLO)$/inspagob.obj \
@@ -103,7 +100,6 @@ SLOFILES = \
$(SLO)$/navigatr.obj \
$(SLO)$/sdpreslt.obj \
$(SLO)$/morphdlg.obj \
- $(SLO)$/printdlg.obj \
$(SLO)$/dlgfield.obj \
$(SLO)$/custsdlg.obj \
$(SLO)$/brkdlg.obj \
@@ -121,8 +117,7 @@ SLOFILES = \
$(SLO)$/sdabstdlg.obj \
$(SLO)$/PaneChildWindows.obj \
$(SLO)$/PaneDockingWindow.obj \
- $(SLO)$/PaneShells.obj \
- $(SLO)$/printdialog.obj
+ $(SLO)$/PaneShells.obj
LIB1TARGET= $(SLB)$/$(TARGET).lib
@@ -148,8 +143,7 @@ LIB1OBJFILES= \
$(SLO)$/sdabstdlg.obj \
$(SLO)$/PaneChildWindows.obj \
$(SLO)$/PaneDockingWindow.obj \
- $(SLO)$/PaneShells.obj \
- $(SLO)$/printdialog.obj
+ $(SLO)$/PaneShells.obj
LIB2TARGET= $(SLB)$/sdui.lib
@@ -174,7 +168,6 @@ LIB2OBJFILES= \
$(SLO)$/dlgolbul.obj \
$(SLO)$/paragr.obj \
$(SLO)$/present.obj \
- $(SLO)$/printdlg.obj \
$(SLO)$/prltempl.obj \
$(SLO)$/sdpreslt.obj \
$(SLO)$/tabtempl.obj \
diff --git a/sd/source/ui/dlg/printdialog.cxx b/sd/source/ui/dlg/printdialog.cxx
deleted file mode 100644
index 3e02a18c2af7..000000000000
--- a/sd/source/ui/dlg/printdialog.cxx
+++ /dev/null
@@ -1,342 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include
-
-#include "sdresid.hxx"
-#include "printdialog.hxx"
-#include "printdialog.hrc"
-#include "optsitem.hxx"
-#include "res_bmp.hrc"
-
-class SdPrintDialogImpl : public ModalDialog
-{
-public:
- SdPrintDialogImpl()
- : ModalDialog( 0, SdResId( DLG_PRINTDIALOG ) )
- {
- }
-
- virtual ~SdPrintDialogImpl()
- {
- FreeResource();
- }
-};
-
-/**
- aOptions.GetOptionsPrint().SetDraw( aCbxDraw.IsChecked() );
- aOptions.GetOptionsPrint().SetNotes( aCbxNotes.IsChecked() );
- aOptions.GetOptionsPrint().SetHandout( aCbxHandout.IsChecked() );
- aOptions.GetOptionsPrint().SetOutline( aCbxOutline.IsChecked() );
-
- aCbxDraw.Check( pPrintOpts->GetOptionsPrint().IsDraw() );
- aCbxNotes.Check( pPrintOpts->GetOptionsPrint().IsNotes() );
- aCbxHandout.Check( pPrintOpts->GetOptionsPrint().IsHandout() );
- aCbxOutline.Check( pPrintOpts->GetOptionsPrint().IsOutline() );
-
- only for impress!!
-*/
-
-SdPrintDialog* SdPrintDialog::Create( Window* pWindow, bool bImpress )
-{
- return new SdPrintDialog( pWindow, bImpress );
-}
-
-SdPrintDialog::SdPrintDialog( Window* pWindow, bool bImpress )
-: PrintDialog( pWindow, false )
-, mbImpress( bImpress )
-{
- if( bImpress )
- {
- mpControls.resize( PRINTDLG_CONTROLCOUNT );
-
- boost::scoped_ptr< SdPrintDialogImpl > aImplDlg( new SdPrintDialogImpl() );
-
- USHORT nChildCount = GetChildCount();
-
- mpControls[FL_PRINTCONTENT-1].reset( new FixedLine( this, SdResId( FL_PRINTCONTENT ) ) );
- mpControls[FT_CONTENT-1].reset( new FixedText( this, SdResId( FT_CONTENT ) ) );
- mpControls[CB_CONTENT-1].reset( new ListBox( this, SdResId( CB_CONTENT ) ) );
- mpControls[FT_SLIDESPERPAGE-1].reset( new FixedText( this, SdResId( FT_SLIDESPERPAGE ) ) );
- mpControls[CB_SLIDESPERPAGE-1].reset( new ListBox( this, SdResId( CB_SLIDESPERPAGE ) ) );
- mpControls[FT_ORDER-1].reset( new FixedText( this, SdResId( FT_ORDER ) ) );
- mpControls[RBT_HORIZONTAL-1].reset( new RadioButton( this, SdResId( RBT_HORIZONTAL ) ) );
- mpControls[RBT_VERTICAL-1].reset( new RadioButton( this, SdResId( RBT_VERTICAL ) ) );
- mpControls[IMG_PREVIEW-1].reset( new FixedImage( this, SdResId( IMG_PREVIEW ) ) );
-
- sal_Int32 nHeight = LogicToPixel( Size( 0, 71 ), MAP_APPFONT ).Height();
-
- sal_Int32 nInsertY = nHeight;
-
- Window* pNextControl = 0;
-
- // find second fixed line
- USHORT nChild = 0;
- USHORT nFixedLine = 2;
- while( nChildCount-- )
- {
- pNextControl = GetChild( nChild++ );
- if( dynamic_cast< FixedLine* >( pNextControl ) )
- {
- if( --nFixedLine == 0 )
- {
- nInsertY = pNextControl->GetPosPixel().Y();
- nChild--;
- nChildCount++;
- break;
- }
- }
- }
-
- // move lower controls down
- std::vector< Window* > aLowerControls;
- while( nChildCount-- )
- {
- Window* pControl = GetChild( nChild++ );
- if( pControl )
- {
- Point aPos( pControl->GetPosPixel() );
- aPos.Y() += nHeight;
- pControl->SetPosPixel(aPos);
- aLowerControls.push_back(pControl);
- }
- }
-
- // positionate new controls
- for( int i = 0; i < PRINTDLG_CONTROLCOUNT; i++ )
- {
- Control* pControl = mpControls[i].get();
- if( pControl )
- {
- Point aPos( pControl->GetPosPixel() );
- aPos.Y() += nInsertY;
- pControl->SetPosPixel(aPos);
- pControl->SetZOrder( pNextControl, WINDOW_ZORDER_BEFOR );
- }
- }
-
- Size aDialogSize( GetSizePixel() );
- aDialogSize.Height() += nHeight;
- SetSizePixel( aDialogSize );
- }
-}
-
-SdPrintDialog::~SdPrintDialog()
-{
-}
-
-void SdPrintDialog::Init( const SdOptionsPrintItem* pPrintOpts )
-{
- if( mbImpress )
- {
- bool bDraw = true, bHandout = false, bNotes = false, bOutline = false;
- sal_uInt16 nPagesPerHandout = 6;
- bool bHandoutHorizontal = true;
-
- if( pPrintOpts )
- {
- const SdOptionsPrint& rOpts = pPrintOpts->GetOptionsPrint();
- bDraw = rOpts.IsDraw();
- bHandout = rOpts.IsHandout();
- bNotes = rOpts.IsNotes();
- bOutline = rOpts.IsOutline();
- nPagesPerHandout = rOpts.GetHandoutPages();
- bHandoutHorizontal = rOpts.IsHandoutHorizontal();
- }
-
- sal_uInt16 nPos = 0;
- if( !bDraw )
- {
- if( bHandout )
- nPos = 1;
- else if( bNotes )
- nPos = 2;
- else if( bOutline )
- nPos = 3;
- }
- static_cast( mpControls[CB_CONTENT-1].get() )->SelectEntryPos( nPos );
-
- switch( nPagesPerHandout )
- {
- case 1: nPos = 0; break;
- case 2: nPos = 1; break;
- case 3: nPos = 2; break;
- case 4: nPos = 3; break;
- case 5:
- case 6: nPos = 4; break;
- default:nPos = 5; break;
- }
- static_cast( mpControls[CB_SLIDESPERPAGE-1].get() )->SelectEntryPos( nPos );
-
-
- static_cast( mpControls[RBT_HORIZONTAL-1].get() )->Check( bHandoutHorizontal == true ) ;
- static_cast( mpControls[RBT_VERTICAL-1].get() )->Check( bHandoutHorizontal == false ) ;
-
- LoadPreviewImages();
-
- Image* pImage = mpPreviews[0].get();
- if( pImage )
- {
- FixedImage* pPreviewImage = static_cast( mpControls[IMG_PREVIEW-1].get() );
-
- Point aPos( pPreviewImage->GetPosPixel() );
- pPreviewImage->SetSizePixel( pImage->GetSizePixel() );
- aPos.X() -= pImage->GetSizePixel().Width();
-
- pPreviewImage->SetPosPixel( aPos );
- }
-
- UpdateStates();
-
- Link aLink( LINK(this,SdPrintDialog,UpdateStatesHdl) );
- static_cast( mpControls[CB_CONTENT-1].get() )->SetSelectHdl( aLink );
- static_cast( mpControls[CB_SLIDESPERPAGE-1].get() )->SetSelectHdl( aLink );
- }
-}
-
-bool SdPrintDialog::Fill( SdOptionsPrintItem* pPrintOpts )
-{
- bool bChanges = false;
- if( mbImpress && pPrintOpts )
- {
- SdOptionsPrint& rOpts = pPrintOpts->GetOptionsPrint();
-
- BOOL bDraw = FALSE, bHandout = FALSE, bNotes = FALSE, bOutline = FALSE;
- switch( static_cast( mpControls[CB_CONTENT-1].get() )->GetSelectEntryPos() )
- {
- case 1: bHandout = TRUE; break;
- case 2: bNotes = TRUE; break;
- case 3: bOutline = TRUE; break;
- default: bDraw = TRUE; break;
- }
- if( rOpts.IsDraw() != bDraw )
- {
- bChanges = true;
- rOpts.SetDraw( bDraw );
- }
-
- if( rOpts.IsNotes() != bNotes )
- {
- bChanges = true;
- rOpts.SetNotes( bNotes );
- }
-
- if( rOpts.IsHandout() != bHandout )
- {
- bChanges = true;
- rOpts.SetHandout( bHandout );
- }
-
- if( rOpts.IsOutline() != bOutline )
- {
- bChanges = true;
- rOpts.SetOutline( bOutline );
- }
-
- sal_uInt16 nSlidePerHandout = 6;
- switch( static_cast( mpControls[CB_SLIDESPERPAGE-1].get() )->GetSelectEntryPos() )
- {
- case 0: nSlidePerHandout = 1; break;
- case 1: nSlidePerHandout = 2; break;
- case 2: nSlidePerHandout = 3; break;
- case 3: nSlidePerHandout = 4; break;
- case 5: nSlidePerHandout = 9; break;
- }
-
- if( rOpts.GetHandoutPages() != nSlidePerHandout )
- {
- bChanges = true;
- rOpts.SetHandoutPages( nSlidePerHandout );
- }
-
- const BOOL bHorizontal = static_cast( mpControls[RBT_HORIZONTAL-1].get() )->IsChecked();
- if( rOpts.IsHandoutHorizontal() != bHorizontal )
- {
- bChanges = true;
- rOpts.SetHandoutHorizontal( bHorizontal );
- }
- }
- return bChanges;
-}
-
-static const sal_uInt16 PREVIEW_COUNT = 6;
-
-void SdPrintDialog::UpdateStates()
-{
- const sal_uInt16 nSlidesPerPagePos = static_cast( mpControls[CB_SLIDESPERPAGE-1].get() )->GetSelectEntryPos();
- bool bHandout = static_cast( mpControls[CB_CONTENT-1].get() )->GetSelectEntryPos() == 1;
- bool bOrder = bHandout && ( nSlidesPerPagePos >= 3);
-
- static_cast( mpControls[FT_SLIDESPERPAGE-1].get() )->Enable( bHandout );
- static_cast( mpControls[CB_SLIDESPERPAGE-1].get() )->Enable( bHandout );
- static_cast( mpControls[FT_ORDER-1].get() )->Enable( bHandout && bOrder );
- static_cast( mpControls[RBT_HORIZONTAL-1].get() )->Enable( bHandout && bOrder );
- static_cast( mpControls[RBT_VERTICAL-1].get() )->Enable( bHandout && bOrder );
-
- FixedImage* pPreviewImage = static_cast( mpControls[IMG_PREVIEW-1].get() );
-
- if( pPreviewImage )
- {
- pPreviewImage->Show( bHandout );
- if( bHandout )
- {
- if( nSlidesPerPagePos < PREVIEW_COUNT)
- {
- if( mpPreviews[nSlidesPerPagePos].get() )
- pPreviewImage->SetModeImage( *mpPreviews[nSlidesPerPagePos].get(), BMP_COLOR_NORMAL );
-
- if( mpPreviewsHC[nSlidesPerPagePos].get() )
- pPreviewImage->SetModeImage( *mpPreviewsHC[nSlidesPerPagePos].get(), BMP_COLOR_HIGHCONTRAST );
- }
- }
- }
-}
-
-IMPL_LINK( SdPrintDialog, UpdateStatesHdl, void*, EMPTYARG )
-{
- UpdateStates();
- return 0;
-}
-
-void SdPrintDialog::LoadPreviewImages()
-{
- static const sal_uInt16 aResId[2*PREVIEW_COUNT] = { BMP_FOILH_01, BMP_FOILH_01_H, BMP_FOILH_02, BMP_FOILH_02_H, BMP_FOILH_03, BMP_FOILH_03_H, BMP_FOILH_04, BMP_FOILH_04_H, BMP_FOILH_06, BMP_FOILH_06_H, BMP_FOILH_09, BMP_FOILH_09_H };
-
- mpPreviews.resize( PREVIEW_COUNT );
- mpPreviewsHC.resize( PREVIEW_COUNT );
-
- const sal_uInt16* pResId( aResId );
- for( sal_uInt16 i = 0; i < PREVIEW_COUNT; i++ )
- {
- mpPreviews[i].reset( new Image( Bitmap( SdResId( *pResId++ ) ) ) );
- mpPreviewsHC[i].reset( new Image( Bitmap( SdResId( *pResId++ ) ) ) );
- }
-}
-
diff --git a/sd/source/ui/dlg/printdialog.hrc b/sd/source/ui/dlg/printdialog.hrc
deleted file mode 100644
index 702dc3898b18..000000000000
--- a/sd/source/ui/dlg/printdialog.hrc
+++ /dev/null
@@ -1,38 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define DLG_PRINTDIALOG 1847
-#define FL_PRINTCONTENT 1
-#define FT_CONTENT 2
-#define CB_CONTENT 3
-#define FT_SLIDESPERPAGE 4
-#define CB_SLIDESPERPAGE 5
-#define FT_ORDER 6
-#define RBT_HORIZONTAL 7
-#define RBT_VERTICAL 8
-#define IMG_PREVIEW 9
-#define PRINTDLG_CONTROLCOUNT 9
diff --git a/sd/source/ui/dlg/printdialog.src b/sd/source/ui/dlg/printdialog.src
deleted file mode 100644
index be014c588b55..000000000000
--- a/sd/source/ui/dlg/printdialog.src
+++ /dev/null
@@ -1,130 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "app.hrc"
-#include "printdialog.hrc"
-
-ModalDialog DLG_PRINTDIALOG
-{
- Size = MAP_APPFONT ( 260, 77 ) ;
-
- FixedLine FL_PRINTCONTENT
- {
- Pos = MAP_APPFONT ( 6 , 0 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Print content" ;
- };
- FixedText FT_CONTENT
- {
- Pos = MAP_APPFONT ( 12 , 12 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- Text [ en-US ] = "Content" ;
- };
- ListBox CB_CONTENT
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 10 ) ;
- Size = MAP_APPFONT ( 108 , 80 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "Slides" ; > ;
- < "Handouts" ; > ;
- < "Notes" ; > ;
- < "Outline" ; > ;
- };
- };
- FixedText FT_SLIDESPERPAGE
- {
- Pos = MAP_APPFONT ( 12 , 30 ) ;
- Size = MAP_APPFONT ( 45 , 8 ) ;
- Text [ en-US ] = "Slides per page" ;
- };
- ListBox CB_SLIDESPERPAGE
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 28 ) ;
- Size = MAP_APPFONT ( 24 , 80 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "1" ; > ;
- < "2" ; > ;
- < "3" ; > ;
- < "4" ; > ;
- < "6" ; > ;
- < "9" ; > ;
- };
- };
- FixedText FT_ORDER
- {
- Pos = MAP_APPFONT ( 12 , 47 ) ;
- Size = MAP_APPFONT ( 45 , 8 ) ;
- Text [ en-US ] = "Order" ;
- };
- RadioButton RBT_HORIZONTAL
- {
- Pos = MAP_APPFONT ( 60 , 45 ) ;
- Size = MAP_APPFONT ( 60 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Horizontal" ;
- };
- RadioButton RBT_VERTICAL
- {
- Pos = MAP_APPFONT ( 60 , 58 ) ;
- Size = MAP_APPFONT ( 60 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Vertical" ;
- };
- FixedImage IMG_PREVIEW
- {
- Pos = MAP_APPFONT ( 168 , 28 ) ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sd/source/ui/dlg/printdlg.cxx b/sd/source/ui/dlg/printdlg.cxx
deleted file mode 100644
index cc20e0f67a84..000000000000
--- a/sd/source/ui/dlg/printdlg.cxx
+++ /dev/null
@@ -1,88 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#ifdef SD_DLLIMPLEMENTATION
-#undef SD_DLLIMPLEMENTATION
-#endif
-
-
-#include "sdresid.hxx"
-#include "printdlg.hxx"
-#include "printdlg.hrc"
-
-/*************************************************************************
-|*
-|* SdPrintDlg::SdPrintDlg()
-|*
-|* Beschreibung Dialog zum Einstellen von Printoptionen
-|*
-*************************************************************************/
-
-SdPrintDlg::SdPrintDlg( Window* pWindow ) :
- ModalDialog ( pWindow, SdResId( DLG_PRINT_WARNINGS ) ),
- aFtInfo ( this, SdResId( FI_INFO ) ),
- aRbtScale ( this, SdResId( RBT_SCALE ) ),
- aRbtPoster ( this, SdResId( RBT_POSTER ) ),
- aRbtCut ( this, SdResId( RBT_CUT ) ),
- aGrpOptions ( this, SdResId( GRP_OPTIONS ) ),
- aBtnOK ( this, SdResId( BTN_OK ) ),
- aBtnCancel ( this, SdResId( BTN_CANCEL ) ),
- aBtnHelp ( this, SdResId( BTN_HELP ) )
-{
- FreeResource();
-
- aRbtScale.Check();
-}
-
-/*************************************************************************
-|*
-|* SdPrintDlg::GetAttr()
-|*
-|* Beschreibung Liefert eingestellte Option zurueck
-|*
-*************************************************************************/
-
-USHORT SdPrintDlg::GetAttr()
-{
- USHORT nOption = 0;
-
- if( aRbtScale.IsChecked() )
- nOption = 1;
- else if( aRbtPoster.IsChecked() )
- nOption = 2;
- else if( aRbtCut.IsChecked() )
- nOption = 3;
-
- return( nOption );
-}
-
-
-
-
diff --git a/sd/source/ui/dlg/printdlg.src b/sd/source/ui/dlg/printdlg.src
deleted file mode 100644
index 45121e72f3ff..000000000000
--- a/sd/source/ui/dlg/printdlg.src
+++ /dev/null
@@ -1,130 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "printdlg.hrc"
-ModalDialog DLG_PRINT_WARNINGS
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 212 , 87 ) ;
- Moveable = TRUE ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 156 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 156 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 156 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_OPTIONS
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 144 , 8 ) ;
- Text [ en-US ] = "Print options" ;
- };
- RadioButton RBT_SCALE
- {
- Pos = MAP_APPFONT ( 12 , 42 ) ;
- Size = MAP_APPFONT ( 129 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Fit page to print range" ;
- };
- RadioButton RBT_POSTER
- {
- Pos = MAP_APPFONT ( 12 , 54 ) ;
- Size = MAP_APPFONT ( 130 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Print on multiple pages" ;
- };
- RadioButton RBT_CUT
- {
- Pos = MAP_APPFONT ( 12 , 66 ) ;
- Size = MAP_APPFONT ( 127 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Trim" ;
- };
- FixedText FI_INFO
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 134 , 25 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Die Seiteneinstellungen stimmen nicht mit dem Druckbereich überein.\nSie können folgende Optionen wählen : Die Seiteneinstellungen stimmen nicht mit dem Druckbereich ³berein.\nSie k÷nnen folgende Optionen wõhlen */
- Text [ en-US ] = "The page settings do not match the print range.\nChoose one of the following options" ;
- WordBreak = TRUE ;
- };
- Text [ en-US ] = "Warning Print Options" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index ea7a702e539e..3c9aad38c332 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -41,15 +41,6 @@
#include "app.hrc"
#include
#include
-// STATIC DATA -----------------------------------------------------------
-
-static USHORT pPrintOptRanges[] =
-{
- ATTR_OPTIONS_PRINT,
- ATTR_OPTIONS_PRINT,
- 0
-};
-
/*************************************************************************
|*
@@ -236,13 +227,6 @@ SfxTabPage* SdPrintOptions::Create( Window* pWindow,
//-----------------------------------------------------------------------
-USHORT* SdPrintOptions::GetRanges()
-{
- return pPrintOptRanges;
-}
-
-//-----------------------------------------------------------------------
-
IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx )
{
// there must be at least one of them checked
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 468b55f56c8a..aa0bb5ce9f27 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -51,7 +51,6 @@
#include "OutlineBulletDlg.hxx"
#include "paragr.hxx"
#include "present.hxx"
-#include "printdlg.hxx"
#include "prltempl.hxx"
#include "sdpreslt.hxx"
#include "tabtempl.hxx"
@@ -76,7 +75,6 @@ IMPL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractMorphDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractSdPrintDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl);
@@ -326,13 +324,6 @@ void AbstractSdStartPresDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
}
// AbstractSdStartPresDlg_Impl end
-//AbstractSdPrintDlg_Impl begin
-USHORT AbstractSdPrintDlg_Impl::GetAttr()
-{
- return pDlg->GetAttr();
-}
-// AbstractSdPrintDlg_Impl end
-
//AbstractSdPresLayoutDlg_Impl begin
void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
{
@@ -498,13 +489,6 @@ AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentatio
}
// add for SdStartPresentationDlg end
-// add for SdPrintDlg begin
-AbstractSdPrintDlg * SdAbstractDialogFactory_Impl::CreateSdPrintDlg( ::Window* pWindow )
-{
- return new AbstractSdPrintDlg_Impl( new SdPrintDlg( pWindow ) );
-}
-// add for SdPrintDlg end
-
// add for SdPresLayoutTemplateDlg begin
SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool )
{
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 44f5b0813a04..fa5e53ebac54 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -209,14 +209,6 @@ class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
virtual void GetAttr( SfxItemSet& rOutAttrs );
};
-// add for SdPrintDlg
-class SdPrintDlg;
-class AbstractSdPrintDlg_Impl : public AbstractSdPrintDlg
-{
- DECL_ABSTDLG_BASE(AbstractSdPrintDlg_Impl,SdPrintDlg)
- virtual USHORT GetAttr();
-};
-
// add for SdPresLayoutDlg
class SdPresLayoutDlg;
class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
@@ -281,7 +273,6 @@ public:
virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList );
- virtual AbstractSdPrintDlg* CreateSdPrintDlg( ::Window* pWindow ); //add for SdPrintDlg
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView );
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 9dbf8e22629c..275d39af4ea5 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -56,6 +56,7 @@
#include
#include
+#include
#include
using namespace com::sun::star;
@@ -728,61 +729,6 @@ List* SdPageObjsTLB::GetSelectEntryList( USHORT nDepth )
return( pList );
}
-/*************************************************************************
-|*
-|* Alle Pages (und Objekte) des Docs zurueckgeben
-|* nType == 0 -> Seiten
-|* nType == 1 -> Objekte
-|*
-\************************************************************************/
-
-List* SdPageObjsTLB::GetBookmarkList( USHORT nType )
-{
- List* pList = NULL;
-
- if( GetBookmarkDoc() )
- {
- SdPage* pPage = NULL;
- String* pName = NULL;
- USHORT nPage = 0;
- const USHORT nMaxPages = mpBookmarkDoc->GetSdPageCount( PK_STANDARD );
-
- while( nPage < nMaxPages )
- {
- pPage = mpBookmarkDoc->GetSdPage( nPage, PK_STANDARD );
-
- if( nType == 0 ) // Seitennamen einfuegen
- {
- if( !pList )
- pList = new List();
-
- pName = new String( pPage->GetRealName() );
- pList->Insert( pName, LIST_APPEND );
- }
- else // Objektnamen einfuegen
- {
- // Ueber Objekte der Seite iterieren
- SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
- while( aIter.IsMore() )
- {
- SdrObject* pObj = aIter.Next();
- String aStr( GetObjectName( pObj ) );
- if( aStr.Len() )
- {
- if( !pList )
- pList = new List();
-
- pName = new String( aStr );
- pList->Insert( pName, LIST_APPEND );
- }
- }
- }
- nPage++;
- }
- }
- return( pList );
-}
-
/*************************************************************************
|*
|* Eintraege werden erst auf Anforderung (Doppelklick) eingefuegt
@@ -1268,7 +1214,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
catch (com::sun::star::uno::Exception&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
if (nRet == DND_ACTION_NONE)
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index ebe0243f7d99..af2668fc9dad 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -86,15 +86,6 @@ using namespace ::com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-static USHORT pActionRanges[] =
-{
- ATTR_ANIMATION_TRANSPCOLOR,
- ATTR_ANIMATION_TRANSPCOLOR,
- ATTR_ACTION_START,
- ATTR_ACTION_END,
- 0
-};
-
#define DOCUMENT_TOKEN (sal_Unicode('#'))
/*************************************************************************
@@ -423,13 +414,6 @@ SfxTabPage* SdTPAction::Create( Window* pWindow,
//------------------------------------------------------------------------
-USHORT* SdTPAction::GetRanges()
-{
- return( pActionRanges );
-}
-
-//------------------------------------------------------------------------
-
void SdTPAction::UpdateTree()
{
if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
@@ -849,35 +833,6 @@ void SdTPAction::SetEditText( String const & rStr )
}
}
-String SdTPAction::GetMacroName( const String& rMacroPath )
-{
- String result = rMacroPath;
-
- // try to get name by parsing the macro path
- // using the new URI parsing services
-
- Reference< XMultiServiceFactory > xSMgr =
- ::comphelper::getProcessServiceFactory();
-
- Reference< com::sun::star::uri::XUriReferenceFactory >
- xFactory( xSMgr->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY );
-
- if ( xFactory.is() )
- {
- Reference< com::sun::star::uri::XVndSunStarScriptUrl >
- xUrl( xFactory->parse( rMacroPath ), UNO_QUERY );
-
- if ( xUrl.is() )
- {
- result = xUrl->getName();
- }
- }
-
- return result;
-}
-
//------------------------------------------------------------------------
String SdTPAction::GetEditText( BOOL bFullDocDestination )
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 29218a7b985a..a033661e7c85 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -312,18 +312,6 @@ BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::
|*
\************************************************************************/
-sal_Bool DrawDocShell::IsNewDocument() const
-{
- return( mbNewDocument &&
- ( !GetMedium() || GetMedium()->GetURLObject().GetProtocol() == INET_PROT_NOT_VALID ) );
-}
-
-/*************************************************************************
-|*
-|* Load: Pools und Dokument laden
-|*
-\************************************************************************/
-
BOOL DrawDocShell::Load( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index f284651b91e5..78b1b9434ad0 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -548,21 +548,6 @@ void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ )
}
}
-::Window* DrawDocShell::GetWindow() const
-{
- SfxViewFrame* pFrame = GetFrame();
- if( pFrame == NULL )
- pFrame = SfxViewFrame::GetFirst( this );
-
- if( pFrame )
- return &(pFrame->GetWindow());
- else
- {
- DBG_ASSERT( 0, "No active window for DrawDocShell found! (next gpf is caused by this assertion)" );
- return NULL;
- }
-}
-
/*************************************************************************
|*
|* Callback fuer ExecuteSpellPopup()
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
index c8256bc2c0a6..55e22361ad3a 100644
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
@@ -87,15 +87,12 @@ const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC2m
-
const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC1andC2 (void) const
{
return maC1andC2;
}
-
-
void ConfigurationClassifier::PartitionResources (
const ::com::sun::star::uno::Sequence >& rS1,
const ::com::sun::star::uno::Sequence >& rS2)
@@ -222,8 +219,6 @@ void ConfigurationClassifier::CopyResources (
}
-
-
void ConfigurationClassifier::TraceResourceIdVector (
const sal_Char* pMessage,
const ResourceIdVector& rResources) const
@@ -240,6 +235,4 @@ void ConfigurationClassifier::TraceResourceIdVector (
}
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 68bf55bb7495..2f846e50be25 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 {
@@ -101,8 +101,6 @@ public:
const Reference& rxController);
~Implementation (void);
- void Initialize (const Reference& rxController);
-
Reference mxControllerManager;
/** The Broadcaster class implements storing and calling of listeners.
@@ -119,8 +117,6 @@ public:
ViewShellBase* mpBase;
- bool mbIsInitialized;
-
::boost::shared_ptr mpResourceFactoryContainer;
::boost::shared_ptr mpResourceManager;
@@ -705,7 +701,6 @@ ConfigurationController::Implementation::Implementation (
mpBroadcaster(new ConfigurationControllerBroadcaster(&rController)),
mxRequestedConfiguration(new Configuration(&rController, true)),
mpBase(NULL),
- mbIsInitialized(false),
mpResourceFactoryContainer(new ResourceFactoryManager(mxControllerManager)),
mpResourceManager(
new ConfigurationControllerResourceManager(mpResourceFactoryContainer,mpBroadcaster)),
@@ -721,27 +716,6 @@ ConfigurationController::Implementation::Implementation (
-void ConfigurationController::Implementation::Initialize (
- const Reference& rxController)
-{
- mxControllerManager = Reference(rxController, UNO_QUERY_THROW);
-
- mpConfigurationUpdater->SetControllerManager(mxControllerManager);
-
- // Tunnel through the controller to obtain a ViewShellBase.
- Reference xTunnel (rxController, UNO_QUERY_THROW);
- if (xTunnel.is())
- {
- ::sd::DrawController* pController = reinterpret_cast(
- xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
- mpBase = pController->GetViewShellBase();
- }
-}
-
-
-
-
ConfigurationController::Implementation::~Implementation (void)
{
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
index e708909ee928..ff167f07520a 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -123,8 +124,7 @@ void ConfigurationControllerBroadcaster::NotifyListeners (
}
catch(RuntimeException&)
{
- DBG_ASSERT(false,
- "ConfigurationController: caught exception while notifying listeners");
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
@@ -212,8 +212,7 @@ void ConfigurationControllerBroadcaster::DisposeAndClear (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,
- "ConfigurationController: caught exception while notifying dispose");
+ DBG_UNHANDLED_EXCEPTION();
}
}
else
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index bb5aab8a05d3..93ff7ee54e00 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -32,6 +32,7 @@
#include "ResourceFactoryManager.hxx"
#include "framework/FrameworkHelper.hxx"
#include
+#include
#include
#include
@@ -168,7 +169,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
}
catch(Exception&)
{
- OSL_ENSURE(false, "caught exception while activating resource");
+ DBG_UNHANDLED_EXCEPTION();
}
if (xResource.is())
@@ -197,7 +198,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -257,7 +258,7 @@ void ConfigurationControllerResourceManager::DeactivateResource (
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
#if defined VERBOSE && VERBOSE>=1
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
index 63e45f8bb110..b9552940060e 100644
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
@@ -41,16 +41,16 @@ void ConfigurationTracer::TraceConfiguration (
const char* pMessage)
{
#ifdef DEBUG
- OSL_TRACE("%s at %p {\n", pMessage, rxConfiguration.get());
+ OSL_TRACE("%s at %p {", pMessage, rxConfiguration.get());
if (rxConfiguration.is())
{
TraceBoundResources(rxConfiguration, NULL, 0);
}
else
{
- OSL_TRACE(" empty\n");
+ OSL_TRACE(" empty");
}
- OSL_TRACE("}\n");
+ OSL_TRACE("}");
#else
(void)rxConfiguration;
(void)pMessage;
@@ -60,12 +60,12 @@ void ConfigurationTracer::TraceConfiguration (
+#ifdef DEBUG
void ConfigurationTracer::TraceBoundResources (
const Reference& rxConfiguration,
const Reference& rxResourceId,
const int nIndentation)
{
-#ifdef DEBUG
Sequence > aResourceList (
rxConfiguration->getResources(rxResourceId, ::rtl::OUString(), AnchorBindingMode_DIRECT));
const ::rtl::OUString sIndentation (::rtl::OUString::createFromAscii(" "));
@@ -74,14 +74,10 @@ void ConfigurationTracer::TraceBoundResources (
::rtl::OUString sLine (aResourceList[nIndex]->getResourceURL());
for (int i=0; i& rxConfiguration,
const char* pMessage);
-
+#ifdef DEBUG
static void TraceBoundResources (
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration,
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XResourceId>& rxResourceId,
const int nIndentation);
+#endif
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 77579e32f1a9..4ab361a9490d 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -35,6 +35,7 @@
#include "framework/FrameworkHelper.hxx"
#include
+#include
#include
@@ -128,7 +129,7 @@ void ConfigurationUpdater::RequestUpdate (
if (IsUpdatePossible())
{
#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("UpdateConfiguration start\n");
+ OSL_TRACE("UpdateConfiguration start");
#endif
// Call UpdateConfiguration while that is possible and while someone
@@ -146,7 +147,7 @@ void ConfigurationUpdater::RequestUpdate (
{
mbUpdatePending = true;
#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("scheduling update for later\n");
+ OSL_TRACE("scheduling update for later");
#endif
}
}
@@ -162,14 +163,6 @@ Reference ConfigurationUpdater::GetCurrentConfiguration (void) c
-Reference ConfigurationUpdater::GetRequestedConfiguration (void) const
-{
- return mxRequestedConfiguration;
-}
-
-
-
-
bool ConfigurationUpdater::IsUpdatePossible (void)
{
return ! mbUpdateBeingProcessed
@@ -185,7 +178,7 @@ bool ConfigurationUpdater::IsUpdatePossible (void)
void ConfigurationUpdater::UpdateConfiguration (void)
{
#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("UpdateConfiguration update\n");
+ OSL_TRACE("UpdateConfiguration update");
#endif
SetUpdateBeingProcessed(true);
comphelper::ScopeGuard aScopeGuard (
@@ -200,7 +193,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
if (aClassifier.Partition())
{
#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationUpdater::UpdateConfiguration(\n");
+ OSL_TRACE("ConfigurationUpdater::UpdateConfiguration(");
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
@@ -232,7 +225,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
else
{
#if defined VERBOSE && VERBOSE>0
- OSL_TRACE("nothing to do\n");
+ OSL_TRACE("nothing to do");
#if defined VERBOSE && VERBOSE>=2
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
@@ -244,8 +237,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
}
catch (RuntimeException e)
{
- OSL_TRACE("caught exception while updating the current configuration");
- DBG_ASSERT(false, "caught exception while updating the current configuration");
+ DBG_UNHANDLED_EXCEPTION();
}
#if defined VERBOSE && VERBOSE>0
@@ -310,11 +302,11 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
{
#if defined VERBOSE && VERBOSE>=2
rClassifier.TraceResourceIdVector(
- "requested but not current resources:\n", rClassifier.GetC1minusC2());
+ "requested but not current resources:", rClassifier.GetC1minusC2());
rClassifier.TraceResourceIdVector(
- "current but not requested resources:\n", rClassifier.GetC2minusC1());
+ "current but not requested resources:", rClassifier.GetC2minusC1());
rClassifier.TraceResourceIdVector(
- "requested and current resources:\n", rClassifier.GetC1andC2());
+ "requested and current resources:", rClassifier.GetC1andC2());
#endif
// Updating of the sub controllers is done in two steps. In the
@@ -325,11 +317,11 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
mpResourceManager->ActivateResources(rClassifier.GetC1minusC2(), mxCurrentConfiguration);
#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationController::UpdateConfiguration)\n");
+ OSL_TRACE("ConfigurationController::UpdateConfiguration)");
ConfigurationTracer::TraceConfiguration(
- mxRequestedConfiguration, "requested configuration\n");
+ mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
- mxCurrentConfiguration, "current configuration\n");
+ mxCurrentConfiguration, "current configuration");
#endif
// Deactivate pure anchors that have no child.
@@ -340,7 +332,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
}
catch(RuntimeException)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -401,7 +393,7 @@ void ConfigurationUpdater::CheckPureAnchors (
if (bDeactiveCurrentResource)
{
#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("deactiving pure anchor %s because it has no children\n",
+ OSL_TRACE("deactiving pure anchor %s because it has no children",
OUStringToOString(
FrameworkHelper::ResourceIdToString(xResourceId),
RTL_TEXTENCODING_UTF8).getStr());
@@ -458,14 +450,14 @@ void ConfigurationUpdater::SetUpdateBeingProcessed (bool bValue)
IMPL_LINK(ConfigurationUpdater, TimeoutHandler, Timer*, EMPTYARG)
{
- OSL_TRACE("configuration update timer\n");
+ OSL_TRACE("configuration update timer");
if ( ! mbUpdateBeingProcessed
&& mxCurrentConfiguration.is()
&& mxRequestedConfiguration.is())
{
if ( ! AreConfigurationsEquivalent(mxCurrentConfiguration, mxRequestedConfiguration))
{
- OSL_TRACE("configurations differ, requesting update\n");
+ OSL_TRACE("configurations differ, requesting update");
RequestUpdate(mxRequestedConfiguration);
}
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
index 87c92be5e5c4..a9f3e09f2a64 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
@@ -84,9 +84,6 @@ public:
css::uno::Reference<
css::drawing::framework::XConfiguration> GetCurrentConfiguration (void) const;
- css::uno::Reference<
- css::drawing::framework::XConfiguration> GetRequestedConfiguration (void) const;
-
friend class ConfigurationUpdaterLock;
/** Return a lock of the called ConfigurationUpdater. While the
returned object exists no update of the current configuration is
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx
index 32894411547a..15d7c3a6f4ec 100644
--- a/sd/source/ui/framework/configuration/ResourceId.cxx
+++ b/sd/source/ui/framework/configuration/ResourceId.cxx
@@ -592,17 +592,6 @@ bool ResourceId::IsBoundToAnchor (
-bool ResourceId::IsValid (void) const
-{
- return maResourceURLs.size() == 0
- || maResourceURLs[0].getLength()>0
- || maResourceURLs.size() == 1;
-
-}
-
-
-
-
void ResourceId::ParseResourceURL (void)
{
::osl::Guard< ::osl::Mutex > aGuard (::osl::Mutex::getGlobalMutex());
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index 969844f7650d..f406501bd114 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -44,6 +44,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
@@ -270,7 +271,7 @@ void SAL_CALL BasicPaneFactory::initialize (const Sequence& aArguments)
Reference SAL_CALL BasicPaneFactory::createResource (
const Reference& rxPaneId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
ThrowIfDisposed();
@@ -528,8 +529,8 @@ Reference BasicPaneFactory::CreateChildWindowPane (
break;
case RightPaneId:
- pShell.reset(new RightPaneShell());
- nChildWindowId = ::sd::RightPaneChildWindow::GetChildWindowId();
+ pShell.reset(new ToolPanelPaneShell());
+ nChildWindowId = ::sd::ToolPanelChildWindow::GetChildWindowId();
break;
default:
@@ -551,32 +552,6 @@ Reference BasicPaneFactory::CreateChildWindowPane (
return xPane;
}
-
-
-
-bool BasicPaneFactory::IsBoundToChildWindow (const Reference& rxResourceId) const
-{
- if ( ! rxResourceId.is())
- return false;
-
- Reference xAnchorId (rxResourceId->getAnchor());
- if ( ! xAnchorId.is())
- return false;
-
- const OUString sAnchorURL (xAnchorId->getResourceURL());
- if (sAnchorURL == FrameworkHelper::msLeftImpressPaneURL)
- return true;
- else if (sAnchorURL == FrameworkHelper::msLeftDrawPaneURL)
- return true;
- else if (sAnchorURL == FrameworkHelper::msRightPaneURL)
- return true;
- else
- return false;
-}
-
-
-
-
void BasicPaneFactory::ThrowIfDisposed (void) const
throw (lang::DisposedException)
{
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
index 1f442656d1d9..9b41866180fc 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
@@ -99,7 +99,7 @@ public:
virtual css::uno::Reference
SAL_CALL createResource (
const css::uno::Reference& rxPaneId)
- throw (css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL
releaseResource (
@@ -159,12 +159,6 @@ private:
css::drawing::framework::XResourceId>& rxPaneId,
const PaneDescriptor& rDescriptor);
- /** Return when the specified resource is bound to one of the
- child windows.
- */
- bool IsBoundToChildWindow (
- const css::uno::Reference& rxResourceId) const;
-
void ThrowIfDisposed (void) const
throw (css::lang::DisposedException);
};
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
index 4645b0462399..d353cfc58c1f 100644
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
@@ -38,6 +38,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
namespace sd { namespace framework {
@@ -191,7 +192,7 @@ void SAL_CALL BasicToolBarFactory::disposing (
Reference SAL_CALL BasicToolBarFactory::createResource (
const Reference& rxToolBarId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
ThrowIfDisposed();
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.hxx b/sd/source/ui/framework/factories/BasicToolBarFactory.hxx
index c305c334bf0f..686de897c179 100644
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.hxx
@@ -80,7 +80,7 @@ public:
createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxToolBarId)
- throw (css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL
releaseResource (
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index d38d5de75198..2dd7689f2b39 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -42,7 +42,7 @@
#include "DrawViewShell.hxx"
#include "GraphicViewShell.hxx"
#include "OutlineViewShell.hxx"
-#include "TaskPaneViewShell.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "PresentationViewShell.hxx"
#include "SlideSorterViewShell.hxx"
#include "FrameView.hxx"
@@ -55,6 +55,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
@@ -189,7 +190,7 @@ void SAL_CALL BasicViewFactory::disposing (void)
Reference SAL_CALL BasicViewFactory::createResource (
const Reference& rxViewId)
- throw(RuntimeException)
+ throw(RuntimeException, IllegalArgumentException, WrappedTargetException)
{
Reference xView;
const bool bIsCenterPane (
@@ -372,7 +373,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence& aArguments)
pDescriptor->mpViewShell,
rxViewId,
rxPane->getWindow());
- pDescriptor->mxView = Reference(pDescriptor->mpWrapper);
+ pDescriptor->mxView.set( pDescriptor->mpWrapper->queryInterface( XResource::static_type() ), UNO_QUERY_THROW );
}
return pDescriptor;
@@ -450,7 +451,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence& aArguments)
else if (rsViewURL.equals(FrameworkHelper::msTaskPaneURL))
{
pViewShell.reset(
- new ::sd::toolpanel::TaskPaneViewShell (
+ new ::sd::toolpanel::ToolPanelViewShell(
&rFrame,
*mpBase,
&rWindow,
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx
index dbdf0f557d61..0cdb45ffc7c1 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx
@@ -96,7 +96,7 @@ public:
virtual css::uno::Reference
SAL_CALL createResource (
const css::uno::Reference& rxViewId)
- throw(css::uno::RuntimeException);
+ throw(css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL releaseResource (
const css::uno::Reference& xView)
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index 290c84c3ec75..5e4e6df987f0 100644
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -191,7 +191,7 @@ void SAL_CALL ChildWindowPane::disposing (void)
break;
// At last, we have access to the window and its UNO wrapper.
- mpWindow = pDockingWindow->GetContentWindow();
+ mpWindow = &pDockingWindow->GetContentWindow();
mxWindow = VCLUnoHelper::GetInterface(mpWindow);
// Register as window listener to be informed when the child window
diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx
index 6ede6e439e02..6f22f1484627 100644
--- a/sd/source/ui/framework/factories/PresentationFactory.cxx
+++ b/sd/source/ui/framework/factories/PresentationFactory.cxx
@@ -34,10 +34,12 @@
#include "ViewShellBase.hxx"
#include
#include
+#include
#include "slideshow.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
@@ -154,7 +156,7 @@ PresentationFactory::PresentationFactory (
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -180,7 +182,7 @@ void SAL_CALL PresentationFactory::disposing (void)
Reference SAL_CALL PresentationFactory::createResource (
const Reference& rxViewId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
ThrowIfDisposed();
@@ -308,7 +310,7 @@ void SAL_CALL PresentationFactoryProvider::initialize(
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
index 8942833d2483..d7c45ceb803b 100644
--- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
@@ -27,18 +27,19 @@
#include "precompiled_sd.hxx"
#include "TaskPanelFactory.hxx"
-#include "TaskPaneViewShell.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "DrawController.hxx"
#include "framework/FrameworkHelper.hxx"
#include
+#include
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
using ::sd::framework::FrameworkHelper;
-using ::sd::toolpanel::TaskPaneViewShell;
namespace sd { namespace framework {
@@ -85,14 +86,11 @@ class TaskPanelResource
{
public:
TaskPanelResource (
- const Reference& rxResourceId,
- const TaskPaneViewShell::PanelId ePaneId);
+ const Reference& rxResourceId );
virtual ~TaskPanelResource ();
virtual void SAL_CALL disposing ();
- TaskPaneViewShell::PanelId GetPaneId () const;
-
// XResource
virtual Reference SAL_CALL getResourceId (void)
@@ -103,7 +101,6 @@ public:
private:
const Reference mxResourceId;
- const TaskPaneViewShell::PanelId mePaneId;
};
} // end of anonymous namespace.
@@ -185,9 +182,27 @@ void SAL_CALL TaskPanelFactory::initialize(
//===== XResourceController ===================================================
+namespace
+{
+ void lcl_collectResourceURLs( const Reference< XResourceId >& i_rResourceId, ::std::vector< ::rtl::OUString >& o_rResourceURLs )
+ {
+ ENSURE_OR_RETURN_VOID( i_rResourceId.is(), "illegal resource ID" );
+ o_rResourceURLs.resize(0);
+
+ Reference< XResourceId > xResourceId( i_rResourceId );
+ ::rtl::OUString sResourceURL = xResourceId->getResourceURL();
+ while ( sResourceURL.getLength() > 0 )
+ {
+ o_rResourceURLs.push_back( sResourceURL );
+ xResourceId = xResourceId->getAnchor();
+ sResourceURL = xResourceId->getResourceURL();
+ }
+ }
+}
+
Reference SAL_CALL TaskPanelFactory::createResource (
const Reference& rxResourceId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
Reference xResource;
@@ -196,45 +211,26 @@ Reference SAL_CALL TaskPanelFactory::createResource (
OUString sResourceURL (rxResourceId->getResourceURL());
- if (sResourceURL.match(FrameworkHelper::msTaskPanelURLPrefix))
+ if ( sResourceURL.match( FrameworkHelper::msTaskPanelURLPrefix ) )
{
- TaskPaneViewShell::PanelId ePaneId (TaskPaneViewShell::PID_UNKNOWN);
+ toolpanel::PanelId ePanelId( toolpanel::GetStandardPanelId( sResourceURL ) );
- if (sResourceURL.equals(FrameworkHelper::msMasterPagesTaskPanelURL))
+ if ( ( ePanelId != toolpanel::PID_UNKNOWN ) && ( mpViewShellBase != NULL ) )
{
- ePaneId = TaskPaneViewShell::PID_MASTER_PAGES;
- }
- else if (sResourceURL.equals(FrameworkHelper::msLayoutTaskPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_LAYOUT;
- }
- else if (sResourceURL.equals(FrameworkHelper::msTableDesignPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_TABLE_DESIGN;
- }
- else if (sResourceURL.equals(FrameworkHelper::msCustomAnimationTaskPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_CUSTOM_ANIMATION;
- }
- else if (sResourceURL.equals(FrameworkHelper::msSlideTransitionTaskPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_SLIDE_TRANSITION;
- }
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( *mpViewShellBase ) );
- if (ePaneId!=TaskPaneViewShell::PID_UNKNOWN && mpViewShellBase!=NULL)
- {
- toolpanel::TaskPaneViewShell* pTaskPane
- = dynamic_cast(
- FrameworkHelper::Instance(*mpViewShellBase)
- ->GetViewShell(FrameworkHelper::msRightPaneURL).get());
- if (pTaskPane != NULL)
- {
- xResource = new TaskPanelResource(
- rxResourceId,
- ePaneId);
- pTaskPane->ShowPanel(ePaneId);
- pTaskPane->ExpandPanel(ePaneId);
- }
+ // assume that the top-level anchor is the URL of the pane
+ ::std::vector< ::rtl::OUString > aResourceURLs;
+ lcl_collectResourceURLs( rxResourceId, aResourceURLs );
+
+ const ::rtl::OUString sPaneURL = aResourceURLs[ aResourceURLs.size() - 1 ];
+ const ::boost::shared_ptr< ViewShell > pPaneViewShell( pFrameworkHelper->GetViewShell( sPaneURL ) );
+
+ toolpanel::ToolPanelViewShell* pToolPanel = dynamic_cast< toolpanel::ToolPanelViewShell* >( pPaneViewShell.get() );
+ if ( pToolPanel != NULL )
+ xResource = new TaskPanelResource( rxResourceId );
+
+ OSL_POSTCOND( xResource.is(), "TaskPanelFactory::createResource: did not find the given resource!" );
}
}
@@ -248,16 +244,37 @@ void SAL_CALL TaskPanelFactory::releaseResource (
const Reference& rxResource)
throw (RuntimeException)
{
- toolpanel::TaskPaneViewShell* pTaskPane
- = dynamic_cast(
- FrameworkHelper::Instance(*mpViewShellBase)
- ->GetViewShell(FrameworkHelper::msRightPaneURL).get());
+ ENSURE_OR_RETURN_VOID( rxResource.is(), "illegal resource" );
+ const Reference< XResourceId > xResourceId( rxResource->getResourceId(), UNO_SET_THROW );
- rtl::Reference pResource = dynamic_cast(
- rxResource.get());
+ // assume that the top-level anchor is the URL of the pane
+ ::std::vector< ::rtl::OUString > aResourceURLs;
+ lcl_collectResourceURLs( xResourceId, aResourceURLs );
- if (pTaskPane != NULL && pResource.is())
- pTaskPane->CollapsePanel(pResource->GetPaneId());
+ OSL_ENSURE( !aResourceURLs.empty(), "TaskPanelFactory::releaseResource: illegal resource/URL!" );
+ if ( !aResourceURLs.empty() )
+ {
+ const ::rtl::OUString sPaneURL = aResourceURLs[ aResourceURLs.size() - 1 ];
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( *mpViewShellBase ) );
+ const ::boost::shared_ptr< ViewShell > pPaneViewShell( pFrameworkHelper->GetViewShell( sPaneURL ) );
+ if ( pPaneViewShell != NULL )
+ {
+ const ::rtl::OUString sPanelResourceURL( xResourceId->getResourceURL() );
+ const toolpanel::PanelId ePanelId( toolpanel::GetStandardPanelId( sPanelResourceURL ) );
+ toolpanel::ToolPanelViewShell* pToolPanel = dynamic_cast< toolpanel::ToolPanelViewShell* >( pPaneViewShell.get() );
+
+ if ( ( ePanelId != toolpanel::PID_UNKNOWN )
+ && ( pToolPanel != NULL )
+ )
+ {
+ pToolPanel->DeactivatePanel( sPanelResourceURL );
+ }
+ else
+ {
+ OSL_ENSURE( false, "TaskPanelFactory::releaseResource: don't know what to do with this resource!" );
+ }
+ }
+ }
Reference xComponent (rxResource, UNO_QUERY);
if (xComponent.is())
@@ -267,33 +284,14 @@ void SAL_CALL TaskPanelFactory::releaseResource (
-//=============================================================================
-
-void TaskPanelFactory::ThrowIfDisposed (void) const
- throw (lang::DisposedException)
-{
- if (rBHelper.bDisposed || rBHelper.bInDispose)
- {
- throw lang::DisposedException (
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "TaskPanelFactory object has already been disposed")),
- const_cast(static_cast(this)));
- }
-}
-
-
-
-
//===== ToolPanelResource =====================================================
namespace {
TaskPanelResource::TaskPanelResource (
- const Reference& rxResourceId,
- const TaskPaneViewShell::PanelId ePaneId)
+ const Reference& rxResourceId)
: TaskPanelResourceInterfaceBase(m_aMutex),
- mxResourceId(rxResourceId),
- mePaneId(ePaneId)
+ mxResourceId(rxResourceId)
{
}
@@ -314,14 +312,6 @@ void SAL_CALL TaskPanelResource::disposing ()
-TaskPaneViewShell::PanelId TaskPanelResource::GetPaneId () const
-{
- return mePaneId;
-}
-
-
-
-
Reference SAL_CALL TaskPanelResource::getResourceId ()
throw (css::uno::RuntimeException)
{
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.hxx b/sd/source/ui/framework/factories/TaskPanelFactory.hxx
index 1130a106a56c..086788a6763e 100644
--- a/sd/source/ui/framework/factories/TaskPanelFactory.hxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.hxx
@@ -80,7 +80,7 @@ public:
SAL_CALL createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxResourcesId)
- throw (css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL releaseResource (
const css::uno::Reference<
@@ -89,8 +89,6 @@ public:
private:
ViewShellBase* mpViewShellBase;
-
- void ThrowIfDisposed (void) const throw (css::lang::DisposedException);
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 0a3aeccade7c..a1c0bd525c9e 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -29,22 +29,32 @@
#include "framework/ViewShellWrapper.hxx"
#include "framework/Pane.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "ViewShell.hxx"
#include "Window.hxx"
#include
+#include
#include
#include
+#include
+#include
#include
#include
+#include
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
+using ::com::sun::star::awt::XWindow;
+using ::com::sun::star::rendering::XCanvas;
+using ::com::sun::star::lang::DisposedException;
+
using ::rtl::OUString;
+using ::sd::toolpanel::ToolPanelViewShell;
namespace sd { namespace framework {
@@ -79,6 +89,8 @@ ViewShellWrapper::~ViewShellWrapper (void)
void SAL_CALL ViewShellWrapper::disposing (void)
{
+ ::osl::MutexGuard aGuard( maMutex );
+
OSL_TRACE("disposing ViewShellWrapper %x", this);
Reference xWindow (mxWindow);
if (xWindow.is())
@@ -101,14 +113,6 @@ void SAL_CALL ViewShellWrapper::disposing (void)
-bool ViewShellWrapper::IsUnique (void)
-{
- return m_refCount==1;
-}
-
-
-
-
//----- XResource -------------------------------------------------------------
Reference SAL_CALL ViewShellWrapper::getResourceId (void)
@@ -177,7 +181,7 @@ const Sequence& ViewShellWrapper::getUnoTunnelId (void)
static Sequence* pSequence = NULL;
if (pSequence == NULL)
{
- const ::vos::OGuard aSolarGuard (Application::GetSolarMutex());
+ const ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (pSequence == NULL)
{
static ::com::sun::star::uno::Sequence aSequence (16);
diff --git a/sd/source/ui/framework/module/ImpressModule.cxx b/sd/source/ui/framework/module/ImpressModule.cxx
index 050429b3f289..a5856bc3ebc9 100644
--- a/sd/source/ui/framework/module/ImpressModule.cxx
+++ b/sd/source/ui/framework/module/ImpressModule.cxx
@@ -33,7 +33,7 @@
#include "ViewTabBarModule.hxx"
#include "CenterViewFocusModule.hxx"
#include "SlideSorterModule.hxx"
-#include "TaskPaneModule.hxx"
+#include "ToolPanelModule.hxx"
#include "ToolBarModule.hxx"
#include "ShellStackGuard.hxx"
@@ -54,7 +54,7 @@ void ImpressModule::Initialize (Reference& rxController)
new SlideSorterModule(
rxController,
FrameworkHelper::msLeftImpressPaneURL);
- TaskPaneModule::Initialize(rxController);
+ ToolPanelModule::Initialize(rxController);
new ToolBarModule(rxController);
new ShellStackGuard(rxController);
}
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index b90ebe851f0e..e910a8df7496 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -35,6 +35,8 @@
#include
#include
+#include
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
@@ -168,7 +170,7 @@ void ModuleController::LoadFactories (const Reference& rxCont
}
catch (Exception&)
{
- OSL_TRACE("ERROR in ModuleController::LoadFactories");
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/sd/source/ui/framework/module/PresentationModule.cxx b/sd/source/ui/framework/module/PresentationModule.cxx
index e28432a25d93..6a5ba5dc5e7f 100644
--- a/sd/source/ui/framework/module/PresentationModule.cxx
+++ b/sd/source/ui/framework/module/PresentationModule.cxx
@@ -31,7 +31,6 @@
#include "CenterViewFocusModule.hxx"
#include "SlideSorterModule.hxx"
-#include "TaskPaneModule.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
index cf9b095072b1..090247e7f68c 100644
--- a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
+++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
@@ -145,17 +145,6 @@ void ReadOnlyModeObserver::AddStatusListener (
-void ReadOnlyModeObserver::RemoveStatusListener (
- const Reference& rxListener)
-{
- mpBroadcaster->removeListener(
- getCppuType((Reference*)NULL),
- rxListener);
-}
-
-
-
-
bool ReadOnlyModeObserver::ConnectToDispatch (void)
{
if ( ! mxDispatch.is())
diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
index f01649bdf8bd..d783d6d83abf 100644
--- a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
+++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
@@ -91,12 +91,6 @@ public:
const ::com::sun::star::uno::Reference<
com::sun::star::frame::XStatusListener>& rxListener);
- /** Remove the given listener.
- */
- void RemoveStatusListener (
- const ::com::sun::star::uno::Reference<
- com::sun::star::frame::XStatusListener>& rxListener);
-
// XEventListener
virtual void SAL_CALL disposing (
diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx
index 8f79ed41f24b..fcd90ca6454b 100644
--- a/sd/source/ui/framework/module/ResourceManager.cxx
+++ b/sd/source/ui/framework/module/ResourceManager.cxx
@@ -291,25 +291,4 @@ void SAL_CALL ResourceManager::disposing (
}
}
-
-
-
-void ResourceManager::Trace (void) const
-{
- OSL_TRACE("main views with resource %s:",
- ::rtl::OUStringToOString(
- FrameworkHelper::ResourceIdToString(mxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-
- MainViewContainer::const_iterator iDescriptor;
- for (iDescriptor=mpActiveMainViewContainer->begin();
- iDescriptor!=mpActiveMainViewContainer->end();
- ++iDescriptor)
- {
- OSL_TRACE(" %s",
- ::rtl::OUStringToOString(*iDescriptor, RTL_TEXTENCODING_UTF8).getStr());
- }
-}
-
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx
index 23cb1ed7dd48..d00ee78c2de3 100644
--- a/sd/source/ui/framework/module/ResourceManager.hxx
+++ b/sd/source/ui/framework/module/ResourceManager.hxx
@@ -126,8 +126,6 @@ private:
const ::com::sun::star::uno::Reference<
com::sun::star::drawing::framework::XConfiguration>& rxConfiguration);
void UpdateForMainViewShell (void);
-
- void Trace (void) const;
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/TaskPaneModule.cxx b/sd/source/ui/framework/module/ToolPanelModule.cxx
similarity index 93%
rename from sd/source/ui/framework/module/TaskPaneModule.cxx
rename to sd/source/ui/framework/module/ToolPanelModule.cxx
index 03e2277bdcd3..888fa68ad708 100644
--- a/sd/source/ui/framework/module/TaskPaneModule.cxx
+++ b/sd/source/ui/framework/module/ToolPanelModule.cxx
@@ -2,10 +2,13 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
+ * $RCSfile: ToolPanelModule.cxx,v $
+ * $Revision: 1.4 $
+ *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -27,7 +30,7 @@
#include "precompiled_sd.hxx"
-#include "TaskPaneModule.hxx"
+#include "ToolPanelModule.hxx"
#include "ReadOnlyModeObserver.hxx"
#include "framework/FrameworkHelper.hxx"
@@ -54,7 +57,7 @@ typedef ::cppu::WeakComponentImplHelper1 <
> LocalReadOnlyModeObserverInterfaceBase;
/** This local class enables or disables the ResourceManager of a
- TaskPaneModule. It connects to a ReadOnlyModeObserver and is called
+ ToolPanelModule. It connects to a ReadOnlyModeObserver and is called
when the state of the .uno:EditDoc command changes. When either the
ResourceManager or the ReadOnlyModeObserver are disposed then the
LocalReadOnlyModeObserver disposes itself. The link
@@ -138,9 +141,9 @@ private:
-//===== TaskPaneModule ====================================================
+//===== ToolPanelModule ====================================================
-void TaskPaneModule::Initialize (const Reference& rxController)
+void ToolPanelModule::Initialize (const Reference& rxController)
{
::rtl::Reference pResourceManager (
new ResourceManager(
diff --git a/sd/source/ui/framework/module/TaskPaneModule.hxx b/sd/source/ui/framework/module/ToolPanelModule.hxx
similarity index 88%
rename from sd/source/ui/framework/module/TaskPaneModule.hxx
rename to sd/source/ui/framework/module/ToolPanelModule.hxx
index 3495e4c93a73..7d728e60e93d 100644
--- a/sd/source/ui/framework/module/TaskPaneModule.hxx
+++ b/sd/source/ui/framework/module/ToolPanelModule.hxx
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,10 +22,10 @@
*
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
+************************************************************************/
-#ifndef SD_FRAMEWORK_TASK_PANE_MODULE_HXX
-#define SD_FRAMEWORK_TASK_PANE_MODULE_HXX
+#ifndef SD_FRAMEWORK_TOOL_PANEL_MODULE_HXX
+#define SD_FRAMEWORK_TOOL_PANEL_MODULE_HXX
#include "ResourceManager.hxx"
@@ -38,7 +37,7 @@ class ReadOnlyModeObserver;
/** This module is responsible for showing the task pane.
*/
-class TaskPaneModule
+class ToolPanelModule
{
public:
static void Initialize (
diff --git a/sd/source/ui/framework/module/makefile.mk b/sd/source/ui/framework/module/makefile.mk
index 56c864a7df53..bec9b1a04075 100644
--- a/sd/source/ui/framework/module/makefile.mk
+++ b/sd/source/ui/framework/module/makefile.mk
@@ -52,7 +52,7 @@ SLOFILES = \
$(SLO)$/ResourceManager.obj \
$(SLO)$/ShellStackGuard.obj \
$(SLO)$/SlideSorterModule.obj \
- $(SLO)$/TaskPaneModule.obj \
+ $(SLO)$/ToolPanelModule.obj \
$(SLO)$/ToolBarModule.obj \
$(SLO)$/ViewTabBarModule.obj
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index e671580b5114..8c325ff202af 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -52,6 +52,7 @@
#include "vcl/svapp.hxx"
#include
#include
+#include
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -218,7 +219,7 @@ const OUString FrameworkHelper::msViewTabBarURL(
// Task panel URLs.
const ::rtl::OUString FrameworkHelper::msTaskPanelURLPrefix(
- OUString::createFromAscii("private:resource/taskpanel/"));
+ OUString::createFromAscii("private:resource/toolpanel/DrawingFramework/"));
const ::rtl::OUString FrameworkHelper::msMasterPagesTaskPanelURL(
msTaskPanelURLPrefix + OUString::createFromAscii("MasterPages"));
const ::rtl::OUString FrameworkHelper::msLayoutTaskPanelURL(
@@ -252,6 +253,46 @@ const OUString FrameworkHelper::msModuleControllerService(
const OUString FrameworkHelper::msConfigurationControllerService(
OUString::createFromAscii("com.sun.star.drawing.framework.ConfigurationController"));
+//----- helper ----------------------------------------------------------------
+namespace
+{
+ static ::boost::shared_ptr< ViewShell > lcl_getViewShell( const Reference< XResource >& i_rViewShellWrapper )
+ {
+ ::boost::shared_ptr< ViewShell > pViewShell;
+ if ( !i_rViewShellWrapper.is() )
+ return pViewShell;
+
+ try
+ {
+ Reference xViewTunnel( i_rViewShellWrapper, UNO_QUERY_THROW );
+ pViewShell = reinterpret_cast< ViewShellWrapper* >(
+ xViewTunnel->getSomething( ViewShellWrapper::getUnoTunnelId() ) )->GetViewShell();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return pViewShell;
+ }
+ Reference< XResource > lcl_getFirstViewInPane( const Reference< XConfigurationController >& i_rConfigController,
+ const Reference< XResourceId >& i_rPaneId )
+ {
+ try
+ {
+ Reference< XConfiguration > xConfiguration( i_rConfigController->getRequestedConfiguration(), UNO_SET_THROW );
+ Sequence< Reference< XResourceId > > aViewIds( xConfiguration->getResources(
+ i_rPaneId, FrameworkHelper::msViewURLPrefix, AnchorBindingMode_DIRECT ) );
+ if ( aViewIds.getLength() > 0 )
+ return i_rConfigController->getResource( aViewIds[0] );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
+}
+
//----- FrameworkHelper::ViewURLMap -------------------------------------------
@@ -438,8 +479,11 @@ bool FrameworkHelper::IsValid (void)
::boost::shared_ptr FrameworkHelper::GetViewShell (const OUString& rsPaneURL)
{
- Reference xPaneId (CreateResourceId(rsPaneURL));
- return GetViewShell(GetView(xPaneId));
+ if ( !mxConfigurationController.is() )
+ return ::boost::shared_ptr();
+
+ Reference xPaneId( CreateResourceId( rsPaneURL ) );
+ return lcl_getViewShell( lcl_getFirstViewInPane( mxConfigurationController, xPaneId ) );
}
@@ -447,22 +491,7 @@ bool FrameworkHelper::IsValid (void)
::boost::shared_ptr FrameworkHelper::GetViewShell (const Reference& rxView)
{
- ::boost::shared_ptr pViewShell;
-
- try
- {
- Reference xViewTunnel (rxView, UNO_QUERY);
- if (xViewTunnel.is())
- {
- pViewShell = reinterpret_cast(xViewTunnel->getSomething(
- ViewShellWrapper::getUnoTunnelId()))->GetViewShell();
- }
- }
- catch (RuntimeException&)
- {
- }
-
- return pViewShell;
+ return lcl_getViewShell( rxView.get() );
}
@@ -479,21 +508,11 @@ Reference FrameworkHelper::GetView (const Reference& rxPaneO
{
if (rxPaneOrViewId->getResourceURL().match(msViewURLPrefix))
{
- xView = Reference(
- mxConfigurationController->getResource(rxPaneOrViewId), UNO_QUERY);
+ xView.set( mxConfigurationController->getResource( rxPaneOrViewId ), UNO_QUERY );
}
else
{
- Reference xConfiguration (
- mxConfigurationController->getRequestedConfiguration());
- if (xConfiguration.is())
- {
- Sequence > aViewIds (xConfiguration->getResources(
- rxPaneOrViewId, msViewURLPrefix, AnchorBindingMode_DIRECT));
- if (aViewIds.getLength() >= 1)
- xView = Reference(
- mxConfigurationController->getResource(aViewIds[0]), UNO_QUERY);
- }
+ xView.set( lcl_getFirstViewInPane( mxConfigurationController, rxPaneOrViewId ), UNO_QUERY );
}
}
catch (lang::DisposedException&)
@@ -501,7 +520,8 @@ Reference FrameworkHelper::GetView (const Reference& rxPaneO
Dispose();
}
catch (RuntimeException&)
- {}
+ {
+ }
return xView;
}
@@ -732,7 +752,7 @@ void FrameworkHelper::HandleModeChangeSlot (
}
catch (RuntimeException&)
{
- OSL_TRACE("HandleModeChangeSlot: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -815,7 +835,7 @@ void FrameworkHelper::WaitForEvent (const OUString& rsEventType) const
if( (osl_getGlobalTimer() - nStartTime) > 60000 )
{
- DBG_ERROR("FrameworkHelper::WaitForEvent(), no event since a minute? giving up!");
+ DBG_ERROR("FrameworkHelper::WaitForEvent(), no event for a minute? giving up!");
break;
}
}
@@ -867,7 +887,7 @@ void FrameworkHelper::UpdateConfiguration (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false, "FrameworkHelper::UpdateConfiguration: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
@@ -997,28 +1017,6 @@ void SAL_CALL FrameworkHelper::DisposeListener::disposing (const lang::EventObje
-//----- DispatchCaller --------------------------------------------------------
-
-DispatchCaller::DispatchCaller (
- SfxDispatcher& rDispatcher,
- USHORT nSId)
- : mrDispatcher(rDispatcher),
- mnSId(nSId)
-{
-}
-
-
-
-
-void DispatchCaller::operator() (bool bEventSeen)
-{
- (void)bEventSeen;
- mrDispatcher.Execute(mnSId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
-}
-
-
-
-
//===== FrameworkHelperResourceIdFilter =======================================
FrameworkHelperResourceIdFilter::FrameworkHelperResourceIdFilter (
@@ -1068,7 +1066,7 @@ CallbackCaller::CallbackCaller (
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,"ConfigurationUpdateGuard: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -1095,7 +1093,7 @@ void CallbackCaller::disposing (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,"~ConfigurationUpdateGuard: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 26119b6a03b9..c0d8235e97fb 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -72,13 +72,6 @@ FuConstruct::FuConstruct (
{
}
-FunctionReference FuConstruct::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuConstruct( pViewSh, pWin, pView, pDoc, rReq ) );
- xFunc->DoExecute(rReq);
- return xFunc;
-}
-
void FuConstruct::DoExecute( SfxRequest& rReq )
{
FuDraw::DoExecute( rReq );
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index bbe13c114931..5cc3cc49ca88 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -99,14 +99,6 @@ FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
{
}
-FunctionReference FuDraw::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent )
-{
- FuDraw* pFunc;
- FunctionReference xFunc( pFunc = new FuDraw( pViewSh, pWin, pView, pDoc, rReq ) );
- pFunc->SetPermanent(bPermanent);
- return xFunc;
-}
-
/*************************************************************************
|*
|* Destruktor
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 931ff3a10cb8..2db29c725718 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
+#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
- {
- aSz = xObj->getVisualAreaSize( nAspect );
- }
- catch ( embed::NoVisualAreaSizeException& )
- {
- // the default size will be set later
- }
-
- Size aSize( aSz.Width, aSz.Height );
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
- if (aSize.Height() == 0 || aSize.Width() == 0)
+
+ Rectangle aRect;
+ 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();
+ aRect = pPickObj->GetLogicRect();
+
+ awt::Size aSz;
+ aSz.Width = aRect.GetWidth();
+ aSz.Height = aRect.GetHeight();
xObj->setVisualAreaSize( nAspect, aSz );
}
else
- aSize = OutputDevice::LogicToLogic(aSize, aUnit, MAP_100TH_MM);
+ {
+ 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);
+ }
- 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) )
+
+ // 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))
+ {
+ pPage->InsertPresObj( pOleObj, ePresObjKind );
+ pOleObj->SetUserCall(pPickObj->GetUserCall());
+ }
+ }
+
+ bool bRet = true;
+ if( pPickObj )
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pOleObj, TRUE );
+ else
+ 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/fuoutl.cxx b/sd/source/ui/func/fuoutl.cxx
index 2bb056f55e42..c0ef53f144b3 100644
--- a/sd/source/ui/func/fuoutl.cxx
+++ b/sd/source/ui/func/fuoutl.cxx
@@ -60,12 +60,6 @@ FuOutline::FuOutline (
{
}
-FunctionReference FuOutline::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuOutline( pViewSh, pWin, pView, pDoc, rReq ) );
- return xFunc;
-}
-
/*************************************************************************
|*
|* Command, weiterleiten an OutlinerView
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index c1df44e52677..0342c5f2bbc5 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -245,16 +245,6 @@ IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, EMPTYARG )
}
IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
-/*************************************************************************
-|*
-|* String in Applikations-Statuszeile ausgeben
-|*
-\************************************************************************/
-
-void FuPoor::WriteStatus(const String& )
-{
-}
-
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
@@ -1119,18 +1109,6 @@ void FuPoor::StartDelayToScrollTimer ()
aDelayToScrollTimer.Start ();
}
-/*************************************************************************
-|*
-|* Handler fuer Maustaste
-|*
-\************************************************************************/
-
-long FuPoor::diffPoint (long pos1, long pos2)
-{
- return (pos1 > pos2) ? pos1 - pos2
- : pos2 - pos1;
-}
-
/*************************************************************************
|*
|* Help-event
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index 82007fe61893..04fcf124cc14 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -38,7 +38,6 @@
#include
#include
#include "fupoor.hxx"
-#include "fuspell.hxx" // wegen SidArraySpell[]
#ifndef SD_WINDOW_SHELL_HXX
#include "Window.hxx"
#endif
@@ -55,6 +54,14 @@ class SfxRequest;
namespace sd {
+static USHORT SidArraySpell[] = {
+ SID_DRAWINGMODE,
+ SID_OUTLINEMODE,
+ SID_DIAMODE,
+ SID_NOTESMODE,
+ SID_HANDOUTMODE,
+ 0 };
+
TYPEINIT1( FuSearch, FuPoor );
/*************************************************************************
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index ab686481b402..fad1cb324fd2 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -123,6 +123,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
{
OSL_ASSERT(pPV!=NULL);
aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
+ pPV->LogicToPagePos(aLinePos);
bLineExist = true;
}
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
diff --git a/sd/source/ui/func/fuspell.cxx b/sd/source/ui/func/fuspell.cxx
deleted file mode 100644
index 526efb0087e4..000000000000
--- a/sd/source/ui/func/fuspell.cxx
+++ /dev/null
@@ -1,166 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-
-#include "fuspell.hxx"
-
-#include
-#include
-
-#include
-#include "fupoor.hxx"
-#include "Outliner.hxx"
-#include "drawdoc.hxx"
-#include "DrawViewShell.hxx"
-#include "OutlineViewShell.hxx"
-#include "ViewShellBase.hxx"
-
-#include "app.hrc"
-
-class SfxRequest;
-
-namespace sd {
-
-USHORT SidArraySpell[] = {
- SID_DRAWINGMODE,
- SID_OUTLINEMODE,
- SID_DIAMODE,
- SID_NOTESMODE,
- SID_HANDOUTMODE,
- 0 };
-
-TYPEINIT1( FuSpell, FuPoor );
-
-/*************************************************************************
-|*
-|* Konstruktor
-|*
-\************************************************************************/
-
-FuSpell::FuSpell (
- ViewShell* pViewSh,
- ::sd::Window* pWin,
- ::sd::View* pView,
- SdDrawDocument* pDoc,
- SfxRequest& rReq )
- : FuPoor(pViewSh, pWin, pView, pDoc, rReq),
- pSdOutliner(NULL),
- bOwnOutliner(FALSE)
-{
-}
-
-FunctionReference FuSpell::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuSpell( pViewSh, pWin, pView, pDoc, rReq ) );
- xFunc->DoExecute(rReq);
- return xFunc;
-}
-
-void FuSpell::DoExecute( SfxRequest& )
-{
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
-
- if ( mpViewShell->ISA(DrawViewShell) )
- {
- bOwnOutliner = TRUE;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
- }
- else if ( mpViewShell->ISA(OutlineViewShell) )
- {
- bOwnOutliner = FALSE;
- pSdOutliner = mpDoc->GetOutliner();
- }
-
- if (pSdOutliner)
- pSdOutliner->PrepareSpelling();
-}
-
-
-
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
-
-FuSpell::~FuSpell()
-{
- mpDocSh->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
-
- if (pSdOutliner)
- pSdOutliner->EndSpelling();
-
- if (bOwnOutliner)
- delete pSdOutliner;
-}
-
-/*************************************************************************
-|*
-|* Pruefung starten
-|*
-\************************************************************************/
-
-void FuSpell::StartSpelling()
-{
- // Get current main view shell.
- ViewShellBase* pBase (ViewShellBase::GetViewShellBase (
- mpDocSh->GetViewShell()->GetViewFrame()));
- if (pBase != NULL)
- mpViewShell = pBase->GetMainViewShell().get();
- else
- mpViewShell = NULL;
- if (mpViewShell != NULL)
- {
- if ( pSdOutliner && mpViewShell->ISA(DrawViewShell) && !bOwnOutliner )
- {
- pSdOutliner->EndSpelling();
-
- bOwnOutliner = TRUE;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
- pSdOutliner->PrepareSpelling();
- }
- else if ( pSdOutliner && mpViewShell->ISA(OutlineViewShell) && bOwnOutliner )
- {
- pSdOutliner->EndSpelling();
- delete pSdOutliner;
-
- bOwnOutliner = FALSE;
- pSdOutliner = mpDoc->GetOutliner();
- pSdOutliner->PrepareSpelling();
- }
-
- if (pSdOutliner)
- pSdOutliner->StartSpelling();
- }
-}
-
-
-
-} // end of namespace sd
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index f62b1b087aee..31797f3c8a03 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -136,29 +136,4 @@ void FuTransform::DoExecute( SfxRequest& rReq )
}
}
-/*************************************************************************
-|*
-|* Function ResizeObject
-|*
-\************************************************************************/
-
-Point FuTransform::GetPoint( Rectangle aRect, RECT_POINT eRP )
-{
-
- switch( eRP )
- {
- case RP_LT: return( Point( aRect.Left(), aRect.Top() ) );
- case RP_MT: return( Point( aRect.Center().X(), aRect.Top() ) );
- case RP_RT: return( Point( aRect.Right(), aRect.Top() ) );
- case RP_LM: return( Point( aRect.Left(), aRect.Center().Y() ) );
- case RP_MM: return( Point( aRect.Center().X(), aRect.Center().Y() ) );
- case RP_RM: return( Point( aRect.Right(), aRect.Center().Y() ) );
- case RP_LB: return( Point( aRect.Left(), aRect.Bottom() ) );
- case RP_MB: return( Point( aRect.Center().X(), aRect.Bottom() ) );
- case RP_RB: return( Point( aRect.Right(), aRect.Bottom() ) );
- }
- return( Point ( 0, 0 ) ); // Sollte nicht vorkommen !
-}
-
-
} // end of namespace sd
diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk
index 9ec946325239..e4df8fe9d65a 100644
--- a/sd/source/ui/func/makefile.mk
+++ b/sd/source/ui/func/makefile.mk
@@ -84,7 +84,6 @@ SLOFILES = \
$(SLO)$/fuolbull.obj \
$(SLO)$/fucopy.obj \
$(SLO)$/fulink.obj \
- $(SLO)$/fuspell.obj \
$(SLO)$/futhes.obj \
$(SLO)$/fusearch.obj \
$(SLO)$/fuinsfil.obj \
@@ -98,7 +97,6 @@ SLOFILES = \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
- $(SLO)$/outlinfo.obj \
$(SLO)$/fucushow.obj \
$(SLO)$/fuvect.obj \
$(SLO)$/bulmaper.obj \
@@ -159,7 +157,6 @@ LIB3OBJFILES= \
$(SLO)$/fuolbull.obj \
$(SLO)$/fucopy.obj \
$(SLO)$/fulink.obj \
- $(SLO)$/fuspell.obj \
$(SLO)$/futhes.obj \
$(SLO)$/fusearch.obj \
$(SLO)$/fuinsfil.obj \
@@ -173,7 +170,6 @@ LIB3OBJFILES= \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
- $(SLO)$/outlinfo.obj \
$(SLO)$/fucushow.obj \
$(SLO)$/fuvect.obj \
$(SLO)$/bulmaper.obj \
diff --git a/sd/source/ui/func/outlinfo.cxx b/sd/source/ui/func/outlinfo.cxx
deleted file mode 100644
index 0a52da329b20..000000000000
--- a/sd/source/ui/func/outlinfo.cxx
+++ /dev/null
@@ -1,301 +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
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include
-#include
-#include
-#include
-#include
-#include "drawdoc.hxx"
-#include "outlinfo.hxx"
-#include