You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/05/31 15:56:04 UTC

svn commit: r1488227 [14/15] - in /openoffice/branches/rejuvenate01: ./ ext_libraries/apr/ ext_libraries/apr/prj/ ext_libraries/coinmp/prj/ ext_libraries/ratscan/prj/ ext_libraries/serf/prj/ main/ main/basctl/source/dlged/ main/basctl/uiconfig/basicide...

Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.hxx Fri May 31 13:55:58 2013
@@ -26,6 +26,7 @@
 #include <sfx2/sidebar/SidebarPanelBase.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
 
 #include <svtools/ctrlbox.hxx>
 #include <svx/tbxcolorupdate.hxx>
@@ -33,6 +34,7 @@
 #include <editeng/fhgtitem.hxx>
 
 #include <com/sun/star/ui/XSidebar.hpp>
+#include <com/sun/star/frame/XToolbarController.hpp>
 
 #include <boost/scoped_ptr.hpp>
 #include "TextCharacterSpacingPopup.hxx"
@@ -58,16 +60,16 @@ public:
     static TextPropertyPanel* Create (
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const ::sfx2::sidebar::EnumContext& rContext);
 
     virtual void DataChanged (const DataChangedEvent& rEvent);
+
     ::sfx2::sidebar::ControllerItem& GetSpaceController();
     long GetSelFontSize();
     void SetSpacing(long nKern);
     void EndSpacingPopupMode (void);
     void EndUnderlinePopupMode (void);
-    void SetFontColor (const String& rsColorName,const Color aColor);
-    void SetBrushColor (const String& rsColorName,const Color aColor);
     void SetUnderline(FontUnderline eUnderline);
     Color& GetUnderlineColor();
     void SetDefaultUnderline(FontUnderline eUnderline);
@@ -99,6 +101,8 @@ private:
     ::boost::scoped_ptr<ToolBox> mpToolBoxSpacing;
     ::boost::scoped_ptr<Window> mpToolBoxFontColorBackground;
     ::boost::scoped_ptr<ToolBox> mpToolBoxFontColor;
+    ::boost::scoped_ptr<Window> mpToolBoxFontColorBackgroundSW;
+    ::boost::scoped_ptr<ToolBox> mpToolBoxFontColorSW;
     ::boost::scoped_ptr<Window> mpToolBoxHighlightBackground;
     ::boost::scoped_ptr<ToolBox> mpToolBoxHighlight;
     ::boost::scoped_ptr<ToolboxButtonColorUpdater> mpFontColorUpdater;
@@ -112,12 +116,10 @@ private:
     ::sfx2::sidebar::ControllerItem maUnderlineControl;
     ::sfx2::sidebar::ControllerItem maStrikeControl;
     ::sfx2::sidebar::ControllerItem maShadowControl;
-    ::sfx2::sidebar::ControllerItem maFontColorControl;
     ::sfx2::sidebar::ControllerItem maScriptControlSw;
     ::sfx2::sidebar::ControllerItem maSuperScriptControl;
     ::sfx2::sidebar::ControllerItem maSubScriptControl;
     ::sfx2::sidebar::ControllerItem maSpacingControl;
-    ::sfx2::sidebar::ControllerItem maHighlightControl;
     ::sfx2::sidebar::ControllerItem maSDFontGrow;
     ::sfx2::sidebar::ControllerItem maSDFontShrink;
 
@@ -129,10 +131,6 @@ private:
     FontStrikeout				meStrike;
     bool mbWeightAvailable;
     bool mbPostureAvailable;
-    Color						maColor;
-    bool mbColorAvailable;
-    Color						maBackColor;
-    bool mbBackColorAvailable;
     SvxEscapement				meEscape;  //for sw
     bool						mbSuper;
     bool						mbSub;
@@ -146,8 +144,6 @@ private:
     bool mbFocusOnFontSizeCtrl;
     TextCharacterSpacingPopup maCharSpacePopup;
     TextUnderlinePopup maUnderlinePopup;
-    ColorPopup maFontColorPopup; 
-    ColorPopup maBrushColorPopup; 
 
     cssu::Reference<css::frame::XFrame> mxFrame;
     ::sfx2::sidebar::EnumContext maContext;
@@ -156,26 +152,21 @@ private:
     TextPropertyPanel (
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const ::sfx2::sidebar::EnumContext& rContext);
     virtual ~TextPropertyPanel (void);
 
 
     PopupControl* CreateCharacterSpacingControl (PopupContainer* pParent);
-    PopupControl* CreateFontColorPopupControl (PopupContainer* pParent);
-    PopupControl* CreateBrushColorPopupControl (PopupContainer* pParent);
     PopupControl* CreateUnderlinePopupControl (PopupContainer* pParent);
     DECL_LINK(SpacingClickHdl, ToolBox*);
-    DECL_LINK(ToolBoxFontColorDropHdl, ToolBox *); //for new color picker 
-    DECL_LINK(ToolBoxHighlightDropHdl, ToolBox *);
     DECL_LINK(ToolBoxUnderlineClickHdl, ToolBox* );
 
     void Initialize (void);
     void SetupToolboxItems (void);
     void InitToolBoxFont();
     void InitToolBoxIncDec();
-    void InitToolBoxFontColor();
     void InitToolBoxScript();
-    void InitToolBoxHighlight();
     void InitToolBoxSpacing();
 
     DECL_LINK(FontSelHdl, FontNameBox *);
@@ -188,6 +179,13 @@ private:
     DECL_LINK(ToolBoxScriptSelectHdl, ToolBox *);
 
     void UpdateItem (const sal_uInt16 nSlotId);
+
+    /** Depending on the given context make one of the toolboxes
+        mpToolBoxFontColor and mpToolBoxFontColorSW visible.  Both
+        occupy the same space.
+    */
+    void UpdateFontColorToolbox (
+        const ::sfx2::sidebar::EnumContext aContext);
 };
 
 } } // end of namespace ::svx::sidebar

Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/text/TextPropertyPanel.src Fri May 31 13:55:58 2013
@@ -64,6 +64,7 @@ Control RID_SIDEBAR_TEXT_PANEL
 		DropDown = TRUE;
 		HelpID = HID_COMBO_FONT_NAME ;
 		QuickHelpText [ en-US ] = "Font";
+//        Command = ".uno:CharFontName";
 	};
 	MetricBox MB_SBFONT_FONTSIZE
 	{
@@ -74,6 +75,7 @@ Control RID_SIDEBAR_TEXT_PANEL
 		DropDown = TRUE;
 		HelpID = HID_METRIC_FONT_SIZE;
 		QuickHelpText [ en-US ] = "Font Size";
+//        Command = ".uno:FontHeight";
 	};
 	
 	ToolBox TB_INCREASE_DECREASE
@@ -90,11 +92,13 @@ Control RID_SIDEBAR_TEXT_PANEL
 			{
 				Identifier = TBI_INCREASE;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_INCREASE;
+                Command = ".uno:Grow";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_DECREASE;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_DECREASE;
+                Command = ".uno:Shrink";
 			};
 		};
 	};
@@ -112,27 +116,32 @@ Control RID_SIDEBAR_TEXT_PANEL
 			{
 				Identifier = TBI_BOLD;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_BOLD;
+                Command = ".uno:Bold";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_ITALIC;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_ITALIC;
+                Command = ".uno:Italic";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_UNDERLINE;
 				DropDown = TRUE ;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_UNDERLINE;				
+                Command = ".uno:Underline";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_STRIKEOUT;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_STRIKEOUT;
+                Command = ".uno:Strikeout";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_SHADOWED;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SHADOWED;
+                Command = ".uno:Shadowed";
 			};		
 		};
 	};
@@ -144,7 +153,6 @@ Control RID_SIDEBAR_TEXT_PANEL
 		Pos = MAP_APPFONT (X3, THIRD_LINE_Y) ;
 		Size = MAP_APPFONT (TOOLBOX_ITEM_DD_WIDTH ,TOOLBOX_ITEM_HEIGHT ) ;
 		TabStop = TRUE ;
-		Text = "Font Color" ;
 		ItemList =
 		{
 			ToolBoxItem
@@ -152,6 +160,25 @@ Control RID_SIDEBAR_TEXT_PANEL
 				Identifier = TBI_FONTCOLOR ;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_FONT_COLOR;
 				DropDown = TRUE ;
+                Command = ".uno:Color";
+			};
+		};
+	};
+	ToolBox TB_FONTCOLOR_SW
+	{
+		HelpID = HID_PPROPERTYPANEL_TEXT_TBX_FONT_COLOR;
+		SVLook = TRUE ;
+		Pos = MAP_APPFONT (X3, THIRD_LINE_Y) ;
+		Size = MAP_APPFONT (TOOLBOX_ITEM_DD_WIDTH ,TOOLBOX_ITEM_HEIGHT ) ;
+		TabStop = TRUE ;
+		ItemList =
+		{
+			ToolBoxItem
+			{
+				Identifier = TBI_FONTCOLOR ;
+				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_FONT_COLOR;
+				DropDown = TRUE ;
+                Command = ".uno:FontColor";
 			};
 		};
 	};
@@ -171,6 +198,7 @@ Control RID_SIDEBAR_TEXT_PANEL
 				Identifier = TBI_HIGHLIGHT ;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_HIGHLIGHT_COLOR;
 				DropDown = TRUE ;
+                Command = ".uno:BackColor";
 			};
 		};
 	};
@@ -189,11 +217,13 @@ Control RID_SIDEBAR_TEXT_PANEL
 			{
 				Identifier = TBI_SUPER_SW;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUPER_SW;
+                Command = ".uno:SuperScript";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_SUB_SW;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUB_SW;
+                Command = ".uno:SubScript";
 			};
 		};
 	};
@@ -211,11 +241,13 @@ Control RID_SIDEBAR_TEXT_PANEL
 			{
 				Identifier = TBI_SUPER;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUPER;
+                Command = ".uno:SuperScript";
 			};
 			ToolBoxItem
 			{
 				Identifier = TBI_SUB;
 				HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUB;
+                Command = ".uno:SubScript";
 			};
 		};
 	};
@@ -235,6 +267,7 @@ Control RID_SIDEBAR_TEXT_PANEL
 				Identifier = TBI_SPACING;
 				DropDown = TRUE ;
 				HelpID = HID_TBI_SPACING;
+                Command = ".uno:Spacing";
 			};
 		};
 	};

