summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/docslots.sdi4
-rw-r--r--sfx2/sdi/sfx.sdi19
-rw-r--r--sfx2/source/control/unoctitm.cxx3
-rw-r--r--sfx2/source/doc/objserv.cxx9
-rw-r--r--sfx2/source/view/viewfrm.cxx6
5 files changed, 40 insertions, 1 deletions
diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi
index a6da56c2488d..811467cd94be 100644
--- a/sfx2/sdi/docslots.sdi
+++ b/sfx2/sdi/docslots.sdi
@@ -202,6 +202,10 @@ interface OfficeDocument : Document
ExecMethod = ExecFile_Impl;
StateMethod = GetState_Impl;
]
+ SID_DOC_REPAIR
+ [
+ StateMethod = GetState_Impl;
+ ]
}
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index e00cd9aece28..659e3763bfd1 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3335,6 +3335,25 @@ SfxStringItem Redo SID_REDO
GroupId = SfxGroupId::Edit;
]
+SfxBoolItem DocumentRepair SID_DOC_REPAIR
+
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
SfxBoolItem Reload SID_RELOAD
()
[
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 9fd42581036f..d5adabbaa598 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1018,7 +1018,8 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
aEvent.FeatureURL.Path == "PreviousTrackedChange" ||
aEvent.FeatureURL.Path == "AlignLeft" ||
aEvent.FeatureURL.Path == "AlignHorizontalCenter" ||
- aEvent.FeatureURL.Path == "AlignRight")
+ aEvent.FeatureURL.Path == "AlignRight" ||
+ aEvent.FeatureURL.Path == "DocumentRepair")
{
bool bTemp = false;
aEvent.State >>= bTemp;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 62f2f003016b..e104116f1d17 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1069,6 +1069,15 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
break;
}
+ case SID_DOC_REPAIR:
+ {
+ svl::IUndoManager* pIUndoMgr = GetUndoManager();
+ if (pIUndoMgr)
+ rSet.Put( SfxBoolItem(nWhich, pIUndoMgr->IsEmptyActions()) );
+ else
+ rSet.DisableItem( nWhich );
+ break;
+ }
}
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 816a0aafbca3..e6db9e2d4fee 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1247,6 +1247,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
break;
}
+ case SfxHintId::DocumentRepair:
+ {
+ GetBindings().Invalidate( SID_DOC_REPAIR );
+ break;
+ }
+
case SfxHintId::Deinitializing:
GetFrame().DoClose();
break;