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
51bacc6a
Kaydet (Commit)
51bacc6a
authored
Ara 04, 2014
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
impl. Clone for all subclasses of SdrPage
Change-Id: Ie370161e51ff83cb605bc57d317ff945404e5611
üst
9638e620
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
156 additions
and
24 deletions
+156
-24
dlgedpage.cxx
basctl/source/dlged/dlgedpage.cxx
+12
-1
dlgedpage.hxx
basctl/source/inc/dlgedpage.hxx
+1
-1
fmpage.hxx
include/svx/fmpage.hxx
+2
-3
svdpage.hxx
include/svx/svdpage.hxx
+4
-1
RptPage.hxx
reportdesign/inc/RptPage.hxx
+1
-1
RptPage.cxx
reportdesign/source/core/sdr/RptPage.cxx
+12
-1
drawpage.hxx
sc/inc/drawpage.hxx
+6
-1
drawpage.cxx
sc/source/core/data/drawpage.cxx
+23
-0
fmpage.cxx
svx/source/form/fmpage.cxx
+14
-3
svdpage.cxx
svx/source/svdraw/svdpage.cxx
+20
-7
dpage.hxx
sw/inc/dpage.hxx
+10
-2
dpage.cxx
sw/source/core/draw/dpage.cxx
+51
-3
No files found.
basctl/source/dlged/dlgedpage.cxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -46,9 +46,20 @@ DlgEdPage::~DlgEdPage()
SdrPage
*
DlgEdPage
::
Clone
()
const
{
return
Clone
(
0
);
}
SdrPage
*
DlgEdPage
::
Clone
(
SdrModel
*
const
pNewModel
)
const
{
DlgEdPage
*
const
pNewPage
=
new
DlgEdPage
(
*
this
);
pNewPage
->
lateInit
(
*
this
);
DlgEdModel
*
pDlgEdModel
=
0
;
if
(
pNewModel
)
{
pDlgEdModel
=
dynamic_cast
<
DlgEdModel
*>
(
pNewModel
);
assert
(
pDlgEdModel
);
}
pNewPage
->
lateInit
(
*
this
,
pDlgEdModel
);
return
pNewPage
;
}
...
...
basctl/source/inc/dlgedpage.hxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -45,8 +45,8 @@ public:
DlgEdPage
(
DlgEdModel
&
rModel
,
bool
bMasterPage
=
false
);
virtual
~
DlgEdPage
();
using
SdrPage
::
Clone
;
virtual
SdrPage
*
Clone
()
const
SAL_OVERRIDE
;
virtual
SdrPage
*
Clone
(
SdrModel
*
pNewModel
)
const
SAL_OVERRIDE
;
void
SetDlgEdForm
(
DlgEdForm
*
pForm
)
{
pDlgEdForm
=
pForm
;
}
DlgEdForm
*
GetDlgEdForm
()
const
{
return
pDlgEdForm
;
}
...
...
include/svx/fmpage.hxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -55,8 +55,7 @@ public:
virtual
void
SetModel
(
SdrModel
*
pNewModel
)
SAL_OVERRIDE
;
virtual
SdrPage
*
Clone
()
const
SAL_OVERRIDE
;
// TODO: Uh huh, how is this supposed to work? Creating a SdrPage from FmFormPage?
using
SdrPage
::
Clone
;
virtual
SdrPage
*
Clone
(
SdrModel
*
pNewModel
)
const
SAL_OVERRIDE
;
virtual
void
InsertObject
(
SdrObject
*
pObj
,
size_t
nPos
=
SAL_MAX_SIZE
,
const
SdrInsertReason
*
pReason
=
NULL
)
SAL_OVERRIDE
;
...
...
@@ -79,7 +78,7 @@ public:
protected
:
FmFormPage
(
const
FmFormPage
&
rPage
);
void
lateInit
(
const
FmFormPage
&
rPage
);
void
lateInit
(
const
FmFormPage
&
rPage
,
FmFormModel
*
pNewModel
=
0
);
};
#endif // INCLUDED_SVX_FMPAGE_HXX
...
...
include/svx/svdpage.hxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -486,7 +486,7 @@ protected:
// classes that needs access to the page objects must be deferred to lateInit. And it must
// call lateInit() of its parent class.
SdrPage
(
const
SdrPage
&
rSrcPage
);
void
lateInit
(
const
SdrPage
&
rSrcPage
);
void
lateInit
(
const
SdrPage
&
rSrcPage
,
SdrModel
*
pNewModel
=
0
);
public
:
TYPEINFO_OVERRIDE
();
...
...
@@ -575,6 +575,9 @@ public:
bool
bEdit
);
void
dumpAsXml
(
struct
_xmlTextWriter
*
pWriter
)
const
;
private
:
void
impl_setModelForLayerAdmin
(
SdrModel
*
pNewModel
);
};
typedef
tools
::
WeakReference
<
SdrPage
>
SdrPageWeakRef
;
...
...
reportdesign/inc/RptPage.hxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -60,7 +60,7 @@ public:
virtual
SdrPage
*
Clone
()
const
SAL_OVERRIDE
;
using
SdrPage
::
Clone
;
virtual
SdrPage
*
Clone
(
SdrModel
*
pNewModel
)
const
SAL_OVERRIDE
;
virtual
void
NbcInsertObject
(
SdrObject
*
pObj
,
size_t
nPos
,
const
SdrInsertReason
*
pReason
)
SAL_OVERRIDE
;
virtual
SdrObject
*
RemoveObject
(
size_t
nObjNum
)
SAL_OVERRIDE
;
...
...
reportdesign/source/core/sdr/RptPage.cxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -60,9 +60,20 @@ OReportPage::~OReportPage()
SdrPage
*
OReportPage
::
Clone
()
const
{
return
Clone
(
0
);
}
SdrPage
*
OReportPage
::
Clone
(
SdrModel
*
const
pNewModel
)
const
{
OReportPage
*
const
pNewPage
=
new
OReportPage
(
*
this
);
pNewPage
->
lateInit
(
*
this
);
OReportModel
*
pReportModel
=
0
;
if
(
pNewModel
)
{
pReportModel
=
dynamic_cast
<
OReportModel
*>
(
pNewModel
);
assert
(
pReportModel
);
}
pNewPage
->
lateInit
(
*
this
,
pReportModel
);
return
pNewPage
;
}
...
...
sc/inc/drawpage.hxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -26,14 +26,19 @@ class ScDrawLayer;
class
ScDrawPage
:
public
FmFormPage
{
ScDrawPage
(
const
ScDrawPage
&
)
SAL_DELETED_FUNCTION
;
ScDrawPage
&
operator
=
(
const
ScDrawPage
&
)
SAL_DELETED_FUNCTION
;
public
:
ScDrawPage
(
ScDrawLayer
&
rNewModel
,
bool
bMasterPage
=
false
);
virtual
~
ScDrawPage
();
virtual
ScDrawPage
*
Clone
()
const
SAL_OVERRIDE
;
virtual
ScDrawPage
*
Clone
(
SdrModel
*
pNewModel
)
const
SAL_OVERRIDE
;
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
createUnoPage
()
SAL_OVERRIDE
;
private
:
ScDrawPage
(
const
ScDrawPage
&
rSrcPage
);
};
#endif
...
...
sc/source/core/data/drawpage.cxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -32,10 +32,33 @@ ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, bool bMasterPage) :
SetSize
(
Size
(
LONG_MAX
,
LONG_MAX
)
);
}
ScDrawPage
::
ScDrawPage
(
const
ScDrawPage
&
rSrcPage
)
:
FmFormPage
(
rSrcPage
)
{
}
ScDrawPage
::~
ScDrawPage
()
{
}
ScDrawPage
*
ScDrawPage
::
Clone
()
const
{
return
Clone
(
0
);
}
ScDrawPage
*
ScDrawPage
::
Clone
(
SdrModel
*
const
pNewModel
)
const
{
ScDrawPage
*
const
pNewPage
=
new
ScDrawPage
(
*
this
);
FmFormModel
*
pScDrawModel
=
0
;
if
(
pNewModel
)
{
pScDrawModel
=
dynamic_cast
<
FmFormModel
*>
(
pNewModel
);
assert
(
pScDrawModel
);
}
pNewPage
->
lateInit
(
*
this
,
pScDrawModel
);
return
pNewPage
;
}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
ScDrawPage
::
createUnoPage
()
{
return
static_cast
<
cppu
::
OWeakObject
*>
(
new
ScPageObj
(
this
)
);
...
...
svx/source/form/fmpage.cxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -68,9 +68,9 @@ FmFormPage::FmFormPage(const FmFormPage& rPage)
{
}
void
FmFormPage
::
lateInit
(
const
FmFormPage
&
rPage
)
void
FmFormPage
::
lateInit
(
const
FmFormPage
&
rPage
,
FmFormModel
*
const
pNewModel
)
{
SdrPage
::
lateInit
(
rPage
);
SdrPage
::
lateInit
(
rPage
,
pNewModel
);
m_pImpl
->
initFrom
(
rPage
.
GetImpl
()
);
m_sPageName
=
rPage
.
m_sPageName
;
...
...
@@ -118,9 +118,20 @@ void FmFormPage::SetModel(SdrModel* pNewModel)
SdrPage
*
FmFormPage
::
Clone
()
const
{
return
Clone
(
0
);
}
SdrPage
*
FmFormPage
::
Clone
(
SdrModel
*
const
pNewModel
)
const
{
FmFormPage
*
const
pNewPage
=
new
FmFormPage
(
*
this
);
pNewPage
->
lateInit
(
*
this
);
FmFormModel
*
pFormModel
=
0
;
if
(
pNewModel
)
{
pFormModel
=
dynamic_cast
<
FmFormModel
*>
(
pNewModel
);
assert
(
pFormModel
);
}
pNewPage
->
lateInit
(
*
this
,
pFormModel
);
return
pNewPage
;
}
...
...
svx/source/svdraw/svdpage.cxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -1302,10 +1302,17 @@ SdrPage::~SdrPage()
}
void
SdrPage
::
lateInit
(
const
SdrPage
&
rSrcPage
)
void
SdrPage
::
lateInit
(
const
SdrPage
&
rSrcPage
,
SdrModel
*
const
pNewModel
)
{
assert
(
!
mpViewContact
);
assert
(
!
mpSdrPageProperties
);
assert
(
!
mxUnoPage
.
is
());
if
(
pNewModel
&&
(
pNewModel
!=
pModel
))
{
pModel
=
pNewModel
;
impl_setModelForLayerAdmin
(
pNewModel
);
}
// copy all the local parameters to make this instance
// a valid copy of source page before copying and inserting
...
...
@@ -1512,18 +1519,24 @@ sal_Int32 SdrPage::GetLwrBorder() const
return
nBordLwr
;
}
void
SdrPage
::
impl_setModelForLayerAdmin
(
SdrModel
*
const
pNewModel
)
{
if
(
pNewModel
!=
NULL
)
{
pLayerAdmin
->
SetParent
(
&
pNewModel
->
GetLayerAdmin
());
}
else
{
pLayerAdmin
->
SetParent
(
NULL
);
}
pLayerAdmin
->
SetModel
(
pNewModel
);
}
void
SdrPage
::
SetModel
(
SdrModel
*
pNewModel
)
{
SdrModel
*
pOldModel
=
pModel
;
SdrObjList
::
SetModel
(
pNewModel
);
if
(
pNewModel
!=
pOldModel
)
{
if
(
pNewModel
!=
NULL
)
{
pLayerAdmin
->
SetParent
(
&
pNewModel
->
GetLayerAdmin
());
}
else
{
pLayerAdmin
->
SetParent
(
NULL
);
}
pLayerAdmin
->
SetModel
(
pNewModel
);
impl_setModelForLayerAdmin
(
pNewModel
);
// create new SdrPageProperties with new model (due to SfxItemSet there)
// and copy ItemSet and StyleSheet
...
...
sw/inc/dpage.hxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -28,16 +28,18 @@ class SwDoc;
class
SwDPage
:
public
FmFormPage
,
public
SdrObjUserCall
{
SwDPage
(
const
SwDPage
&
)
SAL_DELETED_FUNCTION
;
SwDPage
&
operator
=
(
const
SwDPage
&
)
SAL_DELETED_FUNCTION
;
SdrPageGridFrameList
*
pGridLst
;
SwDoc
&
r
Doc
;
SwDoc
*
p
Doc
;
public
:
SwDPage
(
SwDrawModel
&
rNewModel
,
bool
bMasterPage
=
false
);
virtual
~
SwDPage
();
virtual
SwDPage
*
Clone
()
const
SAL_OVERRIDE
;
virtual
SwDPage
*
Clone
(
SdrModel
*
pNewModel
)
const
SAL_OVERRIDE
;
// #i3694#
// This GetOffset() method is not needed anymore, it even leads to errors.
// virtual Point GetOffset() const;
...
...
@@ -49,6 +51,12 @@ public:
bool
RequestHelp
(
vcl
::
Window
*
pWindow
,
SdrView
*
pView
,
const
HelpEvent
&
rEvt
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
createUnoPage
()
SAL_OVERRIDE
;
protected
:
void
lateInit
(
const
SwDPage
&
rPage
,
SwDrawModel
*
pNewModel
=
0
);
private
:
SwDPage
(
const
SwDPage
&
rSrcPage
);
};
#endif // INCLUDED_SW_INC_DPAGE_HXX
...
...
sw/source/core/draw/dpage.cxx
Dosyayı görüntüle @
51bacc6a
...
...
@@ -52,15 +52,59 @@ using namespace ::com::sun::star::frame;
SwDPage
::
SwDPage
(
SwDrawModel
&
rNewModel
,
bool
bMasterPage
)
:
FmFormPage
(
rNewModel
,
bMasterPage
),
pGridLst
(
0
),
rDoc
(
rNewModel
.
GetDoc
())
pDoc
(
&
rNewModel
.
GetDoc
())
{
}
SwDPage
::
SwDPage
(
const
SwDPage
&
rSrcPage
)
:
FmFormPage
(
rSrcPage
),
pGridLst
(
0
),
pDoc
(
0
)
{
if
(
rSrcPage
.
pGridLst
)
{
pGridLst
=
new
SdrPageGridFrameList
;
for
(
sal_uInt16
i
=
0
;
i
!=
rSrcPage
.
pGridLst
->
GetCount
();
++
i
)
pGridLst
->
Insert
(
(
*
rSrcPage
.
pGridLst
)[
i
]
);
}
}
SwDPage
::~
SwDPage
()
{
delete
pGridLst
;
}
void
SwDPage
::
lateInit
(
const
SwDPage
&
rPage
,
SwDrawModel
*
const
pNewModel
)
{
FmFormPage
::
lateInit
(
rPage
,
pNewModel
);
SwDrawModel
*
pSwDrawModel
=
pNewModel
;
if
(
!
pModel
)
{
pSwDrawModel
=
dynamic_cast
<
SwDrawModel
*
>
(
GetModel
()
);
assert
(
pSwDrawModel
);
}
pDoc
=
&
pSwDrawModel
->
GetDoc
();
}
SwDPage
*
SwDPage
::
Clone
()
const
{
return
Clone
(
0
);
}
SwDPage
*
SwDPage
::
Clone
(
SdrModel
*
const
pNewModel
)
const
{
SwDPage
*
const
pNewPage
=
new
SwDPage
(
*
this
);
SwDrawModel
*
pSwDrawModel
=
0
;
if
(
pNewModel
)
{
pSwDrawModel
=
dynamic_cast
<
SwDrawModel
*
>
(
pNewModel
);
assert
(
pSwDrawModel
);
}
pNewPage
->
lateInit
(
*
this
,
pSwDrawModel
);
return
pNewPage
;
}
SdrObject
*
SwDPage
::
ReplaceObject
(
SdrObject
*
pNewObj
,
size_t
nObjNum
)
{
SdrObject
*
pOld
=
GetObj
(
nObjNum
);
...
...
@@ -122,6 +166,8 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList(
bool
SwDPage
::
RequestHelp
(
vcl
::
Window
*
pWindow
,
SdrView
*
pView
,
const
HelpEvent
&
rEvt
)
{
assert
(
pDoc
);
bool
bContinue
=
true
;
if
(
rEvt
.
GetMode
()
&
(
HelpEventMode
::
QUICK
|
HelpEventMode
::
BALLOON
))
...
...
@@ -173,7 +219,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
if
(
!
sTxt
.
isEmpty
()
)
{
// #i80029#
bool
bExecHyperlinks
=
rDoc
.
GetDocShell
()
->
IsReadOnly
();
bool
bExecHyperlinks
=
pDoc
->
GetDocShell
()
->
IsReadOnly
();
if
(
!
bExecHyperlinks
)
{
SvtSecurityOptions
aSecOpts
;
...
...
@@ -208,8 +254,10 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
Reference
<
XInterface
>
SwDPage
::
createUnoPage
()
{
assert
(
pDoc
);
Reference
<
XInterface
>
xRet
;
SwDocShell
*
pDocShell
=
rDoc
.
GetDocShell
();
SwDocShell
*
pDocShell
=
pDoc
->
GetDocShell
();
if
(
pDocShell
)
{
Reference
<
XModel
>
xModel
=
pDocShell
->
GetBaseModel
();
...
...
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