summaryrefslogtreecommitdiff
path: root/patches/OOO_1_1_2/word-count.diff
blob: 4f3040435e73a1680d3a632e60a874d331b25a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
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
--- sw/inc/cmdid.h	22 May 2003 08:40:37 -0000	1.46
+++ 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
--- sw/sdi/swriter.sdi	22 May 2003 08:42:09 -0000	1.43
+++ 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 = TRUE,
+	Toggle = TRUE,
+	Container = FALSE,
+	Asynchron;
+
+	/* config: */
+	AccelConfig = TRUE,
+	MenuConfig = TRUE,
+	StatusBarConfig = FALSE,
+	ToolBoxConfig = TRUE,
+	GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
 SfxVoidItem UnhainFrames FN_FRAME_UNCHAIN
 
 [
Index: sw/sdi/swslots.src
===================================================================
RCS file: /cvs/sw/sw/sdi/swslots.src,v
retrieving revision 1.109
diff -u -p -u -r1.109 swslots.src
--- sw/sdi/swslots.src	17 Jul 2003 11:48:28 -0000	1.109
+++ sw/sdi/swslots.src	31 Jul 2003 17:01:27 -0000
@@ -3685,6 +3685,55 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG
 	SlotName[ hindi ] = "हाइफनेशन";
 	SlotName[ slovak ] = "Delenie slov";
 };
+SfxSlotInfo FN_WORD_COUNT_DLG
+{
+	SlotName = "Wrter zhlen...";
+	SlotName[ arabic ] = "";
+	SlotName[ english ] = "Word count";
+	SlotName[ english_us ] = "Word count";
+	SlotName[ catalan ] = "Comptador de paraules";
+	SlotName[ czech ] = "Počet slov";
+	SlotName[ danish ] = "Ordoptælling";
+	SlotName[ greek ] = " ";
+	SlotName[ spanish ] = "Contar palabras";
+	SlotName[ estonian ] = "Sõnade arv";
+	SlotName[ finnish ] = "Laske sanat";
+	SlotName[ french ] = "Statistiques";
+	SlotName[ hindi ] = "शब्द गिनें";
+	SlotName[ italian ] = "Statistiche";
+	SlotName[ hungarian ] = "Szavak száma";
+	SlotName[ japanese ] = "ワードカウント";
+	SlotName[ korean ] = "통계";
+	SlotName[ norwegian ] = "Ordtelling";
+	SlotName[ dutch ] = "Woorden tellen";
+	SlotName[ polish ] = "Liczba sw";
+	SlotName[ portuguese ] = "Contagem palavras";
+	SlotName[ portuguese_brazilian ] = "Contagem palavras";
+	SlotName[ russian ] = " ";
+	SlotName[ slovak ] = "Počet slov";
+	SlotName[ swedish ] = "Ordräkning";
+	SlotName[ turkish ] = "statistik";
+	SlotName[ chinese_simplified ] = "统计";
+	SlotName[ chinese_traditional ] = "統計";
+	SlotName[ slovenian ] =	"Število besed";
+	SlotName[ thai ] = "Word count";
+	SlotName[ hebrew ] = "Word count";
+	SlotName[ estonian ] = "Word count";
+/*	--: "Word count" translations
+	az:	"Kəlmə Miqdarı"
+	bs:	"Zbir riječi"
+	cy:	"Cyfrif geiriau"
+	eu:	"Hitz kopurua"
+	mk:	"Броење на зборови"
+	mt:	"Għadd ta’ kliem"
+	ro:	"Numără cuvintele"
+	sq:	"Llogariti fjalët"
+	ta:	"சொல் எண்ணி"
+	uk:	"Кількість слів"
+	vi:	"Đếm từ"
+	wa:	"Contaedje des mots"
+*/
+};
 SfxSlotInfo FN_IDX_MARK_TO_IDX
 {
 	SlotName = "Indexmarke zum Index";
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
--- sw/sdi/viewsh.sdi	6 Dec 2002 13:58:48 -0000	1.9
+++ 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 --context=15 -c -r1.133 swmn.hrc
*** sw/source/ui/inc/swmn.hrc.orig	2004-09-22 09:41:21.000000000 -0400
--- sw/source/ui/inc/swmn.hrc	2004-09-23 09:09:01.214282641 -0400
***************
*** 9189,9218 ****
--- 9189,9270 ----
  				Text[ extern ] = "~Hyphenation...";
  				Text[ thai ] = "ใ~ช้ยัติภังค์...";
  				Text[ czech ] = "Dělení slov...";
  				Text[ hebrew ] = "שבירת מלים...";
  				Text[ hindi ] = "~हाइफनेशन...";
  				Text[ slovak ] = "~Delenie slov...";
  				Text[ hungarian ] = "~Elválasztás...";
  				Text[ slovenian ] = "~Deljenje besed...";
  				Text[ estonian ] = "~Poolitus...";
  				Text[ welsh ] = "~Cyplysnodi...";
  				Text[ northernsotho ] = "~Morathofatso...";
  				Text[ afrikaans ] = "~Woordafbreking...";
  				Text[ zulu ] = "~Ukwahlukaniswa kwamagama...";
  				Text[ norwegian_nynorsk ] = "Orddeli~ng ...";
  			};
