Kaydet (Commit) 701afd6b authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Caolán McNamara

Resolves: #i122446# Use different icons in Paragraph panel for...

increasing or decreasing inter-paragraph spacing

(cherry picked from commit 2dc77c47)

Change-Id: I1f44c6a8a12853120016128975016572245c8981
üst 7906c680
......@@ -29,8 +29,10 @@
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <sfx2/sidebar/Tools.hxx>
#include <svx/sidebar/PopupContainer.hxx>
#include <sfx2/dispatch.hxx>
//#include <sfx2/imagemgr.hxx>
#include <editeng/colritem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/lrspitem.hxx>
......@@ -49,9 +51,6 @@ using namespace cssu;
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
......@@ -65,8 +64,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 MAX_SW 1709400
#define MAX_SC_SD 116220200
......@@ -474,8 +471,18 @@ void ParaPropertyPanel::InitToolBoxSpacing()
maTopDist->SetAccessibleName(maTopDist->GetQuickHelpText());
maBottomDist->SetAccessibleName(maBottomDist->GetQuickHelpText());
maTbxUL_IncDec->SetItemImage(TOOLBOX_ITEM1, maParInc);
maTbxUL_IncDec->SetItemImage(TOOLBOX_ITEM2, maParDec);
// 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.
maTbxUL_IncDec->SetItemImage(
BT_TBX_UL_INC,
sfx2::sidebar::Tools::GetImage(maTbxUL_IncDec->GetItemCommand(BT_TBX_UL_INC), mxFrame));
maTbxUL_IncDec->SetItemImage(
BT_TBX_UL_DEC,
sfx2::sidebar::Tools::GetImage(maTbxUL_IncDec->GetItemCommand(BT_TBX_UL_DEC), mxFrame));
aLink = LINK( this, ParaPropertyPanel, ClickUL_IncDec_Hdl_Impl );
maTbxUL_IncDec->SetSelectHdl(aLink);
m_eULSpaceUnit = maULSpaceControl.GetCoreMetric();
......@@ -967,7 +974,7 @@ IMPL_LINK(ParaPropertyPanel, ClickUL_IncDec_Hdl_Impl, ToolBox *, pControl)
{
switch (pControl->GetCurItemId())
{
case UL_INCREMENT:
case BT_TBX_UL_INC:
{
SvxULSpaceItem aMargin( SID_ATTR_PARA_ULSPACE );
......@@ -985,7 +992,7 @@ IMPL_LINK(ParaPropertyPanel, ClickUL_IncDec_Hdl_Impl, ToolBox *, pControl)
SID_ATTR_PARA_ULSPACE, SFX_CALLMODE_RECORD, &aMargin, 0L);
}
break;
case UL_DECREMENT:
case BT_TBX_UL_DEC:
{
SvxULSpaceItem aMargin( SID_ATTR_PARA_ULSPACE );
......@@ -1583,8 +1590,6 @@ ParaPropertyPanel::ParaPropertyPanel(Window* pParent,
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)),
......
......@@ -34,8 +34,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
......
......@@ -143,8 +143,6 @@ private:
Image maIndent3;
Image maIndHang;
Image maParInc;
Image maParDec;
ImageList maNumBImageList;
ImageList maNumBImageListH;
......
......@@ -192,20 +192,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";
};
};
};
......@@ -465,14 +469,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==============================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment