diff options
-rw-r--r-- | include/sfx2/sfx.hrc | 6 | ||||
-rw-r--r-- | include/sfx2/viewfrm.hxx | 1 | ||||
-rw-r--r-- | sc/uiconfig/scalc/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sc/uiconfig/scalc/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sfx2/source/view/view.src | 12 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 18 | ||||
-rw-r--r-- | sw/uiconfig/sglobal/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/sglobal/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/sweb/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/sweb/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swform/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/swform/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swreport/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/swreport/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swriter/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/toolbar/viewerbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swxform/toolbar/standardbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/swxform/toolbar/viewerbar.xml | 1 |
20 files changed, 32 insertions, 29 deletions
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 6c8d6e179b6c..6909d1c260eb 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -151,8 +151,10 @@ #define STR_PASSWD_MIN_LEN (RID_SFX_START+124) #define STR_NONCHECKEDOUT_DOCUMENT (RID_SFX_START+125) #define BT_CHECKOUT (RID_SFX_START+126) -#define STR_PASSWD_MIN_LEN1 (RID_SFX_START+127) -#define STR_MODULENOTINSTALLED (RID_SFX_START+128) +#define BT_READONLY_EDIT (RID_SFX_START+127) +#define STR_READONLY_DOCUMENT (RID_SFX_START+128) +#define STR_PASSWD_MIN_LEN1 (RID_SFX_START+129) +#define STR_MODULENOTINSTALLED (RID_SFX_START+130) #define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157) #define SFX_THUMBNAIL_TEXT (RID_SFX_START+158) diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 16088cd67e3d..919ed9da96a3 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -77,6 +77,7 @@ private: protected: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; + DECL_LINK( SwitchReadOnlyHandler, void * ); SAL_DLLPRIVATE void KillDispatcher_Impl(); virtual ~SfxViewFrame(); diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml b/sc/uiconfig/scalc/toolbar/standardbar.xml index 53682182a1c7..84c9f16104be 100644 --- a/sc/uiconfig/scalc/toolbar/standardbar.xml +++ b/sc/uiconfig/scalc/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sc/uiconfig/scalc/toolbar/viewerbar.xml b/sc/uiconfig/scalc/toolbar/viewerbar.xml index a3718762921a..926e4651b676 100644 --- a/sc/uiconfig/scalc/toolbar/viewerbar.xml +++ b/sc/uiconfig/scalc/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sd/uiconfig/sdraw/toolbar/standardbar.xml b/sd/uiconfig/sdraw/toolbar/standardbar.xml index 8b8af1f090a8..589be80373e7 100644 --- a/sd/uiconfig/sdraw/toolbar/standardbar.xml +++ b/sd/uiconfig/sdraw/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sd/uiconfig/sdraw/toolbar/viewerbar.xml b/sd/uiconfig/sdraw/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sd/uiconfig/sdraw/toolbar/viewerbar.xml +++ b/sd/uiconfig/sdraw/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src index c4213fc2bbdb..85472fe00d7f 100644 --- a/sfx2/source/view/view.src +++ b/sfx2/source/view/view.src @@ -84,7 +84,11 @@ String STR_REPAIREDDOCUMENT String STR_NONCHECKEDOUT_DOCUMENT { - Text [ en-US ] = "Document is not checked out on server" ; + Text [ en-US ] = "This document is not checked out on the server." ; +}; +String STR_READONLY_DOCUMENT +{ + Text [ en-US ] = "This document is opened in read-only mode." ; }; PushButton BT_CHECKOUT @@ -93,5 +97,11 @@ PushButton BT_CHECKOUT Size = MAP_APPFONT( 30 , 0 ); Text[ en-US ] = "Check out"; }; +PushButton BT_READONLY_EDIT +{ + Pos = MAP_APPFONT( 0 , 0 ); + Size = MAP_APPFONT( 70 , 0 ); + Text[ en-US ] = "Edit document"; +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index a01e9162f2ae..efef8f4106ff 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -416,6 +416,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) return; } + RemoveInfoBar("readonly"); pSh->SetReadOnlyUI( false ); } @@ -1246,7 +1247,6 @@ const SvBorder& SfxViewFrame::GetBorderPixelImpl void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { - if( IsDowning_Impl()) return; @@ -1268,7 +1268,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) SfxDispatcher *pDispat = GetDispatcher(); bool bWasReadOnly = pDispat->GetReadOnly_Impl(); bool bIsReadOnly = xObjSh->IsReadOnly(); - if ( !bWasReadOnly != !bIsReadOnly ) + if ( bWasReadOnly != bIsReadOnly ) { // Then also TITLE_CHANGED UpdateTitle(); @@ -1356,6 +1356,14 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) // because each document has its own SfxBindings. //GetDispatcher()->GetBindings()->InvalidateAll(true); } + else + { + std::vector< PushButton* > aButtons; + PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT)); + pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler)); + aButtons.push_back( pBtn ); + AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT), aButtons); + } break; } @@ -1370,6 +1378,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } +IMPL_LINK_NOARG(SfxViewFrame, SwitchReadOnlyHandler) +{ + GetDispatcher()->Execute(SID_EDITDOC); + return 0; +} + void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh ) { diff --git a/sw/uiconfig/sglobal/toolbar/standardbar.xml b/sw/uiconfig/sglobal/toolbar/standardbar.xml index a53f25bf0f74..785c375b9403 100644 --- a/sw/uiconfig/sglobal/toolbar/standardbar.xml +++ b/sw/uiconfig/sglobal/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sw/uiconfig/sglobal/toolbar/viewerbar.xml b/sw/uiconfig/sglobal/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sw/uiconfig/sglobal/toolbar/viewerbar.xml +++ b/sw/uiconfig/sglobal/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sw/uiconfig/sweb/toolbar/standardbar.xml b/sw/uiconfig/sweb/toolbar/standardbar.xml index 1fd6af2f28c3..2a086bf9d352 100644 --- a/sw/uiconfig/sweb/toolbar/standardbar.xml +++ b/sw/uiconfig/sweb/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sw/uiconfig/sweb/toolbar/viewerbar.xml b/sw/uiconfig/sweb/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sw/uiconfig/sweb/toolbar/viewerbar.xml +++ b/sw/uiconfig/sweb/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sw/uiconfig/swform/toolbar/standardbar.xml b/sw/uiconfig/swform/toolbar/standardbar.xml index a53f25bf0f74..785c375b9403 100644 --- a/sw/uiconfig/swform/toolbar/standardbar.xml +++ b/sw/uiconfig/swform/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sw/uiconfig/swform/toolbar/viewerbar.xml b/sw/uiconfig/swform/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sw/uiconfig/swform/toolbar/viewerbar.xml +++ b/sw/uiconfig/swform/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sw/uiconfig/swreport/toolbar/standardbar.xml b/sw/uiconfig/swreport/toolbar/standardbar.xml index a53f25bf0f74..785c375b9403 100644 --- a/sw/uiconfig/swreport/toolbar/standardbar.xml +++ b/sw/uiconfig/swreport/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sw/uiconfig/swreport/toolbar/viewerbar.xml b/sw/uiconfig/swreport/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sw/uiconfig/swreport/toolbar/viewerbar.xml +++ b/sw/uiconfig/swreport/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml b/sw/uiconfig/swriter/toolbar/standardbar.xml index 4eed6fb41245..c7c2dd3e22a6 100644 --- a/sw/uiconfig/swriter/toolbar/standardbar.xml +++ b/sw/uiconfig/swriter/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sw/uiconfig/swriter/toolbar/viewerbar.xml b/sw/uiconfig/swriter/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sw/uiconfig/swriter/toolbar/viewerbar.xml +++ b/sw/uiconfig/swriter/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> diff --git a/sw/uiconfig/swxform/toolbar/standardbar.xml b/sw/uiconfig/swxform/toolbar/standardbar.xml index 28f376968ce6..dc1886e6c1e1 100644 --- a/sw/uiconfig/swxform/toolbar/standardbar.xml +++ b/sw/uiconfig/swxform/toolbar/standardbar.xml @@ -26,8 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:helpid="5331"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/> <toolbar:toolbaritem xlink:href=".uno:PrintDefault" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Print"/> diff --git a/sw/uiconfig/swxform/toolbar/viewerbar.xml b/sw/uiconfig/swxform/toolbar/viewerbar.xml index c57e61d8e7c8..da905abad850 100644 --- a/sw/uiconfig/swxform/toolbar/viewerbar.xml +++ b/sw/uiconfig/swxform/toolbar/viewerbar.xml @@ -20,7 +20,6 @@ <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:EditDoc"/> <toolbar:toolbaritem xlink:href=".uno:SendMail"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> |