You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/06/04 18:24:27 UTC
svn commit: r1489501 - in
/openoffice/trunk/main/svx/source/sidebar/paragraph: ParaPropertyPanel.cxx
ParaPropertyPanel.hrc ParaPropertyPanel.hxx ParaPropertyPanel.src
Author: af
Date: Tue Jun 4 16:24:18 2013
New Revision: 1489501
URL: http://svn.apache.org/r1489501
Log:
122446: Use different icons in Paragraph panel for increasing or decreasing inter-pagraph spacing.
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src
Modified: openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx?rev=1489501&r1=1489500&r2=1489501&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx Tue Jun 4 16:24:18 2013
@@ -34,8 +34,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/brshitem.hxx>
#include <editeng/lrspitem.hxx>
@@ -70,8 +72,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
@@ -491,8 +491,18 @@ void ParaPropertyPanel::InitToolBoxSpaci
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(mpTbxUL_IncDec->GetItemCommand(BT_TBX_UL_INC), mxFrame));
+ maTbxUL_IncDec->SetItemImage(
+ BT_TBX_UL_DEC,
+ sfx2::sidebar::Tools::GetImage(mpTbxUL_IncDec->GetItemCommand(BT_TBX_UL_DEC), mxFrame));
+
aLink = LINK( this, ParaPropertyPanel, ClickUL_IncDec_Hdl_Impl );
maTbxUL_IncDec->SetSelectHdl(aLink);
m_eULSpaceUnit = maULSpaceControl.GetCoreMetric();
@@ -984,7 +994,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 +1012,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 );
@@ -1600,8 +1610,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)),
Modified: openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc?rev=1489501&r1=1489500&r2=1489501&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc (original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc Tue Jun 4 16:24:18 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/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx?rev=1489501&r1=1489500&r2=1489501&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx Tue Jun 4 16:24:18 2013
@@ -147,8 +147,6 @@ private:
Image maIndent3;
Image maIndHang;
- Image maParInc;
- Image maParDec;
ImageList maNumBImageList;
ImageList maNumBImageListH;
Modified: openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src?rev=1489501&r1=1489500&r2=1489501&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src (original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src Tue Jun 4 16:24:18 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==============================