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

Re: Patch problem with OOo 1.1rc



Sorry guys, this is the right patch, forget about the other.

Le dim 10/08/2003 à 18:53, Jérôme Warnier a écrit :
> I'm trying to apply the attached patch, but I can't, and don't
> understand why.
> The swslots.src part has been done "by hand" (using diff) in this file.
> 
> Please help.
-- 
Jérôme Warnier <jwarnier@beeznest.net>
Index: sw/inc/cmdid.h
===================================================================
RCS file: /cvs/sw/sw/inc/cmdid.h,v
retrieving revision 1.46
diff -u -p -u -r1.46 cmdid.h
--- ooo_cvs/sw/inc/cmdid.h	22 May 2003 08:40:37 -0000	1.46
+++ ooo_cvs/sw/inc/cmdid.h	31 Jul 2003 17:01:16 -0000
@@ -749,6 +749,7 @@ Achtung: Ab sofort sind in diesem File k
 #define FN_MACRO_POPUP				(FN_EXTRA + 37)   /* Alle Macrofunktionen */
 #define FN_BULLET					(FN_EXTRA + 38)   /* Bullet-Liste */
 
+#define FN_WORD_COUNT_DLG                       (FN_EXTRA + 39)
 
 //	Bereich: Gloassaries
 
Index: sw/sdi/swriter.sdi
===================================================================
RCS file: /cvs/sw/sw/sdi/swriter.sdi,v
retrieving revision 1.43
diff -u -p -u -r1.43 swriter.sdi
--- ooo_cvs/sw/sdi/swriter.sdi	22 May 2003 08:42:09 -0000	1.43
+++ ooo_cvs/sw/sdi/swriter.sdi	31 Jul 2003 17:01:17 -0000
@@ -8482,6 +8482,29 @@ SfxBoolItem UnderlineDouble FN_UNDERLINE
 ]
 
 //--------------------------------------------------------------------------
