summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2009-12-06 19:11:52 +0100
committerChristian Lippka <cl@openoffice.org>2009-12-06 19:11:52 +0100
commitf0efe6abc4156df0834f8e6953a8bcee9ead9506 (patch)
treef981b0d07aa1d3d3ab8a9f9afdeda000a2846949
parent1be43c60fb32783312c18e4f65d63f4d7a55ca70 (diff)
renaissance01: #i107213# inital layout floater implementation
-rw-r--r--sd/inc/app.hrc2
-rw-r--r--sd/source/ui/app/layoutctrl.cxx85
-rw-r--r--sd/source/ui/dlg/layoutdialog.cxx269
-rw-r--r--sd/source/ui/dlg/layoutdialog.hrc31
-rw-r--r--sd/source/ui/dlg/layoutdialog.src48
-rw-r--r--sd/source/ui/dlg/makefile.mk9
-rw-r--r--sd/source/ui/inc/layoutdialog.hxx50
-rw-r--r--sd/source/ui/view/drviews6.cxx28
8 files changed, 490 insertions, 32 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 0ccbbf921b6b..f78cf1c16716 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -443,6 +443,8 @@
#define SID_SELECT_BACKGROUND (SID_SD_START+422)
#define SID_OBJECT_CROP (SID_SD_START+423)
+#define SID_LAYOUT_DIALOG_WIN (SID_SD_START+424)
+
// Slots for the tool pane popup
#define SID_TP_APPLY_TO_ALL_SLIDES (SID_SD_START+425)
#define SID_TP_APPLY_TO_SELECTED_SLIDES (SID_SD_START+426)
diff --git a/sd/source/ui/app/layoutctrl.cxx b/sd/source/ui/app/layoutctrl.cxx
index ce79068438c1..41e71f3066ff 100644
--- a/sd/source/ui/app/layoutctrl.cxx
+++ b/sd/source/ui/app/layoutctrl.cxx
@@ -48,6 +48,7 @@
#include <svtools/valueset.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/dockwin.hxx>
#include <svx/toolbarmenu.hxx>
@@ -69,12 +70,12 @@ using namespace ::com::sun::star::beans;
SFX_IMPL_TOOLBOX_CONTROL( SdLayoutControl, SfxVoidItem );
-class SdLayoutDockingWindow : public SfxPopupWindow
+#if 0
+class SdLayoutDialogContent : public SfxDockingWindow
{
- using FloatingWindow::StateChanged;
+ using DockingWindow::StateChanged;
private:
- boost::scoped_ptr<ToolbarMenu> mpToolbarMenu;
ToolBox* mpToolBox;
ValueSet* mpLayoutSet;
AutoLayout meCurrentLayout;
@@ -99,17 +100,17 @@ protected:
virtual void GetFocus (void);
public:
- SdLayoutDockingWindow( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow = 0);
- ~SdLayoutDockingWindow();
+ SdLayoutDialogContent( SfxBindings* pBindings, SfxChildWindow *pCW, ::Window* pParent, const SdResId& rSdResId, ViewShellBase& rBase);
+ ~SdLayoutDialogContent();
- virtual SfxPopupWindow* Clone() const;
+ virtual SfxDockingWindow* Clone() const;
virtual void Paint( const Rectangle& rRect );
virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
};
-
+#endif
// class SdLayoutControl ------------------------------------------
SdLayoutControl::SdLayoutControl( USHORT _nSlotId, USHORT _nId, ToolBox& rTbx )
@@ -137,6 +138,27 @@ void SdLayoutControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxP
SfxToolBoxControl::StateChanged( nSID, eState, pState );
}
+SfxPopupWindowType SdLayoutControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SdLayoutControl::CreatePopupWindow()
+{
+ ToolBox& rTbx = GetToolBox();
+ SdLayoutDialogContent* pWin = new SdLayoutDialogContent( GetId(), m_xFrame, &rTbx );
+// pWin->StartPopupMode( &rTbx, FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
+ pWin->EnableDocking(true);
+
+ Window::GetDockingManager()->StartPopupMode( &rTbx, pWin );
+// SetPopupWindow( pWin );
+// return pWin;
+ return 0;
+}
+
+#ifdef 0
// -----------------------------------------------------------------------
struct snewfoil_value_info
@@ -180,17 +202,21 @@ SfxPopupWindowType SdLayoutControl::GetPopupWindowType() const
SfxPopupWindow* SdLayoutControl::CreatePopupWindow()
{
- SdLayoutDockingWindow* pWin = new SdLayoutDockingWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->GrabFocus();
- SetPopupWindow( pWin );
- return pWin;
+ ToolBox& rTbx = GetToolBox();
+ SdLayoutDialogContent* pWin = new SdLayoutDialogContent( GetId(), m_xFrame, &rTbx );
+// pWin->StartPopupMode( &rTbx, FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
+ pWin->EnableDocking(true);
+
+ Window::GetDockingManager()->StartPopupMode( &rTbx, pWin );
+// SetPopupWindow( pWin );
+// return pWin;
+ return 0;
}
// -----------------------------------------------------------------------
-SdLayoutDockingWindow::SdLayoutDockingWindow( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow )
-: SfxPopupWindow( nId, rFrame, pParentWindow, WB_SYSTEMWINDOW|WB_BORDER|WB_NEEDSFOCUS )
+SdLayoutDialogContent::SdLayoutDialogContent( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow )
+: SfxDockingWindow( nId, rFrame, pParentWindow, WB_SYSTEMWINDOW )
, mxFrame( rFrame )
, mbPopupMode(true)
, meCurrentLayout( AUTOLAYOUT_NONE )
@@ -208,13 +234,13 @@ SdLayoutDockingWindow::SdLayoutDockingWindow( USHORT nId, const ::com::sun::star
mpToolbarMenu.reset( new ToolbarMenu( this, WB_CLIPCHILDREN ) );
// mpToolbarMenu->SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
- mpToolbarMenu->SetSelectHdl( LINK( this, SdLayoutDockingWindow, SelectHdl ) );
+ mpToolbarMenu->SetSelectHdl( LINK( this, SdLayoutDialogContent, SelectHdl ) );
mpLayoutSet = new ValueSet( mpToolbarMenu.get(), WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
// mpLayoutSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
- mpLayoutSet->SetSelectHdl( LINK( this, SdLayoutDockingWindow, SelectHdl ) );
+ mpLayoutSet->SetSelectHdl( LINK( this, SdLayoutDialogContent, SelectHdl ) );
mpLayoutSet->SetColCount( 4 );
mpLayoutSet->EnableFullItemMode( FALSE );
@@ -251,19 +277,19 @@ SdLayoutDockingWindow::SdLayoutDockingWindow( USHORT nId, const ::com::sun::star
AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AssignLayout" )));
}
-SfxPopupWindow* SdLayoutDockingWindow::Clone() const
+SfxDockingWindow* SdLayoutDialogContent::Clone() const
{
- return new SdLayoutDockingWindow( GetId(), mxFrame );
+ return new SdLayoutDialogContent( GetId(), mxFrame );
}
-void SdLayoutDockingWindow::Paint( const Rectangle& rRect )
+void SdLayoutDialogContent::Paint( const Rectangle& rRect )
{
- SfxPopupWindow::Paint(rRect);
+ SfxDockingWindow::Paint(rRect);
}
-void SdLayoutDockingWindow::DataChanged( const DataChangedEvent& rDCEvt )
+void SdLayoutDialogContent::DataChanged( const DataChangedEvent& rDCEvt )
{
- SfxPopupWindow::DataChanged( rDCEvt );
+ SfxDockingWindow::DataChanged( rDCEvt );
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
@@ -275,13 +301,13 @@ void SdLayoutDockingWindow::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-SdLayoutDockingWindow::~SdLayoutDockingWindow()
+SdLayoutDialogContent::~SdLayoutDialogContent()
{
}
// -----------------------------------------------------------------------
-void SdLayoutDockingWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SdLayoutDialogContent::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
{
if( (nSID == SID_ASSIGN_LAYOUT) && (eState != SFX_ITEM_DISABLED) )
{
@@ -296,7 +322,7 @@ void SdLayoutDockingWindow::StateChanged( USHORT nSID, SfxItemState eState, cons
// -----------------------------------------------------------------------
-IMPL_LINK( SdLayoutDockingWindow, SelectHdl, void *, pControl )
+IMPL_LINK( SdLayoutDialogContent, SelectHdl, void *, pControl )
{
if ( IsInPopupMode() )
EndPopupMode();
@@ -319,20 +345,21 @@ IMPL_LINK( SdLayoutDockingWindow, SelectHdl, void *, pControl )
// -----------------------------------------------------------------------
-void SdLayoutDockingWindow::PopupModeEnd()
+void SdLayoutDialogContent::PopupModeEnd()
{
if ( IsVisible() )
mbPopupMode = FALSE;
- SfxPopupWindow::PopupModeEnd();
+ SfxDockingWindow::PopupModeEnd();
}
// -----------------------------------------------------------------------
-void SdLayoutDockingWindow::GetFocus (void)
+void SdLayoutDialogContent::GetFocus (void)
{
- SfxPopupWindow::GetFocus();
+ SfxDockingWindow::GetFocus();
if( mpToolbarMenu )
mpToolbarMenu->GrabFocus();
}
+#endif
diff --git a/sd/source/ui/dlg/layoutdialog.cxx b/sd/source/ui/dlg/layoutdialog.cxx
new file mode 100644
index 000000000000..6a1a4db12413
--- /dev/null
+++ b/sd/source/ui/dlg/layoutdialog.cxx
@@ -0,0 +1,269 @@
+/*************************************************************************
+ *
+ * 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: LayerDialogContent.cxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include "layoutdialog.hxx"
+#include <sfx2/dockwin.hxx>
+#include "app.hrc"
+#include <sfx2/app.hxx>
+
+// Instantiate the implementation of the docking window before files
+// are included that define ::sd::Window. The ... macros are not really
+// namespace proof.
+namespace sd {
+SFX_IMPL_DOCKINGWINDOW(LayoutDialogChildWindow, SID_LAYOUT_DIALOG_WIN)
+}
+
+#include <vcl/image.hxx>
+
+#include <sfx2/dispatch.hxx>
+
+#include <svtools/languageoptions.hxx>
+#include <svtools/valueset.hxx>
+
+#include <svx/toolbarmenu.hxx>
+
+#include <com/sun/star/text/WritingMode.hpp>
+
+#include "layoutdialog.hrc"
+#include "glob.hrc"
+#include "strings.hrc"
+#include "res_bmp.hrc"
+#include "sdresid.hxx"
+#include "View.hxx"
+#include "drawdoc.hxx"
+#include "ViewShellBase.hxx"
+#include "DrawViewShell.hxx"
+
+using ::rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+
+namespace sd {
+
+///
+class SdLayoutDialogContent : public SfxDockingWindow
+{
+public:
+ SdLayoutDialogContent( SfxBindings* pBindings, SfxChildWindow *pCW, ::Window* pParent, ViewShellBase& rBase);
+ virtual ~SdLayoutDialogContent();
+
+protected:
+ virtual void Resize (void);
+
+ DECL_LINK( SelectHdl, void * );
+
+private:
+ boost::scoped_ptr<ToolbarMenu> mpToolbarMenu;
+ ValueSet* mpLayoutSet;
+ AutoLayout meCurrentLayout;
+ ViewShellBase& mrBase;
+};
+
+// -----------------------------------------------------------------------
+
+LayoutDialogChildWindow::LayoutDialogChildWindow(::Window* _pParent, USHORT nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo)
+: SfxChildWindow (_pParent, nId)
+{
+ ViewShellBase& rBase (*ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame()));
+ SdLayoutDialogContent* pContent = new SdLayoutDialogContent (pBindings, this, _pParent, rBase);
+ pWindow = pContent;
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ pContent->Initialize(pInfo);
+}
+
+LayoutDialogChildWindow::~LayoutDialogChildWindow (void)
+{
+}
+
+// -----------------------------------------------------------------------
+
+struct snewfoil_value_info
+{
+ USHORT mnBmpResId;
+ USHORT mnHCBmpResId;
+ USHORT mnStrResId;
+ WritingMode meWritingMode;
+ AutoLayout maAutoLayout;
+};
+static snewfoil_value_info standard[] =
+{
+ {BMP_FOIL_20, BMP_FOIL_20_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {BMP_FOIL_00, BMP_FOIL_00_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE},
+ {BMP_FOIL_01, BMP_FOIL_01_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM},
+ {BMP_FOIL_03, BMP_FOIL_03_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT},
+ {BMP_FOIL_19, BMP_FOIL_19_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE},
+ {BMP_FOIL_25, BMP_FOIL_25_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT},
+ {BMP_FOIL_12, BMP_FOIL_12_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ},
+ {BMP_FOIL_15, BMP_FOIL_15_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT},
+ {BMP_FOIL_16, BMP_FOIL_16_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
+ {BMP_FOIL_14, BMP_FOIL_14_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT},
+ {BMP_FOIL_18, BMP_FOIL_18_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ},
+ {BMP_FOIL_27, BMP_FOIL_27_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART},
+
+ // vertical
+ {BMP_FOIL_21, BMP_FOIL_21_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL,AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
+ {BMP_FOIL_22, BMP_FOIL_22_H, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
+ {BMP_FOIL_23, BMP_FOIL_23_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
+ {BMP_FOIL_24, BMP_FOIL_24_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
+
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
+};
+
+// -----------------------------------------------------------------------
+
+SdLayoutDialogContent::SdLayoutDialogContent( SfxBindings* pInBindings, SfxChildWindow *pCW, Window* pParent, ViewShellBase& rBase)
+: SfxDockingWindow(pInBindings, pCW, pParent, SdResId( FLT_WIN_LAYOUT_DIALOG ))
+, meCurrentLayout( AUTOLAYOUT_NONE )
+, mrBase(rBase)
+{
+// SetHelpId( HID_POPUP_LAYOUT );
+
+ const Color aMenuColor( GetSettings().GetStyleSettings().GetMenuColor() );
+ const Color aMenuBarColor( GetSettings().GetStyleSettings().GetMenuBarColor() );
+ const Color aMenuTextColor( GetSettings().GetStyleSettings().GetMenuBarColor() );
+ const Color aMenuBarTextColor( GetSettings().GetStyleSettings().GetMenuBarTextColor() );
+
+ const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ SvtLanguageOptions aLanguageOptions;
+ const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled();
+
+ mpToolbarMenu.reset( new ToolbarMenu( this, WB_CLIPCHILDREN ) );
+// mpToolbarMenu->SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
+ mpToolbarMenu->SetSelectHdl( LINK( this, SdLayoutDialogContent, SelectHdl ) );
+
+
+ mpLayoutSet = new ValueSet( mpToolbarMenu.get(), WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
+// mpLayoutSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
+
+ mpLayoutSet->SetSelectHdl( LINK( this, SdLayoutDialogContent, SelectHdl ) );
+ mpLayoutSet->SetColCount( 4 );
+ mpLayoutSet->EnableFullItemMode( FALSE );
+
+ Size aLayoutItemSize;
+
+ USHORT nItem = 1;
+ for( snewfoil_value_info* pInfo = &standard[0]; pInfo->mnBmpResId; pInfo++ )
+ {
+ if( !bVerticalEnabled && (pInfo->meWritingMode == WritingMode_TB_RL) )
+ continue;
+
+ String aText( SdResId( pInfo->mnStrResId ) );
+ BitmapEx aBmp( SdResId( bHighContrast ? pInfo->mnHCBmpResId : pInfo->mnBmpResId ) );
+ mpLayoutSet->InsertItem( static_cast<USHORT>(pInfo->maAutoLayout)+1, aBmp, aText );
+
+ aLayoutItemSize.Width() = std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() );
+ aLayoutItemSize.Height() = std::max( aLayoutItemSize.Height(), aBmp.GetSizePixel().Height() );
+ }
+
+ aLayoutItemSize = mpLayoutSet->CalcItemSizePixel( aLayoutItemSize );
+ Size aValueSize = mpLayoutSet->CalcWindowSizePixel( aLayoutItemSize );
+ mpLayoutSet->SetSizePixel( aValueSize );
+
+ mpToolbarMenu->appendEntry( -1, String( SdResId( STR_UNDO_MODIFY_PAGE ) ) );
+ mpToolbarMenu->appendEntry( 0, mpLayoutSet );
+ mpToolbarMenu->appendSeparator();
+ mpToolbarMenu->appendEntry( 1, String( RTL_CONSTASCII_USTRINGPARAM("Reset Slide Layout") ));
+
+ SetOutputSizePixel( mpToolbarMenu->getMenuSize() );
+ mpToolbarMenu->SetOutputSizePixel( GetOutputSizePixel() );
+
+ mpToolbarMenu->Show();
+
+// AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AssignLayout" )));
+
+ FreeResource();
+}
+
+void SdLayoutDialogContent::Resize (void)
+{
+ SfxDockingWindow::Resize();
+ mpToolbarMenu->SetPosSizePixel( Point(0,0), GetSizePixel() );
+}
+
+/*
+void SdLayoutDialogContent::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ SfxDockingWindow::DataChanged( rDCEvt );
+
+ if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ {
+ // const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ // todo switch images
+ }
+}
+*/
+
+// -----------------------------------------------------------------------
+
+/*
+void SdLayoutDialogContent::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ if( (nSID == SID_ASSIGN_LAYOUT) && (eState != SFX_ITEM_DISABLED) )
+ {
+ const SfxUInt32Item* pStateItem = dynamic_cast< const SfxUInt32Item* >(pState);
+ if( pStateItem )
+ {
+ meCurrentLayout = static_cast< AutoLayout >( pStateItem->GetValue() );
+ mpLayoutSet->SelectItem( static_cast<USHORT>(meCurrentLayout)+1 );
+ }
+ }
+}
+*/
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SdLayoutDialogContent, SelectHdl, void *, pControl )
+{
+/*
+ if ( IsInPopupMode() )
+ EndPopupMode();
+ AutoLayout eLayout = meCurrentLayout;
+
+ if( pControl == mpLayoutSet )
+ eLayout = static_cast< AutoLayout >(mpLayoutSet->GetSelectItemId()-1);
+
+ const rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:AssignLayout" ));
+
+ Sequence< PropertyValue > aArgs( 1 );
+ aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("WhatLayout") );
+ aArgs[0].Value <<= static_cast<sal_Int32>(eLayout);
+
+ SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), aCommand, aArgs );
+*/
+ return 0;
+}
+
+} // end of namespace sd
diff --git a/sd/source/ui/dlg/layoutdialog.hrc b/sd/source/ui/dlg/layoutdialog.hrc
new file mode 100644
index 000000000000..6fd97b2d09cc
--- /dev/null
+++ b/sd/source/ui/dlg/layoutdialog.hrc
@@ -0,0 +1,31 @@
+/*************************************************************************
+ *
+ * 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: LayerDialog.src,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define FLT_WIN_LAYOUT_DIALOG 795
diff --git a/sd/source/ui/dlg/layoutdialog.src b/sd/source/ui/dlg/layoutdialog.src
new file mode 100644
index 000000000000..21477e8db993
--- /dev/null
+++ b/sd/source/ui/dlg/layoutdialog.src
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * 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: LayerDialog.src,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "app.hrc"
+#include "layoutdialog.hrc"
+#include "helpids.h"
+
+DockingWindow FLT_WIN_LAYOUT_DIALOG
+{
+ HelpId = HID_SD_SLIDE_LAYOUTS;
+ Border = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Sizeable = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+};
+
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index ee62a9c29d7d..252950a73a5e 100644
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -76,7 +76,8 @@ SRC1FILES =\
LayerDialog.src \
PaneDockingWindow.src \
layeroptionsdlg.src \
- printdialog.src
+ printdialog.src \
+ layoutdialog.src
SLOFILES = \
@@ -126,7 +127,8 @@ SLOFILES = \
$(SLO)$/PaneChildWindows.obj \
$(SLO)$/PaneDockingWindow.obj \
$(SLO)$/PaneShells.obj \
- $(SLO)$/printdialog.obj
+ $(SLO)$/printdialog.obj \
+ $(SLO)$/layoutdialog.obj
LIB1TARGET= $(SLB)$/$(TARGET).lib
@@ -153,7 +155,8 @@ LIB1OBJFILES= \
$(SLO)$/PaneChildWindows.obj \
$(SLO)$/PaneDockingWindow.obj \
$(SLO)$/PaneShells.obj \
- $(SLO)$/printdialog.obj
+ $(SLO)$/printdialog.obj \
+ $(SLO)$/layoutdialog.obj
LIB2TARGET= $(SLB)$/sdui.lib
diff --git a/sd/source/ui/inc/layoutdialog.hxx b/sd/source/ui/inc/layoutdialog.hxx
new file mode 100644
index 000000000000..e53cd7944fa4
--- /dev/null
+++ b/sd/source/ui/inc/layoutdialog.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * 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: LayerDialogContent.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_LAYOUTDIALOG_HXX
+#define SD_LAYOUTDIALOG_HXX
+
+#include <sfx2/childwin.hxx>
+
+namespace sd {
+
+class LayoutDialogChildWindow : public SfxChildWindow
+{
+public:
+ LayoutDialogChildWindow ( ::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
+ virtual ~LayoutDialogChildWindow (void);
+
+ SFX_DECL_CHILDWINDOW(LayerDialogChildWindow);
+};
+
+} // end of namespace sd
+
+#endif
+
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 8c10effa061b..5ad91703a8c9 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -73,6 +73,7 @@
#include "AnimationChildWindow.hxx"
#include "NavigatorChildWindow.hxx"
#include "LayerDialogChildWindow.hxx"
+#include "layoutdialog.hxx"
#include "sdresid.hxx"
#include "fupoor.hxx"
#include "fusldlg.hxx"
@@ -375,6 +376,11 @@ void DrawViewShell::SetChildWindowState( SfxItemSet& rSet )
USHORT nId = ::avmedia::MediaPlayer::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_AVMEDIA_PLAYER, GetViewFrame()->HasChildWindow( nId ) ) );
}
+ if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LAYOUT_DIALOG_WIN ) )
+ {
+ USHORT nId = LayoutDialogChildWindow::GetChildWindowId();
+ rSet.Put( SfxBoolItem( SID_LAYOUT_DIALOG_WIN, GetViewFrame()->HasChildWindow( nId ) ) );
+ }
}
@@ -768,6 +774,28 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq)
}
break;
+ case SID_LAYOUT_DIALOG_WIN:
+ {
+ if ( rReq.GetArgs() )
+ {
+ GetViewFrame()->SetChildWindow(
+ LayoutDialogChildWindow::GetChildWindowId(),
+ ((const SfxBoolItem&) (rReq.GetArgs()->
+ Get(SID_LAYOUT_DIALOG_WIN))).GetValue());
+ }
+ else
+ {
+ GetViewFrame()->ToggleChildWindow(
+ LayoutDialogChildWindow::GetChildWindowId());
+ }
+
+ GetViewFrame()->GetBindings().Invalidate(SID_LAYOUT_DIALOG_WIN);
+ Cancel();
+ rReq.Ignore ();
+ }
+ break;
+
+
case SID_DISPLAY_MASTER_BACKGROUND:
case SID_DISPLAY_MASTER_OBJECTS:
{