summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basidesh.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-05-22 17:29:56 +0200
committerAndras Timar <andras.timar@collabora.com>2014-05-23 07:36:50 +0200
commit6c9492030651fed341d8259b373127e3405cd083 (patch)
tree14b3e4c79385f266fa151bd060bbc7761f7e5e33 /basctl/source/basicide/basidesh.cxx
parenta00784b7877017b39badca7289dd997de807e43b (diff)
bnc#467278: Introduce a warning that changes to VBA macros cannot be saved.cp-4.2-4
As an InfoBar, so hopefully not annoying... Conflicts: basctl/source/basicide/basidesh.cxx Change-Id: I5d4e79273edc03829fdab2d6d5a291576c954e4b
Diffstat (limited to 'basctl/source/basicide/basidesh.cxx')
-rw-r--r--basctl/source/basicide/basidesh.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 674775b79d77..f95e6f4d491a 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -35,6 +35,7 @@
#include <sfx2/app.hxx>
#include <sfx2/dinfdlg.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/infobar.hxx>
#include <sfx2/minfitem.hxx>
#include <sfx2/objface.hxx>
#include <svl/aeitem.hxx>
@@ -137,6 +138,7 @@ SFX_IMPL_INTERFACE( basctl_Shell, SfxViewShell, IDEResId( RID_STR_IDENAME ) )
{
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_PROPERTYBROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER);
+ SFX_CHILDWINDOW_REGISTRATION(SfxInfoBarContainerChild::GetChildWindowId());
SFX_POPUPMENU_REGISTRATION( IDEResId( RID_POPUP_DLGED ) );
}
@@ -250,7 +252,14 @@ Shell::~Shell()
void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
{
if (pCurWin)
+ {
pCurWin->OnNewDocument();
+
+ // for VBA documents, show a warning that we can save them only in ODF
+ if (pCurWin->GetDocument().isInVBAMode())
+ GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA));
+ }
+
UpdateWindows();
}