Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
33414c8b
Kaydet (Commit)
33414c8b
authored
May 15, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#91239 - return VclPtr's from Create Fn.s and add missing dispose logic.
Change-Id: I802b841040f608b5586704745cc9817603fb1879
üst
72e6c707
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
24 deletions
+36
-24
baside3.cxx
basctl/source/basicide/baside3.cxx
+1
-1
basides1.cxx
basctl/source/basicide/basides1.cxx
+6
-6
basides2.cxx
basctl/source/basicide/basides2.cxx
+4
-4
basides3.cxx
basctl/source/basicide/basides3.cxx
+3
-3
basidesh.cxx
basctl/source/basicide/basidesh.cxx
+5
-2
layout.cxx
basctl/source/basicide/layout.cxx
+8
-0
layout.hxx
basctl/source/basicide/layout.hxx
+1
-0
basidesh.hxx
basctl/source/inc/basidesh.hxx
+8
-8
No files found.
basctl/source/basicide/baside3.cxx
Dosyayı görüntüle @
33414c8b
...
@@ -1200,7 +1200,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
...
@@ -1200,7 +1200,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
bool
bSuccess
=
rDocument
.
insertDialog
(
aLibName
,
aNewDlgName
,
xISP
);
bool
bSuccess
=
rDocument
.
insertDialog
(
aLibName
,
aNewDlgName
,
xISP
);
if
(
bSuccess
)
if
(
bSuccess
)
{
{
DialogWindow
*
pNewDlgWin
=
pShell
->
CreateDlgWin
(
rDocument
,
aLibName
,
aNewDlgName
);
VclPtr
<
DialogWindow
>
pNewDlgWin
=
pShell
->
CreateDlgWin
(
rDocument
,
aLibName
,
aNewDlgName
);
pShell
->
SetCurWindow
(
pNewDlgWin
,
true
);
pShell
->
SetCurWindow
(
pNewDlgWin
,
true
);
}
}
...
...
basctl/source/basicide/basides1.cxx
Dosyayı görüntüle @
33414c8b
...
@@ -485,14 +485,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
...
@@ -485,14 +485,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
break
;
break
;
case
SID_BASICIDE_NEWMODULE
:
case
SID_BASICIDE_NEWMODULE
:
{
{
ModulWindow
*
pWin
=
CreateBasWin
(
m_aCurDocument
,
m_aCurLibName
,
OUString
()
);
VclPtr
<
ModulWindow
>
pWin
=
CreateBasWin
(
m_aCurDocument
,
m_aCurLibName
,
OUString
()
);
DBG_ASSERT
(
pWin
,
"New Module: Konnte Fenster nicht erzeugen!"
);
DBG_ASSERT
(
pWin
,
"New Module: Konnte Fenster nicht erzeugen!"
);
SetCurWindow
(
pWin
,
true
);
SetCurWindow
(
pWin
,
true
);
}
}
break
;
break
;
case
SID_BASICIDE_NEWDIALOG
:
case
SID_BASICIDE_NEWDIALOG
:
{
{
DialogWindow
*
pWin
=
CreateDlgWin
(
m_aCurDocument
,
m_aCurLibName
,
OUString
()
);
VclPtr
<
DialogWindow
>
pWin
=
CreateDlgWin
(
m_aCurDocument
,
m_aCurLibName
,
OUString
()
);
DBG_ASSERT
(
pWin
,
"New Module: Konnte Fenster nicht erzeugen!"
);
DBG_ASSERT
(
pWin
,
"New Module: Konnte Fenster nicht erzeugen!"
);
SetCurWindow
(
pWin
,
true
);
SetCurWindow
(
pWin
,
true
);
}
}
...
@@ -1088,12 +1088,12 @@ void Shell::ManageToolbars()
...
@@ -1088,12 +1088,12 @@ void Shell::ManageToolbars()
}
}
}
}
BaseWindow
*
Shell
::
FindApplicationWindow
()
VclPtr
<
BaseWindow
>
Shell
::
FindApplicationWindow
()
{
{
return
FindWindow
(
ScriptDocument
::
getApplicationScriptDocument
()
);
return
FindWindow
(
ScriptDocument
::
getApplicationScriptDocument
()
);
}
}
BaseWindow
*
Shell
::
FindWindow
(
VclPtr
<
BaseWindow
>
Shell
::
FindWindow
(
ScriptDocument
const
&
rDocument
,
ScriptDocument
const
&
rDocument
,
OUString
const
&
rLibName
,
OUString
const
&
rName
,
OUString
const
&
rLibName
,
OUString
const
&
rName
,
ItemType
eType
,
bool
bFindSuspended
ItemType
eType
,
bool
bFindSuspended
...
@@ -1147,7 +1147,7 @@ long Shell::CallBasicBreakHdl( StarBASIC* pBasic )
...
@@ -1147,7 +1147,7 @@ long Shell::CallBasicBreakHdl( StarBASIC* pBasic )
return
nRet
;
return
nRet
;
}
}
ModulWindow
*
Shell
::
ShowActiveModuleWindow
(
StarBASIC
*
pBasic
)
VclPtr
<
ModulWindow
>
Shell
::
ShowActiveModuleWindow
(
StarBASIC
*
pBasic
)
{
{
SetCurLib
(
ScriptDocument
::
getApplicationScriptDocument
(),
OUString
(),
false
);
SetCurLib
(
ScriptDocument
::
getApplicationScriptDocument
(),
OUString
(),
false
);
...
@@ -1158,7 +1158,7 @@ ModulWindow* Shell::ShowActiveModuleWindow( StarBASIC* pBasic )
...
@@ -1158,7 +1158,7 @@ ModulWindow* Shell::ShowActiveModuleWindow( StarBASIC* pBasic )
DBG_ASSERT
(
pActiveModule
,
"Kein aktives Modul im ErrorHdl?!"
);
DBG_ASSERT
(
pActiveModule
,
"Kein aktives Modul im ErrorHdl?!"
);
if
(
pActiveModule
)
if
(
pActiveModule
)
{
{
ModulWindow
*
pWin
=
0
;
VclPtr
<
ModulWindow
>
pWin
;
SbxObject
*
pParent
=
pActiveModule
->
GetParent
();
SbxObject
*
pParent
=
pActiveModule
->
GetParent
();
if
(
StarBASIC
*
pLib
=
dynamic_cast
<
StarBASIC
*>
(
pParent
))
if
(
StarBASIC
*
pLib
=
dynamic_cast
<
StarBASIC
*>
(
pParent
))
{
{
...
...
basctl/source/basicide/basides2.cxx
Dosyayı görüntüle @
33414c8b
...
@@ -129,12 +129,12 @@ void Shell::SetMDITitle()
...
@@ -129,12 +129,12 @@ void Shell::SetMDITitle()
}
}
}
}
ModulWindow
*
Shell
::
CreateBasWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rModName
)
VclPtr
<
ModulWindow
>
Shell
::
CreateBasWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rModName
)
{
{
bCreatingWindow
=
true
;
bCreatingWindow
=
true
;
sal_uLong
nKey
=
0
;
sal_uLong
nKey
=
0
;
ModulWindow
*
pWin
=
0
;
VclPtr
<
ModulWindow
>
pWin
;
OUString
aLibName
(
rLibName
);
OUString
aLibName
(
rLibName
);
OUString
aModName
(
rModName
);
OUString
aModName
(
rModName
);
...
@@ -203,14 +203,14 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUStrin
...
@@ -203,14 +203,14 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUStrin
return
pWin
;
return
pWin
;
}
}
ModulWindow
*
Shell
::
FindBasWin
(
VclPtr
<
ModulWindow
>
Shell
::
FindBasWin
(
ScriptDocument
const
&
rDocument
,
ScriptDocument
const
&
rDocument
,
OUString
const
&
rLibName
,
OUString
const
&
rName
,
OUString
const
&
rLibName
,
OUString
const
&
rName
,
bool
bCreateIfNotExist
,
bool
bFindSuspended
bool
bCreateIfNotExist
,
bool
bFindSuspended
)
)
{
{
if
(
BaseWindow
*
pWin
=
FindWindow
(
rDocument
,
rLibName
,
rName
,
TYPE_MODULE
,
bFindSuspended
))
if
(
BaseWindow
*
pWin
=
FindWindow
(
rDocument
,
rLibName
,
rName
,
TYPE_MODULE
,
bFindSuspended
))
return
static_cast
<
ModulWindow
*>
(
pWin
);
return
VclPtr
<
ModulWindow
>
(
static_cast
<
ModulWindow
*>
(
pWin
)
);
return
bCreateIfNotExist
?
CreateBasWin
(
rDocument
,
rLibName
,
rName
)
:
0
;
return
bCreateIfNotExist
?
CreateBasWin
(
rDocument
,
rLibName
,
rName
)
:
0
;
}
}
...
...
basctl/source/basicide/basides3.cxx
Dosyayı görüntüle @
33414c8b
...
@@ -35,12 +35,12 @@ using namespace ::com::sun::star;
...
@@ -35,12 +35,12 @@ using namespace ::com::sun::star;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
io
;
using
namespace
::
com
::
sun
::
star
::
io
;
DialogWindow
*
Shell
::
CreateDlgWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rDlgName
)
VclPtr
<
DialogWindow
>
Shell
::
CreateDlgWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rDlgName
)
{
{
bCreatingWindow
=
true
;
bCreatingWindow
=
true
;
sal_uLong
nKey
=
0
;
sal_uLong
nKey
=
0
;
DialogWindow
*
pWin
=
0
;
VclPtr
<
DialogWindow
>
pWin
;
OUString
aLibName
(
rLibName
);
OUString
aLibName
(
rLibName
);
OUString
aDlgName
(
rDlgName
);
OUString
aDlgName
(
rDlgName
);
...
@@ -107,7 +107,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const OUStri
...
@@ -107,7 +107,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const OUStri
return
pWin
;
return
pWin
;
}
}
DialogWindow
*
Shell
::
FindDlgWin
(
VclPtr
<
DialogWindow
>
Shell
::
FindDlgWin
(
ScriptDocument
const
&
rDocument
,
ScriptDocument
const
&
rDocument
,
OUString
const
&
rLibName
,
OUString
const
&
rName
,
OUString
const
&
rLibName
,
OUString
const
&
rName
,
bool
bCreateIfNotExist
,
bool
bFindSuspended
bool
bCreateIfNotExist
,
bool
bFindSuspended
...
...
basctl/source/basicide/basidesh.cxx
Dosyayı görüntüle @
33414c8b
...
@@ -225,7 +225,6 @@ Shell::~Shell()
...
@@ -225,7 +225,6 @@ Shell::~Shell()
SetWindow
(
0
);
SetWindow
(
0
);
SetCurWindow
(
0
);
SetCurWindow
(
0
);
pTabBar
.
disposeAndClear
();
aObjectCatalog
.
disposeAndClear
();
aObjectCatalog
.
disposeAndClear
();
aScrollBarBox
.
disposeAndClear
();
aScrollBarBox
.
disposeAndClear
();
aVScrollBar
.
disposeAndClear
();
aVScrollBar
.
disposeAndClear
();
...
@@ -247,6 +246,10 @@ Shell::~Shell()
...
@@ -247,6 +246,10 @@ Shell::~Shell()
GetExtraData
()
->
ShellInCriticalSection
()
=
false
;
GetExtraData
()
->
ShellInCriticalSection
()
=
false
;
nShellCount
--
;
nShellCount
--
;
pDialogLayout
.
disposeAndClear
();
pModulLayout
.
disposeAndClear
();
pTabBar
.
disposeAndClear
();
}
}
void
Shell
::
onDocumentCreated
(
const
ScriptDocument
&
/*_rDocument*/
)
void
Shell
::
onDocumentCreated
(
const
ScriptDocument
&
/*_rDocument*/
)
...
@@ -761,7 +764,7 @@ void Shell::UpdateWindows()
...
@@ -761,7 +764,7 @@ void Shell::UpdateWindows()
OUString
aDlgName
=
pDlgNames
[
j
];
OUString
aDlgName
=
pDlgNames
[
j
];
// this find only looks for non-suspended windows;
// this find only looks for non-suspended windows;
// suspended windows are handled in CreateDlgWin
// suspended windows are handled in CreateDlgWin
DialogWindow
*
pWin
=
FindDlgWin
(
*
doc
,
aLibName
,
aDlgName
,
false
);
VclPtr
<
DialogWindow
>
pWin
=
FindDlgWin
(
*
doc
,
aLibName
,
aDlgName
,
false
);
if
(
!
pWin
)
if
(
!
pWin
)
pWin
=
CreateDlgWin
(
*
doc
,
aLibName
,
aDlgName
);
pWin
=
CreateDlgWin
(
*
doc
,
aLibName
,
aDlgName
);
if
(
!
pNextActiveWindow
&&
pLibInfoItem
&&
pLibInfoItem
->
GetCurrentName
()
==
aDlgName
&&
if
(
!
pNextActiveWindow
&&
pLibInfoItem
&&
pLibInfoItem
->
GetCurrentName
()
==
aDlgName
&&
...
...
basctl/source/basicide/layout.cxx
Dosyayı görüntüle @
33414c8b
...
@@ -60,6 +60,8 @@ Layout::~Layout()
...
@@ -60,6 +60,8 @@ Layout::~Layout()
void
Layout
::
dispose
()
void
Layout
::
dispose
()
{
{
aLeftSide
.
dispose
();
aBottomSide
.
dispose
();
pChild
.
clear
();
pChild
.
clear
();
Window
::
dispose
();
Window
::
dispose
();
}
}
...
@@ -178,6 +180,12 @@ Layout::SplittedSide::SplittedSide (Layout* pParent, Side eSide) :
...
@@ -178,6 +180,12 @@ Layout::SplittedSide::SplittedSide (Layout* pParent, Side eSide) :
InitSplitter
(
*
aSplitter
.
get
());
InitSplitter
(
*
aSplitter
.
get
());
}
}
void
Layout
::
SplittedSide
::
dispose
()
{
aSplitter
.
disposeAndClear
();
for
(
auto
i
=
vItems
.
begin
();
i
!=
vItems
.
end
();
++
i
)
i
->
pSplit
.
disposeAndClear
();
}
// Add() -- adds a new window to the side (after construction)
// Add() -- adds a new window to the side (after construction)
void
Layout
::
SplittedSide
::
Add
(
DockingWindow
*
pWin
,
Size
const
&
rSize
)
void
Layout
::
SplittedSide
::
Add
(
DockingWindow
*
pWin
,
Size
const
&
rSize
)
...
...
basctl/source/basicide/layout.hxx
Dosyayı görüntüle @
33414c8b
...
@@ -86,6 +86,7 @@ private:
...
@@ -86,6 +86,7 @@ private:
bool
IsEmpty
()
const
;
bool
IsEmpty
()
const
;
long
GetSize
()
const
;
long
GetSize
()
const
;
void
ArrangeIn
(
Rectangle
const
&
);
void
ArrangeIn
(
Rectangle
const
&
);
void
dispose
();
private
:
private
:
// the layout window
// the layout window
...
...
basctl/source/inc/basidesh.hxx
Dosyayı görüntüle @
33414c8b
...
@@ -120,10 +120,10 @@ private:
...
@@ -120,10 +120,10 @@ private:
void
ManageToolbars
();
void
ManageToolbars
();
void
ArrangeTabBar
();
void
ArrangeTabBar
();
ModulWindow
*
CreateBasWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rModName
);
VclPtr
<
ModulWindow
>
CreateBasWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rModName
);
DialogWindow
*
CreateDlgWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rDlgName
);
VclPtr
<
DialogWindow
>
CreateDlgWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rDlgName
);
ModulWindow
*
ShowActiveModuleWindow
(
StarBASIC
*
pBasic
);
VclPtr
<
ModulWindow
>
ShowActiveModuleWindow
(
StarBASIC
*
pBasic
);
virtual
void
SFX_NOTIFY
(
SfxBroadcaster
&
rBC
,
const
TypeId
&
rBCType
,
virtual
void
SFX_NOTIFY
(
SfxBroadcaster
&
rBC
,
const
TypeId
&
rBCType
,
const
SfxHint
&
rHint
,
const
TypeId
&
rHintType
)
SAL_OVERRIDE
;
const
SfxHint
&
rHint
,
const
TypeId
&
rHintType
)
SAL_OVERRIDE
;
...
@@ -193,11 +193,11 @@ public:
...
@@ -193,11 +193,11 @@ public:
bool
CallBasicErrorHdl
(
StarBASIC
*
pBasic
);
bool
CallBasicErrorHdl
(
StarBASIC
*
pBasic
);
long
CallBasicBreakHdl
(
StarBASIC
*
pBasic
);
long
CallBasicBreakHdl
(
StarBASIC
*
pBasic
);
BaseWindow
*
FindWindow
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
=
OUString
(),
const
OUString
&
rName
=
OUString
(),
ItemType
nType
=
TYPE_UNKNOWN
,
bool
bFindSuspended
=
false
);
VclPtr
<
BaseWindow
>
FindWindow
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
=
OUString
(),
const
OUString
&
rName
=
OUString
(),
ItemType
nType
=
TYPE_UNKNOWN
,
bool
bFindSuspended
=
false
);
DialogWindow
*
FindDlgWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rName
,
bool
bCreateIfNotExist
=
false
,
bool
bFindSuspended
=
false
);
VclPtr
<
DialogWindow
>
FindDlgWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rName
,
bool
bCreateIfNotExist
=
false
,
bool
bFindSuspended
=
false
);
ModulWindow
*
FindBasWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rModName
,
bool
bCreateIfNotExist
=
false
,
bool
bFindSuspended
=
false
);
VclPtr
<
ModulWindow
>
FindBasWin
(
const
ScriptDocument
&
rDocument
,
const
OUString
&
rLibName
,
const
OUString
&
rModName
,
bool
bCreateIfNotExist
=
false
,
bool
bFindSuspended
=
false
);
BaseWindow
*
FindApplicationWindow
();
VclPtr
<
BaseWindow
>
FindApplicationWindow
();
bool
NextPage
(
bool
bPrev
=
false
);
bool
NextPage
(
bool
bPrev
=
false
);
bool
IsAppBasicModified
()
const
{
return
m_bAppBasicModified
;
}
bool
IsAppBasicModified
()
const
{
return
m_bAppBasicModified
;
}
void
SetAppBasicModified
(
bool
bModified
=
true
)
{
m_bAppBasicModified
=
bModified
;
}
void
SetAppBasicModified
(
bool
bModified
=
true
)
{
m_bAppBasicModified
=
bModified
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment