You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/07/19 17:59:11 UTC
svn commit: r1504925 [8/12] - in /openoffice/branches/rejuvenate01:
ext_libraries/apr-util/ ext_libraries/coinmp/ ext_libraries/serf/
ext_libraries/serf/win/ ext_sources/ main/
main/accessibility/bridge/org/openoffice/java/accessibility/
main/basctl/so...
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx Fri Jul 19 15:59:04 2013
@@ -34,6 +34,8 @@
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
+#include <sfx2/sidebar/Tools.hxx>
#include <svx/sidebar/PopupContainer.hxx>
#include <sfx2/dispatch.hxx>
#include <editeng/colritem.hxx>
@@ -49,14 +51,13 @@
#include <sfx2/objsh.hxx>
#include <svtools/unitconv.hxx>
#include <boost/bind.hpp>
+
using namespace css;
using namespace cssu;
+using namespace ::sfx2::sidebar;
using ::sfx2::sidebar::Theme;
using ::sfx2::sidebar::ControlFactory;
-#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
-
-
namespace svx {namespace sidebar {
#define DEFAULT_VALUE 0
#define TOOLBOX_ITEM1 1
@@ -70,8 +71,6 @@ namespace svx {namespace sidebar {
#define INDENT_DECREMENT 2
#define INDENT_STEP 706
#define UL_STEP 58
-#define UL_INCREMENT 1
-#define UL_DECREMENT 2
#define NEGATIVE_MAX_VALUE -9999
#define BEGIN_VALUE 28
@@ -115,6 +114,7 @@ namespace svx {namespace sidebar {
#define LINE_POINT3_WHITE Point(LogicToPixel(Point(LINE_X_WHITE,LINE_TOP_Y2), MAP_APPFONT))
#define LINE_POINT4_WHITE Point(LogicToPixel(Point(LINE_X_WHITE,LINE_BOT_Y2), MAP_APPFONT))
+
ParaPropertyPanel* ParaPropertyPanel::Create (
Window* pParent,
const cssu::Reference<css::frame::XFrame>& rxFrame,
@@ -148,119 +148,119 @@ void ParaPropertyPanel::HandleContextCha
switch (maContext.GetCombinedContext_DI())
{
case CombinedEnumContext(Application_Calc, Context_DrawText):
- maTBxVertAlign->Show();
- maTBxVertAlignBackground->Show();
- maTBxBackColor->Hide();
- maTBxBackColorBackground->Hide();
- maTBxNumBullet->Hide();
- maTBxNumBulletBackground->Hide();
+ mpTBxVertAlign->Show();
+ mpTBxVertAlignBackground->Show();
+ mpTBxBackColor->Hide();
+ mpTBxBackColorBackground->Hide();
+ mpTBxNumBullet->Hide();
+ mpTBxNumBulletBackground->Hide();
ReSize(false);
- maTbxIndent_IncDec->Show();
- maTbxIndent_IncDecBackground->Show();
- maTbxProDemote->Hide();
- maTbxProDemoteBackground->Hide();
+ mpTbxIndent_IncDec->Show();
+ mpTbxIndent_IncDecBackground->Show();
+ mpTbxProDemote->Hide();
+ mpTbxProDemoteBackground->Hide();
break;
case CombinedEnumContext(Application_DrawImpress, Context_Draw):
case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
- maTBxVertAlign->Hide();
- maTBxVertAlignBackground->Hide();
- maTBxBackColor->Hide();
- maTBxBackColorBackground->Hide();
- maTBxNumBullet->Show();
- maTBxNumBulletBackground->Show();
+ mpTBxVertAlign->Hide();
+ mpTBxVertAlignBackground->Hide();
+ mpTBxBackColor->Hide();
+ mpTBxBackColorBackground->Hide();
+ mpTBxNumBullet->Show();
+ mpTBxNumBulletBackground->Show();
ReSize(true);
- maTbxIndent_IncDec->Hide();
- maTbxIndent_IncDecBackground->Hide();
- maTbxProDemote->Show();
- maTbxProDemoteBackground->Show();
+ mpTbxIndent_IncDec->Hide();
+ mpTbxIndent_IncDecBackground->Hide();
+ mpTbxProDemote->Show();
+ mpTbxProDemoteBackground->Show();
break;
case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
- maTBxVertAlign->Show();
- maTBxVertAlignBackground->Show();
- maTBxBackColor->Hide();
- maTBxBackColorBackground->Hide();
- maTBxNumBullet->Show();
- maTBxNumBulletBackground->Show();
+ mpTBxVertAlign->Show();
+ mpTBxVertAlignBackground->Show();
+ mpTBxBackColor->Hide();
+ mpTBxBackColorBackground->Hide();
+ mpTBxNumBullet->Show();
+ mpTBxNumBulletBackground->Show();
ReSize(true);
- maTbxIndent_IncDec->Hide();
- maTbxIndent_IncDecBackground->Hide();
- maTbxProDemote->Show();
- maTbxProDemoteBackground->Show();
+ mpTbxIndent_IncDec->Hide();
+ mpTbxIndent_IncDecBackground->Hide();
+ mpTbxProDemote->Show();
+ mpTbxProDemoteBackground->Show();
break;
case CombinedEnumContext(Application_DrawImpress, Context_Table):
- maTBxVertAlign->Show();
- maTBxVertAlignBackground->Show();
- maTBxBackColor->Hide();
- maTBxBackColorBackground->Hide();
- maTBxNumBullet->Show();
- maTBxNumBulletBackground->Show();
+ mpTBxVertAlign->Show();
+ mpTBxVertAlignBackground->Show();
+ mpTBxBackColor->Hide();
+ mpTBxBackColorBackground->Hide();
+ mpTBxNumBullet->Show();
+ mpTBxNumBulletBackground->Show();
ReSize(true);
- maTbxIndent_IncDec->Hide();
- maTbxIndent_IncDecBackground->Hide();
- maTbxProDemote->Show();
- maTbxProDemoteBackground->Show();
+ mpTbxIndent_IncDec->Hide();
+ mpTbxIndent_IncDecBackground->Hide();
+ mpTbxProDemote->Show();
+ mpTbxProDemoteBackground->Show();
break;
case CombinedEnumContext(Application_WriterVariants, Context_Default):
case CombinedEnumContext(Application_WriterVariants, Context_Text):
- maTBxVertAlign->Hide();
- maTBxVertAlignBackground->Hide();
- maTBxBackColor->Show();
- maTBxBackColorBackground->Show();
- maTBxNumBullet->Show();
+ mpTBxVertAlign->Hide();
+ mpTBxVertAlignBackground->Hide();
+ mpTBxBackColor->Show();
+ mpTBxBackColorBackground->Show();
+ mpTBxNumBullet->Show();
- maTBxNumBulletBackground->Show();
+ mpTBxNumBulletBackground->Show();
ReSize(true);
- maTbxIndent_IncDec->Show();
- maTbxIndent_IncDecBackground->Show();
- maTbxProDemote->Hide();
- maTbxProDemoteBackground->Hide();
+ mpTbxIndent_IncDec->Show();
+ mpTbxIndent_IncDecBackground->Show();
+ mpTbxProDemote->Hide();
+ mpTbxProDemoteBackground->Hide();
break;
case CombinedEnumContext(Application_WriterVariants, Context_Table):
- maTBxVertAlign->Show();
- maTBxVertAlignBackground->Show();
- maTBxBackColor->Show();
- maTBxBackColorBackground->Show();
- maTBxNumBullet->Show();
- maTBxNumBulletBackground->Show();
+ mpTBxVertAlign->Show();
+ mpTBxVertAlignBackground->Show();
+ mpTBxBackColor->Show();
+ mpTBxBackColorBackground->Show();
+ mpTBxNumBullet->Show();
+ mpTBxNumBulletBackground->Show();
ReSize(true);
- maTbxIndent_IncDec->Show();
- maTbxIndent_IncDecBackground->Show();
- maTbxProDemote->Hide();
- maTbxProDemoteBackground->Hide();
+ mpTbxIndent_IncDec->Show();
+ mpTbxIndent_IncDecBackground->Show();
+ mpTbxProDemote->Hide();
+ mpTbxProDemoteBackground->Hide();
break;
case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
- maTBxVertAlign->Show();
- maTBxVertAlignBackground->Show();
- maTBxBackColor->Hide();
- maTBxBackColorBackground->Hide();
- maTBxNumBullet->Hide();
- maTBxNumBulletBackground->Hide();
+ mpTBxVertAlign->Show();
+ mpTBxVertAlignBackground->Show();
+ mpTBxBackColor->Hide();
+ mpTBxBackColorBackground->Hide();
+ mpTBxNumBullet->Hide();
+ mpTBxNumBulletBackground->Hide();
ReSize(false);
- maTbxIndent_IncDec->Show();
- maTbxIndent_IncDecBackground->Show();
- maTbxProDemote->Hide();
- maTbxProDemoteBackground->Hide();
+ mpTbxIndent_IncDec->Show();
+ mpTbxIndent_IncDecBackground->Show();
+ mpTbxProDemote->Hide();
+ mpTbxProDemoteBackground->Hide();
break;
case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
- maTBxVertAlign->Hide();
- maTBxVertAlignBackground->Hide();
- maTBxBackColor->Hide();
- maTBxBackColorBackground->Hide();
- maTBxNumBullet->Hide();
- maTBxNumBulletBackground->Hide();
+ mpTBxVertAlign->Hide();
+ mpTBxVertAlignBackground->Hide();
+ mpTBxBackColor->Hide();
+ mpTBxBackColorBackground->Hide();
+ mpTBxNumBullet->Hide();
+ mpTBxNumBulletBackground->Hide();
ReSize(false);
- maTbxIndent_IncDec->Show();
- maTbxIndent_IncDecBackground->Show();
- maTbxProDemote->Hide();
- maTbxProDemoteBackground->Hide();
+ mpTbxIndent_IncDec->Show();
+ mpTbxIndent_IncDecBackground->Show();
+ mpTbxProDemote->Hide();
+ mpTbxProDemoteBackground->Hide();
break;
case CombinedEnumContext(Application_Calc, Context_EditCell):
@@ -309,19 +309,19 @@ void ParaPropertyPanel::ReSize(bool bSiz
if(bSize)
{
//Paragraph spacing
- maFTUL->SetPosPixel(POS_FT_PARA_SPACE);
- maTbxUL_IncDec->SetPosPixel(POS_TBX_PARA_SPACE_INC_DEC);
- maTopDist->SetPosPixel(POS_MBX_TOP_DIST);
- maBottomDist->SetPosPixel(POS_MBX_BOT_DIST);
+ mpFTUL->SetPosPixel(POS_FT_PARA_SPACE);
+ mpTbxUL_IncDec->SetPosPixel(POS_TBX_PARA_SPACE_INC_DEC);
+ mpTopDist->SetPosPixel(POS_MBX_TOP_DIST);
+ mpBottomDist->SetPosPixel(POS_MBX_BOT_DIST);
//Indent
- maFTIndent->SetPosPixel(POS_FT_PARA_INDENT);
- maTbxIndent_IncDec->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC);
- maTbxProDemote->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC);
- maLeftIndent->SetPosPixel(POS_MBX_LEFT_DIST);
- maRightIndent->SetPosPixel(POS_MBX_RIGHT_DIST);
- maFLineIndent->SetPosPixel(POS_MBX_FLINE_DIST);
+ mpFTIndent->SetPosPixel(POS_FT_PARA_INDENT);
+ mpTbxIndent_IncDec->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC);
+ mpTbxProDemote->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC);
+ mpLeftIndent->SetPosPixel(POS_MBX_LEFT_DIST);
+ mpRightIndent->SetPosPixel(POS_MBX_RIGHT_DIST);
+ mpFLineIndent->SetPosPixel(POS_MBX_FLINE_DIST);
//Line spacing
- maLineSPTbx->SetPosPixel(TBX_LINE_SPACE);
+ mpLineSPTbx->SetPosPixel(TBX_LINE_SPACE);
//image
maFISpace1.SetPosPixel(POS_IMG_SPACE1);
maFISpace2.SetPosPixel(POS_IMG_SPACE2);
@@ -336,19 +336,19 @@ void ParaPropertyPanel::ReSize(bool bSiz
else
{
//Paragraph spacing
- maFTUL->SetPosPixel(POS_FT_PARA_SPACE2);
- maTbxUL_IncDec->SetPosPixel(POS_TBX_PARA_SPACE_INC_DEC2);
- maTopDist->SetPosPixel(POS_MBX_TOP_DIST2);
- maBottomDist->SetPosPixel(POS_MBX_BOT_DIST2);
+ mpFTUL->SetPosPixel(POS_FT_PARA_SPACE2);
+ mpTbxUL_IncDec->SetPosPixel(POS_TBX_PARA_SPACE_INC_DEC2);
+ mpTopDist->SetPosPixel(POS_MBX_TOP_DIST2);
+ mpBottomDist->SetPosPixel(POS_MBX_BOT_DIST2);
//Indent
- maFTIndent->SetPosPixel(POS_FT_PARA_INDENT2);
- maTbxIndent_IncDec->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC2);
- maTbxProDemote->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC2);
- maLeftIndent->SetPosPixel(POS_MBX_LEFT_DIST2);
- maRightIndent->SetPosPixel(POS_MBX_RIGHT_DIST2);
- maFLineIndent->SetPosPixel(POS_MBX_FLINE_DIST2);
+ mpFTIndent->SetPosPixel(POS_FT_PARA_INDENT2);
+ mpTbxIndent_IncDec->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC2);
+ mpTbxProDemote->SetPosPixel(POS_TBX_PARA_INDENT_INC_DEC2);
+ mpLeftIndent->SetPosPixel(POS_MBX_LEFT_DIST2);
+ mpRightIndent->SetPosPixel(POS_MBX_RIGHT_DIST2);
+ mpFLineIndent->SetPosPixel(POS_MBX_FLINE_DIST2);
//Line spacing
- maLineSPTbx->SetPosPixel(TBX_LINE_SPACE2);
+ mpLineSPTbx->SetPosPixel(TBX_LINE_SPACE2);
//image
maFISpace1.SetPosPixel(POS_IMG_SPACE12);
maFISpace2.SetPosPixel(POS_IMG_SPACE22);
@@ -361,10 +361,34 @@ void ParaPropertyPanel::ReSize(bool bSiz
SetSizePixel(aSize);
}
+ maLayouter.Layout();
+
if (mxSidebar.is())
mxSidebar->requestLayout();
}
+
+
+
+void ParaPropertyPanel::Resize (void)
+{
+ switch (maContext.GetCombinedContext_DI())
+ {
+ case CombinedEnumContext(Application_Calc, Context_DrawText):
+ case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+ case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
+ ReSize(false);
+ break;
+
+ default:
+ ReSize(true);
+ break;
+ }
+}
+
+
+
+
void ParaPropertyPanel::EndSpacingPopupMode (void)
{
maLineSpacePopup.Hide();
@@ -386,134 +410,144 @@ void ParaPropertyPanel::EndNumberingPopu
void ParaPropertyPanel::InitToolBoxAlign()
{
const bool bIsHighContrastModeActive (Theme::IsHighContrastMode());
- maAlignToolBox->SetItemImage(TOOLBOX_ITEM1, maLeftAlignControl.GetIcon(bIsHighContrastModeActive));
- maAlignToolBox->SetItemImage(TOOLBOX_ITEM2, maCenterAlignControl.GetIcon(bIsHighContrastModeActive));
- maAlignToolBox->SetItemImage(TOOLBOX_ITEM3, maRightAlignControl.GetIcon(bIsHighContrastModeActive));
- maAlignToolBox->SetItemImage(TOOLBOX_ITEM4, maJustifyAlignControl.GetIcon(bIsHighContrastModeActive));
+ mpAlignToolBox->SetItemImage(TOOLBOX_ITEM1, maLeftAlignControl.GetIcon(bIsHighContrastModeActive));
+ mpAlignToolBox->SetItemImage(TOOLBOX_ITEM2, maCenterAlignControl.GetIcon(bIsHighContrastModeActive));
+ mpAlignToolBox->SetItemImage(TOOLBOX_ITEM3, maRightAlignControl.GetIcon(bIsHighContrastModeActive));
+ mpAlignToolBox->SetItemImage(TOOLBOX_ITEM4, maJustifyAlignControl.GetIcon(bIsHighContrastModeActive));
Link aLink = LINK( this, ParaPropertyPanel, AlignStyleModifyHdl_Impl );
- maAlignToolBox->SetSelectHdl( aLink );
- Size aTbxSize (maAlignToolBox->CalcWindowSizePixel());
- maAlignToolBox->SetOutputSizePixel( aTbxSize );
+ mpAlignToolBox->SetSelectHdl( aLink );
+ Size aTbxSize (mpAlignToolBox->CalcWindowSizePixel());
+ mpAlignToolBox->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::InitToolBoxVertAlign()
{
const bool bIsHighContrastModeActive (Theme::IsHighContrastMode());
- maTBxVertAlign->SetItemImage(IID_VERT_TOP, maVertTop.GetIcon(bIsHighContrastModeActive));
- maTBxVertAlign->SetItemImage(IID_VERT_CENTER, maVertCenter.GetIcon(bIsHighContrastModeActive));
- maTBxVertAlign->SetItemImage(IID_VERT_BOTTOM, maVertBottom.GetIcon(bIsHighContrastModeActive));
- maTBxVertAlign->SetSelectHdl(LINK(this,ParaPropertyPanel,VertTbxSelectHandler));
- Size aTbxSize (maTBxVertAlign->CalcWindowSizePixel());
- maTBxVertAlign->SetOutputSizePixel( aTbxSize );
+ mpTBxVertAlign->SetItemImage(IID_VERT_TOP, maVertTop.GetIcon(bIsHighContrastModeActive));
+ mpTBxVertAlign->SetItemImage(IID_VERT_CENTER, maVertCenter.GetIcon(bIsHighContrastModeActive));
+ mpTBxVertAlign->SetItemImage(IID_VERT_BOTTOM, maVertBottom.GetIcon(bIsHighContrastModeActive));
+ mpTBxVertAlign->SetSelectHdl(LINK(this,ParaPropertyPanel,VertTbxSelectHandler));
+ Size aTbxSize (mpTBxVertAlign->CalcWindowSizePixel());
+ mpTBxVertAlign->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::InitToolBoxIndent()
{
Link aLink = LINK( this, ParaPropertyPanel, ModifyIndentHdl_Impl );
- maLeftIndent->SetModifyHdl( aLink );
- maRightIndent->SetModifyHdl( aLink );
- maFLineIndent->SetModifyHdl( aLink );
-
- maLeftIndent->SetAccessibleName(maLeftIndent->GetQuickHelpText());
- maRightIndent->SetAccessibleName(maRightIndent->GetQuickHelpText());
- maFLineIndent->SetAccessibleName(maFLineIndent->GetQuickHelpText());
+ mpLeftIndent->SetModifyHdl( aLink );
+ mpRightIndent->SetModifyHdl( aLink );
+ mpFLineIndent->SetModifyHdl( aLink );
+
+ mpLeftIndent->SetAccessibleName(mpLeftIndent->GetQuickHelpText());
+ mpRightIndent->SetAccessibleName(mpRightIndent->GetQuickHelpText());
+ mpFLineIndent->SetAccessibleName(mpFLineIndent->GetQuickHelpText());
const bool bIsHighContrastModeActive (Theme::IsHighContrastMode());
if( Application::GetSettings().GetLayoutRTL())
{
- maTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM1, maIncIndentControl.GetIcon(bIsHighContrastModeActive));
- maTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM2, maDecIndentControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM1, maIncIndentControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM2, maDecIndentControl.GetIcon(bIsHighContrastModeActive));
}
else
{
- maTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM1, maIncIndentControl.GetIcon(bIsHighContrastModeActive));
- maTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM2, maDecIndentControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM1, maIncIndentControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM2, maDecIndentControl.GetIcon(bIsHighContrastModeActive));
}
- maTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM3,maIndHang);
+ mpTbxIndent_IncDec->SetItemImage(TOOLBOX_ITEM3,maIndHang);
aLink = LINK( this, ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl );
- maTbxIndent_IncDec->SetSelectHdl(aLink);
+ mpTbxIndent_IncDec->SetSelectHdl(aLink);
m_eLRSpaceUnit = maLRSpaceControl.GetCoreMetric();
- Size aTbxSize = maTbxIndent_IncDec->CalcWindowSizePixel();
- maTbxIndent_IncDec->SetOutputSizePixel( aTbxSize );
+ Size aTbxSize = mpTbxIndent_IncDec->CalcWindowSizePixel();
+ mpTbxIndent_IncDec->SetOutputSizePixel( aTbxSize );
if( Application::GetSettings().GetLayoutRTL())
{
- maTbxProDemote->SetItemImage(TOOLBOX_ITEM1, maOutLineLeftControl.GetIcon(bIsHighContrastModeActive));
- maTbxProDemote->SetItemImage(TOOLBOX_ITEM2, maOutLineRightControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxProDemote->SetItemImage(TOOLBOX_ITEM1, maOutLineLeftControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxProDemote->SetItemImage(TOOLBOX_ITEM2, maOutLineRightControl.GetIcon(bIsHighContrastModeActive));
}
else
{
- maTbxProDemote->SetItemImage(TOOLBOX_ITEM1, maOutLineLeftControl.GetIcon(bIsHighContrastModeActive));
- maTbxProDemote->SetItemImage(TOOLBOX_ITEM2, maOutLineRightControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxProDemote->SetItemImage(TOOLBOX_ITEM1, maOutLineLeftControl.GetIcon(bIsHighContrastModeActive));
+ mpTbxProDemote->SetItemImage(TOOLBOX_ITEM2, maOutLineRightControl.GetIcon(bIsHighContrastModeActive));
}
- maTbxProDemote->SetItemImage(TOOLBOX_ITEM3,maIndHang);
+ mpTbxProDemote->SetItemImage(TOOLBOX_ITEM3,maIndHang);
aLink = LINK( this, ParaPropertyPanel, ClickProDemote_Hdl_Impl );
- maTbxProDemote->SetSelectHdl(aLink);
+ mpTbxProDemote->SetSelectHdl(aLink);
m_eLRSpaceUnit = maLRSpaceControl.GetCoreMetric();
- aTbxSize = maTbxProDemote->CalcWindowSizePixel();
- maTbxProDemote->SetOutputSizePixel( aTbxSize );
+ aTbxSize = mpTbxProDemote->CalcWindowSizePixel();
+ mpTbxProDemote->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::InitToolBoxBGColor()
{
- mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_BACKGROUND_COLOR, TBI_BACK_COLOR, maTBxBackColor.get(), TBX_UPDATER_MODE_CHAR_COLOR_NEW ));
+ mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_BACKGROUND_COLOR, TBI_BACK_COLOR, mpTBxBackColor.get(), TBX_UPDATER_MODE_CHAR_COLOR_NEW ));
- maTBxBackColor->SetItemImage(TBI_BACK_COLOR, GetDisplayBackground().GetColor().IsDark()? maImgBackColorHigh : maImgBackColor);
- maTBxBackColor->SetItemBits( TBI_BACK_COLOR, maTBxBackColor->GetItemBits( TBI_BACK_COLOR ) | TIB_DROPDOWNONLY );
+ mpTBxBackColor->SetItemImage(TBI_BACK_COLOR, GetDisplayBackground().GetColor().IsDark()? maImgBackColorHigh : maImgBackColor);
+ mpTBxBackColor->SetItemBits( TBI_BACK_COLOR, mpTBxBackColor->GetItemBits( TBI_BACK_COLOR ) | TIB_DROPDOWNONLY );
Link aLink = LINK(this, ParaPropertyPanel, ToolBoxBackColorDDHandler);
- maTBxBackColor->SetDropdownClickHdl ( aLink );
- maTBxBackColor->SetSelectHdl ( aLink );
- Size aTbxSize (maTBxBackColor->CalcWindowSizePixel());
- maTBxBackColor->SetOutputSizePixel( aTbxSize );
+ mpTBxBackColor->SetDropdownClickHdl ( aLink );
+ mpTBxBackColor->SetSelectHdl ( aLink );
+ Size aTbxSize (mpTBxBackColor->CalcWindowSizePixel());
+ mpTBxBackColor->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::InitToolBoxBulletsNumbering()
{
const bool bIsHighContrastModeActive (Theme::IsHighContrastMode());
- maTBxNumBullet->SetItemImage(IID_BULLET, maBulletOnOff.GetIcon(bIsHighContrastModeActive));
- maTBxNumBullet->SetItemImage(IID_NUMBER, maNumberOnOff.GetIcon(bIsHighContrastModeActive));
+ mpTBxNumBullet->SetItemImage(IID_BULLET, maBulletOnOff.GetIcon(bIsHighContrastModeActive));
+ mpTBxNumBullet->SetItemImage(IID_NUMBER, maNumberOnOff.GetIcon(bIsHighContrastModeActive));
- maTBxNumBullet->SetDropdownClickHdl(LINK(this,ParaPropertyPanel,NumBTbxDDHandler));
- maTBxNumBullet->SetSelectHdl(LINK(this,ParaPropertyPanel,NumBTbxSelectHandler));
- Size aTbxSize (maTBxNumBullet->CalcWindowSizePixel());
- maTBxNumBullet->SetOutputSizePixel( aTbxSize );
+ mpTBxNumBullet->SetDropdownClickHdl(LINK(this,ParaPropertyPanel,NumBTbxDDHandler));
+ mpTBxNumBullet->SetSelectHdl(LINK(this,ParaPropertyPanel,NumBTbxSelectHandler));
+ Size aTbxSize (mpTBxNumBullet->CalcWindowSizePixel());
+ mpTBxNumBullet->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::InitToolBoxSpacing()
{
Link aLink = LINK( this, ParaPropertyPanel, ULSpaceHdl_Impl );
- maTopDist->SetModifyHdl(aLink);
- maBottomDist->SetModifyHdl( aLink );
+ mpTopDist->SetModifyHdl(aLink);
+ mpBottomDist->SetModifyHdl( aLink );
+
+ mpTopDist->SetAccessibleName(mpTopDist->GetQuickHelpText());
+ mpBottomDist->SetAccessibleName(mpBottomDist->GetQuickHelpText());
- maTopDist->SetAccessibleName(maTopDist->GetQuickHelpText());
- maBottomDist->SetAccessibleName(maBottomDist->GetQuickHelpText());
+ // Use a form of image loading that can handle both .uno:<command>
+ // and private:graphirepository... syntax. This is necessary to
+ // handle the workaround for accessing the images of commands
+ // ParaspaceIncrease and ParaspaceDecrease.
+ // See issue 122446 for more details.
+ mpTbxUL_IncDec->SetItemImage(
+ BT_TBX_UL_INC,
+ sfx2::sidebar::Tools::GetImage(mpTbxUL_IncDec->GetItemCommand(BT_TBX_UL_INC), mxFrame));
+ mpTbxUL_IncDec->SetItemImage(
+ BT_TBX_UL_DEC,
+ sfx2::sidebar::Tools::GetImage(mpTbxUL_IncDec->GetItemCommand(BT_TBX_UL_DEC), mxFrame));
- maTbxUL_IncDec->SetItemImage(TOOLBOX_ITEM1, maParInc);
- maTbxUL_IncDec->SetItemImage(TOOLBOX_ITEM2, maParDec);
aLink = LINK( this, ParaPropertyPanel, ClickUL_IncDec_Hdl_Impl );
- maTbxUL_IncDec->SetSelectHdl(aLink);
+ mpTbxUL_IncDec->SetSelectHdl(aLink);
m_eULSpaceUnit = maULSpaceControl.GetCoreMetric();
- Size aTbxSize = maTbxUL_IncDec->CalcWindowSizePixel();
- maTbxUL_IncDec->SetOutputSizePixel( aTbxSize );
+ Size aTbxSize = mpTbxUL_IncDec->CalcWindowSizePixel();
+ mpTbxUL_IncDec->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::InitToolBoxLineSpacing()
{
Link aLink = LINK( this, ParaPropertyPanel, ClickLineSPDropDownHdl_Impl );
- maLineSPTbx->SetDropdownClickHdl( aLink );
- maLineSPTbx->SetSelectHdl( aLink ); //support keyinput "ENTER"
- maLineSPTbx->SetItemBits( TOOLBOX_ITEM1, maLineSPTbx->GetItemBits( TOOLBOX_ITEM1 ) | TIB_DROPDOWNONLY );
- maLineSPTbx->SetItemImage(TOOLBOX_ITEM1,maSpace3);
- Size aTbxSize = maLineSPTbx->CalcWindowSizePixel();
- maLineSPTbx->SetOutputSizePixel( aTbxSize );
+ mpLineSPTbx->SetDropdownClickHdl( aLink );
+ mpLineSPTbx->SetSelectHdl( aLink ); //support keyinput "ENTER"
+ mpLineSPTbx->SetItemBits( TOOLBOX_ITEM1, mpLineSPTbx->GetItemBits( TOOLBOX_ITEM1 ) | TIB_DROPDOWNONLY );
+ mpLineSPTbx->SetItemImage(TOOLBOX_ITEM1,maSpace3);
+ Size aTbxSize = mpLineSPTbx->CalcWindowSizePixel();
+ mpLineSPTbx->SetOutputSizePixel( aTbxSize );
}
void ParaPropertyPanel::initial()
{
- maFTUL->SetBackground(Wallpaper());
- maFTIndent->SetBackground(Wallpaper());
+ mpFTUL->SetBackground(Wallpaper());
+ mpFTIndent->SetBackground(Wallpaper());
maFISpace1.SetBackground(Wallpaper());
maFISpace2.SetBackground(Wallpaper());
maFIndent1.SetBackground(Wallpaper());
@@ -541,21 +575,21 @@ void ParaPropertyPanel::initial()
InitToolBoxLineSpacing();
#ifdef HAS_IA2
- maAlignToolBox->SetAccRelationLabeledBy(&maAlignToolBox);
- maTBxVertAlign->SetMpSubEditAccLableBy(&maTBxVertAlign);
- maTBxNumBullet->SetAccRelationLabeledBy(&maTBxNumBullet);
- maTBxBackColor->SetMpSubEditAccLableBy(&maTBxBackColor);
- maFTUL->SetAccRelationLabeledBy(&maFTUL);
- maTbxUL_IncDec->SetAccRelationLabeledBy(&maTbxUL_IncDec);
- maTopDist->SetAccRelationLabeledBy(&maTopDist);
- maBottomDist->SetAccRelationLabeledBy(&maBottomDist);
- maLineSPTbx->SetAccRelationLabeledBy(&maLineSPTbx);
- maFTIndent->SetAccRelationLabeledBy(&maFTIndent);
- maTbxIndent_IncDec->SetAccRelationLabeledBy(&maTbxIndent_IncDec);
- maTbxProDemote->SetAccRelationLabeledBy(&maTbxProDemote);
- maLeftIndent->SetAccRelationLabeledBy(&maLeftIndent);
- maRightIndent->SetAccRelationLabeledBy(&maRightIndent);
- maFLineIndent->SetAccRelationLabeledBy(&maFLineIndent);
+ mpAlignToolBox->SetAccRelationLabeledBy(&mpAlignToolBox);
+ mpTBxVertAlign->SetMpSubEditAccLableBy(&mpTBxVertAlign);
+ mpTBxNumBullet->SetAccRelationLabeledBy(&mpTBxNumBullet);
+ mpTBxBackColor->SetMpSubEditAccLableBy(&mpTBxBackColor);
+ mpFTUL->SetAccRelationLabeledBy(&mpFTUL);
+ mpTbxUL_IncDec->SetAccRelationLabeledBy(&mpTbxUL_IncDec);
+ mpTopDist->SetAccRelationLabeledBy(&mpTopDist);
+ mpBottomDist->SetAccRelationLabeledBy(&mpBottomDist);
+ mpLineSPTbx->SetAccRelationLabeledBy(&mpLineSPTbx);
+ mpFTIndent->SetAccRelationLabeledBy(&mpFTIndent);
+ mpTbxIndent_IncDec->SetAccRelationLabeledBy(&mpTbxIndent_IncDec);
+ mpTbxProDemote->SetAccRelationLabeledBy(&mpTbxProDemote);
+ mpLeftIndent->SetAccRelationLabeledBy(&mpLeftIndent);
+ mpRightIndent->SetAccRelationLabeledBy(&mpRightIndent);
+ mpFLineIndent->SetAccRelationLabeledBy(&mpFLineIndent);
mpColorUpdater->SetAccRelationLabeledBy(&mpColorUpdater);
#endif
}
@@ -632,23 +666,23 @@ IMPL_LINK(ParaPropertyPanel, VertTbxSele
if (nId == 1)
{
nSID = SID_TABLE_VERT_NONE;
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_CHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_CHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
}
else if (nId == 2)
{
nSID = SID_TABLE_VERT_CENTER;
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_CHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_CHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
}
else if (nId == 3)
{
nSID = SID_TABLE_VERT_BOTTOM;
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_CHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_CHECK);
}
SfxBoolItem aBoolItem(nSID, sal_True);
GetBindings()->GetDispatcher()->Execute(nSID, SFX_CALLMODE_RECORD, &aBoolItem, 0L);
@@ -660,18 +694,18 @@ void ParaPropertyPanel::VertStateChanged
{
if (eState < SFX_ITEM_DONTCARE)
{
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
- maTBxVertAlign->EnableItem(IID_VERT_TOP, sal_False);
- maTBxVertAlign->EnableItem(IID_VERT_CENTER, sal_False);
- maTBxVertAlign->EnableItem(IID_VERT_BOTTOM, sal_False);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->EnableItem(IID_VERT_TOP, sal_False);
+ mpTBxVertAlign->EnableItem(IID_VERT_CENTER, sal_False);
+ mpTBxVertAlign->EnableItem(IID_VERT_BOTTOM, sal_False);
}
else
{
- maTBxVertAlign->EnableItem(IID_VERT_TOP, sal_True);
- maTBxVertAlign->EnableItem(IID_VERT_CENTER, sal_True);
- maTBxVertAlign->EnableItem(IID_VERT_BOTTOM, sal_True);
+ mpTBxVertAlign->EnableItem(IID_VERT_TOP, sal_True);
+ mpTBxVertAlign->EnableItem(IID_VERT_CENTER, sal_True);
+ mpTBxVertAlign->EnableItem(IID_VERT_BOTTOM, sal_True);
if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem)))
{
const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
@@ -681,44 +715,44 @@ void ParaPropertyPanel::VertStateChanged
{
if (nSID == SID_TABLE_VERT_NONE)
{
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_CHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_CHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
}
else if (nSID == SID_TABLE_VERT_CENTER)
{
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_CHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_CHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
}
else if (nSID == SID_TABLE_VERT_BOTTOM)
{
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_CHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_CHECK);
}
}
else
{
if (nSID == SID_TABLE_VERT_NONE)
{
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
}
else if (nSID == SID_TABLE_VERT_CENTER)
{
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
}
else if (nSID == SID_TABLE_VERT_BOTTOM)
{
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
}
}
}
else
{
- maTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
- maTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_TOP, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_CENTER, STATE_NOCHECK);
+ mpTBxVertAlign->SetItemState(IID_VERT_BOTTOM, STATE_NOCHECK);
}
}
}
@@ -831,9 +865,9 @@ IMPL_LINK( ParaPropertyPanel, AlignStyle
IMPL_LINK( ParaPropertyPanel, ModifyIndentHdl_Impl, SvxRelativeField*, /* pBox */ )
{
SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE );
- aMargin.SetTxtLeft( (const long)GetCoreValue( *maLeftIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetRight( (const long)GetCoreValue( *maRightIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetTxtFirstLineOfst( (const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetTxtLeft( (const long)GetCoreValue( *mpLeftIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetTxtFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ) );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_PARA_LRSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
@@ -865,8 +899,8 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent
sal_Int64 nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
nVal = OutputDevice::LogicToLogic( (long)nVal, MAP_100TH_MM, (MapUnit)m_eLRSpaceUnit );
aMargin.SetTxtLeft( (const long)nVal );
- aMargin.SetRight( (const long)GetCoreValue( *maRightIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetTxtFirstLineOfst( (const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetTxtFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ) );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_PARA_LRSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
@@ -900,8 +934,8 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent
nVal = OutputDevice::LogicToLogic( (long)nVal, MAP_100TH_MM, (MapUnit)m_eLRSpaceUnit );
aMargin.SetTxtLeft( (const long)nVal );
- aMargin.SetRight( (const long)GetCoreValue( *maRightIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetTxtFirstLineOfst( (const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetTxtFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ) );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_PARA_LRSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
@@ -912,9 +946,9 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent
case ID_HANGING_INDENT:
{
SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE );
- aMargin.SetTxtLeft( (const long)GetCoreValue( *maLeftIndent.get(), m_eLRSpaceUnit ) + (const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetRight( (const long)GetCoreValue( *maRightIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetTxtFirstLineOfst( ((const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ))*(-1) );
+ aMargin.SetTxtLeft( (const long)GetCoreValue( *mpLeftIndent.get(), m_eLRSpaceUnit ) + (const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetTxtFirstLineOfst( ((const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ))*(-1) );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_PARA_LRSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
@@ -941,9 +975,9 @@ IMPL_LINK(ParaPropertyPanel, ClickProDem
case SD_HANGING_INDENT:
{
SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE );
- aMargin.SetTxtLeft( (const long)GetCoreValue( *maLeftIndent.get(), m_eLRSpaceUnit ) + (const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetRight( (const long)GetCoreValue( *maRightIndent.get(), m_eLRSpaceUnit ) );
- aMargin.SetTxtFirstLineOfst( ((const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ))*(-1) );
+ aMargin.SetTxtLeft( (const long)GetCoreValue( *mpLeftIndent.get(), m_eLRSpaceUnit ) + (const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent.get(), m_eLRSpaceUnit ) );
+ aMargin.SetTxtFirstLineOfst( ((const short)GetCoreValue( *mpFLineIndent.get(), m_eLRSpaceUnit ))*(-1) );
GetBindings()->GetDispatcher()->Execute( SID_ATTR_PARA_LRSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
}
@@ -972,8 +1006,8 @@ IMPL_LINK( ParaPropertyPanel, ClickLineS
IMPL_LINK( ParaPropertyPanel, ULSpaceHdl_Impl, SvxRelativeField*, /* pBox */)
{
SvxULSpaceItem aMargin( SID_ATTR_PARA_ULSPACE );
- aMargin.SetUpper( (sal_uInt16)GetCoreValue( *maTopDist.get(), m_eULSpaceUnit ) );
- aMargin.SetLower( (sal_uInt16)GetCoreValue( *maBottomDist.get(), m_eULSpaceUnit ) );
+ aMargin.SetUpper( (sal_uInt16)GetCoreValue( *mpTopDist, m_eULSpaceUnit ) );
+ aMargin.SetLower( (sal_uInt16)GetCoreValue( *mpBottomDist, m_eULSpaceUnit ) );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_PARA_ULSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
@@ -984,7 +1018,7 @@ IMPL_LINK(ParaPropertyPanel, ClickUL_Inc
{
switch (pControl->GetCurItemId())
{
- case UL_INCREMENT:
+ case BT_TBX_UL_INC:
{
SvxULSpaceItem aMargin( SID_ATTR_PARA_ULSPACE );
@@ -1002,7 +1036,7 @@ IMPL_LINK(ParaPropertyPanel, ClickUL_Inc
SID_ATTR_PARA_ULSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
}
break;
- case UL_DECREMENT:
+ case BT_TBX_UL_DEC:
{
SvxULSpaceItem aMargin( SID_ATTR_PARA_ULSPACE );
@@ -1049,11 +1083,11 @@ void ParaPropertyPanel::NotifyItemUpdate
m_eMetricUnit = GetCurrentUnit(eState,pState);
if( m_eMetricUnit!=m_last_eMetricUnit )
{
- SetFieldUnit( *maLeftIndent.get(), m_eMetricUnit );
- SetFieldUnit( *maRightIndent.get(), m_eMetricUnit );
- SetFieldUnit( *maFLineIndent.get(), m_eMetricUnit );
- SetFieldUnit( *maTopDist.get(), m_eMetricUnit );
- SetFieldUnit( *maBottomDist.get(), m_eMetricUnit );
+ SetFieldUnit( *mpLeftIndent, m_eMetricUnit );
+ SetFieldUnit( *mpRightIndent, m_eMetricUnit );
+ SetFieldUnit( *mpFLineIndent, m_eMetricUnit );
+ SetFieldUnit( *mpTopDist, m_eMetricUnit );
+ SetFieldUnit( *mpBottomDist, m_eMetricUnit );
}
m_last_eMetricUnit = m_eMetricUnit;
}
@@ -1125,52 +1159,52 @@ void ParaPropertyPanel::StateChangedAlig
{
if(IsChecked)
{
- maAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_CHECK);
- maAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_CHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
}
else
- maAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
}
break;
case SID_ATTR_PARA_ADJUST_CENTER:
{
if(IsChecked)
{
- maAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_CHECK);
- maAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_CHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
}
else
- maAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
}
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
{
if(IsChecked)
{
- maAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_CHECK);
- maAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_CHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
}
else
- maAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
}
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
{
if(IsChecked)
{
- maAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_CHECK);
- maAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
- maAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_CHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
}
else
- maAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
}
break;
}
@@ -1183,16 +1217,16 @@ void ParaPropertyPanel::StateChangedAlig
switch (nSID)
{
case SID_ATTR_PARA_ADJUST_LEFT:
- maAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTLEFT,STATE_NOCHECK);
break;
case SID_ATTR_PARA_ADJUST_CENTER:
- maAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTCENTER,STATE_NOCHECK);
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
- maAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTRIGHT,STATE_NOCHECK);
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
- maAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
+ mpAlignToolBox->SetItemState(BT_SUBSTJUSTIFY,STATE_NOCHECK);
break;
}
}
@@ -1207,11 +1241,11 @@ void ParaPropertyPanel::StateChangedInde
case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
case CombinedEnumContext(Application_Calc, Context_DrawText):
{
- maLeftIndent->SetMin( DEFAULT_VALUE );
- maRightIndent->SetMin( DEFAULT_VALUE );
- maFLineIndent->SetMin( DEFAULT_VALUE );
- maTbxIndent_IncDec->Show();
- maTbxProDemote->Hide();
+ mpLeftIndent->SetMin( DEFAULT_VALUE );
+ mpRightIndent->SetMin( DEFAULT_VALUE );
+ mpFLineIndent->SetMin( DEFAULT_VALUE );
+ mpTbxIndent_IncDec->Show();
+ mpTbxProDemote->Hide();
}
break;
case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
@@ -1220,22 +1254,22 @@ void ParaPropertyPanel::StateChangedInde
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
case CombinedEnumContext(Application_DrawImpress, Context_Table):
{
- maLeftIndent->SetMin( DEFAULT_VALUE );
- maRightIndent->SetMin( DEFAULT_VALUE );
- maFLineIndent->SetMin( DEFAULT_VALUE );
- maTbxIndent_IncDec->Hide();
- maTbxProDemote->Show();
+ mpLeftIndent->SetMin( DEFAULT_VALUE );
+ mpRightIndent->SetMin( DEFAULT_VALUE );
+ mpFLineIndent->SetMin( DEFAULT_VALUE );
+ mpTbxIndent_IncDec->Hide();
+ mpTbxProDemote->Show();
}
break;
case CombinedEnumContext(Application_WriterVariants, Context_Default):
case CombinedEnumContext(Application_WriterVariants, Context_Text):
case CombinedEnumContext(Application_WriterVariants, Context_Table):
{
- maLeftIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
- maRightIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
- maFLineIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
- maTbxIndent_IncDec->Show();
- maTbxProDemote->Hide();
+ mpLeftIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
+ mpRightIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
+ mpFLineIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
+ mpTbxIndent_IncDec->Show();
+ mpTbxProDemote->Hide();
}
break;
}
@@ -1256,23 +1290,23 @@ void ParaPropertyPanel::StateChangedInde
aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, MAP_100TH_MM, (MapUnit)(SFX_MAPUNIT_TWIP) );
long nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
- nVal = (long)maLeftIndent->Normalize( (long)nVal );
- maLeftIndent->SetValue( nVal, FUNIT_100TH_MM );
+ nVal = (long)mpLeftIndent->Normalize( (long)nVal );
+ mpLeftIndent->SetValue( nVal, FUNIT_100TH_MM );
if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)
&& maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default)
&& maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table))
{
- maFLineIndent->SetMin( nVal*(-1), FUNIT_100TH_MM );
+ mpFLineIndent->SetMin( nVal*(-1), FUNIT_100TH_MM );
}
long nrVal = OutputDevice::LogicToLogic( aTxtRight, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
- nrVal = (long)maRightIndent->Normalize( (long)nrVal );
- maRightIndent->SetValue( nrVal, FUNIT_100TH_MM );
+ nrVal = (long)mpRightIndent->Normalize( (long)nrVal );
+ mpRightIndent->SetValue( nrVal, FUNIT_100TH_MM );
long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
- nfVal = (long)maFLineIndent->Normalize( (long)nfVal );
- maFLineIndent->SetValue( nfVal, FUNIT_100TH_MM );
+ nfVal = (long)mpFLineIndent->Normalize( (long)nfVal );
+ mpFLineIndent->SetValue( nfVal, FUNIT_100TH_MM );
switch (maContext.GetCombinedContext_DI())
{
@@ -1282,9 +1316,9 @@ void ParaPropertyPanel::StateChangedInde
case CombinedEnumContext(Application_WriterVariants, Context_Table):
case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
{
- maLeftIndent->SetMax( MAX_SW - nrVal, FUNIT_100TH_MM );
- maRightIndent->SetMax( MAX_SW - nVal, FUNIT_100TH_MM );
- maFLineIndent->SetMax( MAX_SW - nVal - nrVal, FUNIT_100TH_MM );
+ mpLeftIndent->SetMax( MAX_SW - nrVal, FUNIT_100TH_MM );
+ mpRightIndent->SetMax( MAX_SW - nVal, FUNIT_100TH_MM );
+ mpFLineIndent->SetMax( MAX_SW - nVal - nrVal, FUNIT_100TH_MM );
}
break;
case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
@@ -1293,52 +1327,52 @@ void ParaPropertyPanel::StateChangedInde
case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
{
- maLeftIndent->SetMax( MAX_SC_SD - nrVal, FUNIT_100TH_MM );
- maRightIndent->SetMax( MAX_SC_SD - nVal, FUNIT_100TH_MM );
- maFLineIndent->SetMax( MAX_SC_SD - nVal - nrVal, FUNIT_100TH_MM );
+ mpLeftIndent->SetMax( MAX_SC_SD - nrVal, FUNIT_100TH_MM );
+ mpRightIndent->SetMax( MAX_SC_SD - nVal, FUNIT_100TH_MM );
+ mpFLineIndent->SetMax( MAX_SC_SD - nVal - nrVal, FUNIT_100TH_MM );
}
}
- maTbxIndent_IncDec->Enable();
- maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_True);
+ mpTbxIndent_IncDec->Enable();
+ mpTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_True);
if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)
&& maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default)
&& maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table) )
{
- maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_INC, sal_True);
- maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_DEC, sal_True);
+ mpTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_INC, sal_True);
+ mpTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_DEC, sal_True);
}
- maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_True);
+ mpTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_True);
}
else if( eState == SFX_ITEM_DISABLED )
{
- maLeftIndent-> Disable();
- maRightIndent->Disable();
- maFLineIndent->Disable();
- maTbxIndent_IncDec->Disable();
+ mpLeftIndent-> Disable();
+ mpRightIndent->Disable();
+ mpFLineIndent->Disable();
+ mpTbxIndent_IncDec->Disable();
if( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text) &&
maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default) &&
maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table) )
- maTbxIndent_IncDec->Disable();
+ mpTbxIndent_IncDec->Disable();
else
- maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_False);
+ mpTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_False);
// maTbxProDemote->Disable();
- maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
+ mpTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
}
else
{
- maLeftIndent->SetEmptyFieldValue();
- maRightIndent->SetEmptyFieldValue();
- maFLineIndent->SetEmptyFieldValue();
+ mpLeftIndent->SetEmptyFieldValue();
+ mpRightIndent->SetEmptyFieldValue();
+ mpFLineIndent->SetEmptyFieldValue();
if( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text) &&
maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default) &&
maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table) )
- maTbxIndent_IncDec->Disable();
+ mpTbxIndent_IncDec->Disable();
else
- maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_False);
- maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
+ mpTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_False);
+ mpTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
}
}
@@ -1356,8 +1390,8 @@ void ParaPropertyPanel::StateChangedLnSP
void ParaPropertyPanel::StateChangedULImpl( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState )
{
- maTopDist->SetMax( maTopDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) );
- maBottomDist->SetMax( maBottomDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) );
+ mpTopDist->SetMax( mpTopDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) );
+ mpBottomDist->SetMax( mpBottomDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) );
if( pState && eState >= SFX_ITEM_AVAILABLE )
{
@@ -1372,25 +1406,25 @@ void ParaPropertyPanel::StateChangedULIm
maLower = OutputDevice::LogicToLogic( maLower, MAP_100TH_MM, (MapUnit)(SFX_MAPUNIT_TWIP) );
sal_Int64 nVal = OutputDevice::LogicToLogic( maUpper, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
- nVal = maTopDist->Normalize( nVal );
- maTopDist->SetValue( nVal, FUNIT_100TH_MM );
+ nVal = mpTopDist->Normalize( nVal );
+ mpTopDist->SetValue( nVal, FUNIT_100TH_MM );
nVal = OutputDevice::LogicToLogic( maLower, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
- nVal = maBottomDist->Normalize( nVal );
- maBottomDist->SetValue( nVal, FUNIT_100TH_MM );
- maTbxUL_IncDec->Enable();
+ nVal = mpBottomDist->Normalize( nVal );
+ mpBottomDist->SetValue( nVal, FUNIT_100TH_MM );
+ mpTbxUL_IncDec->Enable();
}
else if(eState == SFX_ITEM_DISABLED )
{
- maTopDist->Disable();
- maBottomDist->Disable();
- maTbxUL_IncDec->Disable();
+ mpTopDist->Disable();
+ mpBottomDist->Disable();
+ mpTbxUL_IncDec->Disable();
}
else
{
- maTopDist->SetEmptyFieldValue();
- maBottomDist->SetEmptyFieldValue();
- maTbxUL_IncDec->Disable();
+ mpTopDist->SetEmptyFieldValue();
+ mpBottomDist->SetEmptyFieldValue();
+ mpTbxUL_IncDec->Disable();
}
}
@@ -1411,14 +1445,14 @@ void ParaPropertyPanel::StateChangeOutLi
mbOutLineRight = 0;
}
if(mbOutLineLeft)
- maTbxProDemote->EnableItem(BT_TBX_INDENT_DEMOTE, sal_True);
+ mpTbxProDemote->EnableItem(BT_TBX_INDENT_DEMOTE, sal_True);
else
- maTbxProDemote->EnableItem(BT_TBX_INDENT_DEMOTE, sal_False);
+ mpTbxProDemote->EnableItem(BT_TBX_INDENT_DEMOTE, sal_False);
if(mbOutLineRight)
- maTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_True);
+ mpTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_True);
else
- maTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_False);
+ mpTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_False);
}
@@ -1431,7 +1465,7 @@ void ParaPropertyPanel::StateChangeIncDe
{
// Writer's text shell is the only one which provides reasonable states for Slots SID_INC_INDENT and SID_DEC_INDENT
// - namely SFX_ITEM_UNKNOWN and SFX_ITEM_DISABLED
- maTbxIndent_IncDec->EnableItem(
+ mpTbxIndent_IncDec->EnableItem(
nSID == SID_INC_INDENT ? BT_TBX_INDENT_INC : BT_TBX_INDENT_DEC,
( pState && eState == SFX_ITEM_UNKNOWN ) ? sal_True : sal_False );
}
@@ -1447,13 +1481,13 @@ void ParaPropertyPanel::StateChangeBulle
const sal_Bool aBool = (sal_Bool)pItem->GetValue();
if (nSID==FN_NUM_NUMBERING_ON)
{
- maTBxNumBullet->SetItemState(
+ mpTBxNumBullet->SetItemState(
IID_NUMBER,
aBool ? STATE_CHECK : STATE_NOCHECK );
}
else if (nSID==FN_NUM_BULLET_ON)
{
- maTBxNumBullet->SetItemState(
+ mpTBxNumBullet->SetItemState(
IID_BULLET,
aBool ? STATE_CHECK : STATE_NOCHECK );
}
@@ -1560,33 +1594,30 @@ ParaPropertyPanel::ParaPropertyPanel(Win
SfxBindings* pBindings,
const cssu::Reference<css::ui::XSidebar>& rxSidebar)
: Control(pParent, SVX_RES(RID_SIDEBAR_PARA_PANEL)),
- maAlignToolBoxBackground(ControlFactory::CreateToolBoxBackground(this)),
- maAlignToolBox (ControlFactory::CreateToolBox(maAlignToolBoxBackground.get(),SVX_RES(TBX_HORIZONTALALIGNMENT))),
- maTBxVertAlignBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTBxVertAlign (ControlFactory::CreateToolBox(maTBxVertAlignBackground.get(),SVX_RES(TBX_VERT_ALIGN))),
- maTBxNumBulletBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTBxNumBullet (ControlFactory::CreateToolBox(maTBxNumBulletBackground.get(),SVX_RES(TBX_NUM_BULLET))),
- maTBxBackColorBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTBxBackColor (ControlFactory::CreateToolBox(maTBxBackColorBackground.get(),SVX_RES(TBX_BACK_COLOR))),
- maFTUL (new FixedText(this, SVX_RES(FT_SPACING))),
- maTbxUL_IncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTbxUL_IncDec (ControlFactory::CreateToolBox(maTbxUL_IncDecBackground.get(),SVX_RES(TBX_UL_INC_DEC))),
- maFTIndent (new FixedText(this, SVX_RES(FT_INDENT))),
- maTbxIndent_IncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTbxIndent_IncDec (ControlFactory::CreateToolBox(maTbxIndent_IncDecBackground.get(),SVX_RES(TBX_INDENT_INC_DEC))),
-
- maTopDist (new SvxRelativeField(this, SVX_RES(MF_ABOVE_PARASPACING))),
- maLeftIndent (new SvxRelativeField(this, SVX_RES(MF_BEFORE_INDENT))),
-
- maBottomDist (new SvxRelativeField(this, SVX_RES(MF_BELOW_PARASPACING))),
- maRightIndent (new SvxRelativeField(this, SVX_RES(MF_AFTER_INDENT))),
-
- maLineSPTbxBackground(ControlFactory::CreateToolBoxBackground(this)),
- maLineSPTbx (ControlFactory::CreateToolBox(maLineSPTbxBackground.get(),SVX_RES(TBX_LINESP))),
- maFLineIndent (new SvxRelativeField(this, SVX_RES(MF_FL_INDENT))),
+ mpAlignToolBoxBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpAlignToolBox (ControlFactory::CreateToolBox(mpAlignToolBoxBackground.get(),SVX_RES(TBX_HORIZONTALALIGNMENT))),
+ mpTBxVertAlignBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpTBxVertAlign (ControlFactory::CreateToolBox(mpTBxVertAlignBackground.get(),SVX_RES(TBX_VERT_ALIGN))),
+ mpTBxNumBulletBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpTBxNumBullet (ControlFactory::CreateToolBox(mpTBxNumBulletBackground.get(),SVX_RES(TBX_NUM_BULLET))),
+ mpTBxBackColorBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpTBxBackColor (ControlFactory::CreateToolBox(mpTBxBackColorBackground.get(),SVX_RES(TBX_BACK_COLOR))),
+ mpFTUL (new FixedText(this, SVX_RES(FT_SPACING))),
+ mpTbxUL_IncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpTbxUL_IncDec (ControlFactory::CreateToolBox(mpTbxUL_IncDecBackground.get(),SVX_RES(TBX_UL_INC_DEC))),
+ mpTopDist (new SvxRelativeField(this, SVX_RES(MF_ABOVE_PARASPACING))),
+ mpBottomDist (new SvxRelativeField(this, SVX_RES(MF_BELOW_PARASPACING))),
+ mpLineSPTbxBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpLineSPTbx (ControlFactory::CreateToolBox(mpLineSPTbxBackground.get(),SVX_RES(TBX_LINESP))),
+ mpFTIndent (new FixedText(this, SVX_RES(FT_INDENT))),
+ mpTbxIndent_IncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpTbxIndent_IncDec (ControlFactory::CreateToolBox(mpTbxIndent_IncDecBackground.get(),SVX_RES(TBX_INDENT_INC_DEC))),
+ mpTbxProDemoteBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpTbxProDemote (ControlFactory::CreateToolBox(mpTbxProDemoteBackground.get(),SVX_RES(TBX_INDENT_PRO_DEMOTE))),
+ mpLeftIndent (new SvxRelativeField(this, SVX_RES(MF_BEFORE_INDENT))),
+ mpRightIndent (new SvxRelativeField(this, SVX_RES(MF_AFTER_INDENT))),
+ mpFLineIndent (new SvxRelativeField(this, SVX_RES(MF_FL_INDENT))),
- maTbxProDemoteBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTbxProDemote (ControlFactory::CreateToolBox(maTbxProDemoteBackground.get(),SVX_RES(TBX_INDENT_PRO_DEMOTE))),
mpColorUpdater (),
maFISpace1 ( this, SVX_RES( FI_SPACE1)),
maFISpace2 ( this, SVX_RES( FI_SPACE2)),
@@ -1600,8 +1631,6 @@ ParaPropertyPanel::ParaPropertyPanel(Win
maIndent2 (SVX_RES(IMG_INDENT2)),
maIndent3 (SVX_RES(IMG_INDENT3)),
maIndHang (SVX_RES(IMG_INDENT_HANG)),
- maParInc (SVX_RES(IMG_PARA_INC)),
- maParDec (SVX_RES(IMG_PARA_DEC)),
maNumBImageList (SVX_RES(IL_NUM_BULLET)),
maNumBImageListH (SVX_RES(ILH_NUM_BULLET)),
maNumBImageListRTL (SVX_RES(IL_NUM_BULLET_RTL)),
@@ -1647,10 +1676,67 @@ ParaPropertyPanel::ParaPropertyPanel(Win
maBulletsPopup(this, ::boost::bind(&ParaPropertyPanel::CreateBulletsPopupControl, this, _1)),
maNumberingPopup(this, ::boost::bind(&ParaPropertyPanel::CreateNumberingPopupControl, this, _1)),
maBGColorPopup(this, ::boost::bind(&ParaPropertyPanel::CreateBGColorPopupControl, this, _1)),
- mxSidebar(rxSidebar)
+ mxSidebar(rxSidebar),
+ maLayouter(*this)
{
initial();
FreeResource();
+
+ // Setup the grid layouter.
+ // const sal_Int32 nMappedImageWidth (Layouter::MapWidth(*this, IMAGE_SIZE));
+ const sal_Int32 nMappedImageOffset (Layouter::MapWidth(*this, -3));
+ const sal_Int32 nMappedToolBoxItemWidth (Layouter::MapWidth(*this, TOOLBOX_ITEM_WIDTH));
+ const sal_Int32 nMappedControlWidth (Layouter::MapWidth(*this, CONTROL_WIDTH -10));
+
+ maLayouter.GetCell(0,0).SetControl(*mpFTUL).SetGridWidth(2);
+ maLayouter.GetCell(1,0).SetControl(*mpTbxUL_IncDecBackground).SetGridWidth(2).SetFixedWidth();
+
+ maLayouter.GetCell(0,3).SetControl(*mpFTIndent).SetGridWidth(2);
+ maLayouter.GetCell(1,3,0)
+ .SetControl(*mpTbxIndent_IncDecBackground)
+ .SetGridWidth(2).SetFixedWidth();
+ maLayouter.GetCell(1,3,1)
+ .SetControl(*mpTbxProDemoteBackground)
+ .SetGridWidth(2).SetFixedWidth();
+ maLayouter.GetCell(2,0).SetControl(maFISpace1).SetFixedWidth().SetOffset(nMappedImageOffset);
+ maLayouter.GetCell(2,1).SetControl(*mpTopDist);
+ maLayouter.GetCell(3,0).SetControl(maFISpace2).SetFixedWidth().SetOffset(nMappedImageOffset);
+ maLayouter.GetCell(3,1).SetControl(*mpBottomDist);
+ maLayouter.GetCell(4,0).SetControl(*mpLineSPTbxBackground).SetGridWidth(2).SetFixedWidth();
+
+ maLayouter.GetCell(2,3).SetControl(maFIndent1).SetFixedWidth().SetOffset(nMappedImageOffset);
+ maLayouter.GetCell(2,4).SetControl(*mpLeftIndent);
+ maLayouter.GetCell(3,3).SetControl(maFIndent2).SetFixedWidth().SetOffset(nMappedImageOffset);
+ maLayouter.GetCell(3,4).SetControl(*mpRightIndent);
+ maLayouter.GetCell(4,3).SetControl(maFIndent3).SetFixedWidth().SetOffset(nMappedImageOffset);
+ maLayouter.GetCell(4,4).SetControl(*mpFLineIndent);
+
+ maLayouter.GetColumn(0)
+ .SetWeight(0)
+ .SetLeftPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetFixedWidth(nMappedToolBoxItemWidth + nMappedImageOffset);
+ maLayouter.GetColumn(1)
+ .SetWeight(1)
+ .SetMinimumWidth(nMappedControlWidth);
+ maLayouter.GetColumn(2)
+ .SetWeight(0)
+ .SetMinimumWidth(Layouter::MapWidth(*this, CONTROL_SPACING_HORIZONTAL));
+ maLayouter.GetColumn(3)
+ .SetWeight(0)
+ .SetFixedWidth(nMappedToolBoxItemWidth + nMappedImageOffset);
+ maLayouter.GetColumn(4)
+ .SetWeight(1)
+ .SetRightPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetMinimumWidth(nMappedControlWidth);
+
+ // Make controls that display text handle short widths more
+ // graceful.
+ sfx2::sidebar::Layouter::PrepareForLayouting(*mpFTUL);
+ sfx2::sidebar::Layouter::PrepareForLayouting(*mpFTIndent);
+
+ if (mxSidebar.is())
+ mxSidebar->requestLayout();
+
}
} } // end of namespace svx::sidebar
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc Fri Jul 19 15:59:04 2013
@@ -38,8 +38,6 @@
#define MF_AFTER_INDENT 4
#define MF_FL_INDENT 6
#define TBX_HORIZONTALALIGNMENT 5
-#define IMG_PARA_INC 13
-#define IMG_PARA_DEC 14
#define IMG_INDENT_HANG 15
#define FT_INDENT 16
#define TBX_INDENT_INC_DEC 17
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx Fri Jul 19 15:59:04 2013
@@ -25,6 +25,7 @@
#include <vcl/ctrl.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <sfx2/sidebar/GridLayouter.hxx>
#include <editeng/lspcitem.hxx>
#include <svtools/ctrlbox.hxx>
#include <svx/tbxcolorupdate.hxx>
@@ -99,33 +100,32 @@ private:
**
***********************************************************/
//Alignment
- ::boost::scoped_ptr<Window> maAlignToolBoxBackground;
- ::boost::scoped_ptr<ToolBox> maAlignToolBox;
- ::boost::scoped_ptr<Window> maTBxVertAlignBackground;
- ::boost::scoped_ptr<ToolBox> maTBxVertAlign;
+ ::boost::scoped_ptr<Window> mpAlignToolBoxBackground;
+ ::boost::scoped_ptr<ToolBox> mpAlignToolBox;
+ ::boost::scoped_ptr<Window> mpTBxVertAlignBackground;
+ ::boost::scoped_ptr<ToolBox> mpTBxVertAlign;
//NumBullet&Backcolor
- ::boost::scoped_ptr<Window> maTBxNumBulletBackground;
- ::boost::scoped_ptr<ToolBox> maTBxNumBullet;
- ::boost::scoped_ptr<Window> maTBxBackColorBackground;
- ::boost::scoped_ptr<ToolBox> maTBxBackColor;
+ ::boost::scoped_ptr<Window> mpTBxNumBulletBackground;
+ ::boost::scoped_ptr<ToolBox> mpTBxNumBullet;
+ ::boost::scoped_ptr<Window> mpTBxBackColorBackground;
+ ::boost::scoped_ptr<ToolBox> mpTBxBackColor;
//Paragraph spacing
- ::boost::scoped_ptr<FixedText> maFTUL;
- ::boost::scoped_ptr<Window> maTbxUL_IncDecBackground;
- ::boost::scoped_ptr<ToolBox> maTbxUL_IncDec;
- ::boost::scoped_ptr<FixedText> maFTIndent;
- ::boost::scoped_ptr<Window> maTbxIndent_IncDecBackground;
- ::boost::scoped_ptr<ToolBox> maTbxIndent_IncDec;
- ::boost::scoped_ptr<SvxRelativeField> maTopDist;
- ::boost::scoped_ptr<SvxRelativeField> maLeftIndent;
- ::boost::scoped_ptr<SvxRelativeField> maBottomDist;
- ::boost::scoped_ptr<SvxRelativeField> maRightIndent;
- //Line spacing
- ::boost::scoped_ptr<Window> maLineSPTbxBackground;
- ::boost::scoped_ptr<ToolBox> maLineSPTbx;
- ::boost::scoped_ptr<SvxRelativeField> maFLineIndent;
- //Indent
- ::boost::scoped_ptr<Window> maTbxProDemoteBackground;
- ::boost::scoped_ptr<ToolBox> maTbxProDemote;
+ ::boost::scoped_ptr<FixedText> mpFTUL;
+ ::boost::scoped_ptr<Window> mpTbxUL_IncDecBackground;
+ ::boost::scoped_ptr<ToolBox> mpTbxUL_IncDec;
+ ::boost::scoped_ptr<SvxRelativeField> mpTopDist;
+ ::boost::scoped_ptr<SvxRelativeField> mpBottomDist;
+ ::boost::scoped_ptr<Window> mpLineSPTbxBackground;
+ ::boost::scoped_ptr<ToolBox> mpLineSPTbx;
+ ::boost::scoped_ptr<FixedText> mpFTIndent;
+ ::boost::scoped_ptr<Window> mpTbxIndent_IncDecBackground;
+ ::boost::scoped_ptr<ToolBox> mpTbxIndent_IncDec;
+ ::boost::scoped_ptr<Window> mpTbxProDemoteBackground;
+ ::boost::scoped_ptr<ToolBox> mpTbxProDemote;
+ ::boost::scoped_ptr<SvxRelativeField> mpLeftIndent;
+ ::boost::scoped_ptr<SvxRelativeField> mpRightIndent;
+ ::boost::scoped_ptr<SvxRelativeField> mpFLineIndent;
+
::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater;
/**********************************************************
@@ -147,8 +147,6 @@ private:
Image maIndent3;
Image maIndHang;
- Image maParInc;
- Image maParDec;
ImageList maNumBImageList;
ImageList maNumBImageListH;
@@ -213,7 +211,7 @@ private:
ParaNumberingPopup maNumberingPopup;
ColorPopup maBGColorPopup;
cssu::Reference<css::ui::XSidebar> mxSidebar;
-
+ ::sfx2::sidebar::GridLayouter maLayouter;
ParaPropertyPanel (
Window* pParent,
@@ -251,6 +249,8 @@ private:
void initial();
void ReSize(bool bSize);
+ // Inherited from vcl Window.
+ virtual void Resize (void);
PopupControl* CreateLineSpacingControl (PopupContainer* pParent);
PopupControl* CreateBulletsPopupControl (PopupContainer* pParent);
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src Fri Jul 19 15:59:04 2013
@@ -196,20 +196,24 @@ Control RID_SIDEBAR_PARA_PANEL
Identifier = BT_TBX_UL_INC ;
HelpID = HID_PPROPERTYPANEL_PARA_TBI_INC ;
Text [ en-US ] = "Increase Spacing" ;
- ItemBitmap = Bitmap
- {
- File = "symphony/IncreaseSpace_16x16.png";
- };
+
+ /** The next line should be
+ Command = ".uno:ParaspaceIncrease";
+ The hack is necessary because the ParaspaceIncrease command is only
+ defined for Draw/Impress. It has to be defined in
+ GenericCommancs.xcu to be recognized. See issue 122446 for more details.
+ */
+ Command = "private:graphicrepository/res/commandimagelist/sc_paraspaceincrease.png";
};
ToolBoxItem
{
Identifier = BT_TBX_UL_DEC ;
HelpID = HID_PPROPERTYPANEL_PARA_TBI_DEC ;
Text [ en-US ] = "Decrease Spacing" ;
- ItemBitmap = Bitmap
- {
- File = "symphony/DecreaseSpace_16x16.png";
- };
+ /** See above or issue 122446 why the following line is not
+ Command = ".uno:ParaspaceDecrease";
+ */
+ Command = "private:graphicrepository/res/commandimagelist/sc_paraspacedecrease.png";
};
};
};
@@ -469,14 +473,6 @@ Control RID_SIDEBAR_PARA_PANEL
{
ImageBitmap = Bitmap{File = "symphony/Indent_Hanging.png";};
};
- Image IMG_PARA_INC
- {
- ImageBitmap = Bitmap{File = "symphony/IncreaseSpace_16x16.png";};
- };
- Image IMG_PARA_DEC
- {
- ImageBitmap = Bitmap{File = "symphony/DecreaseSpace_16x16.png";};
- };
};
//===========================================Back color page==============================
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx Fri Jul 19 15:59:04 2013
@@ -22,6 +22,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include "PosSizePropertyPanel.hxx"
#include "PosSizePropertyPanel.hrc"
#include <svx/sidebar/SidebarDialControl.hxx>
@@ -44,6 +45,7 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
using ::sfx2::sidebar::Theme;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
@@ -122,7 +124,8 @@ PosSizePropertyPanel::PosSizePropertyPan
mbAutoHeight(false),
mbAdjustEnabled(false),
mbIsFlip(false),
- mxSidebar(rxSidebar)
+ mxSidebar(rxSidebar),
+ maLayouter(*this)
{
Initialize();
FreeResource();
@@ -131,6 +134,47 @@ PosSizePropertyPanel::PosSizePropertyPan
mpBindings->Update( SID_ATTR_TRANSFORM_HEIGHT );
mpBindings->Update( SID_ATTR_TRANSFORM_PROTECT_SIZE );
mpBindings->Update( SID_ATTR_METRIC );
+
+ // Setup the grid layouter.
+ const sal_Int32 nMappedMboxWidth (Layouter::MapWidth(*this, MBOX_WIDTH));
+
+ maLayouter.GetCell(0,0).SetControl(*mpFtPosX);
+ maLayouter.GetCell(1,0).SetControl(*mpMtrPosX);
+
+ maLayouter.GetCell(0,2).SetControl(*mpFtPosY);
+ maLayouter.GetCell(1,2).SetControl(*mpMtrPosY);
+
+ maLayouter.GetCell(2,0).SetControl(*mpFtWidth);
+ maLayouter.GetCell(3,0).SetControl(*mpMtrWidth);
+
+ maLayouter.GetCell(2,2).SetControl(*mpFtHeight);
+ maLayouter.GetCell(3,2).SetControl(*mpMtrHeight);
+
+ maLayouter.GetCell(4,0).SetControl(*mpCbxScale).SetGridWidth(3);
+ maLayouter.GetCell(5,0).SetControl(*mpFtAngle).SetGridWidth(3);
+
+
+ maLayouter.GetColumn(0)
+ .SetWeight(1)
+ .SetLeftPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetMinimumWidth(nMappedMboxWidth);
+ maLayouter.GetColumn(1)
+ .SetWeight(0)
+ .SetMinimumWidth(Layouter::MapWidth(*this, CONTROL_SPACING_HORIZONTAL));
+ maLayouter.GetColumn(2)
+ .SetWeight(1)
+ .SetRightPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetMinimumWidth(nMappedMboxWidth);
+
+ // Make controls that display text handle short widths more
+ // graceful.
+ Layouter::PrepareForLayouting(*mpFtPosX);
+ Layouter::PrepareForLayouting(*mpFtPosY);
+ Layouter::PrepareForLayouting(*mpFtWidth);
+ Layouter::PrepareForLayouting(*mpFtHeight);
+ Layouter::PrepareForLayouting(*mpCbxScale);
+ Layouter::PrepareForLayouting(*mpFtAngle);
+
}
@@ -156,6 +200,43 @@ void PosSizePropertyPanel::ShowMenu (voi
+namespace
+{
+ bool hasText(const SdrView& rSdrView)
+ {
+ const SdrMarkList& rMarkList = rSdrView.GetMarkedObjectList();
+
+ if(1 == rMarkList.GetMarkCount())
+ {
+ const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
+
+ if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind))
+ {
+ const SdrTextObj* pSdrTextObj = dynamic_cast< const SdrTextObj* >(pObj);
+
+ if(pSdrTextObj && pSdrTextObj->HasText())
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+} // end of anonymous namespace
+
+
+
+
+void PosSizePropertyPanel::Resize (void)
+{
+ maLayouter.Layout();
+}
+
+
+
+
void PosSizePropertyPanel::Initialize()
{
mpFtPosX->SetBackground(Wallpaper());
@@ -228,18 +309,7 @@ void PosSizePropertyPanel::Initialize()
if ( mpView != NULL )
{
maUIScale = mpView->GetModel()->GetUIScale();
-
- const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- if(1 == rMarkList.GetMarkCount())
- {
- const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
-
- if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && ((SdrTextObj*)pObj)->HasText())
- {
- mbAdjustEnabled = true;
- }
- }
+ mbAdjustEnabled = hasText(*mpView);
}
mePoolUnit = maTransfWidthControl.GetCoreMetric();
@@ -705,20 +775,12 @@ void PosSizePropertyPanel::NotifyItemUpd
if ( mpView == NULL )
return;
- const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
-
- if(1 == rMarkList.GetMarkCount())
- {
- const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
+ mbAdjustEnabled = hasText(*mpView);
- if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && ((SdrTextObj*)pObj)->HasText())
- mbAdjustEnabled = true;
- else
- mbAdjustEnabled = false;
- }
- else
- mbAdjustEnabled = false;
+ // Pool unit and dialog unit may have changed, make sure that we
+ // have the current values.
+ mePoolUnit = maTransfWidthControl.GetCoreMetric();
+ meDlgUnit = GetModuleFieldUnit();
switch (nSID)
{
@@ -732,6 +794,7 @@ void PosSizePropertyPanel::NotifyItemUpd
long mlOldWidth1 = pWidthItem->GetValue();
mlOldWidth1 = Fraction( mlOldWidth1 ) / maUIScale;
+ SetFieldUnit( *mpMtrWidth, meDlgUnit, true );
SetMetricValue( *mpMtrWidth, mlOldWidth1, mePoolUnit );
mlOldWidth = mlOldWidth1;
break;
@@ -751,6 +814,7 @@ void PosSizePropertyPanel::NotifyItemUpd
long mlOldHeight1 = pHeightItem->GetValue();
mlOldHeight1 = Fraction( mlOldHeight1 ) / maUIScale;
+ SetFieldUnit( *mpMtrHeight, meDlgUnit, true );
SetMetricValue( *mpMtrHeight, mlOldHeight1, mePoolUnit );
mlOldHeight = mlOldHeight1;
break;
@@ -769,6 +833,7 @@ void PosSizePropertyPanel::NotifyItemUpd
{
long nTmp = pItem->GetValue();
nTmp = Fraction( nTmp ) / maUIScale;
+ SetFieldUnit( *mpMtrPosX, meDlgUnit, true );
SetMetricValue( *mpMtrPosX, nTmp, mePoolUnit );
break;
}
@@ -786,6 +851,7 @@ void PosSizePropertyPanel::NotifyItemUpd
{
long nTmp = pItem->GetValue();
nTmp = Fraction( nTmp ) / maUIScale;
+ SetFieldUnit( *mpMtrPosY, meDlgUnit, true );
SetMetricValue( *mpMtrPosY, nTmp, mePoolUnit );
break;
}
@@ -933,6 +999,7 @@ void PosSizePropertyPanel::NotifyItemUpd
}
const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI());
+ const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
switch (rMarkList.GetMarkCount())
{
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx Fri Jul 19 15:59:04 2013
@@ -26,6 +26,7 @@
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <sfx2/sidebar/GridLayouter.hxx>
#include <boost/scoped_ptr.hpp>
#include <svx/rectenum.hxx>
#include <svl/poolitem.hxx>
@@ -71,6 +72,8 @@ public:
SfxBindings* GetBindings();
void ShowMenu (void);
+ virtual void Resize (void);
+
private:
//Position
::boost::scoped_ptr< FixedText > mpFtPosX;
@@ -151,6 +154,7 @@ private:
bool mbIsFlip : 1;
cssu::Reference<css::ui::XSidebar> mxSidebar;
+ ::sfx2::sidebar::GridLayouter maLayouter;
DECL_LINK( ChangePosXHdl, void * );
DECL_LINK( ChangePosYHdl, void * );
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.cxx Fri Jul 19 15:59:04 2013
@@ -45,6 +45,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <sfx2/sidebar/ControllerFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/SidebarToolBox.hxx>
#include "sfx2/imagemgr.hxx"
@@ -65,11 +66,16 @@
using namespace css;
using namespace cssu;
+using namespace ::sfx2::sidebar;
using ::sfx2::sidebar::Theme;
using ::sfx2::sidebar::ControlFactory;
+using ::sfx2::sidebar::Layouter;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
+
+
+
namespace svx { namespace sidebar {
#undef HAS_IA2
@@ -197,13 +203,31 @@ TextPropertyPanel::TextPropertyPanel (
maUnderlinePopup(this, ::boost::bind(&TextPropertyPanel::CreateUnderlinePopupControl, this, _1)),
mxFrame(rxFrame),
maContext(),
- mpBindings(pBindings)
+ mpBindings(pBindings),
+ maLayouter(*this)
{
Initialize();
FreeResource();
UpdateFontColorToolbox(rContext);
+
+ // Setup the grid layouter.
+ maLayouter.GetCell(0,0).SetControl(*mpFontNameBox).SetMinimumWidth(Layouter::MapWidth(*this,FONTNAME_WIDTH));
+ maLayouter.GetCell(0,2).SetControl(maFontSizeBox).SetFixedWidth();
+
+ maLayouter.GetCell(1,0).SetControl(*mpToolBoxFontBackground).SetFixedWidth();
+ maLayouter.GetCell(1,2).SetControl(*mpToolBoxIncDecBackground).SetFixedWidth();
+
+ maLayouter.GetColumn(0)
+ .SetWeight(1)
+ .SetLeftPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL));
+ maLayouter.GetColumn(1)
+ .SetWeight(0)
+ .SetMinimumWidth(Layouter::MapWidth(*this, CONTROL_SPACING_HORIZONTAL));
+ maLayouter.GetColumn(2)
+ .SetWeight(0)
+ .SetRightPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL));
}
@@ -1169,6 +1193,14 @@ void TextPropertyPanel::NotifyItemUpdate
+void TextPropertyPanel::Resize (void)
+{
+ maLayouter.Layout();
+}
+
+
+
+
void TextPropertyPanel::UpdateItem (const sal_uInt16 nSlotId)
{
switch (nSlotId)
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hrc?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hrc (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hrc Fri Jul 19 15:59:04 2013
@@ -28,6 +28,32 @@
#define CUSTOM_Y OFFSET_Y + POPUPPANEL_MARGIN_SMALL * 3 + 15 * 6 + TEXT_HEIGHT
#define VS_UNDERLINE_WIDTH 57
#define VS_UNDERLINE_HEIGHT 12 * 10
+
+#define CONTROL_HEIGHT_FONT_NAME 250
+#define CONTROL_HEIGHT_FONT_SIZE 180
+#define FONTSIZE_WIDTH (TOOLBOX_ITEM_WIDTH * 2 - 1)
+#define FONTNAME_WIDTH (TOOLBOX_ITEM_WIDTH * 4)
+//PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH) - 6)
+
+#define TB_SPACE 18
+#define TB_SPACE_V 4
+#define TEXT_WIDTH TOOLBOX_42_42_ITEM_DD_WIDTH + TB_SPACE - 3
+
+#define FT_TB_SPACE 1
+#define BK_IMG 20
+
+#define X0 SECTIONPAGE_MARGIN_HORIZONTAL
+#define X1 SECTIONPAGE_MARGIN_HORIZONTAL + 1 + TOOLBOX_ITEM_WIDTH * 2 + 4
+#define X2 (PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH))
+#define X3 (X2 - (TOOLBOX_ITEM_DD_WIDTH) - 3)
+
+#define FIRST_LINE_Y SECTIONPAGE_MARGIN_VERTICAL_TOP
+#define SECOND_LINE_Y FIRST_LINE_Y + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL + 1
+#define THIRD_LINE_Y SECOND_LINE_Y + CONTROL_SPACING_VERTICAL + (TOOLBOX_ITEM_HEIGHT + 2)
+
+
+
+
//#define FT_TEST 1
#define CB_SBFONT_FONT 2
#define MB_SBFONT_FONTSIZE 3
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx Fri Jul 19 15:59:04 2013
@@ -27,6 +27,7 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <sfx2/sidebar/EnumContext.hxx>
+#include <sfx2/sidebar/GridLayouter.hxx>
#include <svtools/ctrlbox.hxx>
#include <svx/tbxcolorupdate.hxx>
@@ -85,6 +86,9 @@ public:
const SfxPoolItem* pState,
const bool bIsEnabled);
+ // Inherited from vcl Window.
+ virtual void Resize (void);
+
private:
//ui controls
::boost::scoped_ptr<SvxSBFontNameBox> mpFontNameBox;
@@ -148,7 +152,8 @@ private:
cssu::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
SfxBindings* mpBindings;
-
+ ::sfx2::sidebar::GridLayouter maLayouter;
+
TextPropertyPanel (
Window* pParent,
const cssu::Reference<css::frame::XFrame>& rxFrame,
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src Fri Jul 19 15:59:04 2013
@@ -23,28 +23,6 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "helpid.hrc"
-#define CONTROL_HEIGHT_FONT_NAME 250
-#define CONTROL_HEIGHT_FONT_SIZE 180
-#define FONTSIZE_WIDTH (TOOLBOX_ITEM_WIDTH * 2 - 1)
-#define FONTNAME_WIDTH (PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH) - 6)
-
-#define TB_SPACE 18
-#define TB_SPACE_V 4
-#define TEXT_WIDTH TOOLBOX_42_42_ITEM_DD_WIDTH + TB_SPACE - 3
-
-#define FT_TB_SPACE 1
-#define BK_IMG 20
-
-#define X0 SECTIONPAGE_MARGIN_HORIZONTAL
-#define X1 SECTIONPAGE_MARGIN_HORIZONTAL + 1 + TOOLBOX_ITEM_WIDTH * 2 + 4
-#define X2 (PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH))
-#define X3 (X2 - (TOOLBOX_ITEM_DD_WIDTH) - 2)
-
-#define FIRST_LINE_Y SECTIONPAGE_MARGIN_VERTICAL_TOP
-#define SECOND_LINE_Y FIRST_LINE_Y + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL + 1
-#define THIRD_LINE_Y SECOND_LINE_Y + CONTROL_SPACING_VERTICAL + (TOOLBOX_ITEM_HEIGHT + 2)
-
-
Control RID_SIDEBAR_TEXT_PANEL
{
OutputSize = TRUE;
Modified: openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdedxv.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdedxv.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdedxv.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdedxv.cxx Fri Jul 19 15:59:04 2013
@@ -768,7 +768,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdi
if( mxSelectionController.is() )
mxSelectionController->onSelectionHasChanged();
- if(IsUndoEnabled())
+ if(IsUndoEnabled() && GetModel() && !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
SdrUndoManager* pSdrUndoManager = getSdrUndoManagerForEnhancedTextEdit();
@@ -854,7 +854,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEn
SdrUndoManager* pUndoEditUndoManager = 0;
bool bNeedToUndoSavedRedoTextEdit(false);
- if(IsUndoEnabled() && GetModel() && pTEObj && pTEOutliner)
+ if(IsUndoEnabled() && GetModel() && pTEObj && pTEOutliner && !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
// change back the UndoManager to the remembered original one
::svl::IUndoManager* pOriginal = pTEOutliner->SetUndoManager(mpOldTextEditUndoManager);