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
39f306df
Kaydet (Commit)
39f306df
authored
Nis 03, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: tdf#90099 group new style and change style together as one undo
Change-Id: I978f503fabce69bb08a892c47d07ff8fa43c73b5
üst
f9ac035b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
docst.cxx
sw/source/uibase/app/docst.cxx
+30
-2
No files found.
sw/source/uibase/app/docst.cxx
Dosyayı görüntüle @
39f306df
...
@@ -632,8 +632,17 @@ sal_uInt16 SwDocShell::Edit(
...
@@ -632,8 +632,17 @@ sal_uInt16 SwDocShell::Edit(
sal_uInt16
nRet
=
nMask
;
sal_uInt16
nRet
=
nMask
;
bool
bModified
=
m_pDoc
->
getIDocumentState
().
IsModified
();
bool
bModified
=
m_pDoc
->
getIDocumentState
().
IsModified
();
SwUndoId
nNewStyleUndoId
(
UNDO_EMPTY
);
if
(
bNew
)
if
(
bNew
)
{
{
if
(
!
bBasic
)
{
// start undo action in order to get only one undo action for the
// UI new style + change style operations
m_pWrtShell
->
StartUndo
();
}
if
(
SFXSTYLEBIT_ALL
!=
nMask
&&
SFXSTYLEBIT_ALL_VISIBLE
!=
nMask
&&
SFXSTYLEBIT_USED
!=
nMask
)
if
(
SFXSTYLEBIT_ALL
!=
nMask
&&
SFXSTYLEBIT_ALL_VISIBLE
!=
nMask
&&
SFXSTYLEBIT_USED
!=
nMask
)
nMask
|=
SFXSTYLEBIT_USERDEF
;
nMask
|=
SFXSTYLEBIT_USERDEF
;
else
else
...
@@ -720,6 +729,13 @@ sal_uInt16 SwDocShell::Edit(
...
@@ -720,6 +729,13 @@ sal_uInt16 SwDocShell::Edit(
}
}
break
;
break
;
}
}
if
(
!
bBasic
)
{
//Get the undo id for the type of style that was created in order to re-use that comment for the grouped
//create style + change style operations
m_pWrtShell
->
GetLastUndoInfo
(
0
,
&
nNewStyleUndoId
);
}
}
}
else
else
{
{
...
@@ -784,11 +800,23 @@ sal_uInt16 SwDocShell::Edit(
...
@@ -784,11 +800,23 @@ sal_uInt16 SwDocShell::Edit(
ApplyStyle
aApplyStyleHelper
(
*
this
,
bNew
,
pStyle
,
nRet
,
xTmp
,
nFamily
,
pDlg
.
get
(),
m_xBasePool
,
bModified
);
ApplyStyle
aApplyStyleHelper
(
*
this
,
bNew
,
pStyle
,
nRet
,
xTmp
,
nFamily
,
pDlg
.
get
(),
m_xBasePool
,
bModified
);
pDlg
->
SetApplyHdl
(
LINK
(
&
aApplyStyleHelper
,
ApplyStyle
,
ApplyHdl
));
pDlg
->
SetApplyHdl
(
LINK
(
&
aApplyStyleHelper
,
ApplyStyle
,
ApplyHdl
));
if
(
RET_OK
==
pDlg
->
Execute
())
short
nDlgRet
=
pDlg
->
Execute
();
if
(
RET_OK
==
nDlgRet
)
{
{
aApplyStyleHelper
.
apply
();
aApplyStyleHelper
.
apply
();
}
}
else
if
(
bNew
)
{
SwRewriter
aRewriter
;
aRewriter
.
AddRule
(
UndoArg1
,
xTmp
->
GetName
());
//Group the create style and change style operations together under the
//one "create style" comment
m_pWrtShell
->
EndUndo
(
nNewStyleUndoId
,
&
aRewriter
);
}
if
(
RET_OK
!=
nDlgRet
)
{
{
if
(
bNew
)
if
(
bNew
)
{
{
...
...
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