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

svn commit: r1444704 [2/2] - in /openoffice/branches/sidebar/main: default_images/svx/res/ officecfg/registry/data/org/openoffice/Office/UI/ svx/ svx/inc/ svx/inc/svx/ svx/inc/svx/sidebar/ svx/source/items/ svx/source/sidebar/ svx/source/sidebar/geomet...

Added: openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hrc?rev=1444704&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hrc (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hrc Mon Feb 11 10:02:16 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

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hrc
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hxx?rev=1444704&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hxx Mon Feb 11 10:02:16 2013
@@ -0,0 +1,217 @@
+/**************************************************************
+ * 
+ * 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_PROPERTYPANEL_AREAPAGE_HXX
+#define SVX_PROPERTYPANEL_AREAPAGE_HXX
+
+#include <vcl/ctrl.hxx>
+#include <sfx2/sidebar/SidebarPanelBase.hxx>
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <svx/xgrad.hxx>
+#include <svx/itemwin.hxx>
+//#include <svx/dlgctrl.hxx>
+//#include <sfx2/sectionpage.hxx>
+//#include <svx/svxdllapi.h>
+#include <svx/xfillit0.hxx>
+#include <svx/xflclit.hxx>
+//#include <svx/xtable.hxx>
+#include <svx/xflgrit.hxx>
+#include <svx/xflhtit.hxx>
+#include <svx/xbtmpit.hxx>
+#include <svx/drawitem.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+//#include <vcl/button.hxx>
+//#include <vcl/toolbox.hxx>
+#include <vcl/fixed.hxx>
+#include <svl/intitem.hxx>
+#include <svx/tbxcolorupdate.hxx>
+#include <svx/sidebar/PropertyPanelTools.hxx>
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <boost/scoped_ptr.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// pedefines
+class XFillFloatTransparenceItem;
+namespace svx { class ToolboxButtonColorUpdater; }
+class SvxColorPage;
+class SvxAreaTrGrPage;
+
+//////////////////////////////////////////////////////////////////////////////
+// namespace open
+
+namespace svx { namespace sidebar {
+
+class AreaPropertyPanel
+:   public Control,
+    public ::sfx2::sidebar::SidebarPanelBase::ContextChangeReceiverInterface,
+    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+{
+private:
+    friend class SvxColorPage;
+    friend class SvxAreaTrGrPage;
+
+public:
+    static AreaPropertyPanel* Create(
+        Window* pParent,
+        const cssu::Reference<css::frame::XFrame>& rxFrame,
+        SfxBindings* pBindings);
+
+    virtual void DataChanged(
+        const DataChangedEvent& rEvent);
+
+    virtual void HandleContextChange(
+        const ::sfx2::sidebar::EnumContext aContext);
+
+    virtual void NotifyItemUpdate(
+        const sal_uInt16 nSId,
+        const SfxItemState eState,
+        const SfxPoolItem* pState);
+
+    SfxBindings* GetBindings();
+
+private:
+    sal_uInt16                                          eLastXFS;
+    Color                                               maLastColor;
+
+    sal_uInt16                                          mnLastPosGradient;
+    sal_uInt16                                          mnLastPosHatch;
+    sal_uInt16                                          mnLastPosBitmap;
+    sal_uInt16                                          mnLastTransSolid;
+
+    XGradient                                           maGradientLinear;
+    XGradient                                           maGradientAxial;
+    XGradient                                           maGradientRadial;
+    XGradient                                           maGradientElliptical;
+    XGradient                                           maGradientSquare;
+    XGradient                                           maGradientRect;
+
+    //ui controls
+    ::boost::scoped_ptr< FixedText >                    mpColorTextFT;
+    ::boost::scoped_ptr< SvxFillTypeBox >               mpLbFillType;
+    ::boost::scoped_ptr< SvxFillAttrBox >               mpLbFillAttr;
+    ::boost::scoped_ptr< ToolBox >                      mpToolBoxColor; // for new color picker
+    ::boost::scoped_ptr< FixedText >                    mpTrspTextFT;
+    ::boost::scoped_ptr< ListBox >                      mpLBTransType;
+    ::boost::scoped_ptr< MetricField >                  mpMTRTransparent;
+    ::boost::scoped_ptr< ToolBox >                      mpBTNGradient;
+
+    ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater;
+
+    ::boost::scoped_ptr< XFillStyleItem >               mpStyleItem;
+    ::boost::scoped_ptr< XFillColorItem >               mpColorItem;
+    ::boost::scoped_ptr< XFillGradientItem >            mpFillGradientItem;
+    ::boost::scoped_ptr< XFillHatchItem >               mpHatchItem;
+    ::boost::scoped_ptr< XFillBitmapItem >              mpBitmapItem;
+    ::boost::scoped_ptr< SvxColorTableItem >            mpColorTableItem;
+    ::boost::scoped_ptr< SvxGradientListItem >          mpGradientListItem;
+    ::boost::scoped_ptr< SvxHatchListItem >             mpHatchListItem;
+    ::boost::scoped_ptr< SvxBitmapListItem >            mpBitmapListItem;
+
+    ::sfx2::sidebar::ControllerItem                     maStyleControl;
+    ::sfx2::sidebar::ControllerItem                     maColorControl;
+    ::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;
+    ::sfx2::sidebar::ControllerItem                     maTransTypeController;
+    ::sfx2::sidebar::ControllerItem                     maTransController;
+    ::sfx2::sidebar::ControllerItem                     maTransGradientController;
+
+    Image                                               maImgAxial;
+    Image                                               maImgElli;
+    Image                                               maImgQuad;
+    Image                                               maImgRadial;
+    Image                                               maImgSquare;
+    Image                                               maImgLinear;
+    Image                                               maImgColor;
+
+    //for high contract
+    Image                                               maImgAxialH;
+    Image                                               maImgElliH;
+    Image                                               maImgQuadH;
+    Image                                               maImgRadialH;
+    Image                                               maImgSquareH;
+    Image                                               maImgLinearH;
+    Image                                               maImgColorH;
+
+    String                                              msHelpFillType;
+    String                                              msHelpFillAttr;
+
+    ::boost::scoped_ptr< PropertyPanelPopuplWindow >    mpTrGrFloatWin;
+    ::boost::scoped_ptr< SvxAreaTrGrPage >              mpTrGrPage;
+
+    //for new  color picker 
+    ::boost::scoped_ptr< PropertyPanelPopuplWindow >    mpFloatWinColor;
+    ::boost::scoped_ptr< SvxColorPage >                 mpPageColor; 
+    ::boost::scoped_ptr< XFillFloatTransparenceItem >   mpGradientItem;
+    ::boost::scoped_ptr< SfxUInt16Item >                mpTransTypeItem;
+
+    cssu::Reference<css::frame::XFrame>                 mxFrame;
+    ::sfx2::sidebar::EnumContext                        maContext;
+    SfxBindings*                                        mpBindings;
+
+    /// bitfield
+    bool                                                mbTBShow;
+    bool                                                mbColorAvail;
+
+    DECL_LINK(SelectFillTypeHdl, ListBox* );
+    DECL_LINK(SelectFillAttrHdl, ListBox* );
+    DECL_LINK(ToolBoxColorDropHdl, ToolBox *); //for new color picker 
+    DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
+    DECL_LINK(ModifyTransparentHdl_Impl, void*);
+    DECL_LINK( ClickTrGrHdl_Impl, ToolBox* );
+    DECL_LINK( ImplPopupModeEndHdl, FloatingWindow* );
+
+    SvxAreaTrGrPage* GetTrGrPage();
+    PropertyPanelPopuplWindow* GetTrGrFloatWin();
+
+    //for color picker 
+    void ImpEnsureFloatWinColorAndPageColor();
+    SvxColorPage* GetColorPage();
+    PropertyPanelPopuplWindow* GetColorFloatWin();
+
+    // cobstructor/destuctor
+    AreaPropertyPanel(
+        Window* pParent,
+        const cssu::Reference<css::frame::XFrame>& rxFrame,
+        SfxBindings* pBindings);
+    virtual ~AreaPropertyPanel(void);
+
+    void SetupIcons(void);
+    void Initialize();
+    void Update();//const SfxPoolItem* pState 
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// namespace close
+
+}} // end of namespace ::svx::sidebar
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // SVX_PROPERTYPANEL_AREAPAGE_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.src?rev=1444704&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.src (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.src Mon Feb 11 10:02:16 2013
@@ -0,0 +1,424 @@
+/**************************************************************
+ * 
+ * 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 <sfx2/propertypanel.hrc>
+#include <svx/dialogs.hrc>
+#include "helpid.hrc"
+#include "areapropertypage.hrc"
+
+#define MASKCOLOR		MaskColor = Color{ Red = 0xffff ; Green = 0xff00 ; Blue = 0xff00 ; };
+#define TOOLBOX_WIDTH		50
+#define TOOLBOX_HEIGHT		17
+
+Control RID_SIDEBAR_AREA_PANEL
+{
+	OutputSize = TRUE;
+	DialogControl = TRUE;
+	Border = FALSE;
+	Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, SECTIONPAGE_MARGIN_VERTICAL_TOP + SECTIONPAGE_MARGIN_VERTICAL_BOT + 2*( FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL + CBOX_HEIGHT) + CONTROL_SPACING_VERTICAL );
+	HelpID = HID_PROPERTYPANEL_AREA_SECTION ;
+	Text [ en-US ] = "Area";
+
+	FixedText FT_COLOR_LIST
+	{
+		Pos		= MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL , SECTIONPAGE_MARGIN_VERTICAL_TOP  ) ;
+        Size    = MAP_APPFONT ( FIXED_TEXT_WIDTH + 50, FIXED_TEXT_HEIGHT ) ;
+		Text [ en-US ] = "~Fill:";
+	};
+	FixedText FL_TRSP_TEXT
+	{
+		Pos  	= MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL , SECTIONPAGE_MARGIN_VERTICAL_TOP + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL ) ; 
+        Size    = MAP_APPFONT ( FIXED_TEXT_WIDTH + 50, FIXED_TEXT_HEIGHT ) ;
+		Text [ en-US ] = "~Transparency:";
+	};
+	ToolBox TB_COLOR
+	{
+		HelpID = HID_PPROPERTYPANEL_AREA_TBX_COLOR;
+		SVLook = TRUE ;
+		Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP + FIXED_TEXT_HEIGHT + 1) ;
+		Size = MAP_APPFONT (TOOLBOX_WIDTH ,TOOLBOX_HEIGHT ) ;
+		TabStop = TRUE ;
+		Text = "Color";
+		ItemList =
+		{
+			ToolBoxItem
+			{
+				Identifier = TBI_COLOR ;
+				HelpID = HID_PPROPERTYPANEL_AREA_TBI_COLOR;
+				DropDown = TRUE ;
+				Text = "Color" ;
+			};
+		};
+	};
+	String STR_HELP_COLOR
+	{
+		Text [ en-US ] = "Select the color to apply." ;
+	};
+	String STR_HELP_TYPE
+	{
+		Text [en-US] = "Select the fill type to apply.";
+	};
+	String STR_HELP_ATTR
+	{
+		Text [en-US] = "Select the effect to apply.";
+	};
+	Image IMG_AXIAL
+	{
+	    ImageBitmap = Bitmap{File = "axial.png";};
+	};
+	Image IMG_ELLI
+	{
+	    ImageBitmap = Bitmap{File = "ellipsoid.png";};
+	};
+	Image IMG_QUAD
+	{
+	    ImageBitmap = Bitmap{File = "Quadratic.png";};
+	};
+	Image IMG_RADIAL
+	{
+	    ImageBitmap = Bitmap{File = "radial.png";};
+	};
+	Image IMG_SQUARE
+	{
+	    ImageBitmap = Bitmap{File = "Square.png";};
+	};
+	Image IMG_LINEAR
+	{
+	    ImageBitmap = Bitmap{File = "linear.png";};
+	};
+	Image IMG_COLOR
+	{
+	    ImageBitmap = Bitmap{File = "fill_color.png";};
+	};
+	
+	//high contract
+	Image IMG_AXIAL_H
+	{
+	    ImageBitmap = Bitmap{File = "axial_h.png";};
+	};
+	Image IMG_ELLI_H
+	{
+	    ImageBitmap = Bitmap{File = "ellipsoid_h.png";};
+	};
+	Image IMG_QUAD_H
+	{
+	    ImageBitmap = Bitmap{File = "Quadratic_h.png";};
+	};
+	Image IMG_RADIAL_H
+	{
+	    ImageBitmap = Bitmap{File = "radial_h.png";};
+	};
+	Image IMG_SQUARE_H
+	{
+	    ImageBitmap = Bitmap{File = "Square_h.png";};
+	};
+	Image IMG_LINEAR_H
+	{
+	    ImageBitmap = Bitmap{File = "linear_h.png";};
+	};
+	Image IMG_COLOR_H
+	{
+	    ImageBitmap = Bitmap{File = "fill_color_h.png";};
+	};
+	
+	//=====================================================================================================================================
+	ListBox LB_TRGR_TYPES
+	{
+		Border = TRUE ;
+        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL , SECTIONPAGE_MARGIN_VERTICAL_TOP + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL) + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL ) ;
+        Size = MAP_APPFONT ( MBOX_WIDTH , LISTBOX_HEIGHT ) ;
+        QuickHelpText [ en-US ] = "Select the type of transparence to apply." ;
+		TabStop = TRUE ;
+		DropDown = TRUE ;
+		HelpID = HID_PPROPERTYPANEL_AREA_LB_TRGR_TYPES ;
+        StringList [ en-US ] =
+        {
+			< "None" ; Default ; > ;
+			< "Solid" ; Default ; > ;
+			< "Linear" ; Default ; > ;
+            < "Axial" ; Default ; > ;
+            < "Radial" ; Default ; > ;
+            < "Ellipsoid" ; Default ; > ;
+            < "Quadratic" ; Default ; > ;
+            < "Square" ; Default ; > ;
+        };
+	};
+	
+	MetricField MTR_TRANSPARENT
+	{
+		Border = TRUE ;
+        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL , SECTIONPAGE_MARGIN_VERTICAL_TOP + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL) + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL ) ;
+        Size = MAP_APPFONT ( MBOX_WIDTH + 1 ,MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRANSPARENT ;
+        QuickHelpText [ en-US ] = "Specify 0% for fully opaque through 100% for fully transparent." ;
+		TabStop = TRUE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Maximum = 100 ;
+		StrictFormat = TRUE ;
+		Unit = FUNIT_CUSTOM ;
+        CustomUnitText = "%" ;
+		Last = 100 ;
+		SpinSize = 5 ;
+	};
+	
+	ToolBox BTN_GRADIENT
+	{
+		Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL , SECTIONPAGE_MARGIN_VERTICAL_TOP + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL) + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL ) ;
+		HelpID = HID_PPROPERTYPANEL_AREA_TBX_GRADIENT ;		
+		SVLook = TRUE ;
+		Border = FALSE ;
+		TabStop = TRUE ;
+		Text = "Gradient";
+		ItemList =
+		{
+			ToolBoxItem
+			{
+				Identifier = TBI_BTX_GRADIENT ;
+				HelpID = HID_PPROPERTYPANEL_AREA_TBI_GRADIENT ;	
+				ItemBitmap = Bitmap
+				{
+					File = "linear.png" ;
+				};
+				DropDown = TRUE;
+				Text = "Gradient" ;
+			};
+		};
+	};
+	String STR_HELP_GRADIENT
+	{
+		Text [ en-US ] = "Specify the variation of gradient transparency." ;
+	};
+};
+
+Control RID_POPUPPANEL_AREAPAGE_TRGR
+{
+	OutputSize = TRUE;
+	DialogControl = TRUE;
+	Border = FALSE;
+	
+//	Size = MAP_APPFONT( POP_WIDTH, POP_HEIGHT );
+	
+	FixedText FT_TRGR_CENTER_X
+	{
+        Size = MAP_APPFONT ( CONTROL_WIDTH , FIXED_TEXT_HEIGHT ) ;
+		Text [ en-US ] = "Center ~X:";
+	};
+	MetricField MTR_TRGR_CENTER_X
+	{
+		Border = TRUE ;
+        Size = MAP_APPFONT ( CONTROL_WIDTH , MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_X ;
+        QuickHelpText [ en-US ] = "Specify the horizontal offset percentage from the center for the gradient shading style. 50% is the horizontal center." ;
+		TabStop = TRUE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Maximum = 100 ;
+		StrictFormat = TRUE ;
+		Unit = FUNIT_CUSTOM ;
+        CustomUnitText = "%" ;
+		Last = 100 ;
+		SpinSize = 5 ;
+	};
+	FixedText FT_TRGR_CENTER_Y
+	{
+        Size = MAP_APPFONT ( CONTROL_WIDTH + POPUPPANEL_MARGIN_HORIZONTAL, FIXED_TEXT_HEIGHT ) ;//wj
+		Text [ en-US ] = "Center ~Y:";
+	};
+	MetricField MTR_TRGR_CENTER_Y
+	{
+		Border = TRUE ;
+        Size = MAP_APPFONT ( CONTROL_WIDTH , MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_Y ;
+        QuickHelpText [ en-US ] = "Specify the vertical offset percentage from the center for the gradient shading style.  50% is the vertical center." ;
+		TabStop = TRUE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Maximum = 100 ;
+		StrictFormat = TRUE ;
+		Unit = FUNIT_CUSTOM ;
+        CustomUnitText = "%" ;
+		Last = 100 ;
+		SpinSize = 5 ;
+	};
+	FixedText FT_TRGR_ANGLE
+	{
+        Size = MAP_APPFONT ( CONTROL_WIDTH * 2 + POPUPPANEL_MARGIN_HORIZONTAL + CONTROL_SPACING_HORIZONTAL, FIXED_TEXT_HEIGHT ) ;//wj
+		Text [ en-US ] = "~Angle:";
+	};
+	MetricField MTR_TRGR_ANGLE
+	{
+		Border = TRUE ;
+        Size = MAP_APPFONT ( CONTROL_WIDTH , MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRGR_ANGLE ;
+        QuickHelpText [ en-US ] = "Specify the angle of rotation for the gradient shading style." ;
+		TabStop = FALSE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Minimum = -9999 ;
+		Maximum = 9999 ;
+		Unit = FUNIT_CUSTOM ;
+		SpinSize = 1 ;
+		CustomUnitText [ en-US ] = " degrees";
+	};	
+	FixedText FT_TRGR_START_VALUE
+	{
+        Size = MAP_APPFONT ( CONTROL_WIDTH , FIXED_TEXT_HEIGHT ) ;
+        Text [ en-US ] = "~Start value:";
+	};
+	MetricField MTR_TRGR_START_VALUE
+	{
+		Border = TRUE ;
+        Size = MAP_APPFONT ( CONTROL_WIDTH , MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRGR_SVALUE ;
+        QuickHelpText [ en-US ] = "Enter a transparency value for the beginning point of the gradient, where 0% is fully opaque and 100% is fully transparent." ;
+		TabStop = TRUE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Maximum = 100 ;
+		StrictFormat = TRUE ;
+		Unit = FUNIT_CUSTOM ;
+        CustomUnitText = "%" ;
+		Last = 100 ;
+		SpinSize = 5 ;
+	};
+	FixedText FT_TRGR_END_VALUE
+	{
+        Size = MAP_APPFONT (CONTROL_WIDTH + POPUPPANEL_MARGIN_HORIZONTAL, FIXED_TEXT_HEIGHT ) ; //wj
+		Text [ en-US ] = "~End value:";
+	};
+	MetricField MTR_TRGR_END_VALUE
+	{
+		Border = TRUE ;
+        Size = MAP_APPFONT ( CONTROL_WIDTH , MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRGR_EVALUE ;
+        QuickHelpText [ en-US ] = "Enter a transparency value for the endpoint of the gradient, where 0% is fully opaque and 100% is fully transparent." ;
+		TabStop = TRUE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Maximum = 100 ;
+		StrictFormat = TRUE ;
+		Unit = FUNIT_CUSTOM ;
+        CustomUnitText = "%" ;
+		Last = 100 ;
+		SpinSize = 5 ;
+	};
+	FixedText FT_TRGR_BORDER
+	{
+        Size = MAP_APPFONT (  CONTROL_WIDTH * 2 + POPUPPANEL_MARGIN_HORIZONTAL + CONTROL_SPACING_HORIZONTAL, FIXED_TEXT_HEIGHT ) ; //
+		Text [ en-US ] = "~Border:";
+	};
+	MetricField MTR_TRGR_BORDER
+	{
+		Border = TRUE ;
+        Size = MAP_APPFONT ( CONTROL_WIDTH , MBOX_HEIGHT ) ;
+        HelpID = HID_PPROPERTYPANEL_AREA_MTR_TRGR_BORDER ;
+        QuickHelpText [ en-US ] = "Specify the border value of gradient transparence." ;
+		TabStop = TRUE ;
+		Repeat = TRUE ;
+		Spin = TRUE ;
+		Maximum = 100 ;
+		StrictFormat = TRUE ;
+		Unit = FUNIT_CUSTOM ;
+		CustomUnitText = "%" ;
+		Last = 100 ;
+		SpinSize = 5 ;
+	};	
+	//=====================================================================================================================================
+
+	ToolBox BTN_LEFT_SECOND
+	{
+	    Border = FALSE ;
+		HelpID = HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND ;
+		SVLook = TRUE ;
+		Border = FALSE ;
+		TabStop = TRUE ;
+		Text = "Rotate Left";
+		ItemList =
+		{
+			ToolBoxItem
+			{
+				Identifier = TBI_LEFT ;
+				Text = "Rotate Left" ;
+				ItemBitmap = Bitmap
+				{
+		//			File = "rotate_left.png" ;
+				};
+			};
+		};		
+	};
+	ToolBox BTN_RIGHT_FIRST
+	{
+	    Border = FALSE ;
+		HelpID = HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST ;
+		SVLook = TRUE ;
+		Border = FALSE ;
+		TabStop = TRUE ;
+		Text = "Rotate Right";
+		ItemList =
+		{
+			ToolBoxItem
+			{
+				Identifier = TBI_RIGHT ;
+				Text = "Rotate Right" ;
+				ItemBitmap = Bitmap
+				{
+		//			File = "rotate_right.png" ;
+				};
+			};
+		};		
+	};
+	String STR_HELP_LEFT
+	{
+		Text [ en-US ] = "Rotate counterclockwise by 45 degrees." ;
+	};
+	String STR_HELP_RIGHT
+	{
+		Text [ en-US ] = "Rotate clockwise by 45 degrees." ;
+	};
+	Image IMG_ROT_LEFT
+	{
+	    ImageBitmap = Bitmap{File = "rotate_left.png";};
+	};
+	Image IMG_ROT_RIGHT
+	{
+	    ImageBitmap = Bitmap{File = "rotate_right.png";};
+	};
+};
+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";
+	};
+};
+
+// eof

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/geometry/AreaPropertyPanel.src
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/tools/PropertyPanelTools.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/tools/PropertyPanelTools.cxx?rev=1444704&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/tools/PropertyPanelTools.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/tools/PropertyPanelTools.cxx Mon Feb 11 10:02:16 2013
@@ -0,0 +1,202 @@
+/**************************************************************
+ * 
+ * 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/PropertyPanelTools.hxx>
+#include <sfx2/sidebar/Theme.hxx>
+//#include "propertypanel.hxx"
+//#include <vcl/svapp.hxx>
+#include <vcl/gradient.hxx>
+
+////////////////////////////////////////////////////////////////////////////////
+
+namespace svx { namespace sidebar {
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//SfxSectionPage::SfxSectionPage(Window* pParent, const ResId& rResId ,SfxPropertyPanel* pPanel, PropertySectionType nPageId)
+//:	Control(pParent, rResId ),
+//	mpPanel(pPanel),
+//	mnPageId(nPageId)
+//{
+//	mnMinimumWidth = GetOutputSizePixel().Width();
+//	EnableChildTransparentMode( TRUE);	
+//	//add  for high contract
+//	if(!GetSettings().GetStyleSettings().GetHighContrastMode())
+//		SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetPropertyPanelBackgroundColor()));
+//	else
+//		SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetMenuColor()));
+//}
+//
+//SfxSectionPage::~SfxSectionPage()
+//{
+//}
+//
+//SfxPropertyPanel* SfxSectionPage::GetPanel()
+//{
+//	return mpPanel;
+//}
+//
+//long SfxSectionPage::GetPanelWidth()
+//{
+//	return mpPanel->GetOutputSizePixel().Width();
+//}
+//
+//void SfxSectionPage::PanelResize()
+//{
+//	mpPanel->RequestReSize();
+//}
+//
+//sal_Int32 SfxSectionPage::GetPreferredWidth (sal_Int32 nHeight)
+//{
+//	//now we don't support auto layout, so return GetOutputSizePixel().Width();
+//	return GetOutputSizePixel().Width();
+//}
+//
+//sal_Int32 SfxSectionPage::GetPreferredHeight (sal_Int32 nWidth)
+//{
+//	//now we don't support auto layout, so return GetOutputSizePixel().Height();
+//	return GetOutputSizePixel().Height();
+//}
+//
+//sal_Int32 SfxSectionPage::GetMinimumWidth (void)
+//{
+//	return mnMinimumWidth;
+//}
+//
+//void SfxSectionPage::StateChangedImpl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) 
+//{
+//    // The SubClass can override this function to listent context switching
+//}
+//
+//SfxBindings* SfxSectionPage::GetBindings()
+//{
+//	if(NULL == mpPanel) return NULL;
+//	return mpPanel->GetBindings();
+//}
+//
+////////////////////////////////////////////////////////////////////////////////
+//
+//SfxPropertyPageController::SfxPropertyPageController(sal_uInt16 nId, SfxSectionPage *p, SfxBindings &rBindings)
+//:   SfxControllerItem(nId, rBindings),
+//    mpPage(p)
+//{
+//}
+//
+//SfxPropertyPageController::~SfxPropertyPageController()
+//{
+//}
+//
+//void SfxPropertyPageController::StateChanged( sal_uInt16 nSID, SfxItemState eState,	const SfxPoolItem* pState )
+//{
+//    if(mpPage) 
+//    {
+//        mpPage->NotifyItemUpdate(nSID, eState, pState);
+//    }
+//}
+//
+////////////////////////////////////////////////////////////////////////////////
+
+PropertyPanelPopuplWindow::PropertyPanelPopuplWindow(Window* pParent)
+:   FloatingWindow(pParent, WB_SYSTEMWINDOW | WB_3DLOOK) //  | WB_POPUP_FOCUSWIN)
+{
+}
+
+PropertyPanelPopuplWindow::~PropertyPanelPopuplWindow()
+{
+}
+
+long PropertyPanelPopuplWindow::Notify(NotifyEvent& rNEvt)
+{
+    if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
+    {
+        if(!HasChildPathFocus(true))
+        {
+            EndPopupMode();
+        }
+    }
+
+    return FloatingWindow::Notify(rNEvt);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+PropertyPanelPopupPage::PropertyPanelPopupPage(Window* pParent, const ResId& rResId)
+:   Control( pParent,rResId)
+{
+	EnableChildTransparentMode(true);
+	SetControlBackground();
+}
+
+PropertyPanelPopupPage::~PropertyPanelPopupPage()
+{
+}
+
+void PropertyPanelPopupPage::Paint(const Rectangle& rect)
+{
+	Size aSize = GetOutputSizePixel();
+	Color aOldLineColor = GetLineColor();
+	Color aOldFillColor = GetFillColor();
+
+    // todo: are this the correct colors ?!?
+	Color aFillColor(sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBackground));
+	Color aLineColor(sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBorderTopLeft));
+
+    SetFillColor (aFillColor);
+    SetLineColor (aLineColor);
+	Rectangle aRect(Point(0,0),aSize);
+	DrawRect(aRect);
+
+    // todo: are this the correct colors ?!?
+	aLineColor = sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBorderBottomRight);
+	SetLineColor (aLineColor);
+	DrawLine (Point(1,aSize.Height()-2),Point(aSize.Width()-2,aSize.Height()-2));	
+	
+	sal_uInt16 nGradientHeight = 9;		
+		
+	if(!GetSettings().GetStyleSettings().GetHighContrastMode())//add  for High contract
+	{
+		aRect = Rectangle(Point(1,1),Size(aSize.Width()-2,nGradientHeight));
+        // todo: are this the correct colors ?!?
+        const Gradient aGradientA(
+            GRADIENT_LINEAR, 
+            sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBorderTopLeft),
+            sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBorderBottomRight));
+		DrawGradient(aRect, aGradientA);
+
+		nGradientHeight = 12;
+		aRect = Rectangle(Point(1,aSize.Height()-2-nGradientHeight),Size(aSize.Width()-2,nGradientHeight));
+        // todo: are this the correct colors ?!?
+        const Gradient aGradientB(
+            GRADIENT_LINEAR, 
+            sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBorderBottomRight),
+            sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_ToolBoxBorderTopLeft));
+		DrawGradient(aRect, aGradientB);
+	}
+
+	Window::Paint(rect);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+}} // end of namespace ::svx::sidebar
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/tools/PropertyPanelTools.cxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: openoffice/branches/sidebar/main/svx/source/xoutdev/xpool.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/xoutdev/xpool.cxx?rev=1444704&r1=1444703&r2=1444704&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/xoutdev/xpool.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/xoutdev/xpool.cxx Mon Feb 11 10:02:16 2013
@@ -151,6 +151,8 @@ XOutdevItemPool::XOutdevItemPool(
 	mpLocalItemInfos[XATTR_FILLGRADIENT     -XATTR_START]._nSID = SID_ATTR_FILL_GRADIENT;
 	mpLocalItemInfos[XATTR_FILLHATCH        -XATTR_START]._nSID = SID_ATTR_FILL_HATCH;
 	mpLocalItemInfos[XATTR_FILLBITMAP       -XATTR_START]._nSID = SID_ATTR_FILL_BITMAP;
+	mpLocalItemInfos[XATTR_FILLTRANSPARENCE -XATTR_START]._nSID = SID_SVX_AREA_TRANSPARENCY;
+	mpLocalItemInfos[XATTR_FILLFLOATTRANSPARENCE -XATTR_START]._nSID = SID_SVX_AREA_TRANSP_GRADIENT;
 	mpLocalItemInfos[XATTR_FORMTXTSTYLE     -XATTR_START]._nSID = SID_FORMTEXT_STYLE;
 	mpLocalItemInfos[XATTR_FORMTXTADJUST    -XATTR_START]._nSID = SID_FORMTEXT_ADJUST;
 	mpLocalItemInfos[XATTR_FORMTXTDISTANCE  -XATTR_START]._nSID = SID_FORMTEXT_DISTANCE;