summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview/srcview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview/srcview.cxx')
-rw-r--r--sw/source/ui/uiview/srcview.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 34cfebe663a1..d30e85c5ee71 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -57,6 +57,7 @@
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/request.hxx>
@@ -457,17 +458,21 @@ void SwSrcView::Execute(SfxRequest& rReq)
break;
case SID_UNDO:
pTextView->Undo();
+ GetViewFrame()->GetBindings().InvalidateAll(FALSE);
break;
case SID_REDO:
pTextView->Redo();
+ GetViewFrame()->GetBindings().InvalidateAll(FALSE);
break;
case SID_REPEAT:
break;
case SID_CUT:
- pTextView->Cut();
+ if(pTextView->HasSelection())
+ pTextView->Cut();
break;
case SID_COPY:
- pTextView->Copy();
+ if(pTextView->HasSelection())
+ pTextView->Copy();
break;
case SID_PASTE:
pTextView->Paste();
@@ -588,6 +593,8 @@ void SwSrcView::GetState(SfxItemSet& rSet)
case SID_DIRECTEXPORTDOCASPDF:
case SID_EXPORTDOC:
case SID_REPEAT:
+ case SID_BROWSER_MODE:
+ case FN_PRINT_LAYOUT:
rSet.DisableItem(nWhich);
break;
case SID_CUT:
@@ -731,6 +738,10 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
+ SfxPrinter* pOld = pDocSh->GetDoc()->getPrinter( false );
+ if ( pOld && pOld->IsPrinting() )
+ return SFX_PRINTERROR_BUSY;
+
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
{
pDocSh->GetDoc()->setPrinter( pNew, true, true );