You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/03/05 13:17:10 UTC

svn commit: r1452760 [1/5] - in /openoffice/branches/sidebar/main: default_images/sfx2/res/symphony/ officecfg/registry/data/org/openoffice/Office/UI/ sd/source/ui/sidebar/ sfx2/inc/sfx2/sidebar/ sfx2/source/sidebar/ svx/ svx/inc/sidebar/ svx/inc/svx/s...

Author: af
Date: Tue Mar  5 12:17:09 2013
New Revision: 1452760

URL: http://svn.apache.org/r1452760
Log:
i121420: Fixed some crashes. Reorganized svx/source/sidebar directory structure.  Added svx::sidebar::Popup.

Added:
    openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock04_sd.png   (with props)
    openoffice/branches/sidebar/main/svx/inc/sidebar/ColorControl.hxx
    openoffice/branches/sidebar/main/svx/inc/sidebar/ColorPopup.hxx
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/Popup.hxx
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupContainer.hxx
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupControl.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/area/
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.hrc
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.src
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaTransparencyGradientPopup.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/graphic/
    openoffice/branches/sidebar/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hrc
    openoffice/branches/sidebar/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/graphic/GraphicPropertyPanel.src
    openoffice/branches/sidebar/main/svx/source/sidebar/line/
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LinePropertyPanel.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LinePropertyPanel.hrc
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LinePropertyPanel.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LinePropertyPanel.src
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineStyleControl.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineStyleControl.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineStylePopup.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineStylePopup.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineStyleValueSet.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineStyleValueSet.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineWidthControl.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineWidthControl.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineWidthPopup.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineWidthPopup.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineWidthValueSet.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/line/LineWidthValueSet.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/ColorControl.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/ColorPopup.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/PopupContainer.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/PopupControl.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/transform/
    openoffice/branches/sidebar/main/svx/source/sidebar/transform/TransformationPropertyPanel.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/transform/TransformationPropertyPanel.hrc
    openoffice/branches/sidebar/main/svx/source/sidebar/transform/TransformationPropertyPanel.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/transform/TransformationPropertyPanel.src
Removed:
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PropertyPanelTools.hxx
    openoffice/branches/sidebar/main/svx/source/sidebar/geometry/
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/PropertyPanelTools.cxx
Modified:
    openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
    openoffice/branches/sidebar/main/sd/source/ui/sidebar/LayoutMenu.cxx
    openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx
    openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.cxx
    openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk
    openoffice/branches/sidebar/main/svx/Library_svx.mk
    openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx
    openoffice/branches/sidebar/main/svx/source/tbxctrls/tbxcolorupdate.cxx

Added: openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock04_sd.png
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock04_sd.png?rev=1452760&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock04_sd.png
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock04_sd.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
Binary files - no diff available.

Modified: openoffice/branches/sidebar/main/sd/source/ui/sidebar/LayoutMenu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/sidebar/LayoutMenu.cxx?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/sidebar/LayoutMenu.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/sidebar/LayoutMenu.cxx Tue Mar  5 12:17:09 2013
@@ -42,6 +42,7 @@
 #include "EventMultiplexer.hxx"
 #include "SlideSorterViewShell.hxx"
 #include "ViewShellBase.hxx"
+#include <sfx2/sidebar/Theme.hxx>
 
 #include <comphelper/processfactory.hxx>
 #include <sfx2/app.hxx>
@@ -149,6 +150,11 @@ LayoutMenu::LayoutMenu (
 {
     implConstruct( *mrBase.GetDocument()->GetDocSh() );
     OSL_TRACE("created LayoutMenu at %x", this);
+
+    SetStyle(GetStyle() | WB_ITEMBORDER | WB_FLATVALUESET | WB_TABSTOP);
+
+    SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground));
+    SetColor(sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_PanelBackground));
     
 #ifdef DEBUG
     SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sd:LayoutMenu")));
@@ -167,6 +173,7 @@ void LayoutMenu::implConstruct( DrawDocS
 	SetStyle (
         ( GetStyle()  & ~(WB_ITEMBORDER) )
         | WB_TABSTOP
+        | WB_MENUSTYLEVALUESET
         | WB_NO_DIRECTSELECT
         );
     if (mbUseOwnScrollBar)
@@ -392,16 +399,12 @@ void LayoutMenu::UpdateEnabledState (con
 
 void LayoutMenu::Paint (const Rectangle& rRect)
 {
-	SetBackground (GetSettings().GetStyleSettings().GetWindowColor());
-
     if (mbSelectionUpdatePending)
     {
         mbSelectionUpdatePending = false;
         UpdateSelection();
     }
     ValueSet::Paint (rRect);
-
-	SetBackground (Wallpaper());
 }
 
 
@@ -456,26 +459,6 @@ void LayoutMenu::MouseButtonDown (const 
 
 
 
-/*
-void LayoutMenu::GetState (SfxItemSet& rItemSet)
-{
-    // Cut and paste is not supported.  The SID_(CUT,COPY,PASTE) entries
-    // therefore must not show up in the context menu.
-    rItemSet.DisableItem (SID_CUT);
-    rItemSet.DisableItem (SID_COPY);
-    rItemSet.DisableItem (SID_PASTE);
-
-    // The SID_INSERTPAGE_LAYOUT_MENU slot depends on the SID_INSERTPAGE
-    // slot being supported elsewhere.
-    const SfxPoolItem* pItem = NULL;
-    const SfxItemState aState (
-        mrBase.GetViewFrame()->GetDispatcher()->QueryState(SID_INSERTPAGE, pItem));
-    if (aState == SFX_ITEM_DISABLED)
-        rItemSet.DisableItem(SID_INSERTPAGE_LAYOUT_MENU);
-}
-*/
-
-
 
 void LayoutMenu::InsertPageWithLayout (AutoLayout aLayout)
 {
@@ -509,10 +492,6 @@ void LayoutMenu::InsertPageWithLayout (A
 
 void LayoutMenu::InvalidateContent (void)
 {
-    // The number of items may have changed.  Request a resize so that the
-    // vertical size of this control can be adapted.
-    //    RequestResize();
-
     // Throw away the current set and fill the menu anew according to the
     // current settings (this includes the support for vertical writing.)
     Fill();
@@ -994,6 +973,8 @@ void LayoutMenu::DataChanged (const Data
 {
     Fill();
     ValueSet::DataChanged(rEvent);
+    SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground));
+    SetColor(sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_PanelBackground));
 }
 
 

Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx Tue Mar  5 12:17:09 2013
@@ -88,6 +88,7 @@ public:
         Color_PanelTitleFont,
         Color_TabMenuSeparator,
         Color_TabItemBorder,
+        Color_DropDownBorder,
 
         __Color_Paint,
         
@@ -104,6 +105,7 @@ public:
         Paint_ToolBoxBorderTopLeft,
         Paint_ToolBoxBorderCenterCorners,
         Paint_ToolBoxBorderBottomRight,
+        Paint_DropDownBackground,
 
         __Paint_Int,
         

Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.cxx?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.cxx Tue Mar  5 12:17:09 2013
@@ -98,10 +98,13 @@ Image Theme::GetImage (const ThemeItem e
 Color Theme::GetColor (const ThemeItem eItem)
 {
     const PropertyType eType (GetPropertyType(eItem));
-    OSL_ASSERT(eType==PT_Color);
+    OSL_ASSERT(eType==PT_Color || eType==PT_Paint);
     const sal_Int32 nIndex (GetIndex(eItem, eType));
     const Theme& rTheme (GetCurrentTheme());
-    return rTheme.maColors[nIndex];
+    if (eType == PT_Color)
+        return rTheme.maColors[nIndex];
+    else if (eType == PT_Paint)
+        return rTheme.maPaints[nIndex].GetColor();
 }
 
 
@@ -213,19 +216,19 @@ void Theme::UpdateTheme (void)
 
 #define Alternatives(n,hc,sys) (mbIsHighContrastMode ? hc : (bUseSystemColors ? sys : n))
 
+        const Color aBaseBackgroundColor (rStyle.GetDialogColor());
+        Color aBorderColor (aBaseBackgroundColor);
+        aBorderColor.DecreaseLuminance(15);
+        Color aSecondColor (aBaseBackgroundColor);
+        aSecondColor.DecreaseLuminance(15);
+        
         setPropertyValue(
             maPropertyIdToNameMap[Paint_DeckBackground],
-            Any(sal_Int32(Alternatives(
-                        0xf0f0f0,
-                        0x000000,
-                        rStyle.GetDialogColor().GetRGBColor()))));
+            Any(sal_Int32(rStyle.GetMenuColor().GetRGBColor())));
 
         setPropertyValue(
             maPropertyIdToNameMap[Paint_DeckTitleBarBackground],
-            Any(sal_Int32(Alternatives(
-                        0xf0f0f0,
-                        0x000000,
-                        rStyle.GetDialogColor().GetRGBColor()))));
+            Any(sal_Int32(aBaseBackgroundColor.GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Int_DeckLeftPadding],
             Any(sal_Int32(2)));
@@ -246,10 +249,7 @@ void Theme::UpdateTheme (void)
             Any(sal_Int32(1)));
         setPropertyValue(
             maPropertyIdToNameMap[Color_DeckTitleFont],
-            Any(sal_Int32(Alternatives(
-                        0x262626,
-                        0x00ff00,
-                        rStyle.GetDialogTextColor().GetRGBColor()))));
+            Any(sal_Int32(rStyle.GetFontColor().GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Int_DeckTitleBarHeight],
             Any(sal_Int32(Alternatives(
@@ -258,10 +258,17 @@ void Theme::UpdateTheme (void)
                         rStyle.GetFloatTitleHeight()))));
         setPropertyValue(
             maPropertyIdToNameMap[Paint_PanelBackground],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x000000 : 0xffffff)));
+            Any(sal_Int32(rStyle.GetDialogColor().GetRGBColor())));
+        //            Any(sal_Int32(mbIsHighContrastMode ? 0x000000 :
+        //            0xffffff)));
+        
         setPropertyValue(
             maPropertyIdToNameMap[Paint_PanelTitleBarBackground],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x000000 : 0xb2b2b2)));
+            Any(Tools::VclToAwtGradient(Gradient(
+                        GRADIENT_LINEAR,
+                        aSecondColor.GetRGBColor(),
+                        aBaseBackgroundColor.GetRGBColor()
+                        ))));
         setPropertyValue(
             maPropertyIdToNameMap[Color_PanelTitleFont],
             Any(sal_Int32(mbIsHighContrastMode ? 0x00ff00 : 0x262626)));
@@ -273,7 +280,7 @@ void Theme::UpdateTheme (void)
                         rStyle.GetTitleHeight()))));
         setPropertyValue(
             maPropertyIdToNameMap[Paint_TabBarBackground],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x000000 : 0xf0f0f0)));
+            Any(sal_Int32(aBaseBackgroundColor.GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Int_TabBarLeftPadding],
             Any(sal_Int32(2)));
@@ -292,7 +299,7 @@ void Theme::UpdateTheme (void)
             Any(sal_Int32(6)));
         setPropertyValue(
             maPropertyIdToNameMap[Color_TabMenuSeparator],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x00ff00 : 0xbfbfbf)));
+            Any(sal_Int32(aBorderColor.GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Int_TabMenuSeparatorPadding],
             Any(sal_Int32(7)));
@@ -305,20 +312,32 @@ void Theme::UpdateTheme (void)
             Any(sal_Int32(32)));
         setPropertyValue(
             maPropertyIdToNameMap[Color_TabItemBorder],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x00ff00 : 0xbfbfbf)));
+            Any(sal_Int32(rStyle.GetActiveBorderColor().GetRGBColor())));
+        //                    mbIsHighContrastMode ? 0x00ff00 : 0xbfbfbf)));
+
+        setPropertyValue(
+            maPropertyIdToNameMap[Paint_DropDownBackground],
+            Any(sal_Int32(aBaseBackgroundColor.GetRGBColor())));
+        setPropertyValue(
+            maPropertyIdToNameMap[Color_DropDownBorder],
+            Any(sal_Int32(rStyle.GetActiveBorderColor().GetRGBColor())));
+
         setPropertyValue(
             maPropertyIdToNameMap[Paint_TabItemBackgroundNormal],
             Any());
         setPropertyValue(
             maPropertyIdToNameMap[Paint_TabItemBackgroundHighlight],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x000000 : 0x00ffffff)));
+            Any(sal_Int32(rStyle.GetActiveTabColor().GetRGBColor())));
+        //                    mbIsHighContrastMode ? 0x000000 : 0x00ffffff)));
 
         setPropertyValue(
             maPropertyIdToNameMap[Paint_HorizontalBorder],
-            Any(sal_Int32(mbIsHighContrastMode ? 0xff00ff00 : 0xd9d9d9)));
+            Any(sal_Int32(aBorderColor.GetRGBColor())));
+        //                    mbIsHighContrastMode ? 0x00ff00 :  0xe4e4e4)));
         setPropertyValue(
             maPropertyIdToNameMap[Paint_VerticalBorder],
-            Any(sal_Int32(mbIsHighContrastMode ? 0xff00ff00 : 0xd9d9d9)));
+            Any(sal_Int32(aBorderColor.GetRGBColor())));
+        //                    mbIsHighContrastMode ? 0x00ff00 : 0xe4e4e4)));
 
         setPropertyValue(
             maPropertyIdToNameMap[Image_Grip],
@@ -363,6 +382,34 @@ void Theme::UpdateTheme (void)
                 A2S("private:graphicrepository/sfx2/res/separator.png")));
 
         // ToolBox
+
+        /*
+        // Separator style
+        setPropertyValue(
+            maPropertyIdToNameMap[Paint_ToolBoxBackground],
+            Any(sal_Int32(rStyle.GetMenuColor().GetRGBColor())));
+        setPropertyValue(
+            maPropertyIdToNameMap[Paint_ToolBoxBorderTopLeft],
+            Any());
+        setPropertyValue(
+            maPropertyIdToNameMap[Paint_ToolBoxBorderCenterCorners],
+            Any());
+        setPropertyValue(
+            maPropertyIdToNameMap[Paint_ToolBoxBorderBottomRight],
+            Any());
+        setPropertyValue(
+            maPropertyIdToNameMap[Rect_ToolBoxPadding],
+            Any(awt::Rectangle(2,2,2,2)));
+        setPropertyValue(
+            maPropertyIdToNameMap[Rect_ToolBoxBorder],
+            Any(awt::Rectangle(0,0,0,0)));
+        setPropertyValue(
+            maPropertyIdToNameMap[Bool_UseToolBoxItemSeparator],
+            Any(true));
+
+        */
+
+        // Gradient style
         setPropertyValue(
             maPropertyIdToNameMap[Paint_ToolBoxBackground],
             Any(Tools::VclToAwtGradient(Gradient(
@@ -751,6 +798,7 @@ void Theme::SetupPropertyMaps (void)
     AddEntry(Color_PanelTitleFont);
     AddEntry(Color_TabMenuSeparator);
     AddEntry(Color_TabItemBorder);
+    AddEntry(Color_DropDownBorder);
 
     AddEntry(Paint_DeckBackground);
     AddEntry(Paint_DeckTitleBarBackground);
@@ -765,6 +813,7 @@ void Theme::SetupPropertyMaps (void)
     AddEntry(Paint_ToolBoxBorderTopLeft);
     AddEntry(Paint_ToolBoxBorderCenterCorners);
     AddEntry(Paint_ToolBoxBorderBottomRight);
+    AddEntry(Paint_DropDownBackground);
 
     AddEntry(Int_DeckTitleBarHeight);
     AddEntry(Int_DeckBorderSize);
@@ -816,6 +865,7 @@ Theme::PropertyType Theme::GetPropertyTy
         case Color_PanelTitleFont:
         case Color_TabMenuSeparator:
         case Color_TabItemBorder:
+        case Color_DropDownBorder:
             return PT_Color;
 
         case Paint_DeckBackground:
@@ -831,6 +881,7 @@ Theme::PropertyType Theme::GetPropertyTy
         case Paint_ToolBoxBorderTopLeft:
         case Paint_ToolBoxBorderCenterCorners:
         case Paint_ToolBoxBorderBottomRight:
+        case Paint_DropDownBackground:
             return PT_Paint;
 
         case Int_DeckTitleBarHeight:

Modified: openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk (original)
+++ openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk Tue Mar  5 12:17:09 2013
@@ -77,10 +77,10 @@ $(eval $(call gb_SrsTarget_add_files,svx
     svx/source/items/svxerr.src \
     svx/source/items/svxitems.src \
     svx/source/mnuctrls/mnuctrls.src \
-    svx/source/sidebar/geometry/AreaPropertyPanel.src \
-    svx/source/sidebar/geometry/GraphicPropertyPanel.src \
-    svx/source/sidebar/geometry/LinePropertyPanel.src \
-    svx/source/sidebar/geometry/TransformationPropertyPanel.src \
+    svx/source/sidebar/area/AreaPropertyPanel.src \
+    svx/source/sidebar/graphic/GraphicPropertyPanel.src \
+    svx/source/sidebar/line/LinePropertyPanel.src \
+    svx/source/sidebar/transform/TransformationPropertyPanel.src \
     svx/source/sidebar/text/TextPropertyPanel.src \
     svx/source/stbctrls/stbctrls.src \
     svx/source/svdraw/svdstr.src \

Modified: openoffice/branches/sidebar/main/svx/Library_svx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/Library_svx.mk?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/Library_svx.mk (original)
+++ openoffice/branches/sidebar/main/svx/Library_svx.mk Tue Mar  5 12:17:09 2013
@@ -174,11 +174,23 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/sidebar/ColorPanel \
     svx/source/sidebar/text/SvxSBFontNameBox \
     svx/source/sidebar/text/TextPropertyPanel \
-    svx/source/sidebar/geometry/AreaPropertyPanel \
-    svx/source/sidebar/geometry/GraphicPropertyPanel \
-    svx/source/sidebar/geometry/LinePropertyPanel \
-    svx/source/sidebar/geometry/TransformationPropertyPanel \
-    svx/source/sidebar/tools/PropertyPanelTools \
+    svx/source/sidebar/area/AreaPropertyPanel \
+    svx/source/sidebar/area/AreaTransparencyGradientControl \
+    svx/source/sidebar/area/AreaTransparencyGradientPopup \
+    svx/source/sidebar/graphic/GraphicPropertyPanel \
+    svx/source/sidebar/line/LinePropertyPanel \
+    svx/source/sidebar/line/LineStyleControl \
+    svx/source/sidebar/line/LineStyleValueSet \
+    svx/source/sidebar/line/LineStylePopup \
+    svx/source/sidebar/line/LineWidthControl \
+    svx/source/sidebar/line/LineWidthValueSet \
+    svx/source/sidebar/line/LineWidthPopup \
+    svx/source/sidebar/transform/TransformationPropertyPanel \
+    svx/source/sidebar/tools/ColorControl \
+    svx/source/sidebar/tools/ColorPopup \
+    svx/source/sidebar/tools/PopupControl \
+    svx/source/sidebar/tools/PopupContainer \
+    svx/source/sidebar/tools/Popup \
     svx/source/stbctrls/pszctrl \
     svx/source/stbctrls/insctrl \
     svx/source/stbctrls/selctrl \

Added: openoffice/branches/sidebar/main/svx/inc/sidebar/ColorControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/sidebar/ColorControl.hxx?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/sidebar/ColorControl.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/sidebar/ColorControl.hxx Tue Mar  5 12:17:09 2013
@@ -0,0 +1,85 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "svx/sidebar/PopupControl.hxx"
+
+#include <svtools/valueset.hxx>
+#include <boost/function.hpp>
+
+class Window;
+class SfxBindings;
+class RedId;
+class FloatingWindow;
+
+
+namespace svx { namespace sidebar {
+
+/** The ColorControl uses a ValueSet control for displaying all named
+    colors in a matrix.
+*/
+class ColorControl
+    : public PopupControl
+{
+public:
+    /** Create a new ColorControl object.
+        @param rControlResId
+            The resource id for the whole color control.
+        @param rColorGetter
+            A functor for setting the (default/preselected) color.
+        @param rColorSetter
+            A functor for setting the color that is selected by the
+            user.
+        @param nNoColorString
+            Resource id of an optional string for the "no color"
+            string.  When a value larger than zero is given then a
+            field/button is created above the color matrix for
+            selecting "no color" ie. transparent.
+            When zero is given then no such field is created.            
+    */
+	ColorControl (
+        Window* pParent,
+        SfxBindings* pBindings,
+        const ResId& rControlResId,
+        const ResId& rValueSetResId,
+        const ::boost::function<Color(void)>& rColorGetter,
+        const ::boost::function<void(String&,Color)>& rColorSetter,
+        FloatingWindow* pFloatingWindow,
+        const sal_uInt32 nNoColorString);
+    virtual ~ColorControl (void);
+    
+	void GetFocus (void);
+	void SetCurColorSelect (
+        const Color aCol,
+        const bool bAvl);
+
+private:	
+	SfxBindings* mpBindings;
+	ValueSet maVSColor;
+    FloatingWindow* mpFloatingWindow;
+    const String msNoColorString;
+    ::boost::function<Color(void)> maColorGetter;
+    ::boost::function<void(String&,Color)> maColorSetter;
+
+	void FillColors (void);
+	DECL_LINK(VSSelectHdl, void *);
+};
+
+} } // end of namespace svx::sidebar

Added: openoffice/branches/sidebar/main/svx/inc/sidebar/ColorPopup.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/sidebar/ColorPopup.hxx?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/sidebar/ColorPopup.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/sidebar/ColorPopup.hxx Tue Mar  5 12:17:09 2013
@@ -0,0 +1,55 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_COLOR_POPUP_HXX_
+#define _SVX_SIDEBAR_COLOR_POPUP_HXX_
+
+#include "svx/sidebar/Popup.hxx"
+
+#include <tools/color.hxx>
+
+
+namespace svx { namespace sidebar {
+
+/** Popup control that displays all named colors in a matrix.
+    The number of rows and columns of the matrix are computed from
+    the number of named colors so that both have roughly the same
+    value.
+    
+    The ColorPopup uses ColorControl as control for its content.
+*/
+class ColorPopup
+    : public Popup
+{
+public :
+    ColorPopup (
+        Window* pParent,
+        const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator);
+    virtual ~ColorPopup (void);
+
+    void SetCurrentColor (
+        const Color aCurrentColor,
+        const bool bIsColorAvailable);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif

Added: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/Popup.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/sidebar/Popup.hxx?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/sidebar/Popup.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/svx/sidebar/Popup.hxx Tue Mar  5 12:17:09 2013
@@ -0,0 +1,107 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_POPUP_HXX_
+#define _SVX_SIDEBAR_POPUP_HXX_
+
+#include "svx/svxdllapi.h"
+#include <rtl/ustring.hxx>
+#include <tools/link.hxx>
+
+#include <boost/function.hpp>
+#include <boost/scoped_ptr.hpp>
+
+class Window;
+class ToolBox;
+
+namespace svx { namespace sidebar {
+
+class PopupContainer;
+class PopupControl;
+
+/** A wrapper around a PopupContainer and a PopupControl object.
+    Usually used as drop down for a toolbox.  Use Show() to start
+    drop down mode and Hide() to end it.
+*/
+class SVX_DLLPUBLIC Popup
+{
+public :
+    /** Create a Popup wrapper object.
+        @param pParent
+            Parent window of the PopupContainer, which in turn is the
+            parent of the PopupControl.
+        @param rControlCreator
+            A functor that is called to create the PopupControl object
+            (usually an instance of a class derived from
+            PopupControl).
+    */
+    Popup (
+        Window* pParent,
+        const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator,
+        const ::rtl::OUString& rsAccessibleName);
+    virtual ~Popup (void);
+
+    /** Show the popup.
+        @rToolBox
+            The tool box is used to determine the position at which
+            the popup is displayed.
+    */
+    void Show (ToolBox& rToolBox);
+
+    /** Hide the popup.
+        This method is called automatically when eg. the user clicks
+        outside the popup or when the ESC-key is pressed.  The
+        application can call Hide() when the popup should be closed
+        for other, non-standard reasons.
+    */
+    void Hide (void);
+    
+    /** If you want to be informed when the popup closes then add a
+        callback that is called after that.
+    */
+    void SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback);
+    
+protected:    
+    ::boost::scoped_ptr<PopupControl> mpControl;
+
+    /** Make sure that both PopupContainer and PopupControl objects
+        exist.  Calls the maControlCreator functor if necessary.
+    */
+    void ProvideContainerAndControl (void);
+
+    /** A derived specialisation class can override this method to do
+        additional work.
+    */
+    virtual void CreateContainerAndControl (void);
+
+private:
+    Window* mpParent;
+    ::boost::function<PopupControl*(PopupContainer*)> maControlCreator;
+    ::boost::function<void(void)> maPopupModeEndCallback;
+    const ::rtl::OUString msAccessibleName;
+    ::boost::scoped_ptr<PopupContainer> mpContainer;
+
+    DECL_LINK(PopupModeEndHandler, void*);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif

Added: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupContainer.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupContainer.hxx?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupContainer.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupContainer.hxx Tue Mar  5 12:17:09 2013
@@ -0,0 +1,48 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_POPUP_CONTAINER_HXX_
+#define _SVX_SIDEBAR_POPUP_CONTAINER_HXX_
+
+#include "svx/svxdllapi.h"
+#include <vcl/floatwin.hxx>
+
+namespace svx { namespace sidebar {
+
+/** Simple base class for popup container windows used by sidebar
+    related drop downs.
+    It initializes the underlying floating window with the right
+    flags and closes the drop down when appropriate.
+*/
+class SVX_DLLPUBLIC PopupContainer
+    : public FloatingWindow
+{
+public:
+    PopupContainer (Window* pParent);
+    virtual ~PopupContainer (void);
+
+    virtual long Notify (NotifyEvent& rNEvt);
+};
+
+
+} } // end of namespace svx::sidebar
+
+#endif

Added: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupControl.hxx?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupControl.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/svx/sidebar/PopupControl.hxx Tue Mar  5 12:17:09 2013
@@ -0,0 +1,51 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_POPUP_CONTROL_HXX_
+#define _SVX_SIDEBAR_POPUP_CONTROL_HXX_
+
+#include "svx/svxdllapi.h"
+#include <vcl/ctrl.hxx>
+
+namespace svx { namespace sidebar {
+
+/** Base class for sidebar related popup controls.
+    A PopupControl is typically a child of a PopupContainer and
+    provides the actual content of a popup.
+    This base class takes care of painting the proper background and
+    border for sidebar popups.
+    Specialize by derivation.
+*/
+class SVX_DLLPUBLIC PopupControl
+    : public Control
+{
+public :
+    PopupControl (
+        Window* pParent,
+        const ResId& rResId);
+    virtual ~PopupControl (void);
+
+    virtual void Paint (const Rectangle& rect);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif

Modified: openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx?rev=1452760&r1=1452759&r2=1452760&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx Tue Mar  5 12:17:09 2013
@@ -22,10 +22,10 @@
 #include "sidebar/PanelFactory.hxx"
 
 #include "text/TextPropertyPanel.hxx"
-#include "geometry/AreaPropertyPanel.hxx"
-#include "geometry/GraphicPropertyPanel.hxx"
-#include "geometry/LinePropertyPanel.hxx"
-#include "geometry/TransformationPropertyPanel.hxx"
+#include "area/AreaPropertyPanel.hxx"
+#include "graphic/GraphicPropertyPanel.hxx"
+#include "line/LinePropertyPanel.hxx"
+#include "transform/TransformationPropertyPanel.hxx"
 #include "gallery/GalleryControl.hxx"
 #include "ColorPanel.hxx"
 #include <sfx2/sidebar/SidebarPanelBase.hxx>

Added: openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.cxx?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.cxx Tue Mar  5 12:17:09 2013
@@ -0,0 +1,1396 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "svx/sidebar/PopupContainer.hxx"
+#include "AreaTransparencyGradientControl.hxx"
+
+#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/Theme.hxx>
+#include <sfx2/sidebar/ControlFactory.hxx>
+#include <AreaPropertyPanel.hxx>
+#include <AreaPropertyPanel.hrc>
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
+#include <sfx2/objsh.hxx>
+#include <svx/xfltrit.hxx>
+#include <svx/xflftrit.hxx>
+#include <svx/xtable.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/bindings.hxx>
+#include <helpid.hrc>
+#include <svtools/valueset.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svx/svxitems.hrc>
+#include <vcl/toolbox.hxx>
+#include <svtools/toolbarmenu.hxx>
+#include "sidebar/ColorControl.hxx"
+
+#include <boost/bind.hpp>
+
+using namespace css;
+using namespace cssu;
+using ::sfx2::sidebar::Theme;
+
+#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
+
+
+
+
+namespace svx { namespace sidebar {
+
+const sal_Int32 AreaPropertyPanel::DEFAULT_CENTERX = 50;
+const sal_Int32 AreaPropertyPanel::DEFAULT_CENTERY = 50;
+const sal_Int32 AreaPropertyPanel::DEFAULT_ANGLE = 0;
+const sal_Int32 AreaPropertyPanel::DEFAULT_STARTVALUE = 0;
+const sal_Int32 AreaPropertyPanel::DEFAULT_ENDVALUE = 16777215;
+const sal_Int32 AreaPropertyPanel::DEFAULT_BORDER = 0;
+
+
+
+AreaPropertyPanel::AreaPropertyPanel(
+    Window* pParent,
+    const cssu::Reference<css::frame::XFrame>& rxFrame,
+    SfxBindings* pBindings)
+:   Control(
+        pParent, 
+        SVX_RES(RID_SIDEBAR_AREA_PANEL)),
+    meLastXFS(-1),
+    maLastColor(Color(COL_DEFAULT_SHAPE_FILLING)),
+    mnLastPosGradient(0),
+    mnLastPosHatch(0),
+    mnLastPosBitmap(0),
+    mnLastTransSolid(50),
+    maGradientLinear(),
+    maGradientAxial(),
+    maGradientRadial(),
+    maGradientElliptical(),
+    maGradientSquare(),
+    maGradientRect(),
+    mpColorTextFT(new FixedText(this, SVX_RES(FT_COLOR_LIST))),
+    mpLbFillType(new SvxFillTypeBox(this)),
+    mpLbFillAttr(new SvxFillAttrBox(this)),
+    mpToolBoxColorBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
+    mpToolBoxColor(sfx2::sidebar::ControlFactory::CreateToolBox(mpToolBoxColorBackground.get(), SVX_RES(TB_COLOR))),
+    mpTrspTextFT(new FixedText(this, SVX_RES(FL_TRSP_TEXT))),
+    mpLBTransType(new ListBox(this, SVX_RES(LB_TRGR_TYPES))),
+    mpMTRTransparent(new MetricField(this, SVX_RES(MTR_TRANSPARENT))),
+    mpBTNGradientBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
+    mpBTNGradient(sfx2::sidebar::ControlFactory::CreateToolBox(mpBTNGradientBackground.get(), SVX_RES(BTN_GRADIENT))),
+    mpColorUpdater(new ::svx::ToolboxButtonColorUpdater(SID_ATTR_FILL_COLOR, TBI_COLOR, mpToolBoxColor.get(), TBX_UPDATER_MODE_CHAR_COLOR_NEW)),
+    mpStyleItem(),
+    mpColorItem(),
+    mpFillGradientItem(),
+    mpHatchItem(),
+    mpBitmapItem(),
+    mpColorTableItem(),
+    mpGradientListItem(),
+    mpHatchListItem(),
+    mpBitmapListItem(),
+    maStyleControl(SID_ATTR_FILL_STYLE, *pBindings, *this),
+    maColorControl(SID_ATTR_FILL_COLOR, *pBindings, *this),
+    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),
+    maFillTransparenceController(SID_ATTR_FILL_TRANSPARENCE, *pBindings, *this),
+    maFillFloatTransparenceController(SID_ATTR_FILL_FLOATTRANSPARENCE, *pBindings, *this),
+    maImgAxial(SVX_RES(IMG_AXIAL)),
+    maImgElli(SVX_RES(IMG_ELLI)),
+    maImgQuad(SVX_RES(IMG_QUAD)),
+    maImgRadial(SVX_RES(IMG_RADIAL)),
+    maImgSquare(SVX_RES(IMG_SQUARE)),
+    maImgLinear(SVX_RES(IMG_LINEAR)),
+    maImgColor(SVX_RES(IMG_COLOR)),
+    maImgAxialH(SVX_RES(IMG_AXIAL_H)),
+    maImgElliH(SVX_RES(IMG_ELLI_H)),
+    maImgQuadH(SVX_RES(IMG_QUAD_H)),
+    maImgRadialH(SVX_RES(IMG_RADIAL_H)),
+    maImgSquareH(SVX_RES(IMG_SQUARE_H)),
+    maImgLinearH(SVX_RES(IMG_LINEAR_H)),
+    maImgColorH(SVX_RES(IMG_COLOR_H)),
+    msHelpFillType(SVX_RES(STR_HELP_TYPE)),
+    msHelpFillAttr(SVX_RES(STR_HELP_ATTR)),
+    maTrGrPopup(this, ::boost::bind(&AreaPropertyPanel::CreateTransparencyGradientControl, this, _1)),
+    maColorPopup(this, ::boost::bind(&AreaPropertyPanel::CreateColorPopupControl, this, _1)),
+    mpFloatTransparenceItem(),
+    mpTransparanceItem(),
+    mxFrame(rxFrame),
+    maContext(),
+    mpBindings(pBindings),
+    mbTBShow(true),
+    mbColorAvail(true)
+{
+    Initialize();
+    FreeResource();
+}
+
+
+
+AreaPropertyPanel::~AreaPropertyPanel()
+{
+    // Destroy the toolboxes, then their background windows.
+    mpToolBoxColor.reset();
+    mpBTNGradient.reset();
+    mpToolBoxColorBackground.reset();
+    mpBTNGradientBackground.reset();
+}
+
+
+
+void AreaPropertyPanel::ShowMenu (void)
+{
+    if (mpBindings != NULL)
+    {
+        SfxDispatcher* pDispatcher = mpBindings->GetDispatcher();
+        if (pDispatcher != NULL)
+            pDispatcher->Execute(SID_ATTRIBUTES_AREA, SFX_CALLMODE_ASYNCHRON);
+    }
+}
+
+
+
+void AreaPropertyPanel::Initialize()
+{
+    maGradientLinear.SetXOffset(DEFAULT_CENTERX);
+    maGradientLinear.SetYOffset(DEFAULT_CENTERY);
+    maGradientLinear.SetAngle(DEFAULT_ANGLE);
+    maGradientLinear.SetStartColor(Color(DEFAULT_STARTVALUE));
+    maGradientLinear.SetEndColor(Color(DEFAULT_ENDVALUE));
+    maGradientLinear.SetBorder(DEFAULT_BORDER);
+    maGradientLinear.SetGradientStyle(XGRAD_LINEAR);
+
+    maGradientAxial = maGradientLinear;
+    maGradientAxial.SetGradientStyle(XGRAD_AXIAL);
+
+    maGradientRadial = maGradientLinear;
+    maGradientRadial.SetGradientStyle(XGRAD_RADIAL);
+
+    maGradientElliptical = maGradientLinear;
+    maGradientElliptical.SetGradientStyle(XGRAD_ELLIPTICAL);
+
+    maGradientSquare = maGradientLinear;
+    maGradientSquare.SetGradientStyle(XGRAD_SQUARE);
+
+    maGradientRect = maGradientLinear;
+    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
+    mpLbFillAttr->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fill")));    //wj acc
+
+    Link aLink = LINK( this, AreaPropertyPanel, SelectFillTypeHdl );
+    mpLbFillType->SetSelectHdl( aLink );
+
+    aLink = LINK( this, AreaPropertyPanel, SelectFillAttrHdl );
+    mpLbFillAttr->SetSelectHdl( aLink );
+
+    //add  for new color picker
+    mpLbFillAttr->Hide();
+    mpToolBoxColor->SetItemImage(TBI_COLOR, GetDisplayBackground().GetColor().IsDark()? maImgColorH : maImgColor);
+    Size aTbxSize( mpToolBoxColor->CalcWindowSizePixel() ); 
+    mpToolBoxColor->SetOutputSizePixel( aTbxSize );
+    mpToolBoxColor->SetItemBits( TBI_COLOR, mpToolBoxColor->GetItemBits( TBI_COLOR ) | TIB_DROPDOWNONLY );
+    mpToolBoxColor->SetBackground(Wallpaper());
+    mpToolBoxColor->SetPaintTransparent(true);
+    mpToolBoxColor->SetQuickHelpText(TBI_COLOR, String(SVX_RES(STR_HELP_COLOR)));    //wj acc
+    //mpToolBoxColor->SetItemText(TBI_COLOR, 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);
+    mpToolBoxColor->SetPosPixel(aPointTBAttr);
+ 
+    aLink = LINK(this, AreaPropertyPanel, ToolBoxColorDropHdl);
+    mpToolBoxColor->SetDropdownClickHdl ( aLink );
+    mpToolBoxColor->SetSelectHdl ( aLink );
+
+    //add end
+    mpLBTransType->SetSelectHdl(LINK(this, AreaPropertyPanel, ChangeTrgrTypeHdl_Impl));
+    mpLBTransType->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Transparency")));    //wj acc
+
+    mpMTRTransparent->SetValue( 50 );
+    mpMTRTransparent->SetModifyHdl(LINK(this, AreaPropertyPanel, ModifyTransparentHdl_Impl));
+    mpMTRTransparent->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Transparency")));    //wj acc
+
+    mpBTNGradient->SetItemBits( TBI_BTX_GRADIENT, mpBTNGradient->GetItemBits( TBI_BTX_GRADIENT ) | TIB_DROPDOWNONLY );
+    aLink = LINK( this, AreaPropertyPanel, ClickTrGrHdl_Impl );
+    mpBTNGradient->SetDropdownClickHdl( aLink );
+    mpBTNGradient->SetSelectHdl( aLink );
+    aTbxSize = mpBTNGradient->CalcWindowSizePixel();
+    mpBTNGradient->SetOutputSizePixel( aTbxSize );
+    mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,maImgLinear);
+    mpBTNGradient->SetQuickHelpText(TBI_BTX_GRADIENT, String(SVX_RES(STR_HELP_GRADIENT)));    //wj acc
+    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);
+    mpMTRTransparent->SetPosPixel(aPointMetric);
+    mpBTNGradient->SetPosPixel(aPointTB);
+
+    mpLbFillType->SetAccessibleRelationLabeledBy(mpColorTextFT.get());
+    mpLbFillAttr->SetAccessibleRelationLabeledBy(mpLbFillAttr.get());
+    mpToolBoxColor->SetAccessibleRelationLabeledBy(mpToolBoxColor.get());
+    mpLBTransType->SetAccessibleRelationLabeledBy(mpTrspTextFT.get());
+    mpMTRTransparent->SetAccessibleRelationLabeledBy(mpMTRTransparent.get());
+    mpBTNGradient->SetAccessibleRelationLabeledBy(mpBTNGradient.get());
+
+    SetupIcons();
+}
+
+
+
+IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
+{
+	XFillStyle  eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos();
+
+	if( (XFillStyle) meLastXFS != eXFS )
+	{
+			mpLbFillAttr->Clear();
+			SfxObjectShell* pSh = SfxObjectShell::Current();
+			XFillStyleItem aXFillStyleItem( eXFS );
+			GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L); 
+
+			switch( eXFS )
+			{
+			case XFILL_NONE:
+				{
+					mpLbFillAttr->Show();	
+					mpToolBoxColor->Hide();	
+					mbTBShow = false;
+					mpLbFillType->Selected();
+					mpLbFillAttr->Disable();
+				}
+				break;
+
+			case XFILL_SOLID:
+				{
+					mpLbFillAttr->Hide();	
+					mpToolBoxColor->Show();	
+					mbTBShow = true;
+					String aTmpStr;
+					Color aColor = maLastColor;
+					XFillColorItem aXFillColorItem( aTmpStr, aColor );
+					GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
+				}
+				break;
+
+			case XFILL_GRADIENT:
+				{
+					mpLbFillAttr->Show();	
+					mpToolBoxColor->Hide();	
+					mbTBShow = false;
+					if ( pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+					{
+						// 
+						if(mpLbFillAttr->GetEntryCount() == 0)
+						{
+							SvxGradientListItem aItem( *(const SvxGradientListItem*)(
+							pSh->GetItem( SID_GRADIENT_LIST ) ) );
+							mpLbFillAttr->Enable();
+							mpLbFillAttr->Clear();
+							mpLbFillAttr->Fill( aItem.GetGradientList() );	
+						}
+
+						if ( mnLastPosGradient != LISTBOX_ENTRY_NOTFOUND)
+						{
+							SvxGradientListItem aItem( *(const SvxGradientListItem*)( pSh->GetItem( SID_GRADIENT_LIST ) ) );
+							if ( mnLastPosGradient < aItem.GetGradientList()->Count() )  
+							{
+								XGradient aGradient = aItem.GetGradientList()->GetGradient( mnLastPosGradient )->GetGradient();
+								XFillGradientItem aXFillGradientItem( mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient );
+								GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+								mpLbFillAttr->SelectEntryPos(mnLastPosGradient);	//add 
+							}
+						}
+					}
+					else
+						mpLbFillAttr->Disable();
+				}
+				break;
+
+			case XFILL_HATCH:
+				{
+					mpLbFillAttr->Show();	
+					mpToolBoxColor->Hide();	
+					mbTBShow = false;
+					if ( pSh && pSh->GetItem( SID_HATCH_LIST ) )
+					{
+						// 
+						if(mpLbFillAttr->GetEntryCount() == 0)
+						{
+							SvxHatchListItem aItem( *(const SvxHatchListItem*)(
+								pSh->GetItem( SID_HATCH_LIST ) ) );
+							mpLbFillAttr->Enable();
+							mpLbFillAttr->Clear();
+							mpLbFillAttr->Fill( aItem.GetHatchList() );
+						}
+
+						if ( mnLastPosHatch != LISTBOX_ENTRY_NOTFOUND )
+						{
+							SvxHatchListItem aItem( *(const SvxHatchListItem*)( pSh->GetItem( SID_HATCH_LIST ) ) );
+							if ( mnLastPosHatch < aItem.GetHatchList()->Count() )  
+							{
+								XHatch aHatch = aItem.GetHatchList()->GetHatch( mnLastPosHatch )->GetHatch();
+								XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch );
+								GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+								mpLbFillAttr->SelectEntryPos(mnLastPosHatch); //add 
+							}
+						}
+					}
+					else
+						mpLbFillAttr->Disable();
+				}
+				break;
+
+			case XFILL_BITMAP:
+				{
+					mpLbFillAttr->Show();	
+					mpToolBoxColor->Hide();	
+					mbTBShow = false;
+					if ( pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+					{
+						// 
+						if(mpLbFillAttr->GetEntryCount() == 0)
+						{
+							SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(
+								pSh->GetItem( SID_BITMAP_LIST ) ) );
+							mpLbFillAttr->Enable();
+							mpLbFillAttr->Clear();
+							mpLbFillAttr->Fill( aItem.GetBitmapList() );
+						}
+
+						if ( mnLastPosBitmap != LISTBOX_ENTRY_NOTFOUND )
+						{
+							SvxBitmapListItem aItem( *(const SvxBitmapListItem*)( pSh->GetItem( SID_BITMAP_LIST ) ) );
+							if ( mnLastPosBitmap < aItem.GetBitmapList()->Count() ) 
+							{
+                                const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(mnLastPosBitmap);
+								XFillBitmapItem aXFillBitmapItem( mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject() );
+								GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+								mpLbFillAttr->SelectEntryPos(mnLastPosBitmap); //add 
+							}
+						}
+					}
+					else
+						mpLbFillAttr->Disable();
+				}
+				break;
+			}
+			meLastXFS = (sal_uInt16)eXFS;
+			if( eXFS != XFILL_NONE )
+			{
+				if ( pToolBox )
+					mpLbFillType->Selected();
+			}
+	}
+	return 0;
+}
+
+
+
+IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
+{
+    XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos();
+    XFillStyleItem aXFillStyleItem( eXFS );
+    SfxObjectShell* pSh = SfxObjectShell::Current();
+
+    if(pToolBox)
+	{
+		if( (XFillStyle) meLastXFS != eXFS )
+        {
+			GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L); //Added  20090909
+        }
+
+		switch( eXFS )
+		{
+		case XFILL_SOLID:
+			//{
+			//	//String aTmpStr = mpLbFillAttr->GetSelectEntry();
+			//	//Color aColor = mpLbFillAttr->GetSelectEntryColor();
+			//	//if(aColor.GetColor() == 0 && aTmpStr.Equals(String::CreateFromAscii("")))
+			//	String aTmpStr;
+			//	Color aColor = maLastColor;
+			//	XFillColorItem aXFillColorItem( aTmpStr, aColor );
+			//	GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
+			//	maLastColor = aColor;
+			//}
+			break;
+
+		case XFILL_GRADIENT:
+			{
+				sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
+				if( nPos == LISTBOX_ENTRY_NOTFOUND )
+					nPos = mnLastPosGradient;
+
+				if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+				{
+					SvxGradientListItem aItem( *(const SvxGradientListItem*)( pSh->GetItem( SID_GRADIENT_LIST ) ) );
+					if ( nPos < aItem.GetGradientList()->Count() )  
+					{
+						XGradient aGradient = aItem.GetGradientList()->GetGradient( nPos )->GetGradient();
+						XFillGradientItem aXFillGradientItem( mpLbFillAttr->GetSelectEntry(), aGradient );
+						GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+					}
+				}
+				if(nPos != LISTBOX_ENTRY_NOTFOUND)
+					mnLastPosGradient = nPos;
+			}
+			break;
+
+		case XFILL_HATCH:
+			{
+				sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
+				if( nPos == LISTBOX_ENTRY_NOTFOUND )
+					nPos = mnLastPosHatch;
+				if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_HATCH_LIST ) )
+				{
+					SvxHatchListItem aItem( *(const SvxHatchListItem*)( pSh->GetItem( SID_HATCH_LIST ) ) );
+					if ( nPos < aItem.GetHatchList()->Count() )  
+					{
+						XHatch aHatch = aItem.GetHatchList()->GetHatch( nPos )->GetHatch();
+						XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch );
+						GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+					}
+				}
+				if(nPos != LISTBOX_ENTRY_NOTFOUND)
+					mnLastPosHatch = nPos;
+			}
+			break;
+
+		case XFILL_BITMAP:
+			{
+				sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
+				if( nPos == LISTBOX_ENTRY_NOTFOUND )
+					nPos = mnLastPosBitmap;
+				if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+				{
+					SvxBitmapListItem aItem( *(const SvxBitmapListItem*)( pSh->GetItem( SID_BITMAP_LIST ) ) );
+					if ( nPos < aItem.GetBitmapList()->Count() ) 
+					{
+                        const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(nPos);
+						XFillBitmapItem aXFillBitmapItem( mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject() );
+						GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+					}
+				}
+				if(nPos != LISTBOX_ENTRY_NOTFOUND)
+					mnLastPosBitmap = nPos;
+			}
+			break;
+
+                    default:
+                        break;
+		}
+	}
+	return 0;
+}
+
+
+//add  for color picker
+
+IMPL_LINK(AreaPropertyPanel, ToolBoxColorDropHdl, ToolBox*, pToolBox)
+{
+    sal_uInt16 nId = pToolBox->GetCurItemId();
+
+    if(nId == TBI_COLOR)
+    {
+        maColorPopup.Show(*pToolBox);
+	    if (mpColorItem)
+            maColorPopup.SetCurrentColor(mpColorItem->GetColorValue(), mbColorAvail);
+		else
+			maColorPopup.SetCurrentColor(COL_WHITE, false);
+	}
+
+    return 0;
+}
+
+
+
+void AreaPropertyPanel::SetColor (
+    const String& rsColorName,
+    const Color aColor)
+{
+    XFillColorItem aXFillColorItem (rsColorName, aColor);
+    mpBindings->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
+    maLastColor = aColor;
+}
+
+
+
+
+PopupControl* AreaPropertyPanel::CreateTransparencyGradientControl (PopupContainer* pParent)
+{
+    return new AreaTransparencyGradientControl(pParent, *this);
+}
+
+
+
+
+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))
+    {
+        // todo
+    }
+    else
+    {
+        // todo
+    }
+}
+
+
+
+AreaPropertyPanel* AreaPropertyPanel::Create (
+    Window* pParent,
+    const cssu::Reference<css::frame::XFrame>& rxFrame,
+    SfxBindings* pBindings)
+{
+    if (pParent == NULL)
+        throw lang::IllegalArgumentException(A2S("no parent Window given to AreaPropertyPanel::Create"), NULL, 0);
+    if ( ! rxFrame.is())
+        throw lang::IllegalArgumentException(A2S("no XFrame given to AreaPropertyPanel::Create"), NULL, 1);
+    if (pBindings == NULL)
+        throw lang::IllegalArgumentException(A2S("no SfxBindings given to AreaPropertyPanel::Create"), NULL, 2);
+    
+    return new AreaPropertyPanel(
+        pParent,
+        rxFrame,
+        pBindings);
+}
+
+
+
+void AreaPropertyPanel::DataChanged(
+    const DataChangedEvent& rEvent)
+{
+    (void)rEvent;
+    
+    SetupIcons();
+}
+
+
+
+void AreaPropertyPanel::HandleContextChange(
+    const ::sfx2::sidebar::EnumContext aContext)
+{
+    if(maContext == aContext)
+    {
+        // Nothing to do.
+        return;
+    }
+
+    maContext = aContext;
+
+
+
+    // todo
+}
+
+
+
+void AreaPropertyPanel::ImpUpdateTransparencies()
+{
+    if(mpTransparanceItem.get() || mpFloatTransparenceItem.get())
+    {
+        bool bZeroValue(false);
+
+        if(mpTransparanceItem.get())
+        {
+            const sal_uInt16 nValue(mpTransparanceItem->GetValue());
+
+            if(!nValue)
+            {
+                bZeroValue = true;
+            }
+            else if(nValue <= 100)
+            {
+                mpLBTransType->Enable();
+                mpLBTransType->SelectEntryPos(1);
+                mpBTNGradient->Hide();
+                mpMTRTransparent->Show();
+                mpMTRTransparent->Enable();
+                mpMTRTransparent->SetValue(nValue);
+            }
+
+            maTrGrPopup.Hide();
+        }
+
+        if(bZeroValue && mpFloatTransparenceItem.get())
+        {
+            if(mpFloatTransparenceItem->IsEnabled())
+            {
+                const XGradient& rGradient = mpFloatTransparenceItem->GetGradientValue();
+                const bool bHighContrast(GetSettings().GetStyleSettings().GetHighContrastMode());
+                sal_uInt16 nEntryPos(0);
+                Image* pImage = 0;
+
+                mpLBTransType->Enable();
+                mpMTRTransparent->Hide();
+                mpBTNGradient->Enable();
+                mpBTNGradient->Show();
+
+                switch(rGradient.GetGradientStyle())
+                {
+                    case XGRAD_LINEAR:
+                    {
+                        nEntryPos = 2;
+                        pImage = bHighContrast ? &maImgLinearH : &maImgLinear;
+                        break;
+                    }
+                    case XGRAD_AXIAL:
+                    {
+                        nEntryPos = 3;
+                        pImage = bHighContrast ? &maImgAxialH : &maImgAxial;
+                        break;
+                    }
+                    case XGRAD_RADIAL:
+                    {
+                        nEntryPos = 4;
+                        pImage = bHighContrast ? &maImgRadialH : &maImgRadial;
+                        break;
+                    }
+                    case XGRAD_ELLIPTICAL:
+                    {
+                        nEntryPos = 5;
+                        pImage = bHighContrast ? &maImgElliH : &maImgElli;
+                        break;
+                    }
+                    case XGRAD_SQUARE:
+                    {
+                        nEntryPos = 6;
+                        pImage = bHighContrast ? &maImgQuadH : &maImgQuad;
+                        break;
+                    }
+                    case XGRAD_RECT:
+                    {
+                        nEntryPos = 7;
+                        pImage = bHighContrast ? &maImgSquareH : &maImgSquare;
+                        break;
+                    }
+                }
+
+                mpLBTransType->SelectEntryPos(nEntryPos);
+                mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT, *pImage);
+                bZeroValue = false;
+            }
+            else
+            {
+                bZeroValue = true;
+            }
+        }
+
+        if(bZeroValue)
+        {
+            mpLBTransType->Enable();
+            mpLBTransType->SelectEntryPos(0);
+            mpBTNGradient->Hide();
+            mpMTRTransparent->Enable();
+            mpMTRTransparent->Show();
+            mpMTRTransparent->SetValue(0);
+        }
+    }
+    else
+    {
+        // no transparency at all
+        mpLBTransType->SetNoSelection();
+        mpMTRTransparent->Disable();
+        mpMTRTransparent->Show();
+        mpBTNGradient->Disable();
+        mpBTNGradient->Hide();
+    }
+
+
+}
+
+void AreaPropertyPanel::NotifyItemUpdate( 
+    sal_uInt16 nSID, 
+    SfxItemState eState, 
+    const SfxPoolItem* pState)
+{	
+	XFillStyle eXFS;
+	SfxObjectShell* pSh = SfxObjectShell::Current();
+    bool bFillTransparenceChanged(false);
+
+    if(SID_ATTR_FILL_TRANSPARENCE == nSID)
+    {
+        bFillTransparenceChanged = true;
+
+        if(eState >= SFX_ITEM_AVAILABLE)
+        {
+            const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState);
+
+            if(pItem && (!mpTransparanceItem || *pItem != *mpTransparanceItem))
+            {
+                mpTransparanceItem.reset((SfxUInt16Item*)pItem->Clone());
+            }
+            else
+            {
+                mpTransparanceItem.reset();
+            }
+        }
+        else
+        {
+            mpTransparanceItem.reset();
+        }
+    }
+    else if(SID_ATTR_FILL_FLOATTRANSPARENCE == nSID)
+    {
+        bFillTransparenceChanged = true;
+
+        if(eState >= SFX_ITEM_AVAILABLE)
+        {
+            const XFillFloatTransparenceItem* pItem = dynamic_cast< const XFillFloatTransparenceItem* >(pState);
+
+            if(pItem && (!mpFloatTransparenceItem || *pItem != *mpFloatTransparenceItem))
+            {
+                mpFloatTransparenceItem.reset((XFillFloatTransparenceItem*)pItem->Clone());
+            }
+            else
+            {
+                mpFloatTransparenceItem.reset();
+            }
+        }
+        else
+        {
+            mpFloatTransparenceItem.reset();
+        }
+    }
+
+    if(bFillTransparenceChanged)
+    {
+        // update transparency settings dependent of mpTransparanceItem and mpFloatTransparenceItem
+        ImpUpdateTransparencies();
+    }
+
+	if	(nSID == SID_ATTR_FILL_STYLE )
+	{
+		if( eState == SFX_ITEM_DISABLED )
+		{
+			mpLbFillType->Disable(); 
+			mpLbFillType->SetNoSelection();
+			mpLbFillAttr->Show();
+			mpLbFillAttr->Disable();
+			mpLbFillAttr->SetNoSelection();
+			mpToolBoxColor->Hide();
+			mbTBShow = false;
+			meLastXFS = -1; 
+            mpStyleItem.reset();
+		}
+		else if( SFX_ITEM_AVAILABLE == eState )
+		{
+			mpStyleItem.reset(pState ? (XFillStyleItem*)pState->Clone() : 0);
+			mpLbFillType->Enable();
+
+			eXFS = (XFillStyle)mpStyleItem->GetValue();
+			meLastXFS = eXFS;  
+			mpLbFillType->SelectEntryPos(
+				sal::static_int_cast< sal_uInt16 >( eXFS ) );
+			//Added for select invisable
+			if(eXFS == XFILL_NONE)
+			{
+				mpLbFillAttr->SetNoSelection();
+				mpLbFillAttr->Disable();
+			}
+			//else
+			//	mpLbFillAttr->Enable();
+			Update();
+			//SelectFillTypeHdl( NULL );
+		}
+		else
+		{
+			mpLbFillType->SetNoSelection();
+			mpLbFillAttr->Show();
+			mpLbFillAttr->Disable();
+			mpLbFillAttr->SetNoSelection();
+			mpToolBoxColor->Hide();
+			mbTBShow = false;
+			meLastXFS = -1;  //Added 
+			mpStyleItem.reset();
+		}
+	}
+	else if(nSID == SID_ATTR_FILL_COLOR)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{	
+			mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0);
+		}
+		if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_SOLID)
+		{
+			mpLbFillAttr->Hide();
+			mpToolBoxColor->Show();
+			mbTBShow = true;
+			if( SFX_ITEM_AVAILABLE == eState)
+			{	
+				mpToolBoxColor->Enable();
+				mbColorAvail = true;	//
+			    // maLastColor = mpColorItem->GetColorValue();
+				Update();
+			}
+			else if(SFX_ITEM_DISABLED == eState )
+			{
+				mpToolBoxColor->Disable();
+				mbColorAvail = false;	//
+				mpColorUpdater->Update(COL_WHITE);
+			}
+			else
+			{
+				mbColorAvail = false;	//
+				mpColorUpdater->Update(COL_WHITE);
+			}
+		}
+	}
+	else if(nSID == SID_ATTR_FILL_GRADIENT)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{
+			mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0);
+		}
+		if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_GRADIENT )
+		{
+			mpLbFillAttr->Show();
+			mpToolBoxColor->Hide();
+			mbTBShow = false;
+			if( SFX_ITEM_AVAILABLE == eState)
+			{
+				mpLbFillAttr->Enable();
+				Update();
+			}
+			
+			else if(SFX_ITEM_DISABLED == eState )
+			{
+				mpLbFillAttr->Disable();
+				mpLbFillAttr->SetNoSelection();
+			}
+			else
+				mpLbFillAttr->SetNoSelection();
+		}
+	}
+	else if(nSID == SID_ATTR_FILL_HATCH)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{	
+			mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0);
+		}
+		if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_HATCH )
+		{
+			mpLbFillAttr->Show();
+			mpToolBoxColor->Hide();
+			mbTBShow = false;
+			if( SFX_ITEM_AVAILABLE == eState)
+			{	
+				mpLbFillAttr->Enable();
+				Update();
+			}
+			else if(SFX_ITEM_DISABLED == eState )
+			{
+				mpLbFillAttr->Disable();
+				mpLbFillAttr->SetNoSelection();
+			}
+			else
+				mpLbFillAttr->SetNoSelection();
+		}
+	}
+	else if(nSID == SID_ATTR_FILL_BITMAP)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{
+			mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0);
+		}
+		if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_BITMAP )
+		{
+			mpLbFillAttr->Show();
+			mpToolBoxColor->Hide();
+			mbTBShow = false;
+			if( SFX_ITEM_AVAILABLE == eState)
+			{
+				mpLbFillAttr->Enable();
+				Update();
+			}
+			else if(SFX_ITEM_DISABLED == eState )
+			{
+				mpLbFillAttr->Disable();
+				mpLbFillAttr->SetNoSelection();
+			}
+			else
+				mpLbFillAttr->SetNoSelection();
+		}
+	}
+	else if(nSID == SID_COLOR_TABLE)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{
+			mpColorTableItem.reset(pState ? (SvxColorTableItem*)pState->Clone() : 0);
+
+			if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue()== XFILL_SOLID)
+			{
+				if ( mpColorItem )
+				{
+					String aString( mpColorItem->GetName() );
+					Color aColor = mpColorItem->GetColorValue();
+					mpLbFillAttr->Clear();
+					SvxColorTableItem aItem( *(const SvxColorTableItem*)(
+						pSh->GetItem( SID_COLOR_TABLE ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Fill( aItem.GetColorTable() );
+					mpLbFillAttr->SelectEntry( aColor );
+				}
+				else 
+					mpLbFillAttr->SetNoSelection();
+			}
+		}
+	}
+	else if(nSID == SID_GRADIENT_LIST)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{
+			mpGradientListItem.reset(pState ? (SvxGradientListItem*)pState->Clone() : 0);
+
+			if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_GRADIENT)
+			{
+				if ( mpFillGradientItem )
+				{
+					String aString( mpFillGradientItem->GetName() );
+					mpLbFillAttr->Clear();
+					SvxGradientListItem aItem( *(const SvxGradientListItem*)(
+						pSh->GetItem( SID_GRADIENT_LIST ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Fill( aItem.GetGradientList() );
+					mpLbFillAttr->SelectEntry( aString );
+				}
+				else
+					mpLbFillAttr->SetNoSelection();
+			}
+		}
+	}
+	else if(nSID == SID_HATCH_LIST)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{
+			mpHatchListItem.reset(pState ? (SvxHatchListItem*)pState->Clone() : 0);
+
+			if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_HATCH )
+			{
+				if ( mpHatchItem)
+				{
+					String aString( mpHatchItem->GetName() );
+					mpLbFillAttr->Clear();
+					SvxHatchListItem aItem( *(const SvxHatchListItem*)(
+						pSh->GetItem( SID_HATCH_LIST ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Fill( aItem.GetHatchList() );
+					mpLbFillAttr->SelectEntry( aString );
+				}
+				else
+					mpLbFillAttr->SetNoSelection();
+			}
+		}
+	}
+	else if(nSID == SID_BITMAP_LIST)
+	{
+		if( SFX_ITEM_AVAILABLE == eState)
+		{
+			mpBitmapListItem.reset(pState ? (SvxBitmapListItem*)pState->Clone() : 0);
+
+			if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_BITMAP )
+			{
+				if ( mpBitmapItem )
+				{
+					String aString( mpBitmapItem->GetName() );
+					mpLbFillAttr->Clear();
+					SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(
+						pSh->GetItem( SID_BITMAP_LIST ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Fill( aItem.GetBitmapList() );
+					mpLbFillAttr->SelectEntry( aString );
+				}
+				else
+					mpLbFillAttr->SetNoSelection();
+			}
+		}
+	}
+}
+
+
+
+SfxBindings* AreaPropertyPanel::GetBindings() 
+{ 
+    return mpBindings; 
+}
+
+
+
+void AreaPropertyPanel::Update()
+{
+	if ( mpStyleItem )
+	{
+		XFillStyle eXFS = (XFillStyle)mpStyleItem->GetValue();
+		SfxObjectShell* pSh = SfxObjectShell::Current();
+
+		switch( eXFS )
+		{
+			case XFILL_NONE:
+			{
+				mpLbFillAttr->Show();	//wj for new color picker
+				mpToolBoxColor->Hide();	//wj for new color picker
+				mbTBShow = false;
+			}
+			break;
+
+			case XFILL_SOLID:
+			{
+				if ( mpColorItem )
+				{
+					mpLbFillAttr->Hide();	//wj for new color picker
+					mpToolBoxColor->Show();	//wj for new color picker
+					mbTBShow = true;					
+					mpColorUpdater->Update(mpColorItem->GetColorValue());
+				}
+				else
+					mpColorUpdater->Update(COL_WHITE);
+			}
+			break;
+
+			case XFILL_GRADIENT:
+			{
+				mpLbFillAttr->Show();	//wj for new color picker
+				mpToolBoxColor->Hide();	//wj for new color picker
+				mbTBShow = false;
+				if ( pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+				{
+					SvxGradientListItem aItem( *(const SvxGradientListItem*)(
+						pSh->GetItem( SID_GRADIENT_LIST ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Clear();
+					mpLbFillAttr->Fill( aItem.GetGradientList() );
+					if ( mpFillGradientItem )
+					{
+						String aString( mpFillGradientItem->GetName() );
+						mpLbFillAttr->SelectEntry( aString );
+					}
+					else
+						mpLbFillAttr->SetNoSelection();
+				}
+				else
+					mpLbFillAttr->SetNoSelection();
+			}
+			break;
+
+			case XFILL_HATCH:
+			{
+				mpLbFillAttr->Show();	//wj for new color picker
+				mpToolBoxColor->Hide();	//wj for new color picker
+				mbTBShow = false;
+				if ( pSh && pSh->GetItem( SID_HATCH_LIST ) )
+				{
+					SvxHatchListItem aItem( *(const SvxHatchListItem*)(
+						pSh->GetItem( SID_HATCH_LIST ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Clear();
+					mpLbFillAttr->Fill( aItem.GetHatchList() );
+					if ( mpHatchItem )
+					{
+						String aString( mpHatchItem->GetName() );
+						mpLbFillAttr->SelectEntry( aString );
+					}
+					else
+						mpLbFillAttr->SetNoSelection();
+				}
+				else
+					mpLbFillAttr->SetNoSelection();
+			}
+			break;
+
+			case XFILL_BITMAP:
+			{
+				mpLbFillAttr->Show();	//wj for new color picker
+				mpToolBoxColor->Hide();	//wj for new color picker
+				mbTBShow = false;
+				//mpLbFillAttr->Fill( mpBitmapListItem->GetBitmapList() );
+				if ( pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+				{
+					SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(
+						pSh->GetItem( SID_BITMAP_LIST ) ) );
+					mpLbFillAttr->Enable();
+					mpLbFillAttr->Clear();
+					mpLbFillAttr->Fill( aItem.GetBitmapList() );
+					if ( mpBitmapItem )
+					{
+						String aString( mpBitmapItem->GetName() );
+						mpLbFillAttr->SelectEntry( aString );
+					}
+					else
+						mpLbFillAttr->SetNoSelection();
+				}
+				else
+					mpLbFillAttr->SetNoSelection();
+			}
+			break;
+
+			default:
+				DBG_ERROR( "Nicht unterstuetzter Flaechentyp" );
+			break;
+		}
+	}
+}
+
+
+
+IMPL_LINK( AreaPropertyPanel, ImplPopupModeEndHdl, FloatingWindow*, EMPTYARG )
+{	
+	return 0;
+}
+
+
+
+IMPL_LINK( AreaPropertyPanel, ClickTrGrHdl_Impl, ToolBox*, pToolBox )
+{
+    maTrGrPopup.Rearrange(mpFloatTransparenceItem.get());
+
+    OSL_ASSERT(pToolBox->GetCurItemId() == TBI_BTX_GRADIENT);
+
+    maTrGrPopup.Show(*pToolBox);
+
+    return (0L);
+}
+
+
+
+IMPL_LINK(AreaPropertyPanel, ChangeTrgrTypeHdl_Impl, void *, EMPTYARG)
+{
+	sal_uInt16 nSelectType = mpLBTransType->GetSelectEntryPos();
+	bool bGradient = false;
+	sal_uInt16 nTrans = 0;
+
+	if (nSelectType == 0)
+	{
+		mpBTNGradient->Hide();
+		mpMTRTransparent->Show();
+		mpMTRTransparent->Enable();
+		mpMTRTransparent->SetValue(0);
+	}
+	else if (nSelectType == 1)
+	{
+		mpBTNGradient->Hide();
+		mpMTRTransparent->Show();
+		nTrans = mnLastTransSolid;
+		mpMTRTransparent->SetValue(nTrans);
+		mpLBTransType->SelectEntryPos(1);// for multi-selected, choose solid no selection
+		mpMTRTransparent->Enable();
+	}
+	else
+	{
+		mpBTNGradient->Show();
+		//for beta1
+		switch ( nSelectType )
+		{
+		case 2:
+			mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,GetSettings().GetStyleSettings().GetHighContrastMode()? maImgLinearH : maImgLinear); // high contrast
+			break;
+		case 3:
+			mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,GetSettings().GetStyleSettings().GetHighContrastMode()? maImgAxialH : maImgAxial);
+			break;
+		case 4:
+			mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,GetSettings().GetStyleSettings().GetHighContrastMode()? maImgRadialH : maImgRadial);
+			break;
+		case 5:
+			mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,GetSettings().GetStyleSettings().GetHighContrastMode()? maImgElliH : maImgElli );
+			break;
+		case 6:
+			mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,GetSettings().GetStyleSettings().GetHighContrastMode()? maImgQuadH : maImgQuad );
+			break;
+		case 7:
+			mpBTNGradient->SetItemImage(TBI_BTX_GRADIENT,GetSettings().GetStyleSettings().GetHighContrastMode()? maImgSquareH : maImgSquare);
+			break;
+		}
+		//end of new code
+		mpMTRTransparent->Hide();
+		mpBTNGradient->Enable();
+		bGradient = true;
+	}
+
+	XFillTransparenceItem aLinearItem(nTrans);
+	GetBindings()->GetDispatcher()->Execute( SID_ATTR_FILL_TRANSPARENCE, SFX_CALLMODE_RECORD, &aLinearItem, 0L );
+
+	if (nSelectType > 1) nSelectType = nSelectType-2;
+
+	XGradient aTmpGradient;
+		
+	switch(nSelectType)
+	{
+	case XGRAD_LINEAR:
+		aTmpGradient = maGradientLinear;
+		break;
+	case XGRAD_AXIAL:
+		aTmpGradient = maGradientAxial;
+		break;
+	case XGRAD_RADIAL:
+		aTmpGradient = maGradientRadial;
+		break;
+	case XGRAD_ELLIPTICAL:
+		aTmpGradient = maGradientElliptical;
+		break;
+	case XGRAD_SQUARE:
+		aTmpGradient = maGradientSquare;
+		break;
+	case XGRAD_RECT:
+		aTmpGradient = maGradientRect;
+		break;
+	}
+	SfxItemPool* pPool = NULL;
+	bool bEnable = false;
+	if (bGradient) bEnable = true;		
+	XFillFloatTransparenceItem aGradientItem(pPool,aTmpGradient, bEnable );
+
+	GetBindings()->GetDispatcher()->Execute( SID_ATTR_FILL_FLOATTRANSPARENCE, SFX_CALLMODE_RECORD, &aGradientItem, 0L );
+
+	return( 0L );
+}
+
+
+
+IMPL_LINK(AreaPropertyPanel, ModifyTransparentHdl_Impl, void*, EMPTYARG)
+{
+	sal_uInt16 nTrans = (sal_uInt16)mpMTRTransparent->GetValue();
+	mnLastTransSolid = nTrans;
+	sal_uInt16 nSelectType = mpLBTransType->GetSelectEntryPos();
+	if (nTrans != 0 && nSelectType == 0)
+		mpLBTransType->SelectEntryPos(1);
+	XFillTransparenceItem aLinearItem(nTrans);
+	GetBindings()->GetDispatcher()->Execute( SID_ATTR_FILL_TRANSPARENCE, SFX_CALLMODE_RECORD, &aLinearItem, 0L );
+
+	return 0L;
+}
+
+
+Color AreaPropertyPanel::GetLastColor (void) const
+{
+    return maLastColor;
+}
+
+
+
+
+XGradient AreaPropertyPanel::GetGradient (const XGradientStyle eStyle) const
+{
+    switch (eStyle)
+    {
+        default:
+		case XGRAD_LINEAR:
+            return maGradientLinear;
+		case XGRAD_AXIAL:
+            return maGradientAxial;
+		case XGRAD_RADIAL:
+            return maGradientRadial;
+		case XGRAD_ELLIPTICAL:
+            return maGradientElliptical;
+		case XGRAD_SQUARE:
+            return maGradientSquare;
+		case XGRAD_RECT:
+            return maGradientRect;
+    }
+}
+
+
+
+
+void AreaPropertyPanel::SetGradient (const XGradient& rGradient)
+{
+    switch (rGradient.GetGradientStyle())
+    {
+        case XGRAD_LINEAR:
+			maGradientLinear = rGradient;
+            break;
+        case XGRAD_AXIAL:
+			maGradientAxial = rGradient;
+            break;
+        case XGRAD_RADIAL:
+			maGradientRadial = rGradient;
+            break;
+        case XGRAD_ELLIPTICAL:
+			maGradientElliptical = rGradient;
+            break;
+        case XGRAD_SQUARE:
+            maGradientSquare = rGradient;
+            break;
+        case XGRAD_RECT:
+            maGradientRect = rGradient;
+            break;
+	}
+}
+
+
+
+
+sal_Int32 AreaPropertyPanel::GetSelectedTransparencyTypeIndex (void) const
+{
+    return mpLBTransType->GetSelectEntryPos();
+}
+
+} } // end of namespace svx::sidebar

Added: openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.hrc?rev=1452760&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.hrc (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/area/AreaPropertyPanel.hrc Tue Mar  5 12:17:09 2013
@@ -0,0 +1,96 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+//  RID_SIDEBAR_AREA_PANEL--------------------------------------------------------------
+#define FT_COLOR_LIST                        1
+#define TB_COLOR			2
+#define TBI_COLOR			3
+#define IMG_COLOR			5
+
+#define VS_COLOR			1
+
+#define TBI_LEFT							1
+#define TBI_RIGHT							1
+#define TBI_BTX_GRADIENT					51
+#define FL_TRSP_TEXT                         4
+
+#define LB_TRGR_TYPES	6
+#define MTR_TRANSPARENT	7
+#define BTN_GRADIENT	8
+
+#define	FT_TRGR_CENTER_X	9
+#define	MTR_TRGR_CENTER_X	10
+#define	FT_TRGR_CENTER_Y 	11
+#define	MTR_TRGR_CENTER_Y	12
+#define	FT_TRGR_ANGLE		13
+#define	MTR_TRGR_ANGLE		14
+#define	FT_TRGR_START_VALUE 15
+#define	MTR_TRGR_START_VALUE 16
+#define	FT_TRGR_END_VALUE	17
+#define	MTR_TRGR_END_VALUE	18
+#define	FT_TRGR_BORDER		19
+#define	MTR_TRGR_BORDER		20
+#define STR_HELP_LEFT		24
+#define STR_HELP_RIGHT		25
+
+#define	BTN_LEFT_SECOND	    	22
+#define	BTN_RIGHT_FIRST	    	23
+
+#define	IMG_AXIAL              24
+#define	IMG_ELLI               25
+#define	IMG_QUAD               26
+#define	IMG_RADIAL              27
+#define	IMG_SQUARE              28
+#define	IMG_LINEAR              29
+#define IMG_ROT_LEFT			30
+#define IMG_ROT_RIGHT			31
+#define STR_HELP_TYPE			32
+#define STR_HELP_ATTR			33
+#define STR_HELP_COLOR			41
+#define STR_HELP_GRADIENT		42
+
+//high contrast
+#define	IMG_AXIAL_H              34
+#define	IMG_ELLI_H               35
+#define	IMG_QUAD_H               36
+#define	IMG_RADIAL_H              37
+#define	IMG_SQUARE_H              38
+#define	IMG_LINEAR_H              39
+#define IMG_COLOR_H				  40
+
+
+#define FIXED_TEXT_HEIGHT   9
+#define FIXED_TEXT_WIDTH   40
+#define MBOX_WIDTH		   50
+#define CONTROL_HEIGHT		12
+#define CONTROL_WIDTH			45
+#define LISTBOX_HEIGHT     80
+#define ROTATE_BUTTON_WIDTH        13
+#define ROTATE_BUTTON_SPACING      15
+#define POP_WIDTH   2*POPUPPANEL_MARGIN_HORIZONTAL+2*CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL 
+#define POP_HEIGHT  2*POPUPPANEL_MARGIN_VERTICAL + 4*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL + MBOX_HEIGHT ) + 3*CONTROL_SPACING_VERTICAL
+#define POP_HEIGHT2  2*POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL + MBOX_HEIGHT ) + 2*CONTROL_SPACING_VERTICAL
+#define LEFT_RIGHT_X1    POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL + 1
+#define LEFT_RIGHT_Y1    POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL - 2
+#define LEFT_RIGHT_X2    POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL + ROTATE_BUTTON_SPACING
+#define LEFT_RIGHT_Y2	 POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL - 2
+
+// eof