Kaydet (Commit) 6ca31d90 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

122270: paragraph property panel, line spacing control: do not directly select…

122270: paragraph property panel, line spacing control: do not directly select item via cursor travelling; removing obsolete code
üst c499090b
...@@ -67,7 +67,6 @@ maSpacing1 (SVX_RES(IMG_SPACING1)), ...@@ -67,7 +67,6 @@ maSpacing1 (SVX_RES(IMG_SPACING1)),
maSpacing115 (SVX_RES(IMG_SPACING115)), maSpacing115 (SVX_RES(IMG_SPACING115)),
maSpacing15 (SVX_RES(IMG_SPACING15)), maSpacing15 (SVX_RES(IMG_SPACING15)),
maSpacing2 (SVX_RES(IMG_SPACING2)), maSpacing2 (SVX_RES(IMG_SPACING2)),
maLPCustom (SVX_RES(IMG_SPACINGLCUSTOM)),
maSelSpacing1 (SVX_RES(IMG_SEL_SPACING1)), maSelSpacing1 (SVX_RES(IMG_SEL_SPACING1)),
maSelSpacing115 (SVX_RES(IMG_SEL_SPACING115)), maSelSpacing115 (SVX_RES(IMG_SEL_SPACING115)),
maSelSpacing15 (SVX_RES(IMG_SEL_SPACING15)), maSelSpacing15 (SVX_RES(IMG_SEL_SPACING15)),
...@@ -105,26 +104,20 @@ ParaLineSpacingControl::~ParaLineSpacingControl() ...@@ -105,26 +104,20 @@ ParaLineSpacingControl::~ParaLineSpacingControl()
void ParaLineSpacingControl::initial() void ParaLineSpacingControl::initial()
{ {
//maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT ); maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
//maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor());
//maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetMenuColor()); maLineSpacing.SetControlBackground(
//maLineSpacing.SetMinFont(); GetSettings().GetStyleSettings().GetHighContrastMode()
? GetSettings().GetStyleSettings().GetMenuColor()
maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()? : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
GetSettings().GetStyleSettings().GetMenuColor(): maLineSpacing.SetColor(
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); GetSettings().GetStyleSettings().GetHighContrastMode()
maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()? ? GetSettings().GetStyleSettings().GetMenuColor()
GetSettings().GetStyleSettings().GetMenuColor(): : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); maLineSpacing.SetBackground(
maLineSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()? GetSettings().GetStyleSettings().GetHighContrastMode()
GetSettings().GetStyleSettings().GetMenuColor(): ? GetSettings().GetStyleSettings().GetMenuColor()
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
//maFTSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
//GetSettings().GetStyleSettings().GetMenuColor():
//sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
//maFTBy.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
//GetSettings().GetStyleSettings().GetMenuColor():
//sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
mpImg = new Image[4]; mpImg = new Image[4];
mpImg[0] = maSpacing1; mpImg[0] = maSpacing1;
...@@ -167,13 +160,7 @@ void ParaLineSpacingControl::initial() ...@@ -167,13 +160,7 @@ void ParaLineSpacingControl::initial()
aLineDistAtPercentBox.SetModifyHdl( aLink ); aLineDistAtPercentBox.SetModifyHdl( aLink );
aLineDistAtMetricBox.SetModifyHdl( aLink ); aLineDistAtMetricBox.SetModifyHdl( aLink );
} }
void ParaLineSpacingControl::ToGetFocus(bool bType)
{
if(!bType)
aLineDist.GrabFocus();
else
maLineSpacing.GrabFocus(); //wj
}
void ParaLineSpacingControl::PopupModeEndCallback() void ParaLineSpacingControl::PopupModeEndCallback()
{ {
...@@ -484,24 +471,6 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe ...@@ -484,24 +471,6 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe
aLineDist.SaveValue(); aLineDist.SaveValue();
/*sal_uInt16 nID = pBox->GetCurItemId();
pBox->SetItemDown(nID, sal_True);
Size aFloatSz = GetOutputSizePixel();
GetLineSPFloatWin()->SetSizePixel( aFloatSz );
Point aPos=maLineSPTbx->GetPosPixel();
aPos.setX(aPos.getX());
aPos = OutputToScreenPixel( aPos );
Size aSize = maLineSPTbx->GetSizePixel();
Rectangle aRect( aPos, aSize );
GetLineSPFloatWin()->StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_NOFOCUSCLOSE);
GetLineSPFloatWin()->SetPopupModeFlags(GetLineSPFloatWin()->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pLineSPPage->ToGetFocus(bValueSetFocus);
*/
sal_uInt16 uCount = aLineDist.GetEntryCount(); sal_uInt16 uCount = aLineDist.GetEntryCount();
if( uCount == LLINESPACE_FIX + 1 ) if( uCount == LLINESPACE_FIX + 1 )
{ {
......
...@@ -43,7 +43,6 @@ class ParaLineSpacingControl:public svx::sidebar::PopupControl ...@@ -43,7 +43,6 @@ class ParaLineSpacingControl:public svx::sidebar::PopupControl
public: public:
ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel); ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
~ParaLineSpacingControl(); ~ParaLineSpacingControl();
void ToGetFocus(bool bType);
void Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext); void Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext);
//virtual void Paint(const Rectangle& rect); //virtual void Paint(const Rectangle& rect);
...@@ -84,7 +83,6 @@ private: ...@@ -84,7 +83,6 @@ private:
Image maSpacing115; Image maSpacing115;
Image maSpacing15; Image maSpacing15;
Image maSpacing2; Image maSpacing2;
Image maLPCustom;
Image maSelSpacing1; Image maSelSpacing1;
Image maSelSpacing115; Image maSelSpacing115;
......
...@@ -119,7 +119,6 @@ ...@@ -119,7 +119,6 @@
#define IMG_SPACING115 19 #define IMG_SPACING115 19
#define IMG_SPACING15 20 #define IMG_SPACING15 20
#define IMG_SPACING2 21 #define IMG_SPACING2 21
#define IMG_SPACINGLCUSTOM 22
#define IMG_SEL_SPACING1 23 #define IMG_SEL_SPACING1 23
#define IMG_SEL_SPACING115 24 #define IMG_SEL_SPACING115 24
#define IMG_SEL_SPACING15 25 #define IMG_SEL_SPACING15 25
......
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