+  			MenuItem
+  			{
+  				Identifier = FN_WORD_COUNT_DLG ;
+  				HelpID = FN_WORD_COUNT_DLG ;
+  				Text = "Wrter zhlen..." ;
+ 				Text [ arabic ] = "...";
+ 				Text [ english ] = "Word count...";
+ 				Text [ english_us ] = "Word count...";
+ 				Text [ catalan ] = "Comptador de paraules...";
+ 				Text [ czech ] = "Počet slov...";
+ 				Text [ danish ] = "Ordoptælling...";
+ 				Text [ greek ] = " ";
+ 				Text [ spanish ] = "Contar palabras...";
+ 				Text [ estonian ] = "Sõnade arv...";
+ 				Text [ finnish ] = "Laske sanat...";
+ 				Text [ french ] = "Statistiques...";
+ 				Text [ hindi ] = "शब्द गिनें...";
+ 				Text [ italian ] = "Statistiche...";
+ 				Text [ hungarian ] = "Szavak száma...";
+ 				Text [ japanese ] = "ワードカウント...";
+ 				Text [ korean ] = "통계...";
+ 				Text [ norwegian ] = "Ordtelling...";
+ 				Text [ dutch ] = "Woorden tellen...";
+ 				Text [ polish ] = "Liczba sw...";
+ 				Text [ portuguese ] = "Contagem palavras...";
+ 				Text [ portuguese_brazilian ] = "Contagem palavras...";
+ 				Text [ russian ] = " ";
+ 				Text [ slovak ] = "Počet slov...";
+ 				Text [ swedish ] = "Ordräkning...";
+ 				Text [ turkish ] = "statistik...";
+ 				Text [ chinese_simplified ] = "统计...";
+ 				Text [ chinese_traditional ] = "統計...";
+ 				Text [ slovenian ] = "Število besed";
+ 				Text [ thai ] = "Word count...";
+ 				Text [ hebrew ] = "Word count...";
+ 				Text [ estonian ] = "Word count...";
+ /*				--: "Word count" translations
+ 				az:	"Kəlmə Miqdarı"
+ 				bs:	"Zbir riječi"
+ 				cy:	"Cyfrif geiriau"
+ 				eu:	"Hitz kopurua"
+ 				mk:	"Броење на зборови"
+ 				mt:	"Għadd ta’ kliem"
+ 				ro:	"Numără cuvintele"
+ 				sl:	"Število besed"
+ 				sq:	"Llogariti fjalët"
+ 				ta:	"சொல் எண்ணி"
+ 				uk:	"Кількість слів"
+ 				vi:	"Đếm từ"
+ 				wa:	"Contaedje des mots"
+ */
+   			};
  #endif
  			SEPARATOR ;
  			MenuItem
  			{
                  Identifier = SID_AUTO_CORRECT_DLG;
                  HelpID = SID_AUTO_CORRECT_DLG;
  				Text = "~AutoKorrektur/AutoFormat..." ;
  				Text [ English ] = "~AutoCorrect/AutoFormat..." ;
  				Text [ portuguese ] = "~AutoCorreco/AutoFormato..." ;
  				Text [ english_us ] = "~AutoCorrect/AutoFormat..." ;
  				Text [ portuguese_brazilian ] = "~AutoCorreo/AutoFormatao..." ;
  				Text [ swedish ] = "~AutoKorrigering/AutoFormat..." ;
  				Text [ danish ] = "~AutoKorrektur/AutoFormat..." ;
  				Text [ italian ] = "Correzione/Formattazione a~utomatica..." ;
  				Text [ spanish ] = "~Correccin/Formateado automtico..." ;
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
--- sw/source/ui/uiview/viewling.cxx	17 Apr 2003 17:51:30 -0000	1.13
+++ sw/source/ui/uiview/viewling.cxx	7 Aug 2003 12:38:22 -0000
@@ -105,6 +105,9 @@
 #ifndef _SVX_DIALMGR_HXX //autogen
 #include <svx/dialmgr.hxx>
 #endif
+#ifndef _SFX_DINFDLG_HXX
+#include <sfx2/dinfdlg.hxx>
+#endif
 #ifndef _SVX_LANGITEM_HXX
 #include <svx/langitem.hxx>
 #endif
@@ -214,6 +217,40 @@ void SwView::ExecLingu(SfxRequest &rReq)
 		case FN_HYPHENATE_OPT_DLG:
 			HyphenateDocument();
 			break;
+	case FN_WORD_COUNT_DLG: {
+
+		SfxObjectShell *pObjectShell = GetObjectShell();
+		if (!pObjectShell)
+			break;
+
+		String aURL, aTitle;
+		SfxDocumentInfo *pTmpDocInfo = new SfxDocumentInfo;
+		*pTmpDocInfo = pObjectShell->GetDocInfo ();
+		pTmpDocInfo->SetReadOnly( true );
+		SfxDocumentInfoItem aDocInfoItem( aURL, *pTmpDocInfo );
+
+		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 ) );
+
+		// SwDocShell::CreateDocumentInfoDialog
+		SfxDocumentInfoDialog *pDlg = pObjectShell->CreateDocumentInfoDialog( 0, aSet );
+
+		pDlg->RemoveResetButton();
+		pDlg->RemoveTabPage( TP_DOCINFODESC );
+		pDlg->RemoveTabPage( TP_DOCINFODOC );
+		pDlg->RemoveTabPage( TP_DOCINFOUSER );
+		pDlg->RemoveTabPage( TP_DOCINFORELOAD );
+		pDlg->GetCancelButton().Hide();
+
+		pDlg->Execute(); // discard return value - it's irrelevant.
+
+		delete pDlg;
+		delete pTmpDocInfo;
+		break;
+	}
+		
 		default:
 			ASSERT(!this, falscher Dispatcher);
 			return;