Author: orw
Date: Wed Apr 24 10:21:09 2013
New Revision: 1471348
URL: http://svn.apache.org/r1471348
Log:
122067: show correct state in paragraph property panel's bullet and numbering
popup control
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx
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/tools/ValueSetWithTextControl.cxx
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx?rev=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
Wed Apr 24 10:21:09 2013
@@ -36,108 +36,96 @@
namespace svx { namespace sidebar {
-ParaBulletsControl::ParaBulletsControl(Window* pParent,
svx::sidebar::ParaPropertyPanel& rPanel):
- PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_BULLETS)),
- maBulletsVS(this,SVX_RES(VS_VALUES)),
- maFISep(this,SVX_RES(IMG_SEPERATOR_BULLET)),
- maMoreButton(this,SVX_RES(CB_BULLET_MORE)),
- mrParaPropertyPanel(rPanel),
- mpBindings(NULL)
-{
- FreeResource();
- mpBindings = mrParaPropertyPanel.GetBindings();
- maBulletsVS.SetColCount(3);
- maBulletsVS.SetLineCount(3);
- maBulletsVS.SetStyle( maBulletsVS.GetStyle() | WB_ITEMBORDER
|WB_NO_DIRECTSELECT);
- 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.SetItemHeight(BULLET_IMAGE_HEIGHT);
- maBulletsVS.InsertItem( DEFAULT_NONE );
- for( sal_uInt16 nVSIdx = 1; nVSIdx <= DEFAULT_BULLET_TYPES; ++nVSIdx )
- {
- maBulletsVS.InsertItem( nVSIdx );
- }
-
- maBulletsVS.SetItemText( DEFAULT_NONE, SVX_RESSTR(
RID_SVXSTR_NUMBULLET_NONE ));
- NBOTypeMgrBase* pBullets =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
- if ( pBullets )
- {
- for( sal_uInt16 nIndex = 0; nIndex < DEFAULT_BULLET_TYPES;
++nIndex )
- {
- maBulletsVS.SetItemText( nIndex + 1,
pBullets->GetDescription(nIndex) );
- }
- }
+ParaBulletsControl::ParaBulletsControl(
+ Window* pParent,
+ svx::sidebar::ParaPropertyPanel& rPanel )
+ : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_BULLETS) )
+ , maBulletsVS( this,SVX_RES(VS_VALUES) )
+ , maMoreButton( this,SVX_RES(CB_BULLET_MORE) )
+ , mrParaPropertyPanel( rPanel )
+ , mpBindings( mrParaPropertyPanel.GetBindings() )
+{
+ FreeResource();
+
+ maBulletsVS.SetColCount(3);
+ maBulletsVS.SetLineCount(3);
+ maBulletsVS.SetStyle( maBulletsVS.GetStyle() | WB_ITEMBORDER
|WB_NO_DIRECTSELECT);
+ maBulletsVS.SetExtraSpacing(BULLET_IMAGE_SPACING);
+ maBulletsVS.SetItemWidth(BULLET_IMAGE_WIDTH);
+ maBulletsVS.SetItemHeight(BULLET_IMAGE_HEIGHT);
+ maBulletsVS.InsertItem( DEFAULT_NONE );
+ for( sal_uInt16 nVSIdx = 1; nVSIdx <= DEFAULT_BULLET_TYPES; ++nVSIdx )
+ {
+ maBulletsVS.InsertItem( nVSIdx );
+ }
+
+ maBulletsVS.SetItemText( DEFAULT_NONE, SVX_RESSTR(
RID_SVXSTR_NUMBULLET_NONE ));
+ NBOTypeMgrBase* pBullets =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ if ( pBullets )
+ {
+ for( sal_uInt16 nIndex = 0; nIndex < DEFAULT_BULLET_TYPES; ++nIndex )
+ {
+ maBulletsVS.SetItemText( nIndex + 1,
pBullets->GetDescription(nIndex) );
+ }
+ }
maBulletsVS.Show();
- maBulletsVS.SetSelectHdl(LINK(this, ParaBulletsControl,
BulletSelectHdl_Impl));
+ maBulletsVS.SetSelectHdl(LINK(this, ParaBulletsControl,
BulletSelectHdl_Impl));
-
/*maMoreButton.SetDefBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
- GetSettings().GetStyleSettings().GetMenuColor():
- sfx2::sidebar::Theme::GetColor(
sfx2::sidebar::Theme::Paint_DropDownBackground ));//Color(244,245,249)//for
high contract
-
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);*/
-
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 ));
+ 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()
{
-
}
+
void ParaBulletsControl::UpdateValueSet()
{
- maBulletsVS.StateChanged(STATE_CHANGE_STYLE);
- maBulletsVS.StateChanged(STATE_CHANGE_INITSHOW);
-}
-void ParaBulletsControl::ToGetFocus()
-{
- sal_uInt16 nTypeIndex = (sal_uInt16)0xFFFF;
- mrParaPropertyPanel.GetBulletTypeIndex();
- if ( nTypeIndex != (sal_uInt16)0xFFFF )
- maBulletsVS.SelectItem( nTypeIndex );
- else
- {
- maBulletsVS.SelectItem(0);
- }
- maMoreButton.GrabFocus();
+ maBulletsVS.StateChanged(STATE_CHANGE_STYLE);
+ maBulletsVS.StateChanged(STATE_CHANGE_INITSHOW);
+
+ const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetBulletTypeIndex();
+ if ( nTypeIndex != (sal_uInt16)0xFFFF )
+ maBulletsVS.SelectItem( nTypeIndex );
+ else
+ {
+ maBulletsVS.SelectItem(0);
+ }
+ maMoreButton.GrabFocus();
}
+
IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG)
{
- sal_uInt16 nIdx = maBulletsVS.GetSelectItemId();
- SfxUInt16Item aItem(FN_SVX_SET_BULLET, nIdx);
- if (mpBindings)
- mpBindings->GetDispatcher()->Execute( FN_SVX_SET_BULLET,
SFX_CALLMODE_RECORD, &aItem, 0L );
-
- mrParaPropertyPanel.EndBulletsPopupMode();
-
- return 0;
+ const sal_uInt16 nIdx = maBulletsVS.GetSelectItemId();
+ SfxUInt16Item aItem( FN_SVX_SET_BULLET, nIdx );
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( FN_SVX_SET_BULLET,
SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ mrParaPropertyPanel.EndBulletsPopupMode();
+
+ return 0;
}
+
IMPL_LINK(ParaBulletsControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
{
- if (mpBindings)
- mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET,
SFX_CALLMODE_ASYNCHRON );
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET,
SFX_CALLMODE_ASYNCHRON );
- mrParaPropertyPanel.EndBulletsPopupMode();
+ mrParaPropertyPanel.EndBulletsPopupMode();
- return 0;
+ return 0;
}
}} // end of namespace sidebar
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx?rev=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx
Wed Apr 24 10:21:09 2013
@@ -38,21 +38,19 @@ namespace svx { namespace sidebar {
class ParaBulletsControl:public svx::sidebar::PopupControl
{
-private:
- SvxNumValueSet3 maBulletsVS;
- FixedImage maFISep;
- PushButton maMoreButton;
- ParaPropertyPanel& mrParaPropertyPanel;
- SfxBindings* mpBindings;
+private:
+ SvxNumValueSet3 maBulletsVS;
+ PushButton maMoreButton;
+ ParaPropertyPanel& mrParaPropertyPanel;
+ SfxBindings* mpBindings;
- DECL_LINK(BulletSelectHdl_Impl, ValueSet*);
- DECL_LINK(MoreButtonClickHdl_Impl, void*);
+ DECL_LINK(BulletSelectHdl_Impl, ValueSet*);
+ DECL_LINK(MoreButtonClickHdl_Impl, void*);
public:
- ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel&
rPanel);
- ~ParaBulletsControl();
- void ToGetFocus();
- void UpdateValueSet();
+ ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel&
rPanel);
+ ~ParaBulletsControl();
+ void UpdateValueSet();
};
}}
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx?rev=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
Wed Apr 24 10:21:09 2013
@@ -49,120 +49,103 @@ namespace svx { namespace sidebar {
Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider()
{
- Reference< XMultiServiceFactory > xMSF =
::comphelper::getProcessServiceFactory();
- Reference < XInterface > xI = xMSF->createInstance(
- ::rtl::OUString::createFromAscii(
"com.sun.star.text.DefaultNumberingProvider" ) );
- Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY);
-// DBG_ASSERT(xRet.is(), "service missing:
\"com.sun.star.text.DefaultNumberingProvider\"")
-
- return xRet;
-}
-
-ParaNumberingControl::ParaNumberingControl(Window* pParent,
svx::sidebar::ParaPropertyPanel& rPanel):
- PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_NUMBERING)),
- maNumberVS(this,SVX_RES(VS_NUMBERING)),
- maFISep(this,SVX_RES(IMG_SEPERATOR_NUMBERING)),
- maMoreButton(this,SVX_RES(CB_NUMBERING_MORE) ),
- mrParaPropertyPanel(rPanel),
- mpBindings(NULL)
-{
- 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.SetItemWidth(NUM_IMAGE_WIDTH);
- maNumberVS.SetItemHeight(NUM_IMAGE_HEIGHT);
-
- Reference<XDefaultNumberingProvider> xDefNum =
lcl_GetNumberingProvider();
- if(xDefNum.is())
- {
- Sequence< Sequence< PropertyValue > > aNumberings;
+ Reference< XMultiServiceFactory > xMSF =
::comphelper::getProcessServiceFactory();
+ Reference < XInterface > xI = xMSF->createInstance(
+ ::rtl::OUString::createFromAscii(
"com.sun.star.text.DefaultNumberingProvider" ) );
+ Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY);
+
+ return xRet;
+}
+
+ParaNumberingControl::ParaNumberingControl(
+ Window* pParent,
+ svx::sidebar::ParaPropertyPanel& rPanel )
+ : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_NUMBERING) )
+ , maNumberVS( this,SVX_RES(VS_NUMBERING) )
+ , maMoreButton( this,SVX_RES(CB_NUMBERING_MORE) )
+ , mrParaPropertyPanel( rPanel )
+ , mpBindings( mrParaPropertyPanel.GetBindings() )
+{
+ FreeResource();
+
+ maNumberVS.SetStyle( maNumberVS.GetStyle() | WB_NO_DIRECTSELECT );
+ maNumberVS.SetExtraSpacing( NUM_IMAGE_SPACING );
+ maNumberVS.SetItemWidth(NUM_IMAGE_WIDTH);
+ maNumberVS.SetItemHeight(NUM_IMAGE_HEIGHT);
+
+ Reference<XDefaultNumberingProvider> xDefNum = lcl_GetNumberingProvider();
+ if(xDefNum.is())
+ {
+ Sequence< Sequence< PropertyValue > > aNumberings;
LanguageType eLang = GetSettings().GetLanguage();
- Locale aLocale = SvxCreateLocale(eLang);
- try
- {
- aNumberings =
- xDefNum->getDefaultContinuousNumberingLevels(
aLocale );
- }
- catch(Exception&)
- {
- }
- Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY);
- maNumberVS.SetNumberingSettings(aNumberings, xFormat, aLocale);
- }
+ Locale aLocale = SvxCreateLocale(eLang);
+ try
+ {
+ aNumberings = xDefNum->getDefaultContinuousNumberingLevels(
aLocale );
+ }
+ catch(Exception&)
+ {
+ }
+ Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY);
+ maNumberVS.SetNumberingSettings(aNumberings, xFormat, aLocale);
+ }
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 contract
-
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()
-{
+{
}
IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{
- sal_uInt16 nIdx = maNumberVS.GetSelectItemId();
- SfxUInt16Item aItem(FN_SVX_SET_NUMBER, nIdx);
- if (mpBindings)
- mpBindings->GetDispatcher()->Execute( FN_SVX_SET_NUMBER,
SFX_CALLMODE_RECORD, &aItem, 0L );
-
- mrParaPropertyPanel.EndNumberingPopupMode();
-
- return 0;
+ const sal_uInt16 nIdx = maNumberVS.GetSelectItemId();
+ SfxUInt16Item aItem( FN_SVX_SET_NUMBER, nIdx );
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( FN_SVX_SET_NUMBER,
SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ mrParaPropertyPanel.EndNumberingPopupMode();
+
+ return 0;
}
+
IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
{
- if (mpBindings)
- mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET,
SFX_CALLMODE_ASYNCHRON );
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET,
SFX_CALLMODE_ASYNCHRON );
- mrParaPropertyPanel.EndNumberingPopupMode();
+ mrParaPropertyPanel.EndNumberingPopupMode();
- return 0;
+ return 0;
}
+
void ParaNumberingControl::UpdateValueSet()
{
- maNumberVS.StateChanged(STATE_CHANGE_STYLE);
- maNumberVS.StateChanged(STATE_CHANGE_INITSHOW);
-}
+ maNumberVS.StateChanged(STATE_CHANGE_STYLE);
+ maNumberVS.StateChanged(STATE_CHANGE_INITSHOW);
-void ParaNumberingControl::ToGetFocus()
-{
- sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex();
- if ( nTypeIndex != (sal_uInt16)0xFFFF )
- maNumberVS.SelectItem( nTypeIndex );
- else
- {
- maNumberVS.SelectItem(0);
- }
- maMoreButton.GrabFocus();
+ const sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex();
+ if ( nTypeIndex != (sal_uInt16)0xFFFF )
+ maNumberVS.SelectItem( nTypeIndex );
+ else
+ {
+ maNumberVS.SelectItem(0);
+ }
+ maMoreButton.GrabFocus();
}
}} // end of namespace sidebar
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx?rev=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx
Wed Apr 24 10:21:09 2013
@@ -41,21 +41,20 @@ namespace svx { namespace sidebar {
class ParaNumberingControl:public svx::sidebar::PopupControl
{
private:
- SvxNumValueSet2 maNumberVS;
- FixedImage maFISep;
- PushButton maMoreButton;
- ParaPropertyPanel& mrParaPropertyPanel;
- SfxBindings* mpBindings;
-
- DECL_LINK(NumSelectHdl_Impl, ValueSet*);
- DECL_LINK(MoreButtonClickHdl_Impl, void*);
+ SvxNumValueSet2 maNumberVS;
+ PushButton maMoreButton;
+ ParaPropertyPanel& mrParaPropertyPanel;
+ SfxBindings* mpBindings;
+
+ DECL_LINK(NumSelectHdl_Impl, ValueSet*);
+ DECL_LINK(MoreButtonClickHdl_Impl, void*);
public:
- ParaNumberingControl(Window* pParent, svx::sidebar::ParaPropertyPanel&
rPanel);
- ~ParaNumberingControl();
- void ToGetFocus();
- void UpdateValueSet();
-
+ ParaNumberingControl( Window* pParent,
+ svx::sidebar::ParaPropertyPanel& rPanel);
+ ~ParaNumberingControl();
+ void UpdateValueSet();
+
};
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=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
Wed Apr 24 10:21:09 2013
@@ -1415,14 +1415,6 @@ void ParaPropertyPanel::StateChangeOutLi
else
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 )
@@ -1451,52 +1443,55 @@ void ParaPropertyPanel::StateChangeIncDe
// Add toggle state for numbering and bullet icons
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)))
- {
- const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
- sal_Bool aBool = (sal_Bool)pItem->GetValue();
- if (aBool) {
- maTBxNumBullet->SetItemState(IID_NUMBER,
STATE_CHECK);
- } else {
- maTBxNumBullet->SetItemState(IID_NUMBER,
STATE_NOCHECK);
- }
- }
- }
- if (nSID==FN_NUM_BULLET_ON)
- {
- if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem)))
- {
- const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
- sal_Bool aBool = (sal_Bool)pItem->GetValue();
- if (aBool) {
- maTBxNumBullet->SetItemState(IID_BULLET,
STATE_CHECK);
- } else {
- maTBxNumBullet->SetItemState(IID_BULLET,
STATE_NOCHECK);
- }
- }
- }
+ if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem)) )
+ {
+ if (nSID==FN_NUM_NUMBERING_ON)
+ {
+ const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
+ sal_Bool aBool = (sal_Bool)pItem->GetValue();
+ if (aBool) {
+ maTBxNumBullet->SetItemState(IID_NUMBER, STATE_CHECK);
+ } else {
+ maTBxNumBullet->SetItemState(IID_NUMBER, STATE_NOCHECK);
+ }
+ }
+ else if (nSID==FN_NUM_BULLET_ON)
+ {
+ const SfxBoolItem* pItem= (const SfxBoolItem*)pState;
+ sal_Bool aBool = (sal_Bool)pItem->GetValue();
+ if (aBool) {
+ maTBxNumBullet->SetItemState(IID_BULLET, STATE_CHECK);
+ } else {
+ maTBxNumBullet->SetItemState(IID_BULLET, STATE_NOCHECK);
+ }
+ }
+ }
}
-//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 )
- {
- mnBulletTypeIndex = nValue;
- }else if ( nSID == FN_NUM_NUM_RULE_INDEX )
- {
- mnNumTypeIndex = nValue;
- }
+
+void ParaPropertyPanel::StateChangeBulletNumRuleImpl( sal_uInt16 nSID,
SfxItemState eState, const SfxPoolItem* pState )
+{
+ if ( eState >= SFX_ITEM_DEFAULT && pState->ISA(SfxUInt16Item) )
+ {
+ 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 eUnit = FUNIT_NONE;
@@ -1527,7 +1522,7 @@ FieldUnit ParaPropertyPanel::GetCurrentU
return eUnit;
}
-//new FixedText(this, SVX_RES(FT_COLOR))
+
PopupControl* ParaPropertyPanel::CreateLineSpacingControl (PopupContainer*
pParent)
{
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=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
Wed Apr 24 10:21:09 2013
@@ -108,13 +108,11 @@
#define CB_BULLET_MORE 4
#define BMP_BULLET_MORE 5
#define BMP_BULLET_MORE_H 6
-#define IMG_SEPERATOR_BULLET 7
#define VS_NUMBERING 10
#define CB_NUMBERING_MORE 12
#define BMP_NUMERING_MORE 13
#define BMP_NUMERING_MORE_H 14
-#define IMG_SEPERATOR_NUMBERING 15
#define VS_FONT_COLOR 1
#define STR_NOFILL 2
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=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
Wed Apr 24 10:21:09 2013
@@ -254,8 +254,6 @@ private:
void StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const
SfxPoolItem* pState );
// Add toggle state for numbering and bullet icons
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 initial();
Modified:
openoffice/trunk/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx?rev=1471348&r1=1471347&r2=1471348&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
Wed Apr 24 10:21:09 2013
@@ -403,16 +403,6 @@ void SvxNumValueSet2::UserDraw( const U
//===============================================================================================
-static const long aOffsetX[] =
-{
- -1,//1,
- 3,//4,
- 4,//5,
- -3,//0,
- -1,//0,
- 3
-};
-
SvxNumValueSet3::SvxNumValueSet3( Window* pParent, const ResId& rResId) :
ValueSet( pParent, rResId )
{