diff options
-rw-r--r-- | include/sfx2/sfx.hrc | 4 | ||||
-rw-r--r-- | include/sfx2/viewfrm.hxx | 3 | ||||
-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, 31 insertions, 30 deletions
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 0497f5256864..865912ca5b1f 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -155,7 +155,9 @@ #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 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_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 af555152bf98..f2b0704c612c 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -79,9 +79,8 @@ private: protected: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; -#ifndef _SFX_HXX + DECL_LINK( SwitchReadOnlyHandler, void * ); SAL_DLLPRIVATE void KillDispatcher_Impl(); -#endif 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 8c4ca8ee016b..ea3dc66474b5 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 a3718762921a..926e4651b676 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 eb2de4eb7525..806394196514 100644 --- a/sfx2/source/view/view.src +++ b/sfx2/source/view/view.src @@ -92,7 +92,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 @@ -101,5 +105,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 9cb15a0f1444..4014167e3b0d 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 ); } @@ -1250,7 +1251,6 @@ const SvBorder& SfxViewFrame::GetBorderPixelImpl void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { - if( IsDowning_Impl()) return; @@ -1272,7 +1272,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(); @@ -1360,6 +1360,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; } @@ -1374,6 +1382,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 e3379f8a8fd3..cfe7083a6c90 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 a3718762921a..926e4651b676 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 77bba2c346b3..347900071aa4 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 a3718762921a..926e4651b676 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 e3379f8a8fd3..cfe7083a6c90 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 a3718762921a..926e4651b676 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 e3379f8a8fd3..cfe7083a6c90 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 a3718762921a..926e4651b676 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 d78bb4f8642d..362a13b1be13 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 a3718762921a..926e4651b676 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 57df68b96a81..32431213cabd 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 a3718762921a..926e4651b676 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"/> |