Kaydet (Commit) 94c81138 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sidebar: Get AreaPropertyPanel basically to work.

Change-Id: Ib5f05346ab5b38b4f3ec30f95b2435c9231d13ab
üst 8fe5f011
...@@ -1004,9 +1004,6 @@ ...@@ -1004,9 +1004,6 @@
// sidebar-related resources (defined in the appropriate .hrc's) // sidebar-related resources (defined in the appropriate .hrc's)
#define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 1240) #define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 1240)
// sidebar-related resources (defined in the appropriate .hrc's)
#define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 1240)
// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1270) #define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1270)
......
...@@ -77,8 +77,6 @@ AreaPropertyPanel::AreaPropertyPanel( ...@@ -77,8 +77,6 @@ AreaPropertyPanel::AreaPropertyPanel(
maGradientElliptical(), maGradientElliptical(),
maGradientSquare(), maGradientSquare(),
maGradientRect(), maGradientRect(),
mpLbFillType(new SvxFillTypeBox(this)),
mpLbFillAttr(new SvxFillAttrBox(this)),
mpStyleItem(), mpStyleItem(),
mpColorItem(), mpColorItem(),
mpFillGradientItem(), mpFillGradientItem(),
...@@ -113,11 +111,13 @@ AreaPropertyPanel::AreaPropertyPanel( ...@@ -113,11 +111,13 @@ AreaPropertyPanel::AreaPropertyPanel(
mbColorAvail(true) mbColorAvail(true)
{ {
get(mpColorTextFT, "filllabel"); get(mpColorTextFT, "filllabel");
get(mpLbFillType, "fillstyle");
get(mpLbFillAttr, "fillattr");
get(mpTrspTextFT, "transparencylabel"); get(mpTrspTextFT, "transparencylabel");
get(mpToolBoxColor, "selectcolor"); get(mpToolBoxColor, "selectcolor");
get(mpLBTransType, "transtype"); get(mpLBTransType, "transtype");
get(mpMTRTransparent, "settransparency"); // GtkSpinButton get(mpMTRTransparent, "settransparency");
get(mpBTNGradient, "selectgradient"); // GtkToolbar get(mpBTNGradient, "selectgradient");
const sal_uInt16 nIdColor = mpToolBoxColor->GetItemId(UNO_SIDEBARCOLOR); const sal_uInt16 nIdColor = mpToolBoxColor->GetItemId(UNO_SIDEBARCOLOR);
mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_ATTR_FILL_COLOR, nIdColor, mpToolBoxColor)), mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_ATTR_FILL_COLOR, nIdColor, mpToolBoxColor)),
...@@ -158,27 +158,6 @@ void AreaPropertyPanel::Initialize() ...@@ -158,27 +158,6 @@ void AreaPropertyPanel::Initialize()
maGradientRect = maGradientLinear; maGradientRect = maGradientLinear;
maGradientRect.SetGradientStyle(XGRAD_RECT); maGradientRect.SetGradientStyle(XGRAD_RECT);
Size aLogicalFillSize(MBOX_WIDTH,LISTBOX_HEIGHT);
Size aLogicalAttrSize(MBOX_WIDTH + 1,LISTBOX_HEIGHT);
Point aPoint(SECTIONPAGE_MARGIN_HORIZONTAL,SECTIONPAGE_MARGIN_VERTICAL_TOP + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL);
Point aPoint_Picker(SECTIONPAGE_MARGIN_HORIZONTAL + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL,SECTIONPAGE_MARGIN_VERTICAL_TOP + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL);
Size aTypeSize(LogicToPixel(aLogicalFillSize, MAP_APPFONT));
Size aAttrSize(LogicToPixel(aLogicalAttrSize, MAP_APPFONT));
Point aTypePoint(LogicToPixel(aPoint, MAP_APPFONT));
Point aAttrPoint(LogicToPixel(aPoint_Picker, MAP_APPFONT));
mpLbFillType->SetPosSizePixel(aTypePoint,aTypeSize);
mpLbFillAttr->SetPosSizePixel(aAttrPoint,aAttrSize);
mpLbFillType->SetHelpId(HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES);
mpLbFillAttr->SetHelpId(HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR);
mpLbFillType->SetQuickHelpText(msHelpFillType);
mpLbFillAttr->SetQuickHelpText(msHelpFillAttr);
mpLbFillType->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill"))); //wj acc mpLbFillType->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill"))); //wj acc
mpLbFillAttr->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill"))); //wj acc mpLbFillAttr->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill"))); //wj acc
...@@ -195,12 +174,6 @@ void AreaPropertyPanel::Initialize() ...@@ -195,12 +174,6 @@ void AreaPropertyPanel::Initialize()
mpToolBoxColor->SetItemBits( nIdColor, mpToolBoxColor->GetItemBits( nIdColor ) | TIB_DROPDOWNONLY ); mpToolBoxColor->SetItemBits( nIdColor, mpToolBoxColor->GetItemBits( nIdColor ) | TIB_DROPDOWNONLY );
mpToolBoxColor->SetItemText(nIdColor, msHelpFillAttr); mpToolBoxColor->SetItemText(nIdColor, msHelpFillAttr);
long aHeightLBStyle = mpLbFillType->GetSizePixel().getHeight();
long aLBPosY = mpLbFillType->GetPosPixel().getY();
long aHeightTBAttr = mpToolBoxColor->GetSizePixel().getHeight();
Point aPointTBAttr = mpToolBoxColor->GetPosPixel();
aPointTBAttr.setY( aLBPosY + aHeightLBStyle / 2 - aHeightTBAttr / 2);
aLink = LINK(this, AreaPropertyPanel, ToolBoxColorDropHdl); aLink = LINK(this, AreaPropertyPanel, ToolBoxColorDropHdl);
mpToolBoxColor->SetDropdownClickHdl ( aLink ); mpToolBoxColor->SetDropdownClickHdl ( aLink );
mpToolBoxColor->SetSelectHdl ( aLink ); mpToolBoxColor->SetSelectHdl ( aLink );
...@@ -221,19 +194,8 @@ void AreaPropertyPanel::Initialize() ...@@ -221,19 +194,8 @@ void AreaPropertyPanel::Initialize()
mpBTNGradient->SetItemImage(nIdGradient,maImgLinear); mpBTNGradient->SetItemImage(nIdGradient,maImgLinear);
mpBTNGradient->Hide(); mpBTNGradient->Hide();
long aHeightLBTrans = mpLBTransType->GetSizePixel().getHeight();
Point aPointLB = mpLBTransType->GetPosPixel();
long aPosY = aPointLB.getY();
Point aPointMetric = mpMTRTransparent->GetPosPixel();
Point aPointTB = mpMTRTransparent->GetPosPixel();
long aHeightMetric = mpMTRTransparent->GetSizePixel().getHeight();
long aHeightTool = mpBTNGradient->GetSizePixel().getHeight();
aPointMetric.setY(aPosY+aHeightLBTrans/2-aHeightMetric/2);
aPointTB.setY(aPosY+aHeightLBTrans/2-aHeightTool/2);
aPointTB.setX(aPointTB.getX()+3);
mpLbFillType->SetAccessibleRelationLabeledBy(mpColorTextFT); mpLbFillType->SetAccessibleRelationLabeledBy(mpColorTextFT);
mpLbFillAttr->SetAccessibleRelationLabeledBy(mpLbFillAttr.get()); mpLbFillAttr->SetAccessibleRelationLabeledBy(mpLbFillAttr);
mpToolBoxColor->SetAccessibleRelationLabeledBy(mpToolBoxColor); mpToolBoxColor->SetAccessibleRelationLabeledBy(mpToolBoxColor);
mpLBTransType->SetAccessibleRelationLabeledBy(mpTrspTextFT); mpLBTransType->SetAccessibleRelationLabeledBy(mpTrspTextFT);
mpMTRTransparent->SetAccessibleRelationLabeledBy(mpMTRTransparent); mpMTRTransparent->SetAccessibleRelationLabeledBy(mpMTRTransparent);
......
...@@ -99,14 +99,14 @@ private: ...@@ -99,14 +99,14 @@ private:
XGradient maGradientRect; XGradient maGradientRect;
//ui controls //ui controls
FixedText* mpColorTextFT; FixedText* mpColorTextFT;
::boost::scoped_ptr< SvxFillTypeBox > mpLbFillType; SvxFillTypeBox* mpLbFillType;
::boost::scoped_ptr< SvxFillAttrBox > mpLbFillAttr; SvxFillAttrBox* mpLbFillAttr;
ToolBox* mpToolBoxColor; // for new color picker ToolBox* mpToolBoxColor; // for new color picker
FixedText* mpTrspTextFT; FixedText* mpTrspTextFT;
ListBox* mpLBTransType; ListBox* mpLBTransType;
MetricField* mpMTRTransparent; MetricField* mpMTRTransparent;
ToolBox* mpBTNGradient; ToolBox* mpBTNGradient;
::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater; ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater;
......
...@@ -609,6 +609,11 @@ SvxFillTypeBox::SvxFillTypeBox( Window* pParent, WinBits nBits ) : ...@@ -609,6 +609,11 @@ SvxFillTypeBox::SvxFillTypeBox( Window* pParent, WinBits nBits ) :
Show(); Show();
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFillTypeBox(Window *pParent, VclBuilder::stringmap &)
{
return new SvxFillTypeBox(pParent);
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
SvxFillTypeBox::~SvxFillTypeBox() SvxFillTypeBox::~SvxFillTypeBox()
...@@ -697,6 +702,11 @@ SvxFillAttrBox::SvxFillAttrBox( Window* pParent, WinBits nBits ) : ...@@ -697,6 +702,11 @@ SvxFillAttrBox::SvxFillAttrBox( Window* pParent, WinBits nBits ) :
Show(); Show();
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFillAttrBox(Window *pParent, VclBuilder::stringmap &)
{
return new SvxFillAttrBox(pParent);
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
SvxFillAttrBox::~SvxFillAttrBox() SvxFillAttrBox::~SvxFillAttrBox()
......
This diff is collapsed.
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