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 = 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 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,12 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG 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"; +}; 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 -u -p -u -r1.133 swmn.hrc --- sw/source/ui/inc/swmn.hrc 17 Jul 2003 11:58:11 -0000 1.133 +++ 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 --- 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 #endif +#ifndef _SFX_DINFDLG_HXX +#include +#endif #ifndef _SVX_LANGITEM_HXX #include #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;