Modified: openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdfmtf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdfmtf.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdfmtf.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdfmtf.cxx Fri May 31 13:55:58 2013
@@ -75,6 +75,9 @@
 #include <svx/xflbmtit.hxx>
 #include <svx/xflbstit.hxx>
 #include <svx/svdpntv.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdogrp.hxx>
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -484,63 +487,130 @@ void ImpSdrGDIMetaFileImport::InsertObj(
     	const SdrLayerID aOldLayer(pObj->GetLayer());
     	const SfxItemSet aOldItemSet(pObj->GetMergedItemSet());
         const SdrGrafObj* pSdrGrafObj = dynamic_cast< SdrGrafObj* >(pObj);
-        BitmapEx aBitmapEx;
+        const SdrTextObj* pSdrTextObj = dynamic_cast< SdrTextObj* >(pObj);
 
-        if(pSdrGrafObj)
+        if(pSdrTextObj && pSdrTextObj->HasText())
         {
-        	aBitmapEx = pSdrGrafObj->GetGraphic().GetBitmapEx();
-        }
+            // all text objects are created from ImportText and have no line or fill attributes, so
+            // it is okay to concentrate on the text itself
+            while(true)
+            {
+                const basegfx::B2DPolyPolygon aTextContour(pSdrTextObj->TakeContour());
+                const basegfx::B2DRange aTextRange(aTextContour.getB2DRange());
+                const basegfx::B2DRange aClipRange(maClip.getB2DRange());
+
+                // no overlap -> completely outside
+                if(!aClipRange.overlaps(aTextRange))
+                {
+                    SdrObject::Free(pObj);
+                    break;
+                }
+
+                // when the clip is a rectangle fast check for inside is possible
+                if(basegfx::tools::isRectangle(maClip) && aClipRange.isInside(aTextRange))
+                {
+                    // completely inside ClipRect
+                    break;
+                }
+
+                // here text needs to be clipped; to do so, convert to SdrObjects with polygons
+                // and add these recursively. Delete original object, do not add in this run
+                SdrObject* pConverted = pSdrTextObj->ConvertToPolyObj(true, true);
+                SdrObject::Free(pObj);
+
+                if(pConverted)
+                {
+                    // recursively add created conversion; per definition this shall not
+                    // contain further SdrTextObjs. Visit only non-group objects
+                    SdrObjListIter aIter(*pConverted, IM_DEEPNOGROUPS);
+
+                    // work with clones; the created conversion may contain group objects
+                    // and when working with the original objects the loop itself could
+                    // break and the cleanup later would be pretty complicated (only delete group
+                    // objects, are these empty, ...?)
+                    while(aIter.IsMore()) 
+                    {
+                        SdrObject* pCandidate = aIter.Next();
+                        OSL_ENSURE(pCandidate && 0 == dynamic_cast< SdrObjGroup* >(pCandidate), "SdrObjListIter with IM_DEEPNOGROUPS error (!)");
+                        SdrObject* pNewClone = pCandidate->Clone();
+
+                        if(pNewClone)
+                        {
+                            InsertObj(pNewClone, false);
+                        }
+                        else
+                        {
+                            OSL_ENSURE(false, "SdrObject::Clone() failed (!)");
+                        }
+                    }
 
-        SdrObject::Free(pObj);
+                    // cleanup temporary conversion objects
+                    SdrObject::Free(pConverted);
+                }
 
-        if(!aOldRange.isEmpty())
+                break;
+            }
+        }
+        else
         {
-            // clip against ClipRegion
-            const basegfx::B2DPolyPolygon aNewPoly(
-                basegfx::tools::clipPolyPolygonOnPolyPolygon(
-                    aPoly, 
-                    maClip, 
-                    true, 
-                    aPoly.isClosed() ? false : true));
-            const basegfx::B2DRange aNewRange(aNewPoly.getB2DRange());
-            
-            if(!aNewRange.isEmpty())
+            BitmapEx aBitmapEx;
+
+            if(pSdrGrafObj)
             {
-                pObj = new SdrPathObj(
-                    aNewPoly.isClosed() ? OBJ_POLY : OBJ_PLIN, 
-                    aNewPoly);
-            
-		        pObj->SetLayer(aOldLayer);
-		        pObj->SetMergedItemSet(aOldItemSet);
+                aBitmapEx = pSdrGrafObj->GetGraphic().GetBitmapEx();
+            }
+
+            SdrObject::Free(pObj);
 
-                if(!!aBitmapEx)
+            if(!aOldRange.isEmpty())
+            {
+                // clip against ClipRegion
+                const basegfx::B2DPolyPolygon aNewPoly(
+                    basegfx::tools::clipPolyPolygonOnPolyPolygon(
+                        aPoly, 
+                        maClip, 
+                        true, 
+                        aPoly.isClosed() ? false : true));
+                const basegfx::B2DRange aNewRange(aNewPoly.getB2DRange());
+            
+                if(!aNewRange.isEmpty())
                 {
-                    // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used
-                    const double fScaleX(aBitmapEx.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0));
-                    const double fScaleY(aBitmapEx.GetSizePixel().Height() / (aOldRange.getHeight() ? aOldRange.getHeight() : 1.0));
-                    basegfx::B2DRange aPixel(aNewRange);
-                    basegfx::B2DHomMatrix aTrans;
-
-                    aTrans.translate(-aOldRange.getMinX(), -aOldRange.getMinY());
-                    aTrans.scale(fScaleX, fScaleY);
-                    aPixel.transform(aTrans);
-
-                    const Size aOrigSizePixel(aBitmapEx.GetSizePixel());
-                    const Point aClipTopLeft(
-                        basegfx::fround(floor(std::max(0.0, aPixel.getMinX()))), 
-                        basegfx::fround(floor(std::max(0.0, aPixel.getMinY()))));
-                    const Size aClipSize(
-                        basegfx::fround(ceil(std::min((double)aOrigSizePixel.Width(), aPixel.getWidth()))),
-                        basegfx::fround(ceil(std::min((double)aOrigSizePixel.Height(), aPixel.getHeight()))));
-                    const BitmapEx aClippedBitmap(
-                        aBitmapEx, 
-                        aClipTopLeft,
-                        aClipSize);
-
-                    pObj->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
-                    pObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aClippedBitmap)));
-                    pObj->SetMergedItem(XFillBmpTileItem(false));
-                    pObj->SetMergedItem(XFillBmpStretchItem(true));
+                    pObj = new SdrPathObj(
+                        aNewPoly.isClosed() ? OBJ_POLY : OBJ_PLIN, 
+                        aNewPoly);
+
+                    pObj->SetLayer(aOldLayer);
+                    pObj->SetMergedItemSet(aOldItemSet);
+
+                    if(!!aBitmapEx)
+                    {
+                        // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used
+                        const double fScaleX(aBitmapEx.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0));
+                        const double fScaleY(aBitmapEx.GetSizePixel().Height() / (aOldRange.getHeight() ? aOldRange.getHeight() : 1.0));
+                        basegfx::B2DRange aPixel(aNewRange);
+                        basegfx::B2DHomMatrix aTrans;
+
+                        aTrans.translate(-aOldRange.getMinX(), -aOldRange.getMinY());
+                        aTrans.scale(fScaleX, fScaleY);
+                        aPixel.transform(aTrans);
+
+                        const Size aOrigSizePixel(aBitmapEx.GetSizePixel());
+                        const Point aClipTopLeft(
+                            basegfx::fround(floor(std::max(0.0, aPixel.getMinX()))), 
+                            basegfx::fround(floor(std::max(0.0, aPixel.getMinY()))));
+                        const Size aClipSize(
+                            basegfx::fround(ceil(std::min((double)aOrigSizePixel.Width(), aPixel.getWidth()))),
+                            basegfx::fround(ceil(std::min((double)aOrigSizePixel.Height(), aPixel.getHeight()))));
+                        const BitmapEx aClippedBitmap(
+                            aBitmapEx, 
+                            aClipTopLeft,
+                            aClipSize);
+
+                        pObj->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
+                        pObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aClippedBitmap)));
+                        pObj->SetMergedItem(XFillBmpTileItem(false));
+                        pObj->SetMergedItem(XFillBmpStretchItem(true));
+                    }
                 }
             }
         }
@@ -959,19 +1029,22 @@ void ImpSdrGDIMetaFileImport::ImportText
 	Rectangle aTextRect( aPos, aSize );
 	SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect );
 
-	if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) )
+	pText->SetMergedItem ( SdrTextUpperDistItem (0));
+	pText->SetMergedItem ( SdrTextLowerDistItem (0));
+	pText->SetMergedItem ( SdrTextRightDistItem (0));
+	pText->SetMergedItem ( SdrTextLeftDistItem (0));
+
+    if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) )
 	{
 		pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH );
 		pText->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
 		// don't let the margins eat the space needed for the text
-		pText->SetMergedItem ( SdrTextUpperDistItem (0));
-		pText->SetMergedItem ( SdrTextLowerDistItem (0));
-		pText->SetMergedItem ( SdrTextRightDistItem (0));
-		pText->SetMergedItem ( SdrTextLeftDistItem (0));
 		pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) );
 	}
 	else
+    {
 		pText->SetMergedItem( SdrTextAutoGrowWidthItem( true ) );
+    }
 
 	pText->SetModel(mpModel);
 	pText->SetLayer(mnLayer);

Modified: openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdhdl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdhdl.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdhdl.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdhdl.cxx Fri May 31 13:55:58 2013
@@ -63,6 +63,13 @@
 #include <svx/sdr/overlay/overlaypolypolygon.hxx>
 #include <vcl/lazydelete.hxx>
 
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
+#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 // #i15222#
 // Due to the ressource problems in Win95/98 with bitmap ressources i
@@ -2433,4 +2440,200 @@ void SdrCropHdl::CreateB2dIAObject()
 	}
 }
 
