summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka <christian.lippka@sun.com>2010-01-13 19:12:02 +0100
committerChristian Lippka <christian.lippka@sun.com>2010-01-13 19:12:02 +0100
commitcc1e430e1a6bdaad393720867db0ea5738439177 (patch)
treef3a1027b35f496944acd019371fe3f46107bbf9c
parentab98df64183f82536da9a36e36de1534c33bcd8f (diff)
toolbar menu rendering finetuning
-rw-r--r--sd/inc/app.hrc2
-rw-r--r--sd/source/ui/app/layoutctrl.cxx273
-rw-r--r--sd/source/ui/app/sddll2.cxx19
-rw-r--r--sd/source/ui/app/strings.src4
-rw-r--r--sd/source/ui/dlg/layoutdialog.cxx143
-rw-r--r--sd/source/ui/dlg/layoutdialog.hrc33
-rw-r--r--sd/source/ui/dlg/makefile.mk3
-rw-r--r--sd/source/ui/inc/ViewShellImplementation.hxx4
-rw-r--r--sd/source/ui/inc/layoutdialog.hxx25
-rw-r--r--sd/source/ui/inc/strings.hrc2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx7
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx56
-rw-r--r--sd/source/ui/view/drviews2.cxx29
-rw-r--r--sd/source/ui/view/drviews6.cxx27
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx10
15 files changed, 133 insertions, 504 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index f78cf1c16716..0ccbbf921b6b 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -443,8 +443,6 @@
#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 5f731d24d2ad..aab54577c9bf 100644
--- a/sd/source/ui/app/layoutctrl.cxx
+++ b/sd/source/ui/app/layoutctrl.cxx
@@ -35,8 +35,6 @@
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <boost/scoped_ptr.hpp>
-
#include <vcl/menu.hxx>
#include <vcl/status.hxx>
#include <vcl/toolbox.hxx>
@@ -45,10 +43,8 @@
#include <svl/style.hxx>
#include <svl/stritem.hxx>
#include <svtools/miscopt.hxx>
-#include <svtools/valueset.hxx>
#include <sfx2/dispatch.hxx>
-#include <sfx2/dockwin.hxx>
#include <svx/toolbarmenu.hxx>
@@ -71,47 +67,6 @@ using namespace ::com::sun::star::beans;
SFX_IMPL_TOOLBOX_CONTROL( SdLayoutControl, SfxVoidItem );
-#if 0
-class SdLayoutDialogContent : public SfxDockingWindow
-{
- using DockingWindow::StateChanged;
-
-private:
- ToolBox* mpToolBox;
- ValueSet* mpLayoutSet;
- AutoLayout meCurrentLayout;
-
- /*boost::scoped_ptr<FixedText> mpTitle;
- boost::scoped_ptr<FixedLine> mpSeperator;
- boost::scoped_ptr<Menu> mpMenu;*/
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- bool mbPopupMode;
-
- DECL_LINK( SelectHdl, void * );
-
-protected:
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- SdLayoutDialogContent( SfxBindings* pBindings, SfxChildWindow *pCW, ::Window* pParent, const SdResId& rSdResId, ViewShellBase& rBase);
- ~SdLayoutDialogContent();
-
- 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 )
@@ -141,6 +96,8 @@ void SdLayoutControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxP
SfxToolBoxControl::StateChanged( nSID, eState, pState );
}
+// -----------------------------------------------------------------------
+
SfxPopupWindowType SdLayoutControl::GetPopupWindowType() const
{
return SFX_POPUPWINDOW_ONCLICK;
@@ -150,231 +107,23 @@ SfxPopupWindowType SdLayoutControl::GetPopupWindowType() const
SfxPopupWindow* SdLayoutControl::CreatePopupWindow()
{
- /*
- OUString sResourceName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/dockingwindow/" ) );
- sResourceName += OUString::valueOf( static_cast<sal_Int32>(GetId()) );
- createAndPositionSubToolBar( sResourceName );
- */
-
SfxPopupWindow* pWin = 0;
ToolBox& rTbx = GetToolBox();
- SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- if( pViewFrame )
+ sd::ViewShellBase* pViewShellBase = sd::ViewShellBase::GetViewShellBase( SfxViewFrame::Current() );
+ if( pViewShellBase )
{
- pWin = sd::LayoutDialogChildWindow::createChildWindow( *pViewFrame, &rTbx );
- if( pWin )
+ pWin = pWin = new sd::SdLayoutDialogContent( *pViewShellBase, &rTbx );
+ pWin->StartPopupMode( &rTbx, TRUE );
+
+/* if( pWin )
{
pWin->EnableDocking(true);
Window::GetDockingManager()->StartPopupMode( &rTbx, pWin );
}
+*/
}
- SetPopupWindow( pWin );
- return 0;
-}
-
-#if 0
-// -----------------------------------------------------------------------
-
-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}
-};
-
-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;
-}
-
-// -----------------------------------------------------------------------
-
-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 )
-{
-// 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" )));
-}
-
-SfxDockingWindow* SdLayoutDialogContent::Clone() const
-{
- return new SdLayoutDialogContent( GetId(), mxFrame );
-}
-
-void SdLayoutDialogContent::Paint( const Rectangle& rRect )
-{
- SfxDockingWindow::Paint(rRect);
-}
-
-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
- }
-}
-
-// -----------------------------------------------------------------------
-
-SdLayoutDialogContent::~SdLayoutDialogContent()
-{
-}
-
-// -----------------------------------------------------------------------
-
-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;
-}
-
-// -----------------------------------------------------------------------
-
-void SdLayoutDialogContent::PopupModeEnd()
-{
- if ( IsVisible() )
- mbPopupMode = FALSE;
- SfxDockingWindow::PopupModeEnd();
-}
-
-// -----------------------------------------------------------------------
-
-void SdLayoutDialogContent::GetFocus (void)
-{
- SfxDockingWindow::GetFocus();
- if( mpToolbarMenu )
- mpToolbarMenu->GrabFocus();
+ SetPopupWindow( pWin );
+ return pWin;
}
-#endif
-
-
diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx
index 3c56631aadf7..4cd293c0061c 100644
--- a/sd/source/ui/app/sddll2.cxx
+++ b/sd/source/ui/app/sddll2.cxx
@@ -79,10 +79,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"
@@ -93,7 +90,6 @@
#include "tmplctrl.hxx"
#include "layoutctrl.hxx"
-#include "layoutdialog.hxx"
/*************************************************************************
|*
@@ -126,10 +122,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 );
@@ -138,15 +130,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);
@@ -234,5 +218,4 @@ void SdDLL::RegisterControllers()
SvxSubToolBoxControl::RegisterControl(SID_OPTIMIZE_TABLE, pMod);
SdLayoutControl::RegisterControl( SID_ASSIGN_LAYOUT, pMod );
- sd::LayoutDialogChildWindow::RegisterChildWindow( sal_False, pMod );
}
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 13f3503b5d31..99e019b4e400 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -1234,3 +1234,7 @@ String RID_ANNOTATIONS_START
{
Text [ en-US ] = "Comments";
};
+String STR_RESET_LAYOUT
+{
+ Text[ en-US ] = "Reset Slide Layout";
+};
diff --git a/sd/source/ui/dlg/layoutdialog.cxx b/sd/source/ui/dlg/layoutdialog.cxx
index 5c8cd4c1aa66..af158e0b5527 100644
--- a/sd/source/ui/dlg/layoutdialog.cxx
+++ b/sd/source/ui/dlg/layoutdialog.cxx
@@ -32,32 +32,24 @@
#include "precompiled_sd.hxx"
#include <com/sun/star/frame/XFrame.hpp>
-#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 <com/sun/star/text/WritingMode.hpp>
#include <vcl/image.hxx>
+#include <sfx2/dockwin.hxx>
+#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/imagemgr.hxx>
#include <sfx2/tbxctrl.hxx>
#include <svl/languageoptions.hxx>
+
#include <svtools/valueset.hxx>
#include <svx/toolbarmenu.hxx>
-#include <com/sun/star/text/WritingMode.hpp>
-
-#include "layoutdialog.hrc"
+#include "app.hrc"
+#include "layoutdialog.hxx"
#include "glob.hrc"
#include "strings.hrc"
#include "res_bmp.hrc"
@@ -76,53 +68,8 @@ using namespace ::com::sun::star::frame;
namespace sd {
-///
-class SdLayoutDialogContent : public SfxPopupWindow
-{
-public:
- SdLayoutDialogContent( ViewShellBase& rBase, Window* pParent);
- 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 (rBase, _pParent);
- pWindow = pContent;
- eChildAlignment = SFX_ALIGN_NOALIGNMENT;
-// pContent->Initialize(pInfo);
-}
-
-LayoutDialogChildWindow::~LayoutDialogChildWindow (void)
-{
-
-}
-
-SfxPopupWindow* LayoutDialogChildWindow::createChildWindow(SfxViewFrame& rViewFrame, ::Window* pParent)
-{
- SfxPopupWindow* pWin = 0;
- sd::ViewShellBase* pViewShellBase = sd::ViewShellBase::GetViewShellBase( &rViewFrame );
- if( pViewShellBase )
- {
- pWin = new SdLayoutDialogContent( *pViewShellBase, pParent );
- }
- return pWin;
-}
-
// -----------------------------------------------------------------------
struct snewfoil_value_info
@@ -141,28 +88,29 @@ static snewfoil_value_info standard[] =
{BMP_LAYOUT_HEAD02A_57X71, BMP_LAYOUT_HEAD02A_57X71_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT},
{BMP_LAYOUT_HEAD01_57X71, BMP_LAYOUT_HEAD01_57X71_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE},
{BMP_LAYOUT_TEXTONLY_57X71, BMP_LAYOUT_TEXTONLY_57X71_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_LAYOUT_HEAD02B_57X71, BMP_LAYOUT_HEAD02B_57X71_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ},
+ {BMP_LAYOUT_HEAD02B_57X71, BMP_LAYOUT_HEAD02B_57X71_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT},
+//--
{BMP_LAYOUT_HEAD03A_57X71, BMP_LAYOUT_HEAD03A_57X71_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
{BMP_LAYOUT_HEAD02B_57X71, BMP_LAYOUT_HEAD02B_57X71_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT},
{BMP_LAYOUT_HEAD04_57X71, BMP_LAYOUT_HEAD04_57X71_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ},
{BMP_LAYOUT_HEAD06_57X71, BMP_LAYOUT_HEAD06_57X71_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART},
-
+/*
// vertical
{BMP_LAYOUT_VERTICAL02_57X71, BMP_LAYOUT_VERTICAL02_57X71_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL,AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
{BMP_LAYOUT_VERTICAL01_57X71, BMP_LAYOUT_VERTICAL01_57X71_H, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
{BMP_LAYOUT_HEAD02_57X71, BMP_LAYOUT_HEAD02_57X71_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
{BMP_LAYOUT_HEAD02A_57X71, BMP_LAYOUT_HEAD02A_57X71_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( ViewShellBase& rBase, Window* pParent )
-: SfxPopupWindow(SID_ASSIGN_LAYOUT, rBase.GetFrame()->GetTopFrame()->GetFrameInterface(), pParent, WB_CLIPCHILDREN|WB_DIALOGCONTROL|WB_SYSTEMWINDOW/*SdResId( FLT_WIN_LAYOUT_DIALOG )*/)
-, meCurrentLayout( AUTOLAYOUT_NONE )
+SdLayoutDialogContent::SdLayoutDialogContent( ViewShellBase& rBase, ::Window* pParent )
+: ToolbarMenu(SID_ASSIGN_LAYOUT, rBase.GetFrame()->GetTopFrame()->GetFrameInterface(), pParent, WB_NOBORDER|WB_CLIPCHILDREN|WB_DIALOGCONTROL|WB_NOSHADOW|WB_SYSTEMWINDOW)
, mrBase(rBase)
{
String sResetSlideLayout( SdResId( STR_RESET_LAYOUT ) );
@@ -182,17 +130,18 @@ SdLayoutDialogContent::SdLayoutDialogContent( ViewShellBase& rBase, Window* pPar
SvtLanguageOptions aLanguageOptions;
const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled();
- mpToolbarMenu.reset( new ToolbarMenu( this, WB_CLIPCHILDREN ) );
+// mpToolbarMenu.reset( new ToolbarMenu( this, WB_CLIPCHILDREN ) );
// mpToolbarMenu->SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
- mpToolbarMenu->SetSelectHdl( LINK( this, SdLayoutDialogContent, SelectHdl ) );
+ /* mpToolbarMenu->*/ SetSelectHdl( LINK( this, SdLayoutDialogContent, SelectHdl ) );
- mpLayoutSet = new ValueSet( mpToolbarMenu.get(), WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
+ mpLayoutSet = new ValueSet( /* mpToolbarMenu->.get()*/ this, 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 );
+ mpLayoutSet->SetColor( GetControlBackground() );
Size aLayoutItemSize;
@@ -204,6 +153,7 @@ SdLayoutDialogContent::SdLayoutDialogContent( ViewShellBase& rBase, Window* pPar
String aText( SdResId( pInfo->mnStrResId ) );
BitmapEx aBmp( SdResId( bHighContrast ? pInfo->mnHCBmpResId : pInfo->mnBmpResId ) );
+ aBmp.Expand( 4, 4, 0, TRUE );
mpLayoutSet->InsertItem( static_cast<USHORT>(pInfo->maAutoLayout)+1, aBmp, aText );
aLayoutItemSize.Width() = std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() );
@@ -211,41 +161,45 @@ SdLayoutDialogContent::SdLayoutDialogContent( ViewShellBase& rBase, Window* pPar
}
aLayoutItemSize = mpLayoutSet->CalcItemSizePixel( aLayoutItemSize );
- Size aValueSize = mpLayoutSet->CalcWindowSizePixel( aLayoutItemSize );
- mpLayoutSet->SetSizePixel( aValueSize );
+ mpLayoutSet->SetSizePixel( mpLayoutSet->CalcWindowSizePixel( aLayoutItemSize ) );
- mpToolbarMenu->appendEntry( -1, String( SdResId( STR_UNDO_MODIFY_PAGE ) ) );
- mpToolbarMenu->appendEntry( 0, mpLayoutSet );
- mpToolbarMenu->appendSeparator();
+ SetText( String( SdResId( STR_UNDO_MODIFY_PAGE ) ) );
+ //mpToolbarMenu->appendEntry( -1, );
+ /*mpToolbarMenu->*/appendEntry( 0, mpLayoutSet );
+ /*mpToolbarMenu->*/appendSeparator();
Reference< XFrame > xFrame( GetFrame(), UNO_QUERY );
if( xFrame.is() )
{
Image aImg( ::GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:Undo") ), FALSE, FALSE ) );
- mpToolbarMenu->appendEntry( 1, sResetSlideLayout, aImg);
+ /*mpToolbarMenu->*/appendEntry( 1, sResetSlideLayout, aImg);
}
else
{
- mpToolbarMenu->appendEntry( 1, sResetSlideLayout);
+ /*mpToolbarMenu->*/appendEntry( 1, sResetSlideLayout);
}
- SetOutputSizePixel( mpToolbarMenu->getMenuSize() );
- mpToolbarMenu->SetOutputSizePixel( GetOutputSizePixel() );
+/*
+ Size aSize( mpToolbarMenu->getMenuSize() );
+ mpToolbarMenu->SetPosSizePixel( Point( 1,1 ), aSize );
- mpToolbarMenu->Show();
+ aSize.Width() += 2;
+ aSize.Height() += 2;
+*/
+ SetOutputSizePixel( getMenuSize() );
-// AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AssignLayout" )));
+// mpToolbarMenu->Show();
}
+// -----------------------------------------------------------------------
+
SdLayoutDialogContent::~SdLayoutDialogContent()
{
}
-void SdLayoutDialogContent::Resize (void)
-{
- SfxPopupWindow::Resize();
- mpToolbarMenu->SetPosSizePixel( Point(0,0), GetSizePixel() );
-}
+
+// -----------------------------------------------------------------------
+
/*
void SdLayoutDialogContent::DataChanged( const DataChangedEvent& rDCEvt )
@@ -285,15 +239,20 @@ IMPL_LINK( SdLayoutDialogContent, SelectHdl, void *, pControl )
if ( IsInPopupMode() )
EndPopupMode();
- AutoLayout eLayout = meCurrentLayout;
-
- if( pControl == mpLayoutSet )
- eLayout = static_cast< AutoLayout >(mpLayoutSet->GetSelectItemId()-1);
-
- const SfxUInt32Item aItem(ID_VAL_WHATLAYOUT, eLayout);
if( mrBase.GetMainViewShell().get() && mrBase.GetMainViewShell()->GetViewFrame() )
{
- mrBase.GetMainViewShell()->GetViewFrame()->GetBindings().GetDispatcher()->Execute(SID_ASSIGN_LAYOUT,SFX_CALLMODE_ASYNCHRON,&aItem,0);
+ if( pControl == mpLayoutSet )
+ {
+ AutoLayout eLayout = static_cast< AutoLayout >(mpLayoutSet->GetSelectItemId()-1);
+
+ const SfxUInt32Item aItem(ID_VAL_WHATLAYOUT, eLayout);
+ mrBase.GetMainViewShell()->GetViewFrame()->GetBindings().GetDispatcher()->Execute(SID_ASSIGN_LAYOUT,SFX_CALLMODE_ASYNCHRON,&aItem,0);
+ }
+ else
+ {
+ // reset autolayout
+ mrBase.GetMainViewShell()->GetViewFrame()->GetBindings().GetDispatcher()->Execute(SID_ASSIGN_LAYOUT,SFX_CALLMODE_ASYNCHRON);
+ }
}
return 0;
diff --git a/sd/source/ui/dlg/layoutdialog.hrc b/sd/source/ui/dlg/layoutdialog.hrc
deleted file mode 100644
index c53f5342f2b5..000000000000
--- a/sd/source/ui/dlg/layoutdialog.hrc
+++ /dev/null
@@ -1,33 +0,0 @@
-/*************************************************************************
- *
- * 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
-
-#define STR_RESET_LAYOUT 1
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index 252950a73a5e..27156c7b285a 100644
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -76,8 +76,7 @@ SRC1FILES =\
LayerDialog.src \
PaneDockingWindow.src \
layeroptionsdlg.src \
- printdialog.src \
- layoutdialog.src
+ printdialog.src
SLOFILES = \
diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx
index e107d3af6987..537c62b3d46d 100644
--- a/sd/source/ui/inc/ViewShellImplementation.hxx
+++ b/sd/source/ui/inc/ViewShellImplementation.hxx
@@ -127,9 +127,7 @@ public:
@param pPage
If a NULL pointer is given then this call is ignored.
*/
- void AssignLayout (
- SdPage* pPage,
- AutoLayout aLayout);
+ void AssignLayout ( SfxRequest& rRequest, PageKind ePageKind );
/** Determine the view id of the view shell. This corresponds to the
view id stored in the SfxViewFrame class.
diff --git a/sd/source/ui/inc/layoutdialog.hxx b/sd/source/ui/inc/layoutdialog.hxx
index 6dd427901856..b9d92f8e53f3 100644
--- a/sd/source/ui/inc/layoutdialog.hxx
+++ b/sd/source/ui/inc/layoutdialog.hxx
@@ -31,25 +31,34 @@
#ifndef SD_LAYOUTDIALOG_HXX
#define SD_LAYOUTDIALOG_HXX
-#include <sfx2/childwin.hxx>
+#include <svx/toolbarmenu.hxx>
+
+#include <svtools/valueset.hxx>
+
+#include <boost/scoped_ptr.hpp>
-class SfxViewFrame;
class ::Window;
-class SfxPopupWindow;
+class ValueSet;
namespace sd {
-class LayoutDialogChildWindow : public SfxChildWindow
+class ViewShellBase;
+
+class SdLayoutDialogContent : public ToolbarMenu
{
public:
- LayoutDialogChildWindow ( ::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
- virtual ~LayoutDialogChildWindow (void);
+ SdLayoutDialogContent( ViewShellBase& rBase, ::Window* pParent);
+ virtual ~SdLayoutDialogContent();
- SFX_DECL_CHILDWINDOW(LayerDialogChildWindow);
+protected:
+ DECL_LINK( SelectHdl, void * );
- static SfxPopupWindow* createChildWindow(SfxViewFrame& rViewFrame, ::Window* pParent);
+private:
+ ValueSet* mpLayoutSet;
+ ViewShellBase& mrBase;
};
+
} // end of namespace sd
#endif
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index c29b8bc5f8fb..0b763d9df058 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -505,6 +505,8 @@
#define STR_NAVIGATOR_SHOW_ALL_SHAPES (RID_APP_START+719)
#define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720)
+#define STR_RESET_LAYOUT (RID_APP_START+721)
+
/******************************************************************************
* The ids in glob.hrc start at RID_APP_START+750!
******************************************************************************/
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 4aa35f91292f..16b1ac78a9cb 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -243,12 +243,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_ASSIGN_LAYOUT:
{
- SFX_REQUEST_ARG (rRequest, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
- SFX_REQUEST_ARG (rRequest, pWhatLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- pShell->mpImpl->AssignLayout(
- pDocument->GetSdPage((USHORT)pWhatPage->GetValue(),
- mrSlideSorter.GetModel().GetPageType()),
- (AutoLayout)pWhatLayout->GetValue());
+ pShell->mpImpl->AssignLayout( rRequest, mrSlideSorter.GetModel().GetPageType() );
rRequest.Done ();
}
break;
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 75b728c7849b..6795c37bb2e8 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -322,30 +322,44 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
rRequest.Done ();
}
+void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind ePageKind )
+{
+ const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATPAGE, FALSE, TYPE(SfxUInt32Item) ) );
+ const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATLAYOUT, FALSE, TYPE(SfxUInt32Item) ) );
+ SdPage* pPage = 0;
+ if( pWhatPage )
+ {
+ SdDrawDocument* pDocument = mrViewShell.GetDoc();
+ if( pDocument )
+ pPage = pDocument->GetSdPage(static_cast<USHORT>(pWhatPage->GetValue()), ePageKind);
+ }
+ if( pPage == 0 )
+ pPage = mrViewShell.getCurrentPage();
-void ViewShell::Implementation::AssignLayout (
- SdPage* pPage,
- AutoLayout aLayout)
-{
- // Transform the given request into the four argument form that is
- // understood by ProcessModifyPageSlot().
- SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin());
- BYTE aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE));
- BYTE aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
- SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers());
- SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
- aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
- aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
- aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
- aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
-
- // Forward the call with the new arguments.
- ProcessModifyPageSlot (
- aRequest,
- pPage,
- pPage->GetPageKind());
+ if( pPage )
+ {
+ AutoLayout eLayout = pPage->GetAutoLayout();
+
+ if( pWhatLayout )
+ eLayout = static_cast< AutoLayout >( pWhatLayout->GetValue() );
+
+ // Transform the given request into the four argument form that is
+ // understood by ProcessModifyPageSlot().
+ SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin());
+ BYTE aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE));
+ BYTE aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
+ SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers());
+ SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
+ aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
+ aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, eLayout));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
+
+ // Forward the call with the new arguments.
+ ProcessModifyPageSlot( aRequest, pPage, pPage->GetPageKind());
+ }
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index bf8407383909..f1bebd83da83 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -432,33 +432,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES || (mePageKind==PK_HANDOUT && meEditMode==EM_MASTERPAGE))
{
- if( rReq.GetArgs() )
- {
- const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rReq.GetArg( ID_VAL_WHATPAGE, FALSE, TYPE(SfxUInt32Item) ) );
- const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rReq.GetArg( ID_VAL_WHATLAYOUT, FALSE, TYPE(SfxUInt32Item) ) );
-
- if( pWhatLayout )
- {
- if ( mpDrawView->IsTextEdit() )
- mpDrawView->SdrEndTextEdit();
-
- USHORT nPage;
- if( pWhatPage )
- {
- nPage = pWhatPage->GetValue();
- }
- else
- {
- nPage = maTabControl.GetCurPageId() - 1;
- }
+ if ( mpDrawView->IsTextEdit() )
+ mpDrawView->SdrEndTextEdit();
- ::sd::ViewShell::mpImpl->AssignLayout(GetDoc()->GetSdPage((USHORT)nPage, mePageKind),(AutoLayout)pWhatLayout->GetValue());
- }
- }
- else
- {
- GetViewFrame()->ToggleChildWindow( sd::LayoutDialogChildWindow::GetChildWindowId() );
- }
+ ::sd::ViewShell::mpImpl->AssignLayout(rReq, mePageKind);
}
Cancel();
rReq.Done ();
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 7dd139e88067..bb5aa18d81c5 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -372,11 +372,6 @@ 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 ) ) );
- }
}
@@ -741,28 +736,6 @@ 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:
{
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index bc4debb1afb3..74515a7cfc64 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -339,16 +339,18 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList )
Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height());
+ if( 50 > nShapeSizePix )
+ return;
- Image* pImages = &ViewOverlayManager::maLargeButtonImages[0]; //(nShapeSizePix > 300) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
+ Image* pImages = &ViewOverlayManager::maSmallButtonImages[0]; //(nShapeSizePix > 300) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
Size aButtonSize( pDev->PixelToLogic(pImages[0].GetSizePixel()) );
- if( 200 > nShapeSizePix )
+ if( 100 > nShapeSizePix )
{
aButtonSize.Width() >>= 1; aButtonSize.Height() >>= 1;
}
- const long nBorderPix = (nShapeSizePix > 300) ? 4 : (nShapeSizePix > 100) ? 2 : 1;
+ const long nBorderPix = (nShapeSizePix > 100) ? 4 : (nShapeSizePix > 50) ? 2 : 1;
Size aBorder( pDev->PixelToLogic(Size(nBorderPix,nBorderPix)) );
const int nColumns = (ViewOverlayManager::ButtonCount+1) >> 1;
@@ -366,7 +368,7 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList )
for( int i = 0, c = 0; i < ViewOverlayManager::ButtonCount; i++ )
{
Image aImg( pImages[i] );
- if( 200 > nShapeSizePix )
+ if( 100 > nShapeSizePix )
{
BitmapEx b( aImg.GetBitmapEx() );
const double scale = 0.5;