diff options
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanel.cxx | 126 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanel.hrc | 2 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanel.hxx | 23 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanel.src | 21 |
4 files changed, 3 insertions, 169 deletions
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index 9ab67b106d18..63467d2f3209 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -38,7 +38,6 @@ #include <svx/svxitems.hrc> #include <vcl/toolbox.hxx> #include <svtools/toolbarmenu.hxx> -#include <svx/sidebar/ColorControl.hxx> #include <boost/bind.hpp> @@ -46,7 +45,6 @@ using namespace css; using namespace css::uno; using ::sfx2::sidebar::Theme; -const char UNO_SIDEBARCOLOR[] = ".uno:sidebarcolor"; const char UNO_SIDEBARGRADIENT[] = ".uno:sidebargradient"; namespace svx { namespace sidebar { @@ -65,7 +63,6 @@ AreaPropertyPanel::AreaPropertyPanel( SfxBindings* pBindings) : PanelLayout(pParent, "AreaPropertyPanel", "svx/ui/sidebararea.ui", rxFrame), meLastXFS(static_cast<sal_uInt16>(-1)), - maLastColor(Color(COL_DEFAULT_SHAPE_FILLING)), mnLastPosGradient(0), mnLastPosHatch(0), mnLastPosBitmap(0), @@ -86,7 +83,6 @@ AreaPropertyPanel::AreaPropertyPanel( maGradientControl(SID_ATTR_FILL_GRADIENT, *pBindings, *this), maHatchControl(SID_ATTR_FILL_HATCH, *pBindings, *this), maBitmapControl(SID_ATTR_FILL_BITMAP, *pBindings, *this), - maColorTableControl(SID_COLOR_TABLE, *pBindings, *this), maGradientListControl(SID_GRADIENT_LIST, *pBindings, *this), maHatchListControl(SID_HATCH_LIST, *pBindings, *this), maBitmapListControl(SID_BITMAP_LIST, *pBindings, *this), @@ -98,14 +94,11 @@ AreaPropertyPanel::AreaPropertyPanel( maImgRadial(SVX_RES(IMG_RADIAL)), maImgSquare(SVX_RES(IMG_SQUARE)), maImgLinear(SVX_RES(IMG_LINEAR)), - maImgColor(SVX_RES(IMG_AREA_COLOR)), maTrGrPopup(this, ::boost::bind(&AreaPropertyPanel::CreateTransparencyGradientControl, this, _1)), - maColorPopup(this, ::boost::bind(&AreaPropertyPanel::CreateColorPopupControl, this, _1)), mpFloatTransparenceItem(), mpTransparanceItem(), mxFrame(rxFrame), - mpBindings(pBindings), - mbColorAvail(true) + mpBindings(pBindings) { get(mpColorTextFT, "filllabel"); get(mpLbFillType, "fillstyle"); @@ -116,9 +109,6 @@ AreaPropertyPanel::AreaPropertyPanel( get(mpMTRTransparent, "settransparency"); get(mpBTNGradient, "selectgradient"); - const sal_uInt16 nIdColor = mpToolBoxColor->GetItemId(UNO_SIDEBARCOLOR); - mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_ATTR_FILL_COLOR, nIdColor, mpToolBoxColor)), - Initialize(); } @@ -164,18 +154,6 @@ void AreaPropertyPanel::Initialize() aLink = LINK( this, AreaPropertyPanel, SelectFillAttrHdl ); mpLbFillAttr->SetSelectHdl( aLink ); - //add for new color picker - mpLbFillAttr->Hide(); - const sal_uInt16 nIdColor = mpToolBoxColor->GetItemId(UNO_SIDEBARCOLOR); - mpToolBoxColor->SetItemImage(nIdColor, maImgColor); - mpToolBoxColor->SetItemBits( nIdColor, mpToolBoxColor->GetItemBits( nIdColor ) | ToolBoxItemBits::DROPDOWNONLY ); - mpToolBoxColor->SetItemText(nIdColor, msHelpFillAttr); - - aLink = LINK(this, AreaPropertyPanel, ToolBoxColorDropHdl); - mpToolBoxColor->SetDropdownClickHdl ( aLink ); - mpToolBoxColor->SetSelectHdl ( aLink ); - - //add end mpLBTransType->SetSelectHdl(LINK(this, AreaPropertyPanel, ChangeTrgrTypeHdl_Impl)); mpLBTransType->SetAccessibleName(OUString( "Transparency")); //wj acc @@ -237,7 +215,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) mpLbFillAttr->Hide(); mpToolBoxColor->Show(); const OUString aTmpStr; - const Color aColor = maLastColor; + const Color aColor = mpColorItem->GetColorValue(); const XFillColorItem aXFillColorItem( aTmpStr, aColor ); // #i122676# change FillStyle and Color in one call @@ -504,41 +482,6 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox ) } -IMPL_LINK(AreaPropertyPanel, ToolBoxColorDropHdl, ToolBox*, pToolBox) -{ - const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId())); - - if(UNO_SIDEBARCOLOR == aCommand) - { - maColorPopup.Show(*pToolBox); - - if (mpColorItem) - { - maColorPopup.SetCurrentColor(mpColorItem->GetColorValue(), mbColorAvail); - } - else - { - maColorPopup.SetCurrentColor(COL_WHITE, false); - } - } - - return 0; -} - - - -void AreaPropertyPanel::SetColor ( - const OUString& rsColorName, - const Color aColor) -{ - const XFillColorItem aXFillColorItem(rsColorName, aColor); - mpBindings->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SfxCallMode::RECORD, &aXFillColorItem, 0L); - maLastColor = aColor; -} - - - - PopupControl* AreaPropertyPanel::CreateTransparencyGradientControl (PopupContainer* pParent) { return new AreaTransparencyGradientControl(pParent, *this); @@ -547,22 +490,6 @@ PopupControl* AreaPropertyPanel::CreateTransparencyGradientControl (PopupContain -PopupControl* AreaPropertyPanel::CreateColorPopupControl (PopupContainer* pParent) -{ - return new ColorControl( - pParent, - mpBindings, - SVX_RES(RID_POPUPPANEL_AERAPAGE_COLOR), - SVX_RES(VS_COLOR), - ::boost::bind(&AreaPropertyPanel::GetLastColor, this), - ::boost::bind(&AreaPropertyPanel::SetColor, this, _1,_2), - pParent, - 0); -} - - - - void AreaPropertyPanel::SetupIcons(void) { if(Theme::GetBoolean(Theme::Bool_UseSymphonyIcons)) @@ -857,24 +784,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Hide(); mpToolBoxColor->Show(); - if(SfxItemState::DEFAULT == eState) - { - mpToolBoxColor->Enable(); - mbColorAvail = true; - // maLastColor = mpColorItem->GetColorValue(); - Update(); - } - else if(SfxItemState::DISABLED == eState) - { - mpToolBoxColor->Disable(); - mbColorAvail = false; - mpColorUpdater->Update(COL_WHITE); - } - else - { - mbColorAvail = false; - mpColorUpdater->Update(COL_WHITE); - } + Update(); } break; } @@ -965,31 +875,6 @@ void AreaPropertyPanel::NotifyItemUpdate( } break; } - case SID_COLOR_TABLE: - { - if(SfxItemState::DEFAULT == eState) - { - if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) - { - if(mpColorItem) - { - const Color aColor = mpColorItem->GetColorValue(); - const SfxObjectShell* pSh = SfxObjectShell::Current(); - const SvxColorListItem aItem(*static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE))); - - mpLbFillAttr->Clear(); - mpLbFillAttr->Enable(); - mpLbFillAttr->Fill(aItem.GetColorList()); - mpLbFillAttr->SelectEntry(aColor); - } - else - { - mpLbFillAttr->SetNoSelection(); - } - } - } - break; - } case SID_GRADIENT_LIST: { if(SfxItemState::DEFAULT == eState) @@ -1094,11 +979,6 @@ void AreaPropertyPanel::Update() { mpLbFillAttr->Hide(); mpToolBoxColor->Show(); - mpColorUpdater->Update(mpColorItem->GetColorValue()); - } - else - { - mpColorUpdater->Update(COL_WHITE); } break; } diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hrc b/svx/source/sidebar/area/AreaPropertyPanel.hrc index c50783b4c5cb..d627b637d923 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.hrc +++ b/svx/source/sidebar/area/AreaPropertyPanel.hrc @@ -22,8 +22,6 @@ #define TBI_LEFT 1 #define TBI_RIGHT 1 -#define VS_COLOR 1 - #define FT_TRGR_CENTER_X 9 #define MTR_TRGR_CENTER_X 10 #define FT_TRGR_CENTER_Y 11 diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx index 0d3540f6e21d..3bc035358ca7 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.hxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx @@ -19,7 +19,6 @@ #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANEL_HXX #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANEL_HXX -#include <svx/sidebar/ColorPopup.hxx> #include "AreaTransparencyGradientPopup.hxx" #include <vcl/ctrl.hxx> #include <sfx2/sidebar/SidebarPanelBase.hxx> @@ -37,13 +36,11 @@ #include <vcl/field.hxx> #include <vcl/fixed.hxx> #include <svl/intitem.hxx> -#include <svx/tbxcolorupdate.hxx> #include <com/sun/star/ui/XUIElement.hpp> #include <boost/scoped_ptr.hpp> class XFillFloatTransparenceItem; -namespace svx { class ToolboxButtonColorUpdater; } namespace svx { namespace sidebar { @@ -85,7 +82,6 @@ public: private: sal_uInt16 meLastXFS; - Color maLastColor; sal_Int32 mnLastPosGradient; sal_Int32 mnLastPosHatch; @@ -109,8 +105,6 @@ private: MetricField* mpMTRTransparent; ToolBox* mpBTNGradient; - ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater; - ::boost::scoped_ptr< XFillStyleItem > mpStyleItem; ::boost::scoped_ptr< XFillColorItem > mpColorItem; ::boost::scoped_ptr< XFillGradientItem > mpFillGradientItem; @@ -122,7 +116,6 @@ private: ::sfx2::sidebar::ControllerItem maGradientControl; ::sfx2::sidebar::ControllerItem maHatchControl; ::sfx2::sidebar::ControllerItem maBitmapControl; - ::sfx2::sidebar::ControllerItem maColorTableControl; ::sfx2::sidebar::ControllerItem maGradientListControl; ::sfx2::sidebar::ControllerItem maHatchListControl; ::sfx2::sidebar::ControllerItem maBitmapListControl; @@ -135,12 +128,8 @@ private: Image maImgRadial; Image maImgSquare; Image maImgLinear; - Image maImgColor; - - OUString msHelpFillAttr; AreaTransparencyGradientPopup maTrGrPopup; - ColorPopup maColorPopup; ::boost::scoped_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem; ::boost::scoped_ptr< SfxUInt16Item > mpTransparanceItem; @@ -148,9 +137,6 @@ private: css::uno::Reference<css::frame::XFrame> mxFrame; SfxBindings* mpBindings; - /// bitfield - bool mbColorAvail : 1; - DECL_LINK(SelectFillTypeHdl, ListBox* ); DECL_LINK(SelectFillAttrHdl, ListBox* ); DECL_LINK(ChangeTrgrTypeHdl_Impl, void*); @@ -160,10 +146,6 @@ private: PopupControl* CreateTransparencyGradientControl (PopupContainer* pParent); DECL_LINK( ClickTrGrHdl_Impl, ToolBox* ); - // for color picker - PopupControl* CreateColorPopupControl (PopupContainer* pParent); - DECL_LINK(ToolBoxColorDropHdl, ToolBox *); //for new color picker - // constructor/destuctor AreaPropertyPanel( vcl::Window* pParent, @@ -175,11 +157,6 @@ private: void Initialize(); void Update(); void ImpUpdateTransparencies(); - - const Color& GetLastColor (void) const { return maLastColor;} - void SetColor ( - const OUString& rsColorName, - const Color aColor); }; diff --git a/svx/source/sidebar/area/AreaPropertyPanel.src b/svx/source/sidebar/area/AreaPropertyPanel.src index bc7a16134e0e..4dea34cbee45 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.src +++ b/svx/source/sidebar/area/AreaPropertyPanel.src @@ -45,10 +45,6 @@ Image IMG_LINEAR { ImageBitmap = Bitmap{File = "symphony/linear.png";}; }; -Image IMG_AREA_COLOR -{ - ImageBitmap = Bitmap{File = "symphony/fill_color.png";}; -}; Image IMG_ROT_LEFT { ImageBitmap = Bitmap{File = "symphony/rotate_left.png";}; @@ -236,22 +232,5 @@ Control RID_POPUPPANEL_AREAPAGE_TRGR Text [ en-US ] = "Rotate clockwise by 45 degrees." ; }; }; -Control RID_POPUPPANEL_AERAPAGE_COLOR -{ - OutputSize = TRUE; - DialogControl = TRUE; - Border = FALSE; - Size = MAP_APPFONT( POPUP_COLOR_PICKER_WIDTH , POPUP_COLOR_PICKER_HEIGHT ); - - Control VS_COLOR - { - HelpID = HID_PPROPERTYPANEL_AREA_COLOR_VS; - Hide = TRUE ; - Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y ); - Size = MAP_APPFONT ( POPUP_COLOR_PICKER_WIDTH - OFFSET_X * 2, POPUP_COLOR_PICKER_HEIGHT - OFFSET_Y * 2); - TabStop = TRUE ; - Text = "Color"; - }; -}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |