Kaydet (Commit) a7597105 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann Kaydeden (comit) Michael Meeks

Resolves: #i122067# show correct state in paragraph property panel

i.e. the paragraph property panel's bullet and numbering popup control

(cherry picked from commit 167f0536)

Conflicts:
	svx/source/sidebar/paragraph/ParaBulletsControl.cxx
	svx/source/sidebar/paragraph/ParaNumberingControl.cxx
	svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
	svx/source/sidebar/paragraph/ParaPropertyPanel.hrc

Change-Id: Iacea3f063d1050f873cff443fb3e1df4b8983279
üst 998a3991
...@@ -31,32 +31,28 @@ ...@@ -31,32 +31,28 @@
namespace svx { namespace sidebar { namespace svx { namespace sidebar {
ParaBulletsControl::ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel) ParaBulletsControl::ParaBulletsControl(
: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_BULLETS)) Window* pParent,
, maBulletsVS(this,SVX_RES(VS_VALUES)) svx::sidebar::ParaPropertyPanel& rPanel )
, maFISep(this,SVX_RES(IMG_SEPERATOR_BULLET)) : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_BULLETS) )
, maMoreButton(this,SVX_RES(CB_BULLET_MORE)) , maBulletsVS( this,SVX_RES(VS_VALUES) )
, mrParaPropertyPanel(rPanel) , maMoreButton( this,SVX_RES(CB_BULLET_MORE) )
, mpBindings(NULL) , mrParaPropertyPanel( rPanel )
, mpBindings( mrParaPropertyPanel.GetBindings() )
{ {
FreeResource(); FreeResource();
mpBindings = mrParaPropertyPanel.GetBindings();
maBulletsVS.SetColCount(3); maBulletsVS.SetColCount(3);
maBulletsVS.SetLineCount(3); maBulletsVS.SetLineCount(3);
maBulletsVS.SetStyle( maBulletsVS.GetStyle() | WB_ITEMBORDER |WB_NO_DIRECTSELECT); maBulletsVS.SetStyle( maBulletsVS.GetStyle() | WB_ITEMBORDER |WB_NO_DIRECTSELECT);
maBulletsVS.SetExtraSpacing(BULLET_IMAGE_SPACING); maBulletsVS.SetExtraSpacing(BULLET_IMAGE_SPACING);
if(GetSettings().GetStyleSettings().GetHighContrastMode())
maBulletsVS.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
else
maBulletsVS.SetBackground(Color(244,245,249));
maBulletsVS.SetItemWidth(BULLET_IMAGE_WIDTH); maBulletsVS.SetItemWidth(BULLET_IMAGE_WIDTH);
maBulletsVS.SetItemHeight(BULLET_IMAGE_HEIGHT); maBulletsVS.SetItemHeight(BULLET_IMAGE_HEIGHT);
maBulletsVS.InsertItem( DEFAULT_NONE ); maBulletsVS.InsertItem( DEFAULT_NONE );
for( sal_uInt16 nVSIdx = 1; nVSIdx <= DEFAULT_BULLET_TYPES; ++nVSIdx ) for( sal_uInt16 nVSIdx = 1; nVSIdx <= DEFAULT_BULLET_TYPES; ++nVSIdx )
{ {
maBulletsVS.InsertItem( nVSIdx ); maBulletsVS.InsertItem( nVSIdx );
} }
maBulletsVS.SetItemText( DEFAULT_NONE, SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE )); maBulletsVS.SetItemText( DEFAULT_NONE, SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE ));
NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS); NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
...@@ -71,39 +67,29 @@ ParaBulletsControl::ParaBulletsControl(Window* pParent, svx::sidebar::ParaProper ...@@ -71,39 +67,29 @@ ParaBulletsControl::ParaBulletsControl(Window* pParent, svx::sidebar::ParaProper
maBulletsVS.Show(); maBulletsVS.Show();
maBulletsVS.SetSelectHdl(LINK(this, ParaBulletsControl, BulletSelectHdl_Impl)); maBulletsVS.SetSelectHdl(LINK(this, ParaBulletsControl, BulletSelectHdl_Impl));
/*maMoreButton.SetDefBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()? maBulletsVS.SetColor( GetSettings().GetStyleSettings().GetHighContrastMode()
GetSettings().GetStyleSettings().GetMenuColor(): ? GetSettings().GetStyleSettings().GetMenuColor()
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_DropDownBackground ));//Color(244,245,249)//for high contrast : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );
maMoreButton.SetHoverBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()? maBulletsVS.SetBackground( GetSettings().GetStyleSettings().GetHighContrastMode()
GetSettings().GetStyleSettings().GetMenuColor(): ? GetSettings().GetStyleSettings().GetMenuColor()
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );//Color( 93, 120, 163 ) : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );
maMoreButton.SetHoverTxtColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_PanelTitleFont ) );//Color( 255, 255, 255 )
maMoreButton.SetIcoPosX( 2);*/
maBulletsVS.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maBulletsVS.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maMoreButton.SetClickHdl(LINK(this, ParaBulletsControl, MoreButtonClickHdl_Impl)); maMoreButton.SetClickHdl(LINK(this, ParaBulletsControl, MoreButtonClickHdl_Impl));
} }
ParaBulletsControl::~ParaBulletsControl() ParaBulletsControl::~ParaBulletsControl()
{ {
} }
void ParaBulletsControl::UpdateValueSet() void ParaBulletsControl::UpdateValueSet()
{ {
maBulletsVS.StateChanged(STATE_CHANGE_STYLE); maBulletsVS.StateChanged(STATE_CHANGE_STYLE);
maBulletsVS.StateChanged(STATE_CHANGE_INITSHOW); maBulletsVS.StateChanged(STATE_CHANGE_INITSHOW);
}
void ParaBulletsControl::ToGetFocus() const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetBulletTypeIndex();
{
sal_uInt16 nTypeIndex = (sal_uInt16)0xFFFF;
mrParaPropertyPanel.GetBulletTypeIndex();
if ( nTypeIndex != (sal_uInt16)0xFFFF ) if ( nTypeIndex != (sal_uInt16)0xFFFF )
maBulletsVS.SelectItem( nTypeIndex ); maBulletsVS.SelectItem( nTypeIndex );
else else
...@@ -113,10 +99,11 @@ void ParaBulletsControl::ToGetFocus() ...@@ -113,10 +99,11 @@ void ParaBulletsControl::ToGetFocus()
maMoreButton.GrabFocus(); maMoreButton.GrabFocus();
} }
IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG) IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG)
{ {
sal_uInt16 nIdx = maBulletsVS.GetSelectItemId(); const sal_uInt16 nIdx = maBulletsVS.GetSelectItemId();
SfxUInt16Item aItem(FN_SVX_SET_BULLET, nIdx); SfxUInt16Item aItem( FN_SVX_SET_BULLET, nIdx );
if (mpBindings) if (mpBindings)
mpBindings->GetDispatcher()->Execute( FN_SVX_SET_BULLET, SFX_CALLMODE_RECORD, &aItem, 0L ); mpBindings->GetDispatcher()->Execute( FN_SVX_SET_BULLET, SFX_CALLMODE_RECORD, &aItem, 0L );
...@@ -125,6 +112,7 @@ IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG) ...@@ -125,6 +112,7 @@ IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG)
return 0; return 0;
} }
IMPL_LINK(ParaBulletsControl, MoreButtonClickHdl_Impl, void*, EMPTYARG) IMPL_LINK(ParaBulletsControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
{ {
if (mpBindings) if (mpBindings)
......
...@@ -36,11 +36,10 @@ namespace svx { namespace sidebar { ...@@ -36,11 +36,10 @@ namespace svx { namespace sidebar {
class ParaBulletsControl:public svx::sidebar::PopupControl class ParaBulletsControl:public svx::sidebar::PopupControl
{ {
private: private:
SvxNumValueSet3 maBulletsVS; SvxNumValueSet3 maBulletsVS;
FixedImage maFISep; PushButton maMoreButton;
PushButton maMoreButton;
ParaPropertyPanel& mrParaPropertyPanel; ParaPropertyPanel& mrParaPropertyPanel;
SfxBindings* mpBindings; SfxBindings* mpBindings;
DECL_LINK(BulletSelectHdl_Impl, ValueSet*); DECL_LINK(BulletSelectHdl_Impl, ValueSet*);
DECL_LINK(MoreButtonClickHdl_Impl, void*); DECL_LINK(MoreButtonClickHdl_Impl, void*);
...@@ -48,7 +47,6 @@ private: ...@@ -48,7 +47,6 @@ private:
public: public:
ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel); ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
~ParaBulletsControl(); ~ParaBulletsControl();
void ToGetFocus();
void UpdateValueSet(); void UpdateValueSet();
}; };
......
...@@ -48,30 +48,23 @@ Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider() ...@@ -48,30 +48,23 @@ Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider()
Reference < XInterface > xI = xMSF->createInstance( Reference < XInterface > xI = xMSF->createInstance(
::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) ); ::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) );
Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY); Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY);
// DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"")
return xRet; return xRet;
} }
ParaNumberingControl::ParaNumberingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel): ParaNumberingControl::ParaNumberingControl(
PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_NUMBERING)), Window* pParent,
maNumberVS(this,SVX_RES(VS_NUMBERING)), svx::sidebar::ParaPropertyPanel& rPanel )
maFISep(this,SVX_RES(IMG_SEPERATOR_NUMBERING)), : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_NUMBERING) )
maMoreButton(this,SVX_RES(CB_NUMBERING_MORE) ), , maNumberVS( this,SVX_RES(VS_NUMBERING) )
mrParaPropertyPanel(rPanel), , maMoreButton( this,SVX_RES(CB_NUMBERING_MORE) )
mpBindings(NULL) , mrParaPropertyPanel( rPanel )
, mpBindings( mrParaPropertyPanel.GetBindings() )
{ {
FreeResource(); FreeResource();
mpBindings = mrParaPropertyPanel.GetBindings();
maNumberVS.SetStyle(maNumberVS.GetStyle() | WB_NO_DIRECTSELECT);
maNumberVS.SetExtraSpacing(NUM_IMAGE_SPACING);
//add by wj for sym2_7246 high contrast
if(GetSettings().GetStyleSettings().GetHighContrastMode())
maNumberVS.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
else
maNumberVS.SetBackground(Color(244,245,249));
maNumberVS.SetStyle( maNumberVS.GetStyle() | WB_NO_DIRECTSELECT );
maNumberVS.SetExtraSpacing( NUM_IMAGE_SPACING );
maNumberVS.SetItemWidth(NUM_IMAGE_WIDTH); maNumberVS.SetItemWidth(NUM_IMAGE_WIDTH);
maNumberVS.SetItemHeight(NUM_IMAGE_HEIGHT); maNumberVS.SetItemHeight(NUM_IMAGE_HEIGHT);
...@@ -82,8 +75,7 @@ ParaNumberingControl::ParaNumberingControl(Window* pParent, svx::sidebar::ParaPr ...@@ -82,8 +75,7 @@ ParaNumberingControl::ParaNumberingControl(Window* pParent, svx::sidebar::ParaPr
Locale aLocale = GetSettings().GetLanguageTag().getLocale(); Locale aLocale = GetSettings().GetLanguageTag().getLocale();
try try
{ {
aNumberings = aNumberings = xDefNum->getDefaultContinuousNumberingLevels( aLocale );
xDefNum->getDefaultContinuousNumberingLevels( aLocale );
} }
catch(Exception&) catch(Exception&)
{ {
...@@ -93,27 +85,19 @@ ParaNumberingControl::ParaNumberingControl(Window* pParent, svx::sidebar::ParaPr ...@@ -93,27 +85,19 @@ ParaNumberingControl::ParaNumberingControl(Window* pParent, svx::sidebar::ParaPr
} }
maNumberVS.Show(); maNumberVS.Show();
maNumberVS.SetSelectHdl(LINK(this, ParaNumberingControl, NumSelectHdl_Impl)); maNumberVS.SetSelectHdl( LINK(this, ParaNumberingControl, NumSelectHdl_Impl) );
/*maMoreButton.SetDefBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_DropDownBackground ));//Color(244,245,249)//for high contrast
maMoreButton.SetHoverBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );//Color( 93, 120, 163 )
maMoreButton.SetHoverTxtColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_PanelTitleFont ) );//Color( 255, 255, 255 )
maMoreButton.SetIcoPosX( 2);*/
maNumberVS.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maNumberVS.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maMoreButton.SetClickHdl(LINK(this, ParaNumberingControl, MoreButtonClickHdl_Impl)); maNumberVS.SetColor( GetSettings().GetStyleSettings().GetHighContrastMode()
? GetSettings().GetStyleSettings().GetMenuColor()
: sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );
maNumberVS.SetBackground( GetSettings().GetStyleSettings().GetHighContrastMode()
? GetSettings().GetStyleSettings().GetMenuColor()
: sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );
maMoreButton.SetClickHdl(LINK(this, ParaNumberingControl, MoreButtonClickHdl_Impl));
} }
ParaNumberingControl::~ParaNumberingControl() ParaNumberingControl::~ParaNumberingControl()
{ {
} }
...@@ -121,8 +105,8 @@ ParaNumberingControl::~ParaNumberingControl() ...@@ -121,8 +105,8 @@ ParaNumberingControl::~ParaNumberingControl()
IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG) IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{ {
sal_uInt16 nIdx = maNumberVS.GetSelectItemId(); const sal_uInt16 nIdx = maNumberVS.GetSelectItemId();
SfxUInt16Item aItem(FN_SVX_SET_NUMBER, nIdx); SfxUInt16Item aItem( FN_SVX_SET_NUMBER, nIdx );
if (mpBindings) if (mpBindings)
mpBindings->GetDispatcher()->Execute( FN_SVX_SET_NUMBER, SFX_CALLMODE_RECORD, &aItem, 0L ); mpBindings->GetDispatcher()->Execute( FN_SVX_SET_NUMBER, SFX_CALLMODE_RECORD, &aItem, 0L );
...@@ -131,6 +115,7 @@ IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG) ...@@ -131,6 +115,7 @@ IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
return 0; return 0;
} }
IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG) IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
{ {
if (mpBindings) if (mpBindings)
...@@ -141,15 +126,13 @@ IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG) ...@@ -141,15 +126,13 @@ IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
return 0; return 0;
} }
void ParaNumberingControl::UpdateValueSet() void ParaNumberingControl::UpdateValueSet()
{ {
maNumberVS.StateChanged(STATE_CHANGE_STYLE); maNumberVS.StateChanged(STATE_CHANGE_STYLE);
maNumberVS.StateChanged(STATE_CHANGE_INITSHOW); maNumberVS.StateChanged(STATE_CHANGE_INITSHOW);
}
void ParaNumberingControl::ToGetFocus() const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex();
{
sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex();
if ( nTypeIndex != (sal_uInt16)0xFFFF ) if ( nTypeIndex != (sal_uInt16)0xFFFF )
maNumberVS.SelectItem( nTypeIndex ); maNumberVS.SelectItem( nTypeIndex );
else else
......
...@@ -38,19 +38,18 @@ namespace svx { namespace sidebar { ...@@ -38,19 +38,18 @@ namespace svx { namespace sidebar {
class ParaNumberingControl:public svx::sidebar::PopupControl class ParaNumberingControl:public svx::sidebar::PopupControl
{ {
private: private:
SvxNumValueSet2 maNumberVS; SvxNumValueSet2 maNumberVS;
FixedImage maFISep; PushButton maMoreButton;
PushButton maMoreButton;
ParaPropertyPanel& mrParaPropertyPanel; ParaPropertyPanel& mrParaPropertyPanel;
SfxBindings* mpBindings; SfxBindings* mpBindings;
DECL_LINK(NumSelectHdl_Impl, ValueSet*); DECL_LINK(NumSelectHdl_Impl, ValueSet*);
DECL_LINK(MoreButtonClickHdl_Impl, void*); DECL_LINK(MoreButtonClickHdl_Impl, void*);
public: public:
ParaNumberingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel); ParaNumberingControl( Window* pParent,
svx::sidebar::ParaPropertyPanel& rPanel);
~ParaNumberingControl(); ~ParaNumberingControl();
void ToGetFocus();
void UpdateValueSet(); void UpdateValueSet();
}; };
......
...@@ -1403,14 +1403,6 @@ void ParaPropertyPanel::StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eS ...@@ -1403,14 +1403,6 @@ void ParaPropertyPanel::StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eS
else else
maTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_False); maTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_False);
// if( !mbOutLineRight && !mbOutLineLeft )
// {
// maTbxProDemote->EnableItem(BT_TBX_INDENT_PROMOTE, sal_True);
// maTbxProDemote->EnableItem(BT_TBX_INDENT_DEMOTE, sal_True);
// maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_True);
// }
// else
// maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
} }
void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
...@@ -1439,9 +1431,9 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt ...@@ -1439,9 +1431,9 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt
// Add toggle state for numbering and bullet icons // Add toggle state for numbering and bullet icons
void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{ {
if (nSID==FN_NUM_NUMBERING_ON) if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem)) )
{ {
if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem))) if (nSID==FN_NUM_NUMBERING_ON)
{ {
const SfxBoolItem* pItem= (const SfxBoolItem*)pState; const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
sal_Bool aBool = (sal_Bool)pItem->GetValue(); sal_Bool aBool = (sal_Bool)pItem->GetValue();
...@@ -1451,10 +1443,7 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState ...@@ -1451,10 +1443,7 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState
maTBxNumBullet->SetItemState(IID_NUMBER, STATE_NOCHECK); maTBxNumBullet->SetItemState(IID_NUMBER, STATE_NOCHECK);
} }
} }
} else if (nSID==FN_NUM_BULLET_ON)
if (nSID==FN_NUM_BULLET_ON)
{
if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem)))
{ {
const SfxBoolItem* pItem= (const SfxBoolItem*)pState; const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
sal_Bool aBool = (sal_Bool)pItem->GetValue(); sal_Bool aBool = (sal_Bool)pItem->GetValue();
...@@ -1466,25 +1455,31 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState ...@@ -1466,25 +1455,31 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState
} }
} }
} }
//Modified for Numbering&Bullets Dialog UX Enh(Story 992) by chengjh,2011.7.5
//Handing the transferred the num rule index data of the current selection
void ParaPropertyPanel::StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState /*eState*/, const SfxPoolItem* pState )
{
const SfxUInt16Item* pIt = (const SfxUInt16Item*)pState;
sal_uInt16 nValue = (sal_uInt16)0xFFFF;
if ( pIt )
nValue = pIt->GetValue();
if ( nSID == FN_BUL_NUM_RULE_INDEX ) void ParaPropertyPanel::StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{ {
mnBulletTypeIndex = nValue; if ( eState >= SFX_ITEM_DEFAULT && pState->ISA(SfxUInt16Item) )
}else if ( nSID == FN_NUM_NUM_RULE_INDEX )
{ {
mnNumTypeIndex = nValue; sal_uInt16 nValue = (sal_uInt16)0xFFFF;
{
const SfxUInt16Item* pIt = (const SfxUInt16Item*)pState;
if ( pIt )
nValue = pIt->GetValue();
}
if ( nSID == FN_BUL_NUM_RULE_INDEX )
{
mnBulletTypeIndex = nValue;
}
else if ( nSID == FN_NUM_NUM_RULE_INDEX )
{
mnNumTypeIndex = nValue;
}
} }
} }
//End
FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState ) FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState )
{ {
FieldUnit eUnit = FUNIT_NONE; FieldUnit eUnit = FUNIT_NONE;
...@@ -1515,7 +1510,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI ...@@ -1515,7 +1510,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI
return eUnit; return eUnit;
} }
//new FixedText(this, SVX_RES(FT_COLOR))
PopupControl* ParaPropertyPanel::CreateLineSpacingControl (PopupContainer* pParent) PopupControl* ParaPropertyPanel::CreateLineSpacingControl (PopupContainer* pParent)
{ {
......
...@@ -103,12 +103,10 @@ ...@@ -103,12 +103,10 @@
#define IL_BULLET_BITMAPS 2 #define IL_BULLET_BITMAPS 2
#define CB_BULLET_MORE 4 #define CB_BULLET_MORE 4
#define BMP_BULLET_MORE 5 #define BMP_BULLET_MORE 5
#define IMG_SEPERATOR_BULLET 7
#define VS_NUMBERING 10 #define VS_NUMBERING 10
#define CB_NUMBERING_MORE 12 #define CB_NUMBERING_MORE 12
#define BMP_NUMERING_MORE 13 #define BMP_NUMERING_MORE 13
#define IMG_SEPERATOR_NUMBERING 15
#define VS_FONT_COLOR 1 #define VS_FONT_COLOR 1
#define STR_NOFILL 2 #define STR_NOFILL 2
......
...@@ -250,8 +250,6 @@ private: ...@@ -250,8 +250,6 @@ private:
void StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
// Add toggle state for numbering and bullet icons // Add toggle state for numbering and bullet icons
void StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
//Modified for Numbering&Bullets Dialog UX Enh
//Handing the transferred the num rule index data of the current selection
void StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
void initial(); void initial();
......
...@@ -398,16 +398,6 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent& rUDEvt ) ...@@ -398,16 +398,6 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent& rUDEvt )
//=============================================================================================== //===============================================================================================
static const long aOffsetX[] =
{
-1,//1,
3,//4,
4,//5,
-3,//0,
-1,//0,
3
};
SvxNumValueSet3::SvxNumValueSet3( Window* pParent, const ResId& rResId) : SvxNumValueSet3::SvxNumValueSet3( Window* pParent, const ResId& rResId) :
ValueSet( pParent, rResId ) ValueSet( pParent, rResId )
{ {
......
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