diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-11-17 21:48:30 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-11-17 21:48:30 -0600 |
commit | a1d800a7a7072c7003aa4f238a48074d3c281d0a (patch) | |
tree | 37d68d31883b212ad214aa62e87769e7e5352f5d /basctl | |
parent | ae78e3e913f39e2cc6d2b6f83f38c2ea225ab53e (diff) |
SetLineNumberDisplay appropriately when opening or swithin modules
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 1 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 68eaaa4a0ba5..8a00b83fe9bd 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1143,6 +1143,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar AdjustPosSizePixel( Point( 0, 0 ), GetViewFrame()->GetWindow().GetOutputSizePixel() ); if( pCurWin->IsA( TYPE( ModulWindow ) ) ) { + dynamic_cast<ModulWindow*>(pCurWin)->SetLineNumberDisplay(SourceLinesDisplayed()); GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW ); pModulLayout->SetModulWindow( (ModulWindow*)pCurWin ); pModulLayout->Show(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 9e7379ffedf6..c1967f9ec391 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -54,6 +54,7 @@ #include <tools/diagnose_ex.h> #include <basidesh.hrc> #include <basidesh.hxx> +#include <baside2.hxx> #include <basdoc.hxx> #include <basobj.hxx> #include <bastypes.hxx> @@ -288,11 +289,19 @@ BasicIDEShell::~BasicIDEShell() void BasicIDEShell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) { + if(pCurWin && pCurWin->IsA( TYPE(ModulWindow))) + { + dynamic_cast<ModulWindow*>(pCurWin)->SetLineNumberDisplay(SourceLinesDisplayed()); + } UpdateWindows(); } void BasicIDEShell::onDocumentOpened( const ScriptDocument& /*_rDocument*/ ) { + if(pCurWin && pCurWin->IsA( TYPE(ModulWindow))) + { + dynamic_cast<ModulWindow*>(pCurWin)->SetLineNumberDisplay(SourceLinesDisplayed()); + } UpdateWindows(); } |