Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Oh, yes, I'm sorry.

On Tue, Jul 24, 2012 at 11:35 AM, Korrawit Pruegsanusak <
detective.conan.1412@gmail.com> wrote:

Hello,

On Tue, Jul 24, 2012 at 4:31 PM, János Uray <uray.janos@gmail.com> wrote:
This patch solves this bug:

Seems you forgot to attach the patch? :-)

Bets Regards,
--
Korrawit Pruegsanusak

From 122a8b70bbf966381bfb930d2021eb641d851839 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Uray=20M.=20J=C3=A1nos"?= <uray.janos@gmail.com>
Date: Tue, 24 Jul 2012 11:29:57 +0200
Subject: [PATCH] fdo#50633 IDE: select current module in Object Catalog on
 open

Change-Id: Ieea731b0ed8eefdab616ed1f778b445aae14191c
---
 basctl/source/basicide/basides1.cxx |    1 +
 basctl/source/basicide/basidesh.cxx |    6 +-----
 basctl/source/basicide/objdlg.cxx   |    7 +++++--
 basctl/source/basicide/objdlg.hxx   |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index ae9443f..48befb7 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1205,6 +1205,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool 
bUpdateTabBar
             GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW );
             SfxObjectShell::SetCurrentComponent( NULL );
         }
+        pModulLayout->GetObjectCatalog().SetCurrentEntry(pCurWin);
         SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 );
         InvalidateBasicIDESlots();
         EnableScrollbars( pCurWin ? sal_True : sal_False );
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 885f7af..e2e1c5a 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -543,11 +543,7 @@ void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy
             if ( pObjectCatalog )
             {
                 pObjectCatalog->SetCancelHdl( LINK( this, BasicIDEShell, ObjectDialogCancelHdl ) );
-                BasicEntryDescriptor aDesc;
-                IDEBaseWindow* pCurWin_ = GetCurWindow();
-                if ( pCurWin_ )
-                    aDesc = pCurWin_->CreateEntryDescriptor();
-                pObjectCatalog->SetCurrentEntry( aDesc );
+                pObjectCatalog->SetCurrentEntry(pCurWin);
             }
         }
 
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 1043594..64935bb 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -223,9 +223,12 @@ void ObjectCatalog::UpdateEntries()
     aMacroTreeList.UpdateEntries();
 }
 
-void ObjectCatalog::SetCurrentEntry( BasicEntryDescriptor& rDesc )
+void ObjectCatalog::SetCurrentEntry (IDEBaseWindow* pCurWin)
 {
-    aMacroTreeList.SetCurrentEntry( rDesc );
+    BasicEntryDescriptor aDesc;
+    if (pCurWin)
+        aDesc = pCurWin->CreateEntryDescriptor();
+    aMacroTreeList.SetCurrentEntry(aDesc);
 }
 
 ObjectCatalogToolBox_Impl::ObjectCatalogToolBox_Impl(
diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx
index c0c3c45..f82ae0e 100644
--- a/basctl/source/basicide/objdlg.hxx
+++ b/basctl/source/basicide/objdlg.hxx
@@ -64,7 +64,7 @@ public:
     virtual ~ObjectCatalog();
 
     void                UpdateEntries();
-    void                SetCurrentEntry( BasicEntryDescriptor& rDesc );
+    void                SetCurrentEntry (IDEBaseWindow* pCurWin);
     void                SetCancelHdl( const Link& rLink ) { aCancelHdl = rLink; }
 };
 
-- 
1.7.7


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.