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
3594780d
Kaydet (Commit)
3594780d
authored
Haz 17, 2014
tarafından
Takeshi Abe
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid possible memory leaks in case of exceptions
Change-Id: I22d22a924d33b91ba6894857ce56b0d920102b4b
üst
6b5c0a5c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
22 deletions
+16
-22
glosdoc.cxx
sw/source/uibase/misc/glosdoc.cxx
+1
-2
formatclipboard.cxx
sw/source/uibase/uiview/formatclipboard.cxx
+5
-8
view0.cxx
sw/source/uibase/uiview/view0.cxx
+3
-3
view2.cxx
sw/source/uibase/uiview/view2.cxx
+2
-2
SwXFilterOptions.cxx
sw/source/uibase/uno/SwXFilterOptions.cxx
+5
-7
No files found.
sw/source/uibase/misc/glosdoc.cxx
Dosyayı görüntüle @
3594780d
...
@@ -252,9 +252,8 @@ bool SwGlossaries::RenameGroupDoc(
...
@@ -252,9 +252,8 @@ bool SwGlossaries::RenameGroupDoc(
m_GlosArr
.
push_back
(
rNewGroup
);
m_GlosArr
.
push_back
(
rNewGroup
);
}
}
SwTextBlocks
*
pNewBlock
=
new
SwTextBlocks
(
sNewFileURL
);
boost
::
scoped_ptr
<
SwTextBlocks
>
pNewBlock
(
new
SwTextBlocks
(
sNewFileURL
)
);
pNewBlock
->
SetName
(
rNewTitle
);
pNewBlock
->
SetName
(
rNewTitle
);
delete
pNewBlock
;
return
true
;
return
true
;
}
}
...
...
sw/source/uibase/uiview/formatclipboard.cxx
Dosyayı görüntüle @
3594780d
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include <editeng/frmdiritem.hxx>
#include <editeng/frmdiritem.hxx>
#include <fmtpdsc.hxx>
#include <fmtpdsc.hxx>
#include <fmtrowsplt.hxx>
#include <fmtrowsplt.hxx>
#include <boost/scoped_ptr.hpp>
namespace
namespace
{
{
...
@@ -509,8 +510,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
...
@@ -509,8 +510,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if
(
m_pItemSet_ParAttr
&&
m_pItemSet_ParAttr
->
Count
()
!=
0
&&
!
bNoParagraphFormats
)
if
(
m_pItemSet_ParAttr
&&
m_pItemSet_ParAttr
->
Count
()
!=
0
&&
!
bNoParagraphFormats
)
{
{
// temporary SfxItemSet
// temporary SfxItemSet
SfxItemSet
*
pTemplateItemSet
=
lcl_CreateEmptyItemSet
(
boost
::
scoped_ptr
<
SfxItemSet
>
pTemplateItemSet
(
lcl_CreateEmptyItemSet
(
nSelectionType
,
*
m_pItemSet_ParAttr
->
GetPool
(),
false
);
nSelectionType
,
*
m_pItemSet_ParAttr
->
GetPool
(),
false
)
)
;
// no need to verify the existence of pTemplateItemSet as we
// no need to verify the existence of pTemplateItemSet as we
// know that here the selection type is SEL_TXT
// know that here the selection type is SEL_TXT
...
@@ -525,8 +526,6 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
...
@@ -525,8 +526,6 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
// store the attributes in aItemVector in order not to apply them as
// store the attributes in aItemVector in order not to apply them as
// text automatic formatting attributes later in the code
// text automatic formatting attributes later in the code
lcl_AppendSetItems
(
aItemVector
,
*
pTemplateItemSet
);
lcl_AppendSetItems
(
aItemVector
,
*
pTemplateItemSet
);
delete
pTemplateItemSet
;
}
}
}
}
...
@@ -544,8 +543,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
...
@@ -544,8 +543,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
else
else
{
{
// temporary SfxItemSet
// temporary SfxItemSet
SfxItemSet
*
pTemplateItemSet
=
lcl_CreateEmptyItemSet
(
boost
::
scoped_ptr
<
SfxItemSet
>
pTemplateItemSet
(
lcl_CreateEmptyItemSet
(
nSelectionType
,
*
m_pItemSet_TxtAttr
->
GetPool
(),
true
);
nSelectionType
,
*
m_pItemSet_TxtAttr
->
GetPool
(),
true
)
)
;
if
(
pTemplateItemSet
)
if
(
pTemplateItemSet
)
{
{
...
@@ -561,8 +560,6 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
...
@@ -561,8 +560,6 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
rWrtShell
.
SetFlyFrmAttr
(
*
pTemplateItemSet
);
rWrtShell
.
SetFlyFrmAttr
(
*
pTemplateItemSet
);
else
if
(
!
bNoCharacterFormats
)
else
if
(
!
bNoCharacterFormats
)
rWrtShell
.
SetAttrSet
(
*
pTemplateItemSet
);
rWrtShell
.
SetAttrSet
(
*
pTemplateItemSet
);
delete
pTemplateItemSet
;
}
}
}
}
}
}
...
...
sw/source/uibase/uiview/view0.cxx
Dosyayı görüntüle @
3594780d
...
@@ -78,6 +78,7 @@ using namespace ::com::sun::star;
...
@@ -78,6 +78,7 @@ using namespace ::com::sun::star;
#include <IDocumentSettingAccess.hxx>
#include <IDocumentSettingAccess.hxx>
#include <unomid.h>
#include <unomid.h>
#include <boost/scoped_ptr.hpp>
SFX_IMPL_NAMED_VIEWFACTORY
(
SwView
,
"Default"
)
SFX_IMPL_NAMED_VIEWFACTORY
(
SwView
,
"Default"
)
{
{
...
@@ -351,7 +352,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
...
@@ -351,7 +352,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
void
SwView
::
ExecViewOptions
(
SfxRequest
&
rReq
)
void
SwView
::
ExecViewOptions
(
SfxRequest
&
rReq
)
{
{
SwViewOption
*
pOpt
=
new
SwViewOption
(
*
GetWrtShell
().
GetViewOptions
()
);
boost
::
scoped_ptr
<
SwViewOption
>
pOpt
(
new
SwViewOption
(
*
GetWrtShell
().
GetViewOptions
()
)
);
bool
bModified
=
GetWrtShell
().
IsModified
();
bool
bModified
=
GetWrtShell
().
IsModified
();
int
eState
=
STATE_TOGGLE
;
int
eState
=
STATE_TOGGLE
;
...
@@ -550,7 +551,6 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
...
@@ -550,7 +551,6 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
break
;
break
;
default
:
default
:
delete
pOpt
;
OSL_FAIL
(
"wrong request method"
);
OSL_FAIL
(
"wrong request method"
);
return
;
return
;
}
}
...
@@ -591,7 +591,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
...
@@ -591,7 +591,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
CalcVisArea
(
GetEditWin
().
GetOutputSizePixel
()
);
CalcVisArea
(
GetEditWin
().
GetOutputSizePixel
()
);
rSh
.
LockView
(
bLockedView
);
rSh
.
LockView
(
bLockedView
);
delete
pOpt
;
pOpt
.
reset
()
;
Invalidate
(
rReq
.
GetSlot
());
Invalidate
(
rReq
.
GetSlot
());
if
(
!
pArgs
)
if
(
!
pArgs
)
rReq
.
AppendItem
(
SfxBoolItem
(
nSlot
,
bFlag
));
rReq
.
AppendItem
(
SfxBoolItem
(
nSlot
,
bFlag
));
...
...
sw/source/uibase/uiview/view2.cxx
Dosyayı görüntüle @
3594780d
...
@@ -2420,7 +2420,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
...
@@ -2420,7 +2420,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
// call documents and template dialog
// call documents and template dialog
SfxApplication
*
pSfxApp
=
SFX_APP
();
SfxApplication
*
pSfxApp
=
SFX_APP
();
Window
*
pTopWin
=
pSfxApp
->
GetTopWindow
();
Window
*
pTopWin
=
pSfxApp
->
GetTopWindow
();
SvtDocumentTemplateDialog
*
pDocTemplDlg
=
new
SvtDocumentTemplateDialog
(
pTopWin
);
boost
::
scoped_ptr
<
SvtDocumentTemplateDialog
>
pDocTemplDlg
(
new
SvtDocumentTemplateDialog
(
pTopWin
)
);
pDocTemplDlg
->
SelectTemplateFolder
();
pDocTemplDlg
->
SelectTemplateFolder
();
int
nRet
=
pDocTemplDlg
->
Execute
();
int
nRet
=
pDocTemplDlg
->
Execute
();
...
@@ -2435,7 +2435,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
...
@@ -2435,7 +2435,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
}
}
}
}
delete
pDocTemplDlg
;
pDocTemplDlg
.
reset
()
;
if
(
bNewWin
)
if
(
bNewWin
)
// after the destruction of the dialogue its parent comes to top,
// after the destruction of the dialogue its parent comes to top,
// but we want that the new document is on top
// but we want that the new document is on top
...
...
sw/source/uibase/uno/SwXFilterOptions.cxx
Dosyayı görüntüle @
3594780d
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "swabstdlg.hxx"
#include "swabstdlg.hxx"
#include "dialog.hrc"
#include "dialog.hrc"
#include <boost/scoped_ptr.hpp>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
ui
::
dialogs
;
using
namespace
::
com
::
sun
::
star
::
ui
::
dialogs
;
...
@@ -101,9 +102,9 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
...
@@ -101,9 +102,9 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
{
{
sal_Int16
nRet
=
ui
::
dialogs
::
ExecutableDialogResults
::
CANCEL
;
sal_Int16
nRet
=
ui
::
dialogs
::
ExecutableDialogResults
::
CANCEL
;
SvStream
*
pInStream
=
NULL
;
boost
::
scoped_ptr
<
SvStream
>
pInStream
;
if
(
xInputStream
.
is
()
)
if
(
xInputStream
.
is
()
)
pInStream
=
utl
::
UcbStreamHelper
::
CreateStream
(
xInputStream
);
pInStream
.
reset
(
utl
::
UcbStreamHelper
::
CreateStream
(
xInputStream
)
);
uno
::
Reference
<
XUnoTunnel
>
xTunnel
(
xModel
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
XUnoTunnel
>
xTunnel
(
xModel
,
uno
::
UNO_QUERY
);
SwDocShell
*
pDocShell
=
0
;
SwDocShell
*
pDocShell
=
0
;
...
@@ -119,8 +120,8 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
...
@@ -119,8 +120,8 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
SwAbstractDialogFactory
*
pFact
=
SwAbstractDialogFactory
::
Create
();
SwAbstractDialogFactory
*
pFact
=
SwAbstractDialogFactory
::
Create
();
OSL_ENSURE
(
pFact
,
"SwAbstractDialogFactory fail!"
);
OSL_ENSURE
(
pFact
,
"SwAbstractDialogFactory fail!"
);
AbstractSwAsciiFilterDlg
*
pAsciiDlg
=
pFact
->
CreateSwAsciiFilterDlg
(
NULL
,
*
pDocShell
,
boost
::
scoped_ptr
<
AbstractSwAsciiFilterDlg
>
pAsciiDlg
(
pFact
->
CreateSwAsciiFilterDlg
(
NULL
,
*
pDocShell
,
pInStream
);
pInStream
.
get
())
);
OSL_ENSURE
(
pAsciiDlg
,
"Dialogdiet fail!"
);
OSL_ENSURE
(
pAsciiDlg
,
"Dialogdiet fail!"
);
if
(
RET_OK
==
pAsciiDlg
->
Execute
())
if
(
RET_OK
==
pAsciiDlg
->
Execute
())
{
{
...
@@ -129,11 +130,8 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
...
@@ -129,11 +130,8 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
aOptions
.
WriteUserData
(
sFilterOptions
);
aOptions
.
WriteUserData
(
sFilterOptions
);
nRet
=
ui
::
dialogs
::
ExecutableDialogResults
::
OK
;
nRet
=
ui
::
dialogs
::
ExecutableDialogResults
::
OK
;
}
}
delete
pAsciiDlg
;
}
}
delete
pInStream
;
return
nRet
;
return
nRet
;
}
}
...
...
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