+SfxVoidItem WordCount FN_WORD_COUNT_DLG
+()
+[
+	/* flags: */
+	AutoUpdate = FALSE,
+	Cachable = Cachable,
+	FastCall = FALSE,
+	HasCoreId = FALSE,
+	HasDialog = TRUE,
+	ReadOnlyDoc = FALSE,
+	Toggle = TRUE,
+	Container = FALSE,
+	Asynchron;
+
+	/* config: */
+	AccelConfig = TRUE,
+	MenuConfig = TRUE,
+	StatusBarConfig = FALSE,
+	ToolBoxConfig = TRUE,
+	GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
 SfxVoidItem UnhainFrames FN_FRAME_UNCHAIN
 
 [
Index: sw/sdi/swslots.src
===================================================================
RCS file: /cvs/sw/sw/sdi/swslots.src,v
retrieving revision x.xx
diff -u -p -u -rx.xx swslots.src
--- ooo_cvs/sw/sdi/swslots.src	Fri Jun 13 13:47:58 2003
+++ ooo_cvs/sw/sdi/swslots.src.jw	Sun Aug 10 17:00:16 2003
@@ -3660,7 +3660,7 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG
 	SlotName[ portuguese ] = "Divisão silábica";
 	SlotName[ russian ] = "Ðàññòàíîâêà ïåðåíîñîâ";
 	SlotName[ dutch ] = "Woordafbreking";
-	SlotName[ french ] = "Coupure des mots";
+	SlotName[ french ] = "Césure";
 	SlotName[ spanish ] = "Separación silábica";
 	SlotName[ italian ] = "Sillabazione";
 	SlotName[ danish ] = "Orddeling";
@@ -3684,6 +3684,13 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG
 	SlotName[ hebrew ] = "â?®×©×?×?ךת ×?×?×?×?â?¬";
 	SlotName[ hindi ] = "à€¹à€Ÿà€?à€«à€šà¥?à€¶à€š";
 	SlotName[ slovak ] = "Delenie slov";
+};
+SfxSlotInfo FN_WORD_COUNT_DLG
+{
+	SlotName = "Wörter zÀhlen...";
+	SlotName[ english ] =  "Word count";
+	SlotName[ english_us ] = "Word count";
+	SlotName[ french ] = "Compte des mots";
 };
 SfxSlotInfo FN_IDX_MARK_TO_IDX
 {
Index: sw/sdi/viewsh.sdi
===================================================================
RCS file: /cvs/sw/sw/sdi/viewsh.sdi,v
retrieving revision 1.9
diff -u -p -u -r1.9 viewsh.sdi
--- ooo_cvs/sw/sdi/viewsh.sdi	6 Dec 2002 13:58:48 -0000	1.9
+++ ooo_cvs/sw/sdi/viewsh.sdi	31 Jul 2003 17:01:27 -0000
@@ -112,6 +112,12 @@ interface TextEditView : BaseTextEditVie
 		StateMethod = GetState ;
 		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 	]
+	FN_WORD_COUNT_DLG // status(final|play)
+	[
+		ExecMethod = ExecLingu ;
+		StateMethod = GetState ;
+		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+	];
 	FN_CHANGE_PAGENUM // status(final)
 	[
 		ExecMethod = ExecDlg ;
Index: sw/source/ui/inc/swmn.hrc
===================================================================
RCS file: /cvs/sw/sw/source/ui/inc/swmn.hrc,v
retrieving revision 1.133
diff -u -p -u -r1.133 swmn.hrc
--- ooo_cvs/sw/source/ui/inc/swmn.hrc	17 Jul 2003 11:58:11 -0000	1.133
+++ ooo_cvs/sw/source/ui/inc/swmn.hrc	31 Jul 2003 17:02:02 -0000
@@ -7708,6 +7708,14 @@ MenuItem _MN_EXTRA
 				Text[ hindi ] = "~à€¹à€Ÿà€?à€«à€šà¥?à€¶à€š...";
 				Text[ slovak ] = "~Delenie slov...";
 			};
+ 			MenuItem
+ 			{
+ 				Identifier = FN_WORD_COUNT_DLG ;
+ 				HelpID = FN_WORD_COUNT_DLG ;
+ 				Text = "Word count..." ;
+ 				Text [ English ] = "Word count..." ;
+ 				Text [ english_us ] = "Word count..." ;
+  			};
 #endif
 			SEPARATOR ;
 			MenuItem
Index: sw/source/ui/uiview/viewling.cxx
===================================================================
RCS file: /cvs/sw/sw/source/ui/uiview/viewling.cxx,v
retrieving revision 1.13
diff -u -p -u -r1.13 viewling.cxx
--- ooo_cvs/sw/source/ui/uiview/viewling.cxx	17 Apr 2003 17:51:30 -0000	1.13
+++ ooo_cvs/sw/source/ui/uiview/viewling.cxx	31 Jul 2003 17:02:22 -0000
@@ -1,3 +1,4 @@
+#include <stdio.h>
 /*************************************************************************
  *
  *  $RCSfile: word-count.diff,v $
@@ -214,6 +215,70 @@ void SwView::ExecLingu(SfxRequest &rReq)
 		case FN_HYPHENATE_OPT_DLG:
 			HyphenateDocument();
 			break;
+	case FN_WORD_COUNT_DLG:
+		fprintf (stderr, "Do Word count ...\n");
+		/* SID_DOCINFO stuff ... sfx2/source/doc/objserv.cxx#1135 */
+//		DocInfoDlg_Impl(GetDocInfo());
+#if 0
+	// anzuzeigenden Dokumentnamen ermitteln
+	String aURL, aTitle;
+	if ( HasName() && !pImp->aNewName.Len() )
+	{
+		aURL = GetMedium()->GetName();
+		aTitle = GetTitle();
+	}
+	else
+	{
+		if ( !pImp->aNewName.Len() )
+		{
+			aURL = DEFINE_CONST_UNICODE( "private:factory/" );
+			aURL += String::CreateFromAscii( GetFactory().GetShortName() );
+			// aTitle = String( SfxResId( STR_NONAME ) );
+		}
+		else
+		{
+			aURL = DEFINE_CONST_UNICODE( "[private:factory/" );
+			aURL += String::CreateFromAscii( GetFactory().GetShortName() );
+			aURL += DEFINE_CONST_UNICODE( "]" );
+			INetURLObject aURLObj( pImp->aNewName );
+			aURL += aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+			// aTitle = aURLObj.GetBase();
+		}
+		aTitle = GetTitle();
+	}
+
+	// Itemset f"ur Dialog aufbereiten
+	SfxDocumentInfoItem aDocInfoItem( aURL, rDocInfo );
+	if ( !GetSlotState( SID_DOCTEMPLATE ) )
+		aDocInfoItem.SetTemplate(FALSE);
+	SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO,
+					SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START,
+					0L );
+	aSet.Put( aDocInfoItem );
+	aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, aTitle ) );
+
+	// Dialog via Factory erzeugen und ausf"uhren
+	SfxDocumentInfoDialog *pDlg = CreateDocumentInfoDialog(0, aSet);
+	if ( RET_OK == pDlg->Execute() )
+	{
+		// neue DocInfo aus Dialog holen
+		const SfxPoolItem *pItem = 0;
+		if ( SFX_ITEM_SET ==
+			 pDlg->GetOutputItemSet()->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+		{
+			rDocInfo = (*(const SfxDocumentInfoItem *)pItem)();
+
+			// ggf. den Titel des Dokuments neu setzen
+			String aNewTitle = rDocInfo.GetTitle();
+			aNewTitle.EraseLeadingChars();
+			aNewTitle.EraseTrailingChars();
+			if ( aTitle != aNewTitle && aNewTitle.Len() )
+				SetTitle( aNewTitle );
+		}
+	}
+	delete pDlg;
+#endif
+		break;
 		default:
 			ASSERT(!this, falscher Dispatcher);
 			return;

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: