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
8374bbe5
Kaydet (Commit)
8374bbe5
authored
Tem 02, 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: I7878d425cea773338799fb784c25039e6b923e47
üst
7a85ec95
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
31 deletions
+24
-31
fillctrl.cxx
svx/source/tbxctrls/fillctrl.cxx
+7
-9
fontworkgallery.cxx
svx/source/tbxctrls/fontworkgallery.cxx
+3
-4
linectrl.cxx
svx/source/tbxctrls/linectrl.cxx
+7
-9
UnoGraphicExporter.cxx
svx/source/unodraw/UnoGraphicExporter.cxx
+3
-5
UnoNameItemTable.cxx
svx/source/unodraw/UnoNameItemTable.cxx
+2
-2
unoshape.cxx
svx/source/unodraw/unoshape.cxx
+2
-2
No files found.
svx/source/tbxctrls/fillctrl.cxx
Dosyayı görüntüle @
8374bbe5
...
...
@@ -36,6 +36,7 @@
#include <svx/itemwin.hxx>
#include <svx/dialmgr.hxx>
#include "helpid.hrc"
#include <boost/scoped_ptr.hpp>
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
util
;
...
...
@@ -317,9 +318,9 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState)
}
aTmpStr
=
TMP_STR_BEGIN
+
aString
+
TMP_STR_END
;
XGradientEntry
*
pEntry
=
new
XGradientEntry
(
mpGradientItem
->
GetGradientValue
(),
aTmpStr
);
boost
::
scoped_ptr
<
XGradientEntry
>
pEntry
(
new
XGradientEntry
(
mpGradientItem
->
GetGradientValue
(),
aTmpStr
)
);
XGradientList
aGradientList
(
""
,
""
/*TODO?*/
);
aGradientList
.
Insert
(
pEntry
);
aGradientList
.
Insert
(
pEntry
.
get
()
);
aGradientList
.
SetDirty
(
false
);
const
Bitmap
aBmp
=
aGradientList
.
GetUiBitmap
(
0
);
...
...
@@ -330,7 +331,6 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState)
}
aGradientList
.
Remove
(
0
);
delete
pEntry
;
}
}
else
...
...
@@ -363,9 +363,9 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState)
}
aTmpStr
=
TMP_STR_BEGIN
+
aString
+
TMP_STR_END
;
XHatchEntry
*
pEntry
=
new
XHatchEntry
(
mpHatchItem
->
GetHatchValue
(),
aTmpStr
);
boost
::
scoped_ptr
<
XHatchEntry
>
pEntry
(
new
XHatchEntry
(
mpHatchItem
->
GetHatchValue
(),
aTmpStr
)
);
XHatchList
aHatchList
(
""
,
""
/*TODO?*/
);
aHatchList
.
Insert
(
pEntry
);
aHatchList
.
Insert
(
pEntry
.
get
()
);
aHatchList
.
SetDirty
(
false
);
const
Bitmap
aBmp
=
aHatchList
.
GetUiBitmap
(
0
);
...
...
@@ -376,7 +376,6 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState)
}
aHatchList
.
Remove
(
0
);
delete
pEntry
;
}
}
else
...
...
@@ -409,16 +408,15 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState)
}
aTmpStr
=
TMP_STR_BEGIN
+
aString
+
TMP_STR_END
;
XBitmapEntry
*
pEntry
=
new
XBitmapEntry
(
mpBitmapItem
->
GetGraphicObject
(),
aTmpStr
);
boost
::
scoped_ptr
<
XBitmapEntry
>
pEntry
(
new
XBitmapEntry
(
mpBitmapItem
->
GetGraphicObject
(),
aTmpStr
)
);
XBitmapListRef
xBitmapList
=
XPropertyList
::
CreatePropertyList
(
XBITMAP_LIST
,
OUString
(
"TmpList"
),
""
/*TODO?*/
)
->
AsBitmapList
();
xBitmapList
->
Insert
(
pEntry
);
xBitmapList
->
Insert
(
pEntry
.
get
()
);
xBitmapList
->
SetDirty
(
false
);
mpFillAttrLB
->
Fill
(
xBitmapList
);
mpFillAttrLB
->
SelectEntryPos
(
mpFillAttrLB
->
GetEntryCount
()
-
1
);
xBitmapList
->
Remove
(
0
);
delete
pEntry
;
}
}
else
...
...
svx/source/tbxctrls/fontworkgallery.cxx
Dosyayı görüntüle @
8374bbe5
...
...
@@ -52,6 +52,7 @@
#include "fontworkgallery.hrc"
#include <algorithm>
#include <boost/scoped_ptr.hpp>
#include "helpid.hrc"
...
...
@@ -202,10 +203,10 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
if
(
nItemId
>
0
)
{
FmFormModel
*
pModel
=
new
FmFormModel
(
);
boost
::
scoped_ptr
<
FmFormModel
>
pModel
(
new
FmFormModel
()
);
pModel
->
GetItemPool
().
FreezeIdRanges
();
if
(
GalleryExplorer
::
GetSdrObj
(
mnThemeId
,
nItemId
-
1
,
pModel
)
)
if
(
GalleryExplorer
::
GetSdrObj
(
mnThemeId
,
nItemId
-
1
,
pModel
.
get
()
)
)
{
SdrPage
*
pPage
=
pModel
->
GetPage
(
0
);
if
(
pPage
&&
pPage
->
GetObjCount
()
)
...
...
@@ -237,8 +238,6 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
}
}
}
delete
pModel
;
}
}
...
...
svx/source/tbxctrls/linectrl.cxx
Dosyayı görüntüle @
8374bbe5
...
...
@@ -34,6 +34,7 @@
#include <svx/itemwin.hxx>
#include <svx/dialmgr.hxx>
#include <svx/unoapi.hxx>
#include <boost/scoped_ptr.hpp>
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
beans
;
...
...
@@ -356,27 +357,27 @@ SvxLineEndWindow::~SvxLineEndWindow()
IMPL_LINK_NOARG
(
SvxLineEndWindow
,
SelectHdl
)
{
XLineEndItem
*
pLineEndItem
=
NULL
;
XLineStartItem
*
pLineStartItem
=
NULL
;
boost
::
scoped_ptr
<
XLineEndItem
>
pLineEndItem
;
boost
::
scoped_ptr
<
XLineStartItem
>
pLineStartItem
;
sal_uInt16
nId
=
aLineEndSet
.
GetSelectItemId
();
if
(
nId
==
1
)
{
pLineStartItem
=
new
XLineStartItem
(
);
pLineStartItem
.
reset
(
new
XLineStartItem
()
);
}
else
if
(
nId
==
2
)
{
pLineEndItem
=
new
XLineEndItem
(
);
pLineEndItem
.
reset
(
new
XLineEndItem
()
);
}
else
if
(
nId
%
2
)
// beginning of line
{
XLineEndEntry
*
pEntry
=
pLineEndList
->
GetLineEnd
(
(
nId
-
1
)
/
2
-
1
);
pLineStartItem
=
new
XLineStartItem
(
pEntry
->
GetName
(),
pEntry
->
GetLineEnd
()
);
pLineStartItem
.
reset
(
new
XLineStartItem
(
pEntry
->
GetName
(),
pEntry
->
GetLineEnd
()
)
);
}
else
// end of line
{
XLineEndEntry
*
pEntry
=
pLineEndList
->
GetLineEnd
(
nId
/
2
-
2
);
pLineEndItem
=
new
XLineEndItem
(
pEntry
->
GetName
(),
pEntry
->
GetLineEnd
()
);
pLineEndItem
.
reset
(
new
XLineEndItem
(
pEntry
->
GetName
(),
pEntry
->
GetLineEnd
()
)
);
}
if
(
IsInPopupMode
()
)
...
...
@@ -407,9 +408,6 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl)
OUString
(
".uno:LineEndStyle"
),
aArgs
);
delete
pLineEndItem
;
delete
pLineStartItem
;
return
0
;
}
...
...
svx/source/unodraw/UnoGraphicExporter.cxx
Dosyayı görüntüle @
8374bbe5
...
...
@@ -66,7 +66,7 @@
#include <svx/svdoutl.hxx>
#include <editeng/flditem.hxx>
#include
"boost/scoped_ptr.hpp"
#include
<boost/scoped_ptr.hpp>
#include <UnoGraphicExporter.hxx>
...
...
@@ -439,7 +439,7 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWid
if
(
bSuccess
)
{
SdrView
*
pView
=
new
SdrView
(
mpDoc
,
pVDev
);
boost
::
scoped_ptr
<
SdrView
>
pView
(
new
SdrView
(
mpDoc
,
pVDev
)
);
pView
->
SetPageVisible
(
false
);
pView
->
SetBordVisible
(
false
);
pView
->
SetGridVisible
(
false
);
...
...
@@ -451,7 +451,6 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWid
ImplExportCheckVisisbilityRedirector
aRedirector
(
mpCurrentPage
);
pView
->
CompleteRedraw
(
pVDev
,
aRegion
,
&
aRedirector
);
delete
pView
;
}
else
{
...
...
@@ -713,14 +712,13 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
}
VirtualDevice
*
pVDev
=
CreatePageVDev
(
pPage
,
nWidthPix
,
nHeightPix
);
boost
::
scoped_ptr
<
VirtualDevice
>
pVDev
(
CreatePageVDev
(
pPage
,
nWidthPix
,
nHeightPix
)
);
if
(
pVDev
)
{
aGraphic
=
pVDev
->
GetBitmap
(
Point
(),
pVDev
->
GetOutputSize
()
);
aGraphic
.
SetPrefMapMode
(
aMap
);
aGraphic
.
SetPrefSize
(
aSize
);
delete
pVDev
;
}
}
// create a metafile to export a vector format
...
...
svx/source/unodraw/UnoNameItemTable.cxx
Dosyayı görüntüle @
8374bbe5
...
...
@@ -30,6 +30,7 @@
#include <vcl/svapp.hxx>
#include "svx/unoapi.hxx"
#include <boost/scoped_ptr.hpp>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
rtl
;
...
...
@@ -87,11 +88,10 @@ void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, cons
SfxItemSet
*
mpInSet
=
new
SfxItemSet
(
*
mpModelPool
,
mnWhich
,
mnWhich
);
maItemSetVector
.
push_back
(
mpInSet
);
NameOrIndex
*
pNewItem
=
createItem
(
);
boost
::
scoped_ptr
<
NameOrIndex
>
pNewItem
(
createItem
()
);
pNewItem
->
SetName
(
aName
);
pNewItem
->
PutValue
(
aElement
,
mnMemberId
);
mpInSet
->
Put
(
*
pNewItem
,
mnWhich
);
delete
pNewItem
;
}
// XNameContainer
...
...
svx/source/unodraw/unoshape.cxx
Dosyayı görüntüle @
8374bbe5
...
...
@@ -94,6 +94,7 @@
#include "svx/extrud3d.hxx"
#include <boost/bind.hpp>
#include <boost/scoped_ptr.hpp>
#include <vcl/wmf.hxx>
using
namespace
::
osl
;
...
...
@@ -685,7 +686,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
SdrModel
*
pModel
=
mpObj
->
GetModel
();
SdrPage
*
pPage
=
mpObj
->
GetPage
();
E3dView
*
pView
=
new
E3dView
(
pModel
,
&
aVDev
);
boost
::
scoped_ptr
<
E3dView
>
pView
(
new
E3dView
(
pModel
,
&
aVDev
)
);
pView
->
hideMarkHandles
();
SdrPageView
*
pPageView
=
pView
->
ShowSdrPage
(
pPage
);
...
...
@@ -717,7 +718,6 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
}
pView
->
UnmarkAll
();
delete
pView
;
return
aAny
;
}
...
...
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