summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-02 15:51:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-02 15:51:45 +0000
commit19f251c29311c23f071cc02fdaa6efd6917922a0 (patch)
treedcdd660d7eab7c6622efd45ac1baef869fd71c0f /sw/source/ui/shells
parent16160041500efcc4cc8ad9b77e7c6aa90c0d1acc (diff)
CWS-TOOLING: integrate CWS notes7
2008-12-29 19:45:08 +0100 mod r265824 : CWS-TOOLING: rebase CWS notes7 to trunk@265758 (milestone: DEV300:m38) 2008-12-16 14:54:42 +0100 mod r265544 : #i97239# 2008-12-16 14:53:18 +0100 mod r265543 : #i97239# 2008-12-16 13:36:43 +0100 mod r265537 : 96602 2008-12-13 13:02:54 +0100 mba r265452 : warning fixed 2008-12-13 08:20:21 +0100 mod r265448 : search inside notes 2008-12-13 00:11:47 +0100 mod r265447 : search inside notes 2008-12-13 00:11:09 +0100 mod r265446 : search inside notes 2008-12-13 00:10:52 +0100 mod r265445 : search inside notes 2008-12-12 19:39:14 +0100 mod r265439 : search inside notes 2008-12-12 19:02:44 +0100 mod r265438 : search inside notes 2008-12-12 16:42:07 +0100 mba r265431 : #i80135#: search in notes 2008-12-12 16:11:54 +0100 mba r265429 : #i80135#: search in notes 2008-12-12 16:11:02 +0100 mba r265428 : #i80135#: search in notes 2008-12-11 20:24:20 +0100 pb r265358 : fix: #i80135# fixes for aNotesBtn 2008-12-11 20:23:19 +0100 pb r265357 : fix: #i80135# fixes for aNotesBtn 2008-12-11 07:42:17 +0100 pb r265241 : fix: #i80135# CB_NOTES added 2008-12-11 07:40:36 +0100 pb r265240 : fix: #i80135# CB_NOTES added 2008-12-11 07:32:03 +0100 pb r265239 : fix: #i80135# CheckBox aNotesBtn added 2008-12-11 07:24:45 +0100 pb r265238 : fix: #i80135# CheckBox aNotesBtn added 2008-12-10 15:41:31 +0100 mod r265198 : crash using replies 2008-12-10 15:21:23 +0100 mod r265195 : crash using replies 2008-12-10 13:45:14 +0100 mba r265181 : warning fixed 2008-12-10 13:26:45 +0100 mba r265178 : warning fixed 2008-12-10 11:48:23 +0100 mba r265162 : fixed compilation error on Linux 2008-12-03 18:39:07 +0100 mod r264806 : we don't get the Ctrl-Alt-N on mac inside a note, let's do the whole reply thing using the shell, cleaner anyway 2008-12-03 17:13:59 +0100 mod r264802 : search dialog can be started and closed when focus is inside a note 2008-12-03 00:07:08 +0100 mod r264733 : search inside notes 2008-12-02 18:06:08 +0100 mod r264729 : WaE 2008-12-02 15:01:26 +0100 mod r264703 : WaE 2008-12-02 00:20:14 +0100 mod r264644 : WaE 2008-12-01 10:06:14 +0100 mod r264587 : WaE 2008-12-01 01:28:34 +0100 mod r264585 : WaE 2008-11-30 22:51:19 +0100 mod r264584 : search inside notes 2008-11-30 17:03:04 +0100 mod r264583 : search inside notes 2008-11-28 16:30:05 +0100 mod r264560 : #i96602# 2008-11-28 16:14:50 +0100 mod r264559 : test 2008-11-28 16:11:37 +0100 mod r264558 : test 2008-11-17 17:46:10 +0100 mod r263735 : WaE 2008-11-17 17:45:56 +0100 mod r263734 : WaE 2008-11-17 17:37:35 +0100 mod r263733 : revert manual fix for icu 2008-11-17 15:03:55 +0100 mod r263726 : manual fix for icu 2008-11-17 11:17:49 +0100 mod r263707 : manual fix for icu 2008-11-14 15:51:19 +0100 mod r263679 : fix 2008-11-14 14:48:02 +0100 mod r263676 : some more cleanup, redline comments not in the margin for 3.1 2008-11-14 08:37:07 +0100 mod r263664 : end of line missing 2008-11-13 18:36:53 +0100 mod r263660 : WaE 2008-11-13 18:20:04 +0100 mod r263659 : #i94374# 2008-11-13 15:51:28 +0100 mod r263648 : CWS-TOOLING: rebase CWS notes7 to trunk@263288 (milestone: DEV300:m35) 2008-11-13 08:33:19 +0100 mod r263622 : typos 2008-11-02 23:18:19 +0100 mod r263278 : changes notes, replies 2008-11-01 11:48:35 +0100 mod r262873 : replies, comments 2008-11-01 11:44:57 +0100 mod r262872 : notes search button 2008-10-10 14:34:34 +0200 mod r262150 : migration from cvs to svn 2008-10-10 14:33:39 +0200 mod r262149 : migration from cvs to svn
Diffstat (limited to 'sw/source/ui/shells')
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx177
-rw-r--r--sw/source/ui/shells/drawsh.cxx73
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx92
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx27
-rw-r--r--sw/source/ui/shells/frmsh.cxx80
-rw-r--r--sw/source/ui/shells/grfsh.cxx18
-rw-r--r--sw/source/ui/shells/makefile.mk6
-rw-r--r--sw/source/ui/shells/textfld.cxx48
-rw-r--r--sw/source/ui/shells/textsh1.cxx31
9 files changed, 441 insertions, 111 deletions
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index aa63e682c06d..cdb4c04f6e65 100755
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: annotsh.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.82.3 $
*
* This file is part of OpenOffice.org.
*
@@ -67,6 +67,8 @@
#include <svx/svdoutl.hxx>
#include <svtools/whiter.hxx>
#include <svtools/cjkoptions.hxx>
+#include <svtools/ctloptions.hxx>
+#include <svtools/useroptions.hxx>
#include <vcl/msgbox.hxx>
#include <svx/flditem.hxx>
#include <svx/editstat.hxx>
@@ -88,6 +90,8 @@
#include <swmodule.hxx>
#include <initui.hxx>
#include <edtwin.hxx>
+#include <swwait.hxx>
+#include <docstat.hxx>
#include <cmdid.h>
#include <globals.hrc>
@@ -118,6 +122,10 @@
#include <svtools/undo.hxx>
#include "swabstdlg.hxx" //CHINA001
#include "chrdlg.hrc" //CHINA001
+#include "misc.hrc"
+#include <app.hrc>
+
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/bootstrap.hxx>
@@ -133,10 +141,8 @@ using namespace ::com::sun::star::i18n;
#include <itemdef.hxx>
#include <swslots.hxx>
-
SFX_IMPL_INTERFACE(SwAnnotationShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT))
{
- //SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_DRAW_TEXT_TOOLBOX));
SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_ANNOTATION_POPUPMENU));
}
@@ -316,12 +322,106 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
break;
}
+ case FN_INSERT_SOFT_HYPHEN:
+ case FN_INSERT_HARDHYPHEN:
+ case FN_INSERT_HARD_SPACE:
+ case SID_INSERT_RLM :
+ case SID_INSERT_LRM :
+ case SID_INSERT_ZWNBSP :
+ case SID_INSERT_ZWSP:
+ {
+ sal_Unicode cIns = 0;
+ switch(rReq.GetSlot())
+ {
+ case FN_INSERT_SOFT_HYPHEN: cIns = CHAR_SOFTHYPHEN; break;
+ case FN_INSERT_HARDHYPHEN: cIns = CHAR_HARDHYPHEN; break;
+ case FN_INSERT_HARD_SPACE: cIns = CHAR_HARDBLANK; break;
+ case SID_INSERT_RLM : cIns = CHAR_RLM ; break;
+ case SID_INSERT_LRM : cIns = CHAR_LRM ; break;
+ case SID_INSERT_ZWSP : cIns = CHAR_ZWSP ; break;
+ case SID_INSERT_ZWNBSP: cIns = CHAR_ZWNBSP; break;
+ }
+ pOLV->InsertText( String(cIns), TRUE );
+ rReq.Done();
+ break;
+ }
case FN_INSERT_SYMBOL:
{
if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
InsertSymbol(rReq);
break;
}
+ case FN_INSERT_STRING:
+ {
+ const SfxPoolItem* pItem = 0;
+ if(pNewAttrs)
+ pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
+ pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
+ break;
+ }
+
+ case FN_FORMAT_FOOTNOTE_DLG:
+ {
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+
+ VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( rView.GetWindow(), rView.GetWrtShell(), DLG_DOC_FOOTNOTE );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ break;
+ }
+ case FN_NUMBERING_OUTLINE_DLG:
+ {
+ SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
+ rView.GetWindow(), &aTmp, rView.GetWrtShell());
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ rReq.Done();
+ }
+ break;
+ case SID_OPEN_XML_FILTERSETTINGS:
+ {
+ try
+ {
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ if( xDialog.is() )
+ {
+ xDialog->execute();
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ rReq.Ignore ();
+ }
+ break;
+ case FN_WORDCOUNT_DIALOG:
+ {
+ SwWrtShell &rSh = rView.GetWrtShell();
+ SwDocStat aCurr;
+ SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
+ {
+ SwWait aWait( *rView.GetDocShell(), TRUE );
+ rSh.StartAction();
+ rSh.CountWords( aCurr );
+ rSh.UpdateDocStat( aDocStat );
+ rSh.EndAction();
+ }
+
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( rView.GetWindow() );
+ pDialog->SetValues(aCurr, aDocStat );
+ pDialog->Execute();
+ delete pDialog;
+ }
+ break;
case SID_CHAR_DLG:
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -640,6 +740,18 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
}
}
break;
+ case SID_INSERT_RLM :
+ case SID_INSERT_LRM :
+ case SID_INSERT_ZWNBSP :
+ case SID_INSERT_ZWSP:
+ {
+ SvtCTLOptions aCTLOptions;
+ sal_Bool bEnabled = aCTLOptions.IsCTLFontEnabled();
+ rView.GetViewFrame()->GetBindings().SetVisibleState( nWhich, bEnabled );
+ if(!bEnabled)
+ rSet.DisableItem(nWhich);
+ }
+ break;
default:
rSet.InvalidateItem( nWhich );
break;
@@ -655,6 +767,16 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
}
}
+void SwAnnotationShell::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+{
+ rView.ExecSearch(rReq,bNoMessage);
+}
+
+void SwAnnotationShell::StateSearch(SfxItemSet &rSet)
+{
+ rView.StateSearch(rSet);
+}
+
void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
@@ -874,9 +996,12 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
+ case FN_REPLY:
+ case FN_POSTIT:
+ case FN_DELETE_COMMENT:
case FN_DELETE_NOTE:
if ( pPostItMgr->GetActivePostIt() )
- pPostItMgr->GetActivePostIt()->Delete();
+ pPostItMgr->GetActivePostIt()->ExecuteCommand(nSlot);
break;
case FN_DELETE_ALL_NOTES:
pPostItMgr->Delete();
@@ -889,8 +1014,15 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
}
case FN_HIDE_NOTE:
- if ( pPostItMgr->GetActivePostIt() )
- pPostItMgr->GetActivePostIt()->Hide();
+ /*
+ if ( Mgr()->GetActivePostIt() == this )
+ {
+ Mgr()->SetActivePostIt(0);
+ // put the cursor back into the document
+ SwitchToFieldPos();
+ }
+ Mgr()->Hide(mpFld);
+ */
break;
case FN_HIDE_ALL_NOTES:
pPostItMgr->Hide();
@@ -914,24 +1046,49 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
USHORT nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
+ case FN_POSTIT:
case FN_DELETE_NOTE:
case FN_DELETE_NOTE_AUTHOR:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_NOTE:
case FN_HIDE_NOTE_AUTHOR:
case FN_HIDE_ALL_NOTES:
+ {
+ if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() || !pPostItMgr->GetActivePostIt()->ISA(SwPostIt))
+ rSet.DisableItem(nWhich);
+ break;
+ }
+ case FN_DELETE_COMMENT:
+ {
+ if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) //|| !pPostItMgr->GetActivePostIt()->ISA(SwRedComment))
+ rSet.DisableItem(nWhich);
+ break;
+ }
+ case FN_REPLY:
+ {
+ if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() || !pPostItMgr->GetActivePostIt()->ISA(SwPostIt))
+ rSet.DisableItem(nWhich);
+ else
{
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
- rSet.InvalidateItem( nWhich );
+ SvtUserOptions aUserOpt;
+ String sAuthor;
+ if( !(sAuthor = aUserOpt.GetFullName()).Len())
+ if( !(sAuthor = aUserOpt.GetID()).Len() )
+ sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR ));
+ if (sAuthor == pPostItMgr->GetActivePostIt()->GetAuthor())
+ rSet.DisableItem(nWhich);
}
break;
+ }
default:
rSet.InvalidateItem( nWhich );
break;
}
- if ( (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) && (nSlotId==FN_DELETE_NOTE) )
- rSet.DisableItem( nWhich );
+ if ( (pPostItMgr->GetActivePostIt()->IsProtected()) &&
+ //if ( (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) &&
+ ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) )
+ rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
}
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index 46c442fe9d27..e616126f8b1c 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: drawsh.cxx,v $
- * $Revision: 1.20 $
+ * $Revision: 1.20.190.1 $
*
* This file is part of OpenOffice.org.
*
@@ -47,10 +47,14 @@
#include <svx/fontworkbar.hxx>
#include <svx/tbxcustomshapes.hxx>
#include <uitool.hxx>
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
#include <swmodule.hxx>
+#include <swwait.hxx>
+#include <docstat.hxx>
+#include <IDocumentStatistics.hxx>
+
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <svx/xtable.hxx>
@@ -67,7 +71,11 @@
#define SwDrawShell
#include "itemdef.hxx"
#include "swslots.hxx"
+#include "swabstdlg.hxx" //CHINA001
+#include "misc.hrc"
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
SFX_IMPL_INTERFACE(SwDrawShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAW))
{
@@ -189,7 +197,66 @@ void SwDrawShell::Execute(SfxRequest &rReq)
pVFrame->GetBindings().Invalidate(SID_FONTWORK);
}
break;
+ case FN_FORMAT_FOOTNOTE_DLG:
+ {
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), GetView().GetWrtShell(), DLG_DOC_FOOTNOTE );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ break;
+ }
+ case FN_NUMBERING_OUTLINE_DLG:
+ {
+ SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
+ GetView().GetWindow(), &aTmp, GetView().GetWrtShell());
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ rReq.Done();
+ }
+ break;
+ case SID_OPEN_XML_FILTERSETTINGS:
+ {
+ try
+ {
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ if( xDialog.is() )
+ {
+ xDialog->execute();
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ rReq.Ignore ();
+ }
+ break;
+ case FN_WORDCOUNT_DIALOG:
+ {
+ SwDocStat aCurr;
+ SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
+ {
+ SwWait aWait( *GetView().GetDocShell(), TRUE );
+ rSh.StartAction();
+ rSh.CountWords( aCurr );
+ rSh.UpdateDocStat( aDocStat );
+ rSh.EndAction();
+ }
+
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
+ pDialog->SetValues(aCurr, aDocStat );
+ pDialog->Execute();
+ delete pDialog;
+ }
+ break;
case SID_EXTRUSION_TOOGLE:
case SID_EXTRUSION_TILT_DOWN:
case SID_EXTRUSION_TILT_UP:
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index f09a3d6a7dad..016f27dca10e 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: drwtxtex.cxx,v $
- * $Revision: 1.46 $
+ * $Revision: 1.46.82.1 $
*
* This file is part of OpenOffice.org.
*
@@ -61,6 +61,7 @@
#include <sfx2/viewfrm.hxx>
#include <svtools/whiter.hxx>
#include <svtools/cjkoptions.hxx>
+#include <svtools/ctloptions.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx>
@@ -84,19 +85,18 @@
#include <swmodule.hxx>
#include <initui.hxx> // fuer SpellPointer
#include <edtwin.hxx>
+#include <swwait.hxx>
+#include <docstat.hxx>
+
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-
#include "swabstdlg.hxx"
#include "chrdlg.hrc"
+#include "misc.hrc"
//modified on Jul. 30th
#include <svtools/languageoptions.hxx>
@@ -124,9 +124,8 @@ using namespace ::com::sun::star;
void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SwWrtShell &rSh = GetShell();
-
- OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- SfxItemSet aEditAttr(pOLV->GetAttribs());
+ OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
+ SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxItemSet aNewAttr(*aEditAttr.GetPool(), aEditAttr.GetRanges());
sal_uInt16 nSlot = rReq.GetSlot();
@@ -298,7 +297,66 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
aNewAttr.Put(*pArgs);
}
break;
+ case FN_FORMAT_FOOTNOTE_DLG:
+ {
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), rView.GetWrtShell(), DLG_DOC_FOOTNOTE );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ break;
+ }
+ case FN_NUMBERING_OUTLINE_DLG:
+ {
+ SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
+ GetView().GetWindow(), &aTmp, GetView().GetWrtShell());
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ rReq.Done();
+ }
+ break;
+ case SID_OPEN_XML_FILTERSETTINGS:
+ {
+ try
+ {
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ if( xDialog.is() )
+ {
+ xDialog->execute();
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ rReq.Ignore ();
+ }
+ break;
+ case FN_WORDCOUNT_DIALOG:
+ {
+ SwDocStat aCurr;
+ SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
+ {
+ SwWait aWait( *GetView().GetDocShell(), TRUE );
+ rSh.StartAction();
+ rSh.CountWords( aCurr );
+ rSh.UpdateDocStat( aDocStat );
+ rSh.EndAction();
+ }
+
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
+ pDialog->SetValues(aCurr, aDocStat );
+ pDialog->Execute();
+ delete pDialog;
+ }
+ break;
case SID_PARA_DLG:
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -663,6 +721,18 @@ ASK_ESCAPE:
GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
}
break;
+ case SID_INSERT_RLM :
+ case SID_INSERT_LRM :
+ case SID_INSERT_ZWNBSP :
+ case SID_INSERT_ZWSP:
+ {
+ SvtCTLOptions aCTLOptions;
+ sal_Bool bEnabled = aCTLOptions.IsCTLFontEnabled();
+ GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, bEnabled );
+ if(!bEnabled)
+ rSet.DisableItem(nWhich);
+ }
+ break;
default:
nSlotId = 0; // don't know this slot
break;
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index f2381dbc8ff3..e033f7c7c3f7 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: drwtxtsh.cxx,v $
- * $Revision: 1.42 $
+ * $Revision: 1.42.190.1 $
*
* This file is part of OpenOffice.org.
*
@@ -110,7 +110,8 @@
#include <cppuhelper/bootstrap.hxx>
-
+#include "swabstdlg.hxx" //CHINA001
+#include "misc.hrc"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -494,9 +495,6 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -528,9 +526,23 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
rReq.Done();
}
break;
- case FN_INSERT_SYMBOL: // Sonderzeichen einfuegen
+ case FN_INSERT_SYMBOL:
+ { // Sonderzeichen einfuegen
InsertSymbol(rReq);
break;
+ }
+ case FN_INSERT_STRING:
+ {
+ const SfxItemSet *pNewAttrs = rReq.GetArgs();
+ sal_uInt16 nSlot = rReq.GetSlot();
+ const SfxPoolItem* pItem = 0;
+ if(pNewAttrs)
+ {
+ pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
+ }
+ break;
+ }
case SID_SELECTALL:
{
@@ -544,7 +556,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
}
break;
- case FN_FORMAT_RESET: // Harte Textattributierung l�schen
+ case FN_FORMAT_RESET: // delete hard text attributes
{
pOLV->RemoveAttribsKeepLanguages( true );
pOLV->GetEditView().GetEditEngine()->RemoveFields(TRUE);
@@ -564,7 +576,6 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
return;
}
break;
-
case FN_DRAWTEXT_ATTR_DLG:
{
SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool() );
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 550a4524ed96..4df31175e1aa 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: frmsh.cxx,v $
- * $Revision: 1.22 $
+ * $Revision: 1.22.190.1 $
*
* This file is part of OpenOffice.org.
*
@@ -70,24 +70,23 @@
#include <usrpref.hxx>
#include <edtwin.hxx>
#include <swdtflvr.hxx>
+#include <swwait.hxx>
+#include <docstat.hxx>
+#include <IDocumentStatistics.hxx>
+
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#include "swabstdlg.hxx"
+#include "misc.hrc"
+
using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
// Prototypen ------------------------------------------------------------
@@ -236,7 +235,66 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.Unchain( (SwFrmFmt&)*rSh.GetFlyFrmFmt() );
GetView().GetViewFrame()->GetBindings().Invalidate(FN_FRAME_CHAIN);
break;
+ case FN_FORMAT_FOOTNOTE_DLG:
+ {
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+
+ VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), GetView().GetWrtShell(), DLG_DOC_FOOTNOTE );
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ break;
+ }
+ case FN_NUMBERING_OUTLINE_DLG:
+ {
+ SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
+ GetView().GetWindow(), &aTmp, GetView().GetWrtShell());
+ DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ pDlg->Execute();
+ delete pDlg;
+ rReq.Done();
+ break;
+ }
+ case SID_OPEN_XML_FILTERSETTINGS:
+ {
+ try
+ {
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ if( xDialog.is() )
+ {
+ xDialog->execute();
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ rReq.Ignore ();
+ }
+ break;
+ case FN_WORDCOUNT_DIALOG:
+ {
+ SwDocStat aCurr;
+ SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
+ {
+ SwWait aWait( *GetView().GetDocShell(), TRUE );
+ rSh.StartAction();
+ rSh.CountWords( aCurr );
+ rSh.UpdateDocStat( aDocStat );
+ rSh.EndAction();
+ }
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "Dialogdiet fail!");
+ AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
+ pDialog->SetValues(aCurr, aDocStat );
+ pDialog->Execute();
+ delete pDialog;
+ }
+ break;
default: bMore = TRUE;
}
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 10858ab1e68f..026e22a228c4 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -86,12 +86,8 @@
#include <usrpref.hxx>
#include <edtwin.hxx>
#include <swwait.hxx>
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
#define SwGrfShell
#include "itemdef.hxx"
@@ -114,6 +110,11 @@ void SwGrfShell::Execute(SfxRequest &rReq)
USHORT nSlot = rReq.GetSlot();
switch(nSlot)
{
+ case SID_TWAIN_TRANSFER:
+ {
+ GetView().ExecuteScan( rReq );
+ break;
+ }
case FN_SAVE_GRAPHIC:
{
const Graphic *pGraphic;
@@ -383,8 +384,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
switch( nSlot )
{
- case FN_FLIP_VERT_GRAFIC:
- case FN_FLIP_HORZ_GRAFIC:
+ case FN_FLIP_VERT_GRAFIC:
+ case FN_FLIP_HORZ_GRAFIC:
{
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
@@ -475,7 +476,6 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
aToolboxAccess.toggleToolbox();
break;
}
-
case SID_GRFFILTER:
case SID_GRFFILTER_INVERT:
case SID_GRFFILTER_SMOOTH:
@@ -534,7 +534,11 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
BOOL bDisable = bParentCntProt;
switch( nWhich )
{
+ case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
+ case SID_TWAIN_TRANSFER:
+ if( bParentCntProt || !bIsGrfCntnt )
+ bDisable = TRUE;
break;
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk
index 9dfec26cddfc..2e4a96c990bf 100644
--- a/sw/source/ui/shells/makefile.mk
+++ b/sw/source/ui/shells/makefile.mk
@@ -81,7 +81,11 @@ EXCEPTIONSFILES = \
$(SLO)$/drwtxtsh.obj \
$(SLO)$/textsh.obj \
$(SLO)$/textsh2.obj \
- $(SLO)$/grfshex.obj \
+ $(SLO)$/grfshex.obj \
+ $(SLO)$/drawsh.obj \
+ $(SLO)$/drwtxtsh.obj \
+ $(SLO)$/frmsh.obj \
+ $(SLO)$/drwtxtex.obj \
$(SLO)$/textsh1.obj
# --- Tagets -------------------------------------------------------
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 97a331201751..d4556b89d14f 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textfld.cxx,v $
- * $Revision: 1.38 $
+ * $Revision: 1.38.190.2 $
*
* This file is part of OpenOffice.org.
*
@@ -37,9 +37,7 @@
#include <sfx2/lnkbase.hxx>
#include <fmtfld.hxx>
#include <tools/urlobj.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svtools/itempool.hxx>
#include <svtools/useroptions.hxx>
#include <svtools/whiter.hxx>
@@ -57,19 +55,14 @@
#include <fmtinfmt.hxx>
#include <fldwrap.hxx>
#include <redline.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <wrtsh.hxx>
#include <flddat.hxx>
#include <numrule.hxx>
-#ifndef _TEXTSH_HXX
#include <textsh.hxx>
-#endif
+#include <docsh.hxx>
#include <docufld.hxx>
#include <usrfld.hxx>
#include <ddefld.hxx>
@@ -77,12 +70,8 @@
#include <fldmgr.hxx>
#include <uitool.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#include <sfx2/app.hxx>
#include <svx/svxdlg.hxx>
@@ -92,9 +81,7 @@
#include <fldui.hrc>
#include <doc.hxx>
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
#include "PostItMgr.hxx"
#include "postit.hxx"
@@ -334,7 +321,6 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rReq.Ignore();
}
break;
-
case FN_DELETE_NOTE:
if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->GetActivePostIt() )
GetView().GetPostItMgr()->GetActivePostIt()->Delete();
@@ -369,7 +355,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
- if (bNew)
+ if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
SvtUserOptions aUserOpt;
String sAuthor;
@@ -388,10 +374,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, FALSE);
pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
rSh.Pop(FALSE); // Cursorpos restaurieren
- }
- else
- {
- }
+ }
if (pPostIt)
{
@@ -413,6 +396,20 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_REDLINE_COMMENT:
{
+ /* this code can be used once we want redline comments in the margin, all other stuff can
+ then be deleted
+ String sComment;
+ const SwRedline *pRedline = rSh.GetCurrRedline();
+
+ if (pRedline)
+ {
+ sComment = pRedline->GetComment();
+ if ( sComment == String(rtl::OUString::createFromAscii("")) )
+ GetView().GetDocShell()->Broadcast(SwRedlineHint(pRedline,SWREDLINE_INSERTED));
+ const_cast<SwRedline*>(pRedline)->Broadcast(SwRedlineHint(pRedline,SWREDLINE_FOCUS));
+ }
+ */
+
String sComment;
const SwRedline *pRedline = rSh.GetCurrRedline();
@@ -792,10 +789,6 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
}
}
-/*--------------------------------------------------------------------
- Beschreibung: Traveling zwischen Redlines
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn )
{
SwWrtShell* pSh = GetShellPtr();
@@ -851,10 +844,6 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
{
SwWrtShell* pSh = GetShellPtr();
@@ -905,4 +894,3 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
}
-
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 123247c8a164..92fee69b7bb6 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textsh1.cxx,v $
- * $Revision: 1.70 $
+ * $Revision: 1.70.84.1 $
*
* This file is part of OpenOffice.org.
*
@@ -32,16 +32,10 @@
#include "precompiled_sw.hxx"
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <comphelper/processfactory.hxx>
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
#include <hintids.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <i18npool/mslangid.hxx>
#include <svtools/languageoptions.hxx>
@@ -63,9 +57,7 @@
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/colritem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/brshitem.hxx>
#include <svx/svxacorr.hxx>
#include <svtools/cjkoptions.hxx>
@@ -78,18 +70,14 @@
#include <fmtinfmt.hxx>
#include <swwait.hxx>
#include <wrtsh.hxx>
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
#include <swmodule.hxx>
#include <viewopt.hxx>
#include <uitool.hxx>
#include <swevent.hxx>
#include <fmthdft.hxx>
#include <pagedesc.hxx>
-#ifndef _TEXTSH_HXX
#include <textsh.hxx>
-#endif
#include <bookmrk.hxx>
#include <swdtflvr.hxx>
#include <docstat.hxx>
@@ -97,41 +85,24 @@
#include <tablemgr.hxx>
#include <swundo.hxx> // fuer Undo-IDs
#include <reffld.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <mdiexp.hxx>
-#ifndef _INPUTWIN_HXX
#include <inputwin.hxx>
-#endif
-#ifndef _PARDLG_HXX
#include <pardlg.hxx>
-#endif
#include <frmatr.hxx>
#include <fmtcol.hxx>
#include <cellatr.hxx>
#include <edtwin.hxx>
-#ifndef _REDLNDLG_HXX
#include <redlndlg.hxx>
-#endif
#include "fldmgr.hxx"
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
-#ifndef _WEB_HRC
#include <web.hrc>
-#endif
#include "paratr.hxx"
#include <crsskip.hxx>
#include <docstat.hxx>
-#include <swwait.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/app.hxx>
#include <breakit.hxx>