ooo-build r14852 - in trunk: . patches/dev300



Author: thorstenb
Date: Mon Dec 15 13:14:19 2008
New Revision: 14852
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14852&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/fit-list-to-size-popup.diff: adding a context
    menu entry for autofit; also, enable the text attr tabpage again
    for title/outline shapes.



Added:
   trunk/patches/dev300/fit-list-to-size-popup.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Mon Dec 15 13:14:19 2008
@@ -2560,6 +2560,7 @@
 fit-list-to-size.diff, i#94086, thorsten
 fit-list-to-size-ui.diff, i#94086, thorsten
 fit-list-to-size-style-defaults.diff, i#94086, thorsten
+fit-list-to-size-popup.diff, i#94086, thorsten
 
 # apply this patch if you need to disable vcl grabbing your mouse -
 # after applying the patch, set SAL_NO_MOUSEGRABS in your env

Added: trunk/patches/dev300/fit-list-to-size-popup.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/fit-list-to-size-popup.diff	Mon Dec 15 13:14:19 2008
@@ -0,0 +1,279 @@
+ sd/inc/app.hrc                                     |    1 
+ sd/sdi/_drvwsh.sdi                                 |    5 ++
+ sd/sdi/sdraw.sdi                                   |   27 +++++++++++++
+ sd/source/ui/app/menuids_tmpl.src                  |    8 ++++
+ sd/source/ui/app/popup2_tmpl.src                   |   43 ++++++++++++++++++++
+ sd/source/ui/inc/res_bmp.hrc                       |    2 +
+ sd/source/ui/view/drviews2.cxx                     |   25 ++++++++++++
+ sd/source/ui/view/drviews4.cxx                     |    6 ++-
+ sd/source/ui/view/drviewsj.cxx                     |   19 ++++++---
+ .../Linux_X86_64rc                                 |    2 -
+ .../unorc                                          |    2 -
+ 11 files changed, 130 insertions(+), 10 deletions(-)
+
+
+diff --git sd/inc/app.hrc sd/inc/app.hrc
+index 83cfa86..9bd8aee 100644
+--- sd/inc/app.hrc
++++ sd/inc/app.hrc
+@@ -459,6 +459,7 @@
+ #define SID_DISPLAY_MASTER_BACKGROUND       (SID_SD_START+436)
+ #define SID_DISPLAY_MASTER_OBJECTS          (SID_SD_START+437)
+ #define SID_INSERTPAGE_LAYOUT_MENU          (SID_SD_START+438)
++#define SID_OUTLINE_TEXT_AUTOFIT            (SID_SD_START+439)
+ 
+ // Add companion for the SID_HIDE_SLIDE (that is defined in svx)
+ #define SID_SHOW_SLIDE                      (SID_SD_START+440)
+diff --git sd/sdi/_drvwsh.sdi sd/sdi/_drvwsh.sdi
+index c895d2e..44a6ae0 100644
+--- sd/sdi/_drvwsh.sdi
++++ sd/sdi/_drvwsh.sdi
+@@ -665,6 +665,11 @@ interface DrawView
+         ExecMethod = FuPermanent ;
+         StateMethod = GetMenuState ;
+     ]
++    SID_OUTLINE_TEXT_AUTOFIT // ole : no, status : ?
++    [
++        ExecMethod = FuTemporary ;
++        StateMethod = GetMenuState ;
++    ]
+     SID_TEXT_FITTOSIZE_VERTICAL // ole : no, status : ?
+     [
+         ExecMethod = FuPermanent ;
+diff --git sd/sdi/sdraw.sdi sd/sdi/sdraw.sdi
+index c4d7bad..fae94ab 100644
+--- sd/sdi/sdraw.sdi
++++ sd/sdi/sdraw.sdi
+@@ -6377,6 +6377,33 @@ SfxBoolItem TextFitToSizeTool SID_TEXT_FITTOSIZE
+ ]
+ 
+ //--------------------------------------------------------------------------
++SfxBoolItem TextAutoFitToSize SID_OUTLINE_TEXT_AUTOFIT
++
++[
++	/* flags: */  
++	AutoUpdate = TRUE, 
++	Cachable = Cachable, 
++	FastCall = FALSE, 
++	HasCoreId = FALSE, 
++	HasDialog = FALSE, 
++	ReadOnlyDoc = FALSE, 
++	Toggle = FALSE, 
++	Container = FALSE, 
++	RecordAbsolute = FALSE, 
++	RecordPerSet;
++	Synchron;
++
++	Readonly = FALSE, 
++
++	/* config: */ 
++	AccelConfig = TRUE, 
++	MenuConfig = TRUE, 
++	StatusBarConfig = FALSE, 
++	ToolBoxConfig = TRUE, 
++	GroupId = GID_FORMAT;
++]
++
++//--------------------------------------------------------------------------
+ TbxImageItem TextToolbox SID_DRAWTBX_TEXT
+ 
+ [
+diff --git sd/source/ui/app/menuids_tmpl.src sd/source/ui/app/menuids_tmpl.src
+index feb34df..d35dc60 100644
+--- sd/source/ui/app/menuids_tmpl.src
++++ sd/source/ui/app/menuids_tmpl.src
+@@ -307,6 +307,14 @@
+         Text [ en-US ] = "~Text..." ; \
+ 	};
+ 
++#define MN_OUTLINE_TEXT_AUTOFIT \
++    MenuItem\
++    {\
++        Identifier = SID_OUTLINE_TEXT_AUTOFIT ; \
++        HelpID = SID_OUTLINE_TEXT_AUTOFIT ; \
++        Text [ en-US ] = "~Autofit Text" ; \
++	};
++
+ #define MN_CONNECTION \
+     MenuItem\
+     {\
+diff --git sd/source/ui/app/popup2_tmpl.src sd/source/ui/app/popup2_tmpl.src
+index 63ad153..c5340a9 100644
+--- sd/source/ui/app/popup2_tmpl.src
++++ sd/source/ui/app/popup2_tmpl.src
+@@ -82,6 +82,49 @@
+ };
+ 
+ //
++// OUTLINETEXTOBJ_POPUP
++//
++#if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP
++	Menu RID_DRAW_OUTLINETEXTOBJ_POPUP
++#elif  SD_POPUP == RID_GRAPHIC_TEXTOBJ_POPUP
++	Menu RID_GRAPHIC_OUTLINETEXTOBJ_POPUP
++#endif
++{
++	ItemList =
++	{
++		MN_SET_DEFAULT
++		SEPARATOR
++		MN_LINE
++		MN_AREA
++		MN_TEXTATTR
++		MN_OUTLINE_TEXT_AUTOFIT
++		MN_TRANSFORM
++		MN_FONTWORK
++		SEPARATOR
++		MN_CHAR_PARAGRAPH
++		SEPARATOR
++		MN_POSITION
++		MN_OBJECT_ALIGN
++		MN_DISTRIBUTE
++		MNSUB_CONVERT
++
++		//-#i68101#----------------------
++		SEPARATOR
++		MN_OBJECT_TITLE_DESCRIPTION
++		MN_NAME_GROUP
++		//-#i68101#----------------------
++
++#if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP
++		SEPARATOR
++		MN_EFFECT
++		MN_ACTION
++#endif
++		SEPARATOR
++		MN_STYLEDT
++	};
++};
++
++//
+ // GEOMOBJ_POPUP
+ //
+ #if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP
+diff --git sd/source/ui/inc/res_bmp.hrc sd/source/ui/inc/res_bmp.hrc
+index 4725971..cffe512 100644
+--- sd/source/ui/inc/res_bmp.hrc
++++ sd/source/ui/inc/res_bmp.hrc
+@@ -296,6 +296,8 @@
+ 
+ #define RID_DRAW_TABLE_POPUP				RID_APP_START+91
+ #define RID_GRAPHIC_TABLE_POPUP				RID_APP_START+92
++#define RID_DRAW_OUTLINETEXTOBJ_POPUP		RID_APP_START+93
++#define RID_GRAPHIC_OUTLINETEXTOBJ_POPUP	RID_APP_START+94
+ 
+ /*
+  * Pointer (Mauszeiger)
+diff --git sd/source/ui/view/drviews2.cxx sd/source/ui/view/drviews2.cxx
+index f55b303..605716f 100644
+--- sd/source/ui/view/drviews2.cxx
++++ sd/source/ui/view/drviews2.cxx
+@@ -175,6 +175,31 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
+ 
+ 	switch ( nSId )
+ 	{
++        case SID_OUTLINE_TEXT_AUTOFIT:
++        {
++            SfxUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
++            SdrObject* pObj = NULL;
++            const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
++            if( rMarkList.GetMarkCount() == 1 )
++            {
++                pUndoManager->EnterListAction( String(), String() );
++                mpDrawView->BegUndo();
++
++                pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
++                bool bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
++
++                mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
++
++                pObj->SetMergedItem(SdrTextFitToSizeTypeItem(bSet ? SDRTEXTFIT_NONE : SDRTEXTFIT_AUTOFIT));
++				
++                mpDrawView->EndUndo();
++                pUndoManager->LeaveListAction();
++            }
++            Cancel();
++            rReq.Done();
++        }
++        break;
++
+ 		// Flaechen und Linien-Attribute:
+ 		// Sollten (wie StateMethode) eine eigene
+ 		// Execute-Methode besitzen
+diff --git sd/source/ui/view/drviews4.cxx sd/source/ui/view/drviews4.cxx
+index 66482d4..8a9b122 100644
+--- sd/source/ui/view/drviews4.cxx
++++ sd/source/ui/view/drviews4.cxx
+@@ -669,9 +669,13 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
+ 							{
+ 								switch ( nId )
+ 								{
++									case OBJ_OUTLINETEXT:
++										nSdResId = bGraphicShell ? RID_GRAPHIC_OUTLINETEXTOBJ_POPUP :
++																	RID_DRAW_OUTLINETEXTOBJ_POPUP;
++										break;
++
+ 									case OBJ_CAPTION:
+ 									case OBJ_TITLETEXT:
+-									case OBJ_OUTLINETEXT:
+ 									case OBJ_TEXT:
+ 										nSdResId = bGraphicShell ? RID_GRAPHIC_TEXTOBJ_POPUP :
+ 																	RID_DRAW_TEXTOBJ_POPUP;
+diff --git sd/source/ui/view/drviewsj.cxx sd/source/ui/view/drviewsj.cxx
+index 5892f63..eceea7a 100644
+--- sd/source/ui/view/drviewsj.cxx
++++ sd/source/ui/view/drviewsj.cxx
+@@ -213,9 +213,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
+ 				rSet.DisableItem( SID_CHANGEPOLYGON );
+ 			}
+ 
+-			if(nInv == SdrInventor && (nId == OBJ_TITLETEXT || nId == OBJ_OUTLINETEXT))
+-				rSet.DisableItem( SID_TEXTATTR_DLG );
+-
+ 			if(nInv == SdrInventor && nId == OBJ_TABLE )
+ 			{
+ 				rSet.DisableItem( SID_TEXTATTR_DLG );
+@@ -308,6 +305,17 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
+ 			else
+ 				rSet.DisableItem( SID_MODIFY_FIELD );
+ 		}
++		if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
++		{
++            bool bSet = false;
++            const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
++            if( rMarkList.GetMarkCount() == 1 )
++            {
++                SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
++                bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
++            }
++            rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
++		}
+ 
+ 		rSet.DisableItem( SID_GROUP );
+ 		rSet.DisableItem( SID_COMBINE );
+@@ -357,7 +365,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
+ 			BOOL bGraf = FALSE;
+ 			BOOL bDrawObj = FALSE;
+ 			BOOL b3dObj = FALSE;
+-			BOOL bTitOutText = FALSE;
+ 			bool bTable = false;
+ 			BOOL bMeasureObj = FALSE;
+ 			BOOL bEdgeObj = FALSE; // Connector
+@@ -397,8 +404,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
+ 
+ 						case OBJ_GRAF: bGraf = TRUE; break;
+ 
+-						case OBJ_TITLETEXT:
+-						case OBJ_OUTLINETEXT: bTitOutText = TRUE; break;
+ 						case OBJ_TABLE: bTable = true; break;
+ 					}
+ 				}
+@@ -446,7 +451,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
+ 			{
+ 				rSet.DisableItem( SID_UNGROUP );
+ 			}
+-			if( bTitOutText || bTable )
++			if( bTable )
+ 				rSet.DisableItem( SID_TEXTATTR_DLG );
+ 
+ 			if( !bMeasureObj )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]