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
108dabd5
Kaydet (Commit)
108dabd5
authored
Eyl 09, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
factor out code which sets the defaults for properties
üst
38596e65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
20 deletions
+29
-20
doc.hxx
sw/inc/doc.hxx
+4
-1
docnew.cxx
sw/source/core/doc/docnew.cxx
+25
-19
No files found.
sw/inc/doc.hxx
Dosyayı görüntüle @
108dabd5
...
@@ -1270,9 +1270,12 @@ public:
...
@@ -1270,9 +1270,12 @@ public:
SwTxtFmtColl
*
CopyTxtColl
(
const
SwTxtFmtColl
&
rColl
);
SwTxtFmtColl
*
CopyTxtColl
(
const
SwTxtFmtColl
&
rColl
);
SwGrfFmtColl
*
CopyGrfColl
(
const
SwGrfFmtColl
&
rColl
);
SwGrfFmtColl
*
CopyGrfColl
(
const
SwGrfFmtColl
&
rColl
);
// Replace all
format
s with those from rSource.
// Replace all
style
s with those from rSource.
void
ReplaceStyles
(
const
SwDoc
&
rSource
);
void
ReplaceStyles
(
const
SwDoc
&
rSource
);
// Replace all property defaults with those from rSource.
void
ReplaceDefaults
(
const
SwDoc
&
rSource
);
// Query if style (paragraph- / character- / frame- / page-) is used.
// Query if style (paragraph- / character- / frame- / page-) is used.
sal_Bool
IsUsed
(
const
SwModify
&
)
const
;
sal_Bool
IsUsed
(
const
SwModify
&
)
const
;
sal_Bool
IsUsed
(
const
SwNumRule
&
)
const
;
sal_Bool
IsUsed
(
const
SwNumRule
&
)
const
;
...
...
sw/source/core/doc/docnew.cxx
Dosyayı görüntüle @
108dabd5
...
@@ -1046,12 +1046,11 @@ void SwDoc::InitTOXTypes()
...
@@ -1046,12 +1046,11 @@ void SwDoc::InitTOXTypes()
pTOXTypes
->
Insert
(
pNew
,
pTOXTypes
->
Count
()
);
pTOXTypes
->
Insert
(
pNew
,
pTOXTypes
->
Count
()
);
}
}
SfxObjectShell
*
SwDoc
::
CreateCopy
(
bool
bCallInitNew
)
const
void
SwDoc
::
ReplaceDefaults
(
const
SwDoc
&
rSource
)
{
{
SwDoc
*
pRet
=
new
SwDoc
;
//copy property defaults
const
sal_uInt16
aRangeOfDefaults
[]
=
//copy settings
{
sal_uInt16
aRangeOfDefaults
[]
=
{
RES_FRMATR_BEGIN
,
RES_FRMATR_END
-
1
,
RES_FRMATR_BEGIN
,
RES_FRMATR_END
-
1
,
RES_CHRATR_BEGIN
,
RES_CHRATR_END
-
1
,
RES_CHRATR_BEGIN
,
RES_CHRATR_END
-
1
,
RES_PARATR_BEGIN
,
RES_PARATR_END
-
1
,
RES_PARATR_BEGIN
,
RES_PARATR_END
-
1
,
...
@@ -1060,25 +1059,32 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
...
@@ -1060,25 +1059,32 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
0
0
};
};
{
SfxItemSet
aNewDefaults
(
GetAttrPool
(),
aRangeOfDefaults
);
SfxItemSet
aNewDefaults
(
pRet
->
GetAttrPool
(),
aRangeOfDefaults
);
sal_uInt16
nWhich
;
sal_uInt16
nRange
=
0
;
sal_uInt16
nRange
=
0
;
while
(
aRangeOfDefaults
[
nRange
]
!=
0
)
while
(
aRangeOfDefaults
[
nRange
]
!=
0
)
{
for
(
sal_uInt16
nWhich
=
aRangeOfDefaults
[
nRange
];
nWhich
<
aRangeOfDefaults
[
nRange
+
1
];
++
nWhich
)
{
{
for
(
nWhich
=
aRangeOfDefaults
[
nRange
];
nWhich
<
aRangeOfDefaults
[
nRange
+
1
];
++
nWhich
)
const
SfxPoolItem
&
rSourceAttr
=
{
rSource
.
mpAttrPool
->
GetDefaultItem
(
nWhich
);
const
SfxPoolItem
&
rSourceAttr
=
mpAttrPool
->
GetDefaultItem
(
nWhich
);
if
(
rSourceAttr
!=
mpAttrPool
->
GetDefaultItem
(
nWhich
))
if
(
rSourceAttr
!=
pRet
->
mpAttrPool
->
GetDefaultItem
(
nWhich
)
)
aNewDefaults
.
Put
(
rSourceAttr
);
aNewDefaults
.
Put
(
rSourceAttr
);
}
nRange
+=
2
;
}
}
if
(
aNewDefaults
.
Count
()
)
nRange
+=
2
;
pRet
->
SetDefault
(
aNewDefaults
);
}
}
if
(
aNewDefaults
.
Count
())
SetDefault
(
aNewDefaults
);
}
SfxObjectShell
*
SwDoc
::
CreateCopy
(
bool
bCallInitNew
)
const
{
SwDoc
*
pRet
=
new
SwDoc
;
pRet
->
ReplaceDefaults
(
*
this
);
pRet
->
n32DummyCompatabilityOptions1
=
n32DummyCompatabilityOptions1
;
pRet
->
n32DummyCompatabilityOptions1
=
n32DummyCompatabilityOptions1
;
pRet
->
n32DummyCompatabilityOptions2
=
n32DummyCompatabilityOptions2
;
pRet
->
n32DummyCompatabilityOptions2
=
n32DummyCompatabilityOptions2
;
pRet
->
mbParaSpaceMax
=
mbParaSpaceMax
;
pRet
->
mbParaSpaceMax
=
mbParaSpaceMax
;
...
...
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