-// --------------------------------------------------------------------
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrCropViewHdl::SdrCropViewHdl(
+    const basegfx::B2DHomMatrix& rObjectTransform,
+    const Graphic& rGraphic,
+    double fCropLeft,
+    double fCropTop,
+    double fCropRight,
+    double fCropBottom,
+    bool bExtraMirrorXFromGraphic)
+:   SdrHdl(Point(), HDL_USER),
+    maObjectTransform(rObjectTransform),
+    maGraphic(rGraphic),
+    mfCropLeft(fCropLeft),
+    mfCropTop(fCropTop),
+    mfCropRight(fCropRight),
+    mfCropBottom(fCropBottom),
+    mbExtraMirrorXFromGraphic(bExtraMirrorXFromGraphic)
+{
+}
+
+void SdrCropViewHdl::CreateB2dIAObject()
+{
+    GetRidOfIAObject();
+    SdrMarkView* pView = pHdlList ? pHdlList->GetView() : 0;
+    SdrPageView* pPageView = pView ? pView->GetSdrPageView() : 0;
+
+    if(pPageView && pView->areMarkHandlesHidden())
+    {
+        return;
+    }
+
+    // decompose to have current translate and scale
+    basegfx::B2DVector aScale, aTranslate;
+    double fRotate, fShearX;
+
+    maObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX);
+
+    if(aScale.equalZero())
+    {
+        return;
+    }
+
+    // detect 180 degree rotation, this is the same as mirrored in X and Y,
+    // thus change to mirroring. Prefer mirroring here. Use the equal call
+    // with getSmallValue here, the original which uses rtl::math::approxEqual
+    // is too correct here. Maybe this changes with enhanced precision in aw080
+    // to the better so that this can be reduced to the more precise call again
+    if(basegfx::fTools::equal(fabs(fRotate), F_PI, 0.000000001))
+    {
+        aScale.setX(aScale.getX() * -1.0);
+        aScale.setY(aScale.getY() * -1.0);
+        fRotate = 0.0;
+    }
+
+    // remember mirroring, reset at Scale and adapt crop values for usage; 
+    // mirroring can stay in the object transformation, so do not have to 
+    // cope with it here (except later for the CroppedImage transformation, 
+    // see below)
+    const bool bMirroredX(aScale.getX() < 0.0);
+    const bool bMirroredY(aScale.getY() < 0.0);
+    double fCropLeft(mfCropLeft);
+    double fCropTop(mfCropTop);
+    double fCropRight(mfCropRight);
+    double fCropBottom(mfCropBottom);
+
+    if(bMirroredX)
+    {
+        aScale.setX(-aScale.getX());
+        fCropLeft = mfCropRight;
+        fCropRight = mfCropLeft;
+    }
+
+    if(bMirroredY)
+    {
+        aScale.setY(-aScale.getY());
+        fCropTop = mfCropBottom;
+        fCropBottom = mfCropTop;
+    }
+
+    // create target translate and scale
+    const basegfx::B2DVector aTargetScale(
+        aScale.getX() + fCropRight + fCropLeft,
+        aScale.getY() + fCropBottom + fCropTop);
+    const basegfx::B2DVector aTargetTranslate(
+        aTranslate.getX() - fCropLeft,
+        aTranslate.getY() - fCropTop);
+
+    // create ranges to make comparisons
+    const basegfx::B2DRange aCurrentForCompare(
+        aTranslate.getX(), aTranslate.getY(), 
+        aTranslate.getX() + aScale.getX(), aTranslate.getY() + aScale.getY());
+    basegfx::B2DRange aCropped(
+        aTargetTranslate.getX(), aTargetTranslate.getY(), 
+        aTargetTranslate.getX() + aTargetScale.getX(), aTargetTranslate.getY() + aTargetScale.getY());
+
+    if(aCropped.isEmpty())
+    {
+        // nothing to return since cropped content is completely empty
+        return;
+    }
+
+    if(aCurrentForCompare.equal(aCropped))
+    {
+        // no crop at all
+        return;
+    }
+
+    // back-transform to have values in unit coordinates
+    basegfx::B2DHomMatrix aBackToUnit;
+    aBackToUnit.translate(-aTranslate.getX(), -aTranslate.getY());
+    aBackToUnit.scale(
+        basegfx::fTools::equalZero(aScale.getX()) ? 1.0 : 1.0 / aScale.getX(),
+        basegfx::fTools::equalZero(aScale.getY()) ? 1.0 : 1.0 / aScale.getY());
+
+    // transform cropped back to unit coordinates
+    aCropped.transform(aBackToUnit);
+
+    // prepare crop PolyPolygon
+    basegfx::B2DPolyPolygon aCropPolyPolygon(
+        basegfx::tools::createPolygonFromRect(
+            aCropped));
+
+    // current range is unit range
+    basegfx::B2DRange aOverlap(0.0, 0.0, 1.0, 1.0);
+
+    aOverlap.intersect(aCropped);
+
+    if(!aOverlap.isEmpty())
+    {
+        aCropPolyPolygon.append(
+            basegfx::tools::createPolygonFromRect(
+                aOverlap));
+    }
+
+    // transform to object coordinates to prepare for clip
+    aCropPolyPolygon.transform(maObjectTransform);
+
+    // create cropped transformation
+    basegfx::B2DHomMatrix aCroppedTransform;
+    const bool bCombinedMirrorX(mbExtraMirrorXFromGraphic || bMirroredX);
+
+    aCroppedTransform.scale(
+        bCombinedMirrorX ? -aCropped.getWidth() : aCropped.getWidth(), 
+        bMirroredY ? -aCropped.getHeight() : aCropped.getHeight());
+    aCroppedTransform.translate(
+        bCombinedMirrorX ? aCropped.getMaxX() : aCropped.getMinX(), 
+        bMirroredY ? aCropped.getMaxY() : aCropped.getMinY());
+    aCroppedTransform = maObjectTransform * aCroppedTransform;
+
+    // prepare graphic primitive (tranformed)
+    const drawinglayer::primitive2d::Primitive2DReference aGraphic(
+        new drawinglayer::primitive2d::GraphicPrimitive2D(
+            aCroppedTransform,
+            maGraphic));
+
+    // embed to MaskPrimitive2D
+    const drawinglayer::primitive2d::Primitive2DReference aMaskedGraphic(
+        new drawinglayer::primitive2d::MaskPrimitive2D(
+            aCropPolyPolygon,
+            drawinglayer::primitive2d::Primitive2DSequence(&aGraphic, 1)));
+
+    // embed to UnifiedTransparencePrimitive2D
+    const drawinglayer::primitive2d::Primitive2DReference aTransparenceMaskedGraphic(
+        new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
+            drawinglayer::primitive2d::Primitive2DSequence(&aMaskedGraphic, 1),
+            0.8));
+
+    const drawinglayer::primitive2d::Primitive2DSequence aSequence(&aTransparenceMaskedGraphic, 1);
+
+    for(sal_uInt32 b(0L); b < pPageView->PageWindowCount(); b++)
+    {
+        // const SdrPageViewWinRec& rPageViewWinRec = rPageViewWinList[b];
+        const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b);
+
+        if(rPageWindow.GetPaintWindow().OutputToWindow())
+        {
+            if(rPageWindow.GetOverlayManager())
+            {
+                ::sdr::overlay::OverlayObject* pNew = new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence);
+                DBG_ASSERT(pNew, "Got NO new IAO!");
+
+                if(pNew)
+                {
+                    // only informative object, no hit
+                    pNew->setHittable(false);
+
+                    rPageWindow.GetOverlayManager()->add(*pNew);
+                    maOverlayGroup.append(*pNew);
+                }
+            }
+        }
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// eof

Modified: openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdmrkv.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdmrkv.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdmrkv.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdmrkv.cxx Fri May 31 13:55:58 2013
@@ -55,6 +55,7 @@
 #include <svx/sdrpagewindow.hxx>
 #include <svx/sdrhittesthelper.hxx>
 #include <svx/svdocapt.hxx>
+#include <svx/svdograf.hxx>
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 // predefines
@@ -761,6 +762,56 @@ void SdrMarkView::SetMarkHandles()
                 }
                 else if( eDragMode==SDRDRAG_CROP )
 				{
+                    const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pMarkedObj);
+
+                    if(pSdrGrafObj)
+                    {
+                        const SdrGrafCropItem& rCrop = static_cast< const SdrGrafCropItem& >(pSdrGrafObj->GetMergedItem(SDRATTR_GRAFCROP));
+
+                        if(rCrop.GetLeft() || rCrop.GetTop() || rCrop.GetRight() ||rCrop.GetBottom())
+                        {
+                            basegfx::B2DHomMatrix aMatrix;
+                            basegfx::B2DPolyPolygon aPolyPolygon;
+
+                            pSdrGrafObj->TRGetBaseGeometry(aMatrix, aPolyPolygon);
+
+                            // decompose to have current translate and scale
+                            basegfx::B2DVector aScale, aTranslate;
+                            double fRotate, fShearX;
+
+                            aMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+
+                            if(!aScale.equalZero())
+                            {
+                                // get crop scale
+                                const basegfx::B2DVector aCropScaleFactor(
+                                    pSdrGrafObj->GetGraphicObject().calculateCropScaling(
+                                        aScale.getX(),
+                                        aScale.getY(),
+                                        rCrop.GetLeft(),
+                                        rCrop.GetTop(),
+                                        rCrop.GetRight(),
+                                        rCrop.GetBottom()));
+
+                                // apply crop scale
+                                const double fCropLeft(rCrop.GetLeft() * aCropScaleFactor.getX());
+                                const double fCropTop(rCrop.GetTop() * aCropScaleFactor.getY());
+                                const double fCropRight(rCrop.GetRight() * aCropScaleFactor.getX());
+                                const double fCropBottom(rCrop.GetBottom() * aCropScaleFactor.getY());
+
+                                aHdl.AddHdl(
+                                    new SdrCropViewHdl(
+                                        aMatrix,
+                                        pSdrGrafObj->GetGraphicObject().GetGraphic(),
+                                        fCropLeft,
+                                        fCropTop,
+                                        fCropRight,
+                                        fCropBottom,
+                                        pSdrGrafObj->IsMirrored()));
+                            }
+                        }
+                    }
+    
 					aHdl.AddHdl(new SdrCropHdl(aRect.TopLeft()     ,HDL_UPLFT));
 					aHdl.AddHdl(new SdrCropHdl(aRect.TopCenter()   ,HDL_UPPER));
 					aHdl.AddHdl(new SdrCropHdl(aRect.TopRight()    ,HDL_UPRGT));

Modified: openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdundo.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdundo.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdundo.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/svdraw/svdundo.cxx Fri May 31 13:55:58 2013
@@ -1168,6 +1168,11 @@ void SdrUndoObjSetText::Undo()
 
 	pObj->SetEmptyPresObj( bEmptyPresObj );
 	pObj->ActionChanged();
+
+    // #122410# SetOutlinerParaObject at SdrText does not trigger a
+    // BroadcastObjectChange, but it is needed to make evtl. SlideSorters
+    // update their preview.
+	pObj->BroadcastObjectChange();
 }
 
 void SdrUndoObjSetText::Redo()
@@ -1184,6 +1189,11 @@ void SdrUndoObjSetText::Redo()
 
 	pObj->ActionChanged();
 
+    // #122410# NbcSetOutlinerParaObjectForText at SdrTextObj does not trigger a
+    // BroadcastObjectChange, but it is needed to make evtl. SlideSorters
+    // update their preview.
+	pObj->BroadcastObjectChange();
+
 	// #94278# Trigger PageChangeCall
 	ImpShowPageOfThisObject();
 }

Modified: openoffice/branches/rejuvenate01/main/svx/source/tbxctrls/extrusioncontrols.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/tbxctrls/extrusioncontrols.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/tbxctrls/extrusioncontrols.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/tbxctrls/extrusioncontrols.cxx Fri May 31 13:55:58 2013
@@ -539,7 +539,7 @@ OUString SAL_CALL ExtrusionDepthControll
 Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException )
 {
     Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuController" ));
+    aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
     return aSNS;
 }
 

Modified: openoffice/branches/rejuvenate01/main/svx/source/unodraw/UnoGraphicExporter.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/unodraw/UnoGraphicExporter.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/unodraw/UnoGraphicExporter.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/unodraw/UnoGraphicExporter.cxx Fri May 31 13:55:58 2013
@@ -852,7 +852,8 @@ bool GraphicExporter::GetGraphic( Export
                               ( rSettings.mnHeight != aSizePixel.Height() ) ) )
 						{
 							BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
-							aBmpEx.Scale( Size( rSettings.mnWidth, rSettings.mnHeight ) );
+                            // export: use highest quality
+							aBmpEx.Scale( Size( rSettings.mnWidth, rSettings.mnHeight ), BMP_SCALE_LANCZOS );
 							aGraphic = aBmpEx;
 						}
 

Modified: openoffice/branches/rejuvenate01/main/svx/source/unodraw/unoprov.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/unodraw/unoprov.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/unodraw/unoprov.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/unodraw/unoprov.cxx Fri May 31 13:55:58 2013
@@ -1232,64 +1232,60 @@ bool SvxUnoConvertResourceString( int nS
 
 static sal_uInt16 __READONLY_DATA SvxUnoColorNameDefResId[] =
 {
-	RID_SVXSTR_BLUEGREY_DEF,
-	RID_SVXSTR_BLACK_DEF,
-	RID_SVXSTR_BLUE_DEF,
-	RID_SVXSTR_GREEN_DEF,
-	RID_SVXSTR_CYAN_DEF,
-	RID_SVXSTR_RED_DEF,
-	RID_SVXSTR_MAGENTA_DEF,
-	RID_SVXSTR_BROWN_DEF,
-	RID_SVXSTR_GREY_DEF,
-	RID_SVXSTR_LIGHTGREY_DEF,
-	RID_SVXSTR_LIGHTBLUE_DEF,
-	RID_SVXSTR_LIGHTGREEN_DEF,
-	RID_SVXSTR_LIGHTCYAN_DEF,
-	RID_SVXSTR_LIGHTRED_DEF,
-	RID_SVXSTR_LIGHTMAGENTA_DEF,
-	RID_SVXSTR_YELLOW_DEF,
-	RID_SVXSTR_WHITE_DEF,
-	RID_SVXSTR_ORANGE_DEF,
-	RID_SVXSTR_VIOLET_DEF,
-	RID_SVXSTR_BORDEAUX_DEF,
-	RID_SVXSTR_PALE_YELLOW_DEF,
-	RID_SVXSTR_PALE_GREEN_DEF,
-	RID_SVXSTR_DKVIOLET_DEF,
-	RID_SVXSTR_SALMON_DEF,
-	RID_SVXSTR_SEABLUE_DEF,
-	RID_SVXSTR_COLOR_SUN_DEF,
-	RID_SVXSTR_COLOR_CHART_DEF
+	RID_SVXSTR_COLOR_BLUEGREY_DEF,
+	RID_SVXSTR_COLOR_BLACK_DEF,
+	RID_SVXSTR_COLOR_BLUE_DEF,
+	RID_SVXSTR_COLOR_GREEN_DEF,
+	RID_SVXSTR_COLOR_CYAN_DEF,
+	RID_SVXSTR_COLOR_RED_DEF,
+	RID_SVXSTR_COLOR_MAGENTA_DEF,
+	RID_SVXSTR_COLOR_GREY_DEF,
+	RID_SVXSTR_COLOR_YELLOW_DEF,
+	RID_SVXSTR_COLOR_WHITE_DEF,
+	RID_SVXSTR_COLOR_ORANGE_DEF,
+	RID_SVXSTR_COLOR_VIOLET_DEF,
+	RID_SVXSTR_COLOR_BORDEAUX_DEF,
+	RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
+	RID_SVXSTR_COLOR_PALE_GREEN_DEF,
+	RID_SVXSTR_COLOR_DARKVIOLET_DEF,
+	RID_SVXSTR_COLOR_SALMON_DEF,
+	RID_SVXSTR_COLOR_SEABLUE_DEF,
+	RID_SVXSTR_COLOR_CHART_DEF,
+    RID_SVXSTR_COLOR_PURPLE_DEF,
+    RID_SVXSTR_COLOR_SKYBLUE_DEF,
+    RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
+    RID_SVXSTR_COLOR_PINK_DEF,
+    RID_SVXSTR_COLOR_TURQUOISE_DEF,
+    RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF
 };
 
 static sal_uInt16 __READONLY_DATA SvxUnoColorNameResId[] =
 {
-	RID_SVXSTR_BLUEGREY,
-	RID_SVXSTR_BLACK,
-	RID_SVXSTR_BLUE,
-	RID_SVXSTR_GREEN,
-	RID_SVXSTR_CYAN,
-	RID_SVXSTR_RED,
-	RID_SVXSTR_MAGENTA,
-	RID_SVXSTR_BROWN,
-	RID_SVXSTR_GREY,
-	RID_SVXSTR_LIGHTGREY,
-	RID_SVXSTR_LIGHTBLUE,
-	RID_SVXSTR_LIGHTGREEN,
-	RID_SVXSTR_LIGHTCYAN,
-	RID_SVXSTR_LIGHTRED,
-	RID_SVXSTR_LIGHTMAGENTA,
-	RID_SVXSTR_YELLOW,
-	RID_SVXSTR_WHITE,
-	RID_SVXSTR_ORANGE,
-	RID_SVXSTR_VIOLET,
-	RID_SVXSTR_BORDEAUX,
-	RID_SVXSTR_PALE_YELLOW,
-	RID_SVXSTR_PALE_GREEN,
-	RID_SVXSTR_DKVIOLET,
-	RID_SVXSTR_SALMON,
-	RID_SVXSTR_SEABLUE,
-	RID_SVXSTR_COLOR_SUN,
-    RID_SVXSTR_COLOR_CHART
+	RID_SVXSTR_COLOR_BLUEGREY,
+	RID_SVXSTR_COLOR_BLACK,
+	RID_SVXSTR_COLOR_BLUE,
+	RID_SVXSTR_COLOR_GREEN,
+	RID_SVXSTR_COLOR_CYAN,
+	RID_SVXSTR_COLOR_RED,
+	RID_SVXSTR_COLOR_MAGENTA,
+	RID_SVXSTR_COLOR_GREY,
+	RID_SVXSTR_COLOR_YELLOW,
+	RID_SVXSTR_COLOR_WHITE,
+	RID_SVXSTR_COLOR_ORANGE,
+	RID_SVXSTR_COLOR_VIOLET,
+	RID_SVXSTR_COLOR_BORDEAUX,
+	RID_SVXSTR_COLOR_PALE_YELLOW,
+	RID_SVXSTR_COLOR_PALE_GREEN,
+	RID_SVXSTR_COLOR_DARKVIOLET,
+	RID_SVXSTR_COLOR_SALMON,
+	RID_SVXSTR_COLOR_SEABLUE,
+    RID_SVXSTR_COLOR_CHART,
+    RID_SVXSTR_COLOR_PURPLE,
+    RID_SVXSTR_COLOR_SKYBLUE,
+    RID_SVXSTR_COLOR_YELLOWGREEN,
+    RID_SVXSTR_COLOR_PINK,
+    RID_SVXSTR_COLOR_TURQUOISE,
+    RID_SVXSTR_COLOR_BLUE_CLASSIC
 };
 
 bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw()

Modified: openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xattr2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xattr2.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xattr2.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xattr2.cxx Fri May 31 13:55:58 2013
@@ -222,6 +222,9 @@ SfxItemPresentation XLineJointItem::GetP
 				case( com::sun::star::drawing::LineJoint_ROUND ):
 					nId = RID_SVXSTR_LINEJOINT_ROUND;
 				break;
+
+				default:
+				break;
 			}
 
 			if( nId )

Modified: openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xtabcolr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xtabcolr.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xtabcolr.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/xoutdev/xtabcolr.cxx Fri May 31 13:55:58 2013
@@ -38,7 +38,6 @@
 #define GLOBALOVERFLOW
 
 using namespace com::sun::star;
-using namespace rtl;
 
 sal_Unicode const pszExtColor[]	 = {'s','o','c'};
 
@@ -139,288 +138,139 @@ bool XColorList::Save()
 
 bool XColorList::Create()
 {
-	XubString aStr;
-	xub_StrLen nLen;
-	ResMgr& rRes = DIALOG_MGR();
+    sal_uInt32 a(0);
+    sal_uInt32 b(0);
 
-	static sal_uInt16 __READONLY_DATA aResId[] =
-	{
-		RID_SVXSTR_BLACK,
-		RID_SVXSTR_BLUE,
-		RID_SVXSTR_GREEN,
-		RID_SVXSTR_CYAN,
-		RID_SVXSTR_RED,
-		RID_SVXSTR_MAGENTA,
-		RID_SVXSTR_BROWN,
-		RID_SVXSTR_GREY,
-		RID_SVXSTR_LIGHTGREY,
-		RID_SVXSTR_LIGHTBLUE,
-		RID_SVXSTR_LIGHTGREEN,
-		RID_SVXSTR_LIGHTCYAN,
-		RID_SVXSTR_LIGHTRED,
-		RID_SVXSTR_LIGHTMAGENTA,
-		RID_SVXSTR_YELLOW,
-		RID_SVXSTR_WHITE
-	};
-
-	// MT: COL_XXX ist in VCL kein enum mehr!!!
-	// COL_WHITE ist seeeehr gross! ( => Zugriff ueber das obige Array hinweg )
-	// Mit der unteren Schleife gibt es keinen Absturtz, aber es ist
-	// alles schwarz, weil alles kleine Werte.
-	// Ausserdem ist die ganze Vorgehensweise laut MM sehr unperformant
-	// => lieber gleich Stringlisten laden.
-
-	// BM: ifndef VCL part removed (deprecated)
+    // <!-- Gray palette from white to black -->
+    XubString aStrGrey( SVX_RESSTR( RID_SVXSTR_COLOR_GREY ) );
 
-	static ColorData __READONLY_DATA aColTab[] =
-	{
-		COL_BLACK,
-		COL_BLUE,
-		COL_GREEN,
-		COL_CYAN,
-		COL_RED,
-		COL_MAGENTA,
-		COL_BROWN,
-		COL_GRAY,
-		COL_LIGHTGRAY,
-		COL_LIGHTBLUE,
-		COL_LIGHTGREEN,
-		COL_LIGHTCYAN,
-		COL_LIGHTRED,
-		COL_LIGHTMAGENTA,
-		COL_YELLOW,
-		COL_WHITE
-	};
+    Insert( new XColorEntry( Color( 0xff, 0xff, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_WHITE ) ) );
+    aStrGrey.AppendAscii(" 1"); Insert( new XColorEntry( Color( 0xee, 0xee, 0xee ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('2')); Insert( new XColorEntry( Color( 0xdd, 0xdd, 0xdd ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('3')); Insert( new XColorEntry( Color( 0xcc, 0xcc, 0xcc ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('4')); Insert( new XColorEntry( Color( 0xb2, 0xb2, 0xb2 ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('5')); Insert( new XColorEntry( Color( 0x99, 0x99, 0x99 ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('6')); Insert( new XColorEntry( Color( 0x80, 0x80, 0x80 ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('7')); Insert( new XColorEntry( Color( 0x66, 0x66, 0x66 ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('8')); Insert( new XColorEntry( Color( 0x33, 0x33, 0x33 ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('9')); Insert( new XColorEntry( Color( 0x1c, 0x1c, 0x1c  ), aStrGrey ) );
+    aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('1')); aStrGrey.AppendAscii("0"); Insert( new XColorEntry( Color( 0x11, 0x11, 0x11 ), aStrGrey ) );
+    Insert( new XColorEntry( Color( 0x00, 0x00, 0x00 ), SVX_RESSTR( RID_SVXSTR_COLOR_BLACK ) ) );
+
+    // <!-- Base colors step 0 to 10 -->
+    const sal_uInt32 nNumColorsInGroup(12);
+    const sal_uInt32 nNumGroups(11);
+    XubString aStrCol[nNumColorsInGroup];
+    const sal_uInt32 aStdCol[nNumColorsInGroup * nNumGroups] = {
+        0xffff99, 0xff6600, 0xff3333, 0xff00cc, 0xff33ff, 0x9900ff, 0x6666ff, 0x00ccff, 0x66ffff, 0x33ff99, 0x99ff66, 0xccff00, 
+        0xffff66, 0xffcc00, 0xff9999, 0xff66cc, 0xff99ff, 0xcc66ff, 0x9999ff, 0x9999ff, 0x99ffff, 0x66ff99, 0x99ff99, 0xccff66,
+        0xffff00, 0xff9900, 0xff6666, 0xff3399, 0xff66ff, 0x9933ff, 0x3333ff, 0x3399ff, 0x00ffff, 0x00ff66, 0x66ff66, 0x99ff33, 
+        0xcc9900, 0xff3300, 0xff0000, 0xff0066, 0xff00ff, 0x6600ff, 0x0000ff, 0x0066ff, 0x00cccc, 0x00cc33, 0x00cc00, 0x66ff00,
+        0x996600, 0xcc3300, 0xcc0000, 0xcc0066, 0xcc00cc, 0x6600cc, 0x0000cc, 0x0066cc, 0x009999, 0x009933, 0x009900, 0x66cc00, 
+        0x663300, 0x801900, 0x990000, 0x990066, 0x990099, 0x330099, 0x000099, 0x006699, 0x006666, 0x007826, 0x006600, 0x669900,
+        0x333300, 0x461900, 0x330000, 0x330033, 0x660066, 0x000033, 0x000066, 0x000080, 0x003333, 0x00331a, 0x003300, 0x193300, 
+        0x666633, 0x661900, 0x663333, 0x660033, 0x663366, 0x330066, 0x333366, 0x003366, 0x336666, 0x006633, 0x336633, 0x336600,
+        0x999966, 0x996633, 0x996666, 0x993366, 0x996699, 0x663399, 0x666699, 0x336699, 0x669999, 0x339966, 0x669966, 0x669933, 
+        0xcccc99, 0xcc9966, 0xcc9999, 0xcc6699, 0xcc99cc, 0x9966cc, 0x9999cc, 0x6699cc, 0x99cccc, 0x66cc99, 0x99cc99, 0x99cc66,
+        0xffffcc, 0xffcc99, 0xffcccc, 0xff99cc, 0xffccff, 0xcc99ff, 0xccccff, 0x99ccff, 0xccffff, 0x99ffcc, 0xccffcc, 0xccff99 };
 
-	for( sal_uInt16 n = 0; n < 16; ++n )
-	{
-		Insert( new XColorEntry( Color( aColTab[n] ), String( ResId( aResId[ n ], rRes )) ), n );
-	}
+    for(a = 0; a < nNumGroups; a++)
+    {
+        switch(a)
+        {
+            case 0:
+            {
+                aStrCol[0] = SVX_RESSTR(RID_SVXSTR_COLOR_YELLOW);
+                aStrCol[1] = SVX_RESSTR(RID_SVXSTR_COLOR_ORANGE);
+                aStrCol[2] = SVX_RESSTR(RID_SVXSTR_COLOR_RED);
+                aStrCol[3] = SVX_RESSTR(RID_SVXSTR_COLOR_PINK);
+                aStrCol[4] = SVX_RESSTR(RID_SVXSTR_COLOR_MAGENTA);
+                aStrCol[5] = SVX_RESSTR(RID_SVXSTR_COLOR_PURPLE);
+                aStrCol[6] = SVX_RESSTR(RID_SVXSTR_COLOR_BLUE);
+                aStrCol[7] = SVX_RESSTR(RID_SVXSTR_COLOR_SKYBLUE);
+                aStrCol[8] = SVX_RESSTR(RID_SVXSTR_COLOR_CYAN);
+                aStrCol[9] = SVX_RESSTR(RID_SVXSTR_COLOR_TURQUOISE);
+                aStrCol[10] = SVX_RESSTR(RID_SVXSTR_COLOR_GREEN);
+                aStrCol[11] = SVX_RESSTR(RID_SVXSTR_COLOR_YELLOWGREEN);
+                break;
+            }
+            case 1:
+            {
+                for(b = 0; b < nNumColorsInGroup; b++)
+                {
+                    aStrCol[b].AppendAscii(" 1");
+                }
+                break;
+            }
+            case 10:
+            {
+                for(b = 0; b < nNumColorsInGroup; b++)
+                {
+                    aStrCol[b].SetChar(aStrCol[b].Len() - 1, sal_Unicode('1'));
+                    aStrCol[b].AppendAscii("0");
+                }
+                break;
+            }
+            default: // 2 .. 9, 11
+            {
+                for(b = 0; b < nNumColorsInGroup; b++)
+                {
+                    aStrCol[b].SetChar(aStrCol[b].Len() - 1, sal_Unicode('0') + sal_Unicode(a % 10));
+                }
+                break;
+            }
+        }
+
+        const sal_uInt32 nOffset(a * nNumColorsInGroup);
+
+        for(b = 0; b < nNumColorsInGroup; b++)
+        {
+            Insert( new XColorEntry( aStdCol[nOffset + b], aStrCol[b] ) );
+        }
+    }
 
-	aStr = SVX_RESSTR( RID_SVXSTR_GREY );
-	aStr.AppendAscii(" 80%");
-	nLen = aStr.Len() - 3;
-	Insert( new XColorEntry( Color( 51, 51, 51 ), aStr ) , 16);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color( 76, 76, 76 ), aStr ) , 17);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color(102,102,102 ), aStr ) , 18);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(153,153,153 ), aStr ) , 19);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(179,179,179 ), aStr ) , 20);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(204,204,204 ), aStr ) , 21);
-	// BM: new 15%
-	aStr.SetChar(nLen, sal_Unicode('1'));
-	aStr.SetChar(nLen + 1, sal_Unicode('5'));
-	Insert( new XColorEntry( Color(217,217,217 ), aStr ) , 22);
-	aStr.SetChar(nLen + 1, sal_Unicode('0'));
-	Insert( new XColorEntry( Color(230,230,230 ), aStr ) , 23);
-	Insert( new XColorEntry( Color(230,230,255 ), SVX_RESSTR( RID_SVXSTR_BLUEGREY ) ) , 24);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_RED );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color(255, 51,102 ), aStr ) , 25);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(220, 35,  0 ), aStr ) , 26);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(184, 71,  0 ), aStr ) , 27);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(255, 51, 51 ), aStr ) , 28);
-	aStr.SetChar(nLen, sal_Unicode('5'));
-	Insert( new XColorEntry( Color(235, 97, 61 ), aStr ) , 29);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color(184, 71, 71 ), aStr ) , 30);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color(184,  0, 71 ), aStr ) , 31);
-	aStr.SetChar(nLen, sal_Unicode('8'));
-	Insert( new XColorEntry( Color(153, 40, 76 ), aStr ) , 32);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_MAGENTA );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color(148,  0,107 ), aStr ) , 33);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(148, 71,107 ), aStr ) , 34);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(148, 71,148 ), aStr ) , 35);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(153,102,204 ), aStr ) , 36);
-	aStr.SetChar(nLen, sal_Unicode('5'));
-	Insert( new XColorEntry( Color(107, 71,148 ), aStr ) , 37);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color(107, 35,148 ), aStr ) , 38);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color(107,  0,148 ), aStr ) , 39);
-	aStr.SetChar(nLen, sal_Unicode('8'));
-	Insert( new XColorEntry( Color( 94, 17,166 ), aStr ) , 40);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_BLUE );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color( 40,  0,153 ), aStr ) , 41);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color( 71,  0,184 ), aStr ) , 42);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color( 35,  0,220 ), aStr ) , 43);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color( 35, 35,220 ), aStr ) , 44);
-	aStr.SetChar(nLen, sal_Unicode('5'));
-	Insert( new XColorEntry( Color(  0, 71,255 ), aStr ) , 45);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color(  0,153,255 ), aStr ) , 46);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color(  0,184,255 ), aStr ) , 47);
-	aStr.SetChar(nLen, sal_Unicode('8'));
-	Insert( new XColorEntry( Color(153,204,255 ), aStr ) , 48);
-	//Insert(48, new XColorEntry( Color( 46,215,255 ), aStr ) );
-
-	aStr = SVX_RESSTR( RID_SVXSTR_CYAN );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color(  0,220,255 ), aStr ) , 49);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(  0,204,204 ), aStr ) , 50);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color( 35,184,220 ), aStr ) , 51);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color( 71,184,184 ), aStr ) , 52);
-	aStr.SetChar(nLen, sal_Unicode('5'));
-	Insert( new XColorEntry( Color( 51,163,163 ), aStr ) , 53);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color( 25,138,138 ), aStr ) , 54);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color(  0,107,107 ), aStr ) , 55);
-	aStr.SetChar(nLen, sal_Unicode('8'));
-	Insert( new XColorEntry( Color(  0, 74, 74 ), aStr ) , 56);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_GREEN );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color( 53, 94,  0 ), aStr ) , 57);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color( 92,133, 38 ), aStr ) , 58);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(125,166, 71 ), aStr ) , 59);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(148,189, 94 ), aStr ) , 60);
-	aStr.SetChar(nLen, sal_Unicode('5'));
-	Insert( new XColorEntry( Color(  0,174,  0 ), aStr ) , 61);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color( 51,204,102 ), aStr ) , 62);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color( 61,235, 61 ), aStr ) , 63);
-	aStr.SetChar(nLen, sal_Unicode('8'));
-	Insert( new XColorEntry( Color( 35,255, 35 ), aStr ) , 64);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_YELLOW );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color(230,255,  0 ), aStr ) , 65);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(255,255,153 ), aStr ) , 66);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(255,255,102 ), aStr ) , 67);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(230,230, 76 ), aStr ) , 68);
-	aStr.SetChar(nLen, sal_Unicode('5'));
-	Insert( new XColorEntry( Color(204,204,  0 ), aStr ) , 69);
-	aStr.SetChar(nLen, sal_Unicode('6'));
-	Insert( new XColorEntry( Color(179,179,  0 ), aStr ) , 70);
-	aStr.SetChar(nLen, sal_Unicode('7'));
-	Insert( new XColorEntry( Color(128,128, 25 ), aStr ) , 71);
-	aStr.SetChar(nLen, sal_Unicode('8'));
-	Insert( new XColorEntry( Color(102,102,  0 ), aStr ) , 72);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_BROWN );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color( 76, 25,  0 ), aStr ) , 73);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(102, 51,  0 ), aStr ) , 74);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(128, 76, 25 ), aStr ) , 75);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(153,102, 51 ), aStr ) , 76);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_ORANGE );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color(204,102, 51 ), aStr ) , 77);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color(255,102, 51 ), aStr ) , 78);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color(255,153,102 ), aStr ) , 79);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color(255,204,153 ), aStr ) , 80);
-
-	// new chart colors
-	aStr = SVX_RESSTR( RID_SVXSTR_VIOLET );
-	Insert( new XColorEntry( Color( 0x99, 0x99, 0xff ), aStr ) , 81);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_BORDEAUX );
-	Insert( new XColorEntry( Color( 0x99, 0x33, 0x66 ), aStr ) , 82);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_PALE_YELLOW );
-	Insert( new XColorEntry( Color( 0xff, 0xff, 0xcc ), aStr ) , 83);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_PALE_GREEN );
-	Insert( new XColorEntry( Color( 0xcc, 0xff, 0xff ), aStr ) , 84);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_DKVIOLET );
-	Insert( new XColorEntry( Color( 0x66, 0x00, 0x66 ), aStr ) , 85);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_SALMON );
-	Insert( new XColorEntry( Color( 0xff, 0x80, 0x80 ), aStr ) , 86);
-
-	aStr = SVX_RESSTR( RID_SVXSTR_SEABLUE );
-	Insert( new XColorEntry( Color( 0x00, 0x66, 0xcc ), aStr ) , 87);
-
-	// Sun colors
-	aStr = SVX_RESSTR( RID_SVXSTR_COLOR_SUN );
-	aStr.AppendAscii(" 1");
-	nLen = aStr.Len() - 1;
-	Insert( new XColorEntry( Color( 0x33, 0x33, 0x66 ), aStr ) , 88);
-	aStr.SetChar(nLen, sal_Unicode('2'));
-	Insert( new XColorEntry( Color( 0x66, 0x66, 0x99 ), aStr ) , 89);
-	aStr.SetChar(nLen, sal_Unicode('3'));
-	Insert( new XColorEntry( Color( 0x99, 0x99, 0xcc ), aStr ) , 90);
-	aStr.SetChar(nLen, sal_Unicode('4'));
-	Insert( new XColorEntry( Color( 0xcc, 0xcc, 0xff ), aStr ) , 91);
-
-    // Chart default colors
-    aStr = SVX_RESSTR( RID_SVXSTR_COLOR_CHART );
-    aStr.AppendAscii(" 1");
-    nLen = aStr.Len() - 1;
-    Insert( new XColorEntry( Color( 0x00, 0x45, 0x86 ), aStr ) , 92);
-    aStr.SetChar(nLen, sal_Unicode('2'));
-    Insert( new XColorEntry( Color( 0xff, 0x42, 0x0e ), aStr ) , 93);
-    aStr.SetChar(nLen, sal_Unicode('3'));
-    Insert( new XColorEntry( Color( 0xff, 0xd3, 0x20 ), aStr ) , 94);
-    aStr.SetChar(nLen, sal_Unicode('4'));
-    Insert( new XColorEntry( Color( 0x57, 0x9d, 0x1c ), aStr ) , 95);
-    aStr.SetChar(nLen, sal_Unicode('5'));
-    Insert( new XColorEntry( Color( 0x7e, 0x00, 0x21 ), aStr ) , 96);
-    aStr.SetChar(nLen, sal_Unicode('6'));
-    Insert( new XColorEntry( Color( 0x83, 0xca, 0xff ), aStr ) , 97);
-    aStr.SetChar(nLen, sal_Unicode('7'));
-    Insert( new XColorEntry( Color( 0x31, 0x40, 0x04 ), aStr ) , 98);
-    aStr.SetChar(nLen, sal_Unicode('8'));
-    Insert( new XColorEntry( Color( 0xae, 0xcf, 0x00 ), aStr ) , 99);
-    aStr.SetChar(nLen, sal_Unicode('9'));
-    Insert( new XColorEntry( Color( 0x4b, 0x1f, 0x6f ), aStr ) , 100);
-    aStr.SetChar(nLen, sal_Unicode('1'));
-    aStr.AppendAscii("0");
-    nLen = aStr.Len() - 1;
-    Insert( new XColorEntry( Color( 0xff, 0x95, 0x0e ), aStr ) , 101);
-    aStr.SetChar(nLen, sal_Unicode('1'));
-    Insert( new XColorEntry( Color( 0xc5, 0x00, 0x0b ), aStr ) , 102);
-    aStr.SetChar(nLen, sal_Unicode('2'));
-    Insert( new XColorEntry( Color( 0x00, 0x84, 0xd1 ), aStr ) , 103);
+    // <!-- use some 'nice' colors from original palette -->
+    Insert( new XColorEntry( Color( 0xe6, 0xe6, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_BLUEGREY) ) );
+    Insert( new XColorEntry( Color( 0xCF, 0xE7, 0xF5  ), SVX_RESSTR( RID_SVXSTR_COLOR_BLUE_CLASSIC ) ) );
+
+    // <!-- add 'pale' colors from original palette -->
+    Insert( new XColorEntry( Color( 0x99, 0x99, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_VIOLET ) ) );
+    Insert( new XColorEntry( Color( 0x99, 0x33, 0x66 ), SVX_RESSTR( RID_SVXSTR_COLOR_BORDEAUX ) ) );
+    Insert( new XColorEntry( Color( 0xff, 0xff, 0xcc ), SVX_RESSTR( RID_SVXSTR_COLOR_PALE_YELLOW ) ) );
+    Insert( new XColorEntry( Color( 0xcc, 0xff, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_PALE_GREEN ) ) );
+    Insert( new XColorEntry( Color( 0x66, 0x00, 0x66 ), SVX_RESSTR( RID_SVXSTR_COLOR_DARKVIOLET ) ) );
+    Insert( new XColorEntry( Color( 0xff, 0x80, 0x80 ), SVX_RESSTR( RID_SVXSTR_COLOR_SALMON ) ) );
+    Insert( new XColorEntry( Color( 0x00, 0x66, 0xcc ), SVX_RESSTR( RID_SVXSTR_COLOR_SEABLUE ) ) );
+
+    // <!-- add Chart colors from original palette (also 12, coincidence?) -->
+    XubString aStrChart( SVX_RESSTR( RID_SVXSTR_COLOR_CHART ) );
+    aStrChart.AppendAscii(" 1");
+    Insert( new XColorEntry( Color( 0x00, 0x45, 0x86 ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('2'));
+    Insert( new XColorEntry( Color( 0xff, 0x42, 0x0e ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('3'));
+    Insert( new XColorEntry( Color( 0xff, 0xd3, 0x20 ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('4'));
+    Insert( new XColorEntry( Color( 0x57, 0x9d, 0x1c ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('5'));
+    Insert( new XColorEntry( Color( 0x7e, 0x00, 0x21 ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('6'));
+    Insert( new XColorEntry( Color( 0x83, 0xca, 0xff ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('7'));
+    Insert( new XColorEntry( Color( 0x31, 0x40, 0x04 ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('8'));
+    Insert( new XColorEntry( Color( 0xae, 0xcf, 0x00 ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('9'));
+    Insert( new XColorEntry( Color( 0x4b, 0x1f, 0x6f ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('1'));
+    aStrChart.AppendAscii("0");
+    Insert( new XColorEntry( Color( 0xff, 0x95, 0x0e ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('1'));
+    Insert( new XColorEntry( Color( 0xc5, 0x00, 0x0b ), aStrChart ) );
+    aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('2'));
+    Insert( new XColorEntry( Color( 0x00, 0x84, 0xd1 ), aStrChart ) );
 
-	return( Count() == 104 );
+    return(165 == Count());
 }
 
 /************************************************************************/

Modified: openoffice/branches/rejuvenate01/main/svx/util/svxcore.component
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/util/svxcore.component?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/util/svxcore.component (original)
+++ openoffice/branches/rejuvenate01/main/svx/util/svxcore.component Fri May 31 13:55:58 2013
@@ -25,7 +25,7 @@
 <component loader="com.sun.star.loader.SharedLibrary"
     xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.svx.ExtrusionDepthController">
-    <service name="com.sun.star.frame.PopupMenuController"/>
+    <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
   <implementation name="com.sun.star.comp.svx.ExtrusionDirectionController">
     <service name="com.sun.star.frame.ToolbarController"/>

Modified: openoffice/branches/rejuvenate01/main/sw/Library_msword.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/Library_msword.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/Library_msword.mk (original)
+++ openoffice/branches/rejuvenate01/main/sw/Library_msword.mk Fri May 31 13:55:58 2013
@@ -62,7 +62,7 @@ $(eval $(call gb_Library_add_linked_libs
 	svx \
 	svxcore \
 	sw \
-	tk \
+	ootk \
 	tl \
 	ucbhelper \
 	utl \

Modified: openoffice/branches/rejuvenate01/main/sw/Library_sw.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/Library_sw.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/Library_sw.mk (original)
+++ openoffice/branches/rejuvenate01/main/sw/Library_sw.mk Fri May 31 13:55:58 2013
@@ -69,7 +69,7 @@ $(eval $(call gb_Library_add_linked_libs
 	svt \
 	svx \
 	svxcore \
-	tk \
+	ootk \
 	tl \
 	ucbhelper \
 	utl \

Modified: openoffice/branches/rejuvenate01/main/sw/Library_swui.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/Library_swui.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/Library_swui.mk (original)
+++ openoffice/branches/rejuvenate01/main/sw/Library_swui.mk Fri May 31 13:55:58 2013
@@ -56,7 +56,7 @@ $(eval $(call gb_Library_add_linked_libs
 	svx \
 	svxcore \
 	sw \
-	tk \
+	ootk \
 	tl \
 	ucbhelper \
 	utl \

Modified: openoffice/branches/rejuvenate01/main/sw/Library_vbaswobj.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/Library_vbaswobj.mk?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/Library_vbaswobj.mk (original)
+++ openoffice/branches/rejuvenate01/main/sw/Library_vbaswobj.mk Fri May 31 13:55:58 2013
@@ -52,7 +52,7 @@ $(eval $(call gb_Library_add_linked_libs
 	svx \
 	svxcore \
 	sw \
-	tk \
+	ootk \
 	tl \
 	utl \
 	vbahelper \

Modified: openoffice/branches/rejuvenate01/main/sw/source/core/doc/poolfmt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/doc/poolfmt.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/doc/poolfmt.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/doc/poolfmt.cxx Fri May 31 13:55:58 2013
@@ -1440,7 +1440,7 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nI
 
 
 
-void lcl_GetStdPgSize( SwDoc* pDoc, SfxItemSet& rSet )
+void lcl_PutStdPageSizeIntoItemSet( SwDoc* pDoc, SfxItemSet& rSet )
 {
 	SwPageDesc* pStdPgDsc = pDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD );
 	SwFmtFrmSize aFrmSz( pStdPgDsc->GetMaster().GetFrmSize() );
@@ -1455,152 +1455,163 @@ void lcl_GetStdPgSize( SwDoc* pDoc, SfxI
 
 SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
 {
-	ASSERT( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
-			"Falsche AutoFormat-Id" );
-
-    SwPageDesc *pNewPgDsc;
-	sal_uInt16 n;
+    ASSERT( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
+            "Falsche AutoFormat-Id" );
 
-	for( n = 0; n < aPageDescs.Count(); ++n )
-		if( nId == ( pNewPgDsc = aPageDescs[ n ] )->GetPoolFmtId() )
-		{
-            return pNewPgDsc;
-		}
+    for( sal_uInt16 n = 0; n < aPageDescs.Count(); ++n )
+    {
+        if ( nId == aPageDescs[ n ]->GetPoolFmtId() )
+        {
+            return aPageDescs[ n ];
+        }
+    }
 
-	// Fehlerfall: unbekannte Poolvorlage
-	if( RES_POOLPAGE_BEGIN > nId ||  nId >= RES_POOLPAGE_END )
-	{
-		ASSERT( !this, "ungueltige Id" );
-		nId = RES_POOLPAGE_BEGIN;
-	}
+    if( RES_POOLPAGE_BEGIN > nId ||  nId >= RES_POOLPAGE_END )
+    {
+        // unknown page pool ID
+        ASSERT( !this, "<SwDoc::GetPageDescFromPool(..)> - unknown page pool ID" );
+        nId = RES_POOLPAGE_BEGIN;
+    }
 
-	ResId aResId( sal_uInt32(RC_POOLPAGEDESC_BEGIN + nId - RES_POOLPAGE_BEGIN), *pSwResMgr );
-	String aNm( aResId );
+    SwPageDesc* pNewPgDsc = 0;
     {
-		sal_Bool bIsModified = IsModified();
+        const ResId aResId( sal_uInt32(RC_POOLPAGEDESC_BEGIN + nId - RES_POOLPAGE_BEGIN), *pSwResMgr );
+        const String aNm( aResId );
+        const bool bIsModified = IsModified();
 
+        sal_uInt16 nPageDescIdx = 0;
         {
             ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
-            n = MakePageDesc( aNm, 0, bRegardLanguage );
+            nPageDescIdx = MakePageDesc( aNm, 0, bRegardLanguage );
         }
 
-		pNewPgDsc = aPageDescs[ n ];
-		pNewPgDsc->SetPoolFmtId( nId );
-		if( !bIsModified )
-			ResetModified();
-	}
-
+        pNewPgDsc = aPageDescs[ nPageDescIdx ];
+        pNewPgDsc->SetPoolFmtId( nId );
+        if ( !bIsModified )
+        {
+            ResetModified();
+        }
+    }
 
     SvxLRSpaceItem aLR( RES_LR_SPACE );
-	aLR.SetLeft( GetMetricVal( CM_1 ) * 2 );
-	aLR.SetRight( aLR.GetLeft() );
+    {
+        aLR.SetLeft( GetMetricVal( CM_1 ) * 2 );
+        aLR.SetRight( aLR.GetLeft() );
+    }
     SvxULSpaceItem aUL( RES_UL_SPACE );
-	aUL.SetUpper( (sal_uInt16)aLR.GetLeft() );
-	aUL.SetLower( (sal_uInt16)aLR.GetLeft() );
+    {
+        aUL.SetUpper( (sal_uInt16)aLR.GetLeft() );
+        aUL.SetLower( (sal_uInt16)aLR.GetLeft() );
+    }
 
-	SwAttrSet aSet( GetAttrPool(), aPgFrmFmtSetRange );
-	sal_Bool bSetLeft = sal_True;
+    SwAttrSet aSet( GetAttrPool(), aPgFrmFmtSetRange );
+    bool bSetLeft = true;
 
-	switch( nId )
-	{
-	case RES_POOLPAGE_STANDARD:				// Standard-Seite
-		{
-			aSet.Put( aLR );
-			aSet.Put( aUL );
-			if( pNewPgDsc )
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
-		}
-		break;
+    switch( nId )
+    {
+    case RES_POOLPAGE_STANDARD:     // "Default"
+        {
+            aSet.Put( aLR );
+            aSet.Put( aUL );
+            if( pNewPgDsc )
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+        }
+        break;
 
-	case RES_POOLPAGE_FIRST:				// Erste Seite
-	case RES_POOLPAGE_REGISTER:				// Verzeichnis
-		{
-			lcl_GetStdPgSize( this, aSet );
-			aSet.Put( aLR );
-			aSet.Put( aUL );
-			if( pNewPgDsc )
-			{
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
-				if( RES_POOLPAGE_FIRST == nId )
-					pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_STANDARD ));
-			}
-		}
-		break;
+    case RES_POOLPAGE_FIRST:        // "First Page"
+    case RES_POOLPAGE_REGISTER:     // "Index"
+        {
+            lcl_PutStdPageSizeIntoItemSet( this, aSet );
+            aSet.Put( aLR );
+            aSet.Put( aUL );
+            if( pNewPgDsc )
+            {
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+                if( RES_POOLPAGE_FIRST == nId )
+                    pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_STANDARD ));
+            }
+        }
+        break;
 
-	case RES_POOLPAGE_LEFT:					// Linke Seite
-		{
-			lcl_GetStdPgSize( this, aSet );
-			aSet.Put( aLR );
-			aSet.Put( aUL );
-			bSetLeft = sal_False;
-			if( pNewPgDsc )
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
-		}
-		break;
-	case RES_POOLPAGE_RIGHT:				// Rechte Seite
-		{
-			lcl_GetStdPgSize( this, aSet );
-			aSet.Put( aLR );
-			aSet.Put( aUL );
-			bSetLeft = sal_False;
-			if( pNewPgDsc )
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
-		}
-		break;
+    case RES_POOLPAGE_LEFT:         // "Left Page"
+        {
+            lcl_PutStdPageSizeIntoItemSet( this, aSet );
+            aSet.Put( aLR );
+            aSet.Put( aUL );
+            bSetLeft = false;
+            if( pNewPgDsc )
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
+        }
+        break;
+    case RES_POOLPAGE_RIGHT:        // "Right Page"
+        {
+            lcl_PutStdPageSizeIntoItemSet( this, aSet );
+            aSet.Put( aLR );
+            aSet.Put( aUL );
+            bSetLeft = false;
+            if( pNewPgDsc )
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
+        }
+        break;
 
-	case RES_POOLPAGE_JAKET:				// Umschlag
-		{
-			aLR.SetLeft( 0 ); aLR.SetRight( 0 );
-			aUL.SetUpper( 0 ); aUL.SetLower( 0 );
-			Size aPSize( SvxPaperInfo::GetPaperSize( PAPER_ENV_C65 ) );
-			LandscapeSwap( aPSize );
-			aSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() ));
-			aSet.Put( aLR );
-			aSet.Put( aUL );
+    case RES_POOLPAGE_JAKET:        // "Envelope"
+        {
+            Size aPSize( SvxPaperInfo::GetPaperSize( PAPER_ENV_C65 ) );
+            LandscapeSwap( aPSize );
+            aSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() ));
+            aLR.SetLeft( 0 ); aLR.SetRight( 0 );
+            aUL.SetUpper( 0 ); aUL.SetLower( 0 );
+            aSet.Put( aLR );
+            aSet.Put( aUL );
 
-			if( pNewPgDsc )
-			{
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
-				pNewPgDsc->SetLandscape( sal_True );
-			}
-		}
-		break;
+            if( pNewPgDsc )
+            {
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+                pNewPgDsc->SetLandscape( sal_True );
+            }
+        }
+        break;
 
-	case RES_POOLPAGE_HTML:				// HTML
-		{
-			lcl_GetStdPgSize( this, aSet );
-			aLR.SetRight( GetMetricVal( CM_1 ));
-			aUL.SetUpper( (sal_uInt16)aLR.GetRight() );
-			aUL.SetLower( (sal_uInt16)aLR.GetRight() );
-			aSet.Put( aLR );
-			aSet.Put( aUL );
+    case RES_POOLPAGE_HTML:         // "HTML"
+        {
+            lcl_PutStdPageSizeIntoItemSet( this, aSet );
+            aLR.SetRight( GetMetricVal( CM_1 ));
+            aUL.SetUpper( (sal_uInt16)aLR.GetRight() );
+            aUL.SetLower( (sal_uInt16)aLR.GetRight() );
+            aSet.Put( aLR );
+            aSet.Put( aUL );
 
-			if( pNewPgDsc )
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
-		}
-		break;
-	case RES_POOLPAGE_FOOTNOTE:
-	case RES_POOLPAGE_ENDNOTE:
-		{
-			lcl_GetStdPgSize( this, aSet );
-			aSet.Put( aLR );
-			aSet.Put( aUL );
-			if( pNewPgDsc )
-				pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
-			SwPageFtnInfo aInf( pNewPgDsc->GetFtnInfo() );
-			aInf.SetLineWidth( 0 );
-			aInf.SetTopDist( 0 );
-			aInf.SetBottomDist( 0 );
-			pNewPgDsc->SetFtnInfo( aInf );
-		}
+            if( pNewPgDsc )
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+        }
+        break;
+
+    case RES_POOLPAGE_FOOTNOTE:     // "Footnote"
+    case RES_POOLPAGE_ENDNOTE:      // "Endnote"
+        {
+            lcl_PutStdPageSizeIntoItemSet( this, aSet );
+            aSet.Put( aLR );
+            aSet.Put( aUL );
+            if( pNewPgDsc )
+                pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+            SwPageFtnInfo aInf( pNewPgDsc->GetFtnInfo() );
+            aInf.SetLineWidth( 0 );
+            aInf.SetTopDist( 0 );
+            aInf.SetBottomDist( 0 );
+            pNewPgDsc->SetFtnInfo( aInf );
+        }
         break;  
-        case RES_POOLPAGE_LANDSCAPE:
+
+    case RES_POOLPAGE_LANDSCAPE:    // "Landscape"
         {
             SwPageDesc* pStdPgDsc = this->GetPageDescFromPool( RES_POOLPAGE_STANDARD );
             SwFmtFrmSize aFrmSz( pStdPgDsc->GetMaster().GetFrmSize() );
-            SwTwips nTmp = aFrmSz.GetHeight();
-            aFrmSz.SetHeight( aFrmSz.GetWidth() );
-            aFrmSz.SetWidth( nTmp );
+            if ( !pStdPgDsc->GetLandscape() )
+            {
+                const SwTwips nTmp = aFrmSz.GetHeight();
+                aFrmSz.SetHeight( aFrmSz.GetWidth() );
+                aFrmSz.SetWidth( nTmp );
+            }
             aSet.Put( aFrmSz );
             aSet.Put( aLR );
             aSet.Put( aUL );
@@ -1609,23 +1620,18 @@ SwPageDesc* SwDoc::GetPageDescFromPool( 
                 pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
                 pNewPgDsc->SetLandscape( sal_True );
             }
-       }
-       break;
+        }
+        break;
 
-	}
+    }
 
-	if( aSet.Count() )
-	{
-        {
-			if( bSetLeft )
-                pNewPgDsc->GetLeft().SetFmtAttr( aSet );
-            pNewPgDsc->GetMaster().SetFmtAttr( aSet );
-			// JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
-			//				(Bug: 18545)
-			// SetModified();
-		}
-	}
-	return pNewPgDsc;
+    if( aSet.Count() )
+    {
+        if( bSetLeft )
+            pNewPgDsc->GetLeft().SetFmtAttr( aSet );
+        pNewPgDsc->GetMaster().SetFmtAttr( aSet );
+    }
+    return pNewPgDsc;
 }
 
 SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )

Modified: openoffice/branches/rejuvenate01/main/sw/source/core/edit/eddel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/edit/eddel.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/edit/eddel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/edit/eddel.cxx Fri May 31 13:55:58 2013
@@ -92,8 +92,11 @@ void SwEditShell::DeleteSel( SwPaM& rPam
 				aDelPam.Move( fnMoveBackward, fnGoCntnt );
 			}
 				// geschuetze Boxen ueberspringen !
+			//For i117395, in some situation, the node would be hidden or invisible, which makes the frame of it unavailable
+			//So verify it before use it.
+			SwCntntFrm* pFrm = NULL;
 			if( !pNd->IsCntntNode() ||
-				!((SwCntntNode*)pNd)->getLayoutFrm( GetLayout() )->IsProtected() )
+				!((pFrm=((SwCntntNode*)pNd)->getLayoutFrm( GetLayout() ))!=NULL && pFrm->IsProtected()) )
 			{
 				// alles loeschen
 				GetDoc()->DeleteAndJoin( aDelPam );

Modified: openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/text/portxt.hxx Fri May 31 13:55:58 2013
@@ -23,6 +23,7 @@
 #ifndef _PORTXT_HXX
 #define _PORTXT_HXX
 
+#include <cstddef>
 #include <tools/mempool.hxx>
 
 #include "porlin.hxx"

Modified: openoffice/branches/rejuvenate01/main/sw/source/core/undo/untblk.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/core/undo/untblk.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/core/undo/untblk.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/core/undo/untblk.cxx Fri May 31 13:55:58 2013
@@ -248,8 +248,9 @@ void SwUndoInserts::UndoImpl(::sw::UndoR
 				pTxtNode->JoinNext();
 			}
             // reset all text attributes in the paragraph!
-            pTxtNode->RstAttr( SwIndex(pTxtNode, 0), pTxtNode->Len(),
-                                0, 0, true );
+	//i121897, change the hints clearing method from 'RstAttr' to 'ClarSwpHints' as the certain tox mark index hint reason
+            if( pTxtNode && pTxtNode->GetpSwpHints() )
+                pTxtNode->ClearSwpHintsArr( true );
 
 			// setze alle Attribute im Node zurueck
             pTxtNode->ResetAllAttr();

Modified: openoffice/branches/rejuvenate01/main/sw/source/filter/html/htmlatr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/filter/html/htmlatr.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/filter/html/htmlatr.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/filter/html/htmlatr.cxx Fri May 31 13:55:58 2013
@@ -3401,7 +3401,9 @@ SwAttrFnTab aHTMLAttrFnTab = {
 /* RES_CHRATR_OVERLINE */           OutHTML_CSS1Attr,
 /* RES_CHRATR_DUMMY1 */             0,
 /* RES_CHRATR_DUMMY2 */             0,
-
+//For i120935, Insert blank entry for RES_CHRATR_BIDITRL and RES_CHRATR_IDCTHINT, for keep the identical res order
+/*RES_CHRATR_BIDIRTL*/			0,
+/*RES_CHRATR_IDCTHINT*/		0,
 /* RES_TXTATR_REFMARK */            0,
 /* RES_TXTATR_TOXMARK */            0,
 /* RES_TXTATR_META */               0,

Modified: openoffice/branches/rejuvenate01/main/sw/source/ui/fldui/fldref.src
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/ui/fldui/fldref.src?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/ui/fldui/fldref.src (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/ui/fldui/fldref.src Fri May 31 13:55:58 2013
@@ -42,7 +42,7 @@ TabPage TP_FLD_REF
 	    HelpID = "sw:ListBox:TP_FLD_REF:LB_REFTYPE";
 		Border = TRUE ;
 		Pos = MAP_APPFONT ( 6 , 14 ) ;
-		Size = MAP_APPFONT ( 76 , 165 ) ;
+		Size = MAP_APPFONT ( 76 , 73 ) ;
 		TabStop = TRUE ;
 		AutoHScroll = TRUE ;
 	};
@@ -58,7 +58,7 @@ TabPage TP_FLD_REF
 	    HelpID = "sw:ListBox:TP_FLD_REF:LB_REFSELECTION";
 		Border = TRUE ;
 		Pos = MAP_APPFONT ( 88 , 14 ) ;
-        Size = MAP_APPFONT ( 166 , 73 ) ;
+        Size = MAP_APPFONT ( 166 , 136 ) ;
 		TabStop = TRUE ;
 		Sort = TRUE ;
 	};
@@ -68,12 +68,12 @@ TabPage TP_FLD_REF
         HelpID = HID_REFSELECTION_TOOLTIP ;
         Border = TRUE ;
         Pos = MAP_APPFONT ( 88 , 14 ) ;
-        Size = MAP_APPFONT ( 166 , 73 ) ;
+        Size = MAP_APPFONT ( 166 , 136 ) ;
         TabStop = TRUE ;
     };
 	FixedText FT_REFFORMAT
 	{
-        Pos = MAP_APPFONT ( 88 , 93 ) ;
+        Pos = MAP_APPFONT ( 6 , 93 ) ;
         Size = MAP_APPFONT ( 76 , 8 ) ;
 		Left = TRUE ;
         Text [ en-US ] = "Insert ~reference to" ;
@@ -82,7 +82,7 @@ TabPage TP_FLD_REF
 	{
 	    HelpID = "sw:ListBox:TP_FLD_REF:LB_REFFORMAT";
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 88 , 104 ) ;
+        Pos = MAP_APPFONT ( 6 , 104 ) ;
         Size = MAP_APPFONT ( 76 , 75 ) ;
 		TabStop = TRUE ;
 		DropDown = FALSE ;
@@ -90,8 +90,8 @@ TabPage TP_FLD_REF
 	};
 	FixedText FT_REFNAME
 	{
-        Pos = MAP_APPFONT ( 170 , 93 ) ;
-		Size = MAP_APPFONT ( 84 , 10 ) ;
+        Pos = MAP_APPFONT ( 88 , 155 ) ;
+		Size = MAP_APPFONT ( 80 , 10 ) ;
 		Left = TRUE ;
 		Text [ en-US ] = "Na~me" ;
 	};
@@ -99,15 +99,15 @@ TabPage TP_FLD_REF
 	{
 	    HelpID = "sw:Edit:TP_FLD_REF:ED_REFNAME";
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 104 ) ;
-		Size = MAP_APPFONT ( 84 , 12 ) ;
+        Pos = MAP_APPFONT ( 88 , 167 ) ;
+		Size = MAP_APPFONT ( 80 , 12 ) ;
 		TabStop = TRUE ;
 		Left = TRUE ;
 	};
 	FixedText FT_REFVALUE
 	{
-        Pos = MAP_APPFONT ( 170 , 122 ) ;
-		Size = MAP_APPFONT ( 84 , 8 ) ;
+        Pos = MAP_APPFONT ( 174 , 155 ) ;
+		Size = MAP_APPFONT ( 80 , 8 ) ;
 		Text [ en-US ] = "~Value" ;
 		Disable = TRUE ;
 		Left = TRUE ;
@@ -116,8 +116,8 @@ TabPage TP_FLD_REF
 	{
 	    HelpID = "sw:Edit:TP_FLD_REF:ED_REFVALUE";
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 170 , 136 ) ;
-		Size = MAP_APPFONT ( 84 , 12 ) ;
+        Pos = MAP_APPFONT ( 174 , 167 ) ;
+		Size = MAP_APPFONT ( 80 , 12 ) ;
 		TabStop = TRUE ;
 		Disable = TRUE ;
 		Left = TRUE ;

Modified: openoffice/branches/rejuvenate01/main/sw/source/ui/sidebar/PageSizeControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/ui/sidebar/PageSizeControl.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/ui/sidebar/PageSizeControl.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/ui/sidebar/PageSizeControl.cxx Fri May 31 13:55:58 2013
@@ -116,9 +116,9 @@ PageSizeControl::PageSizeControl(
                 maWidthHeightField.IsUseThousandSep(),
                 maWidthHeightField.IsShowTrailingZeros() );
 
-            ItemText2 = HeightStr;
+            ItemText2 = WidthStr;
             ItemText2 += String::CreateFromAscii(" x ");
-            ItemText2 += WidthStr;
+            ItemText2 += HeightStr;
             ItemText2 += String::CreateFromAscii(" ");
             ItemText2 += aMetricStr;
 

Modified: openoffice/branches/rejuvenate01/main/sw/source/ui/uiview/view0.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/source/ui/uiview/view0.cxx?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/source/ui/uiview/view0.cxx (original)
+++ openoffice/branches/rejuvenate01/main/sw/source/ui/uiview/view0.cxx Fri May 31 13:55:58 2013
@@ -109,7 +109,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Defa
 SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
 {
 	SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
-	SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
 	SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
 	SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
 	SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/menubar/menubar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/menubar/menubar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/menubar/menubar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/menubar/menubar.xml Fri May 31 13:55:58 2013
@@ -140,7 +140,6 @@
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
       <menu:menuitem menu:id=".uno:Navigator"/>
-      <menu:menuitem menu:id=".uno:TaskPane"/>
       <menu:menuitem menu:id=".uno:Sidebar"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:FullScreen"/>

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/toolbar/standardbar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/toolbar/standardbar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/toolbar/standardbar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/sglobal/toolbar/standardbar.xml Fri May 31 13:55:58 2013
@@ -26,7 +26,7 @@
  <toolbar:toolbaritem xlink:href=".uno:OpenUrl" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:AddDirect"/>
  <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:Open"/>
+ <toolbar:toolbaritem xlink:href=".uno:Open" toolbar:style="dropdown"/>
  <toolbar:toolbaritem xlink:href=".uno:Save"/>
  <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:SendMail"/>

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/menubar/menubar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/menubar/menubar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/menubar/menubar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/menubar/menubar.xml Fri May 31 13:55:58 2013
@@ -113,7 +113,6 @@
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
       <menu:menuitem menu:id=".uno:Navigator"/>
-      <menu:menuitem menu:id=".uno:TaskPane"/>
       <menu:menuitem menu:id=".uno:Sidebar"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:FullScreen"/>

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/toolbar/standardbar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/toolbar/standardbar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/toolbar/standardbar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/sweb/toolbar/standardbar.xml Fri May 31 13:55:58 2013
@@ -26,7 +26,7 @@
  <toolbar:toolbaritem xlink:href=".uno:OpenUrl" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:AddDirect"/>
  <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:Open"/>
+ <toolbar:toolbaritem xlink:href=".uno:Open" toolbar:style="dropdown"/>
  <toolbar:toolbaritem xlink:href=".uno:Save"/>
  <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:SendMail"/>

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/menubar/menubar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/menubar/menubar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/menubar/menubar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/menubar/menubar.xml Fri May 31 13:55:58 2013
@@ -140,7 +140,6 @@
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
       <menu:menuitem menu:id=".uno:Navigator"/>
-      <menu:menuitem menu:id=".uno:TaskPane"/>
       <menu:menuitem menu:id=".uno:Sidebar"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:FullScreen"/>

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/toolbar/standardbar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/toolbar/standardbar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/toolbar/standardbar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/swform/toolbar/standardbar.xml Fri May 31 13:55:58 2013
@@ -26,7 +26,7 @@
  <toolbar:toolbaritem xlink:href=".uno:OpenUrl" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:AddDirect"/>
  <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:Open"/>
+ <toolbar:toolbaritem xlink:href=".uno:Open" toolbar:style="dropdown"/>
  <toolbar:toolbaritem xlink:href=".uno:Save"/>
  <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:SendMail"/>

Modified: openoffice/branches/rejuvenate01/main/sw/uiconfig/swreport/menubar/menubar.xml
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sw/uiconfig/swreport/menubar/menubar.xml?rev=1488227&r1=1488226&r2=1488227&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sw/uiconfig/swreport/menubar/menubar.xml (original)
+++ openoffice/branches/rejuvenate01/main/sw/uiconfig/swreport/menubar/menubar.xml Fri May 31 13:55:58 2013
@@ -140,7 +140,6 @@
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
       <menu:menuitem menu:id=".uno:Navigator"/>
-      <menu:menuitem menu:id=".uno:TaskPane"/>
       <menu:menuitem menu:id=".uno:Sidebar"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:FullScreen"/>