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
acaa4d59
Kaydet (Commit)
acaa4d59
authored
Tem 16, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#38244 enable attaching comments to document text ranges in writer
Change-Id: I1e1ec7e91d513bc34737c7659d1178a02e80c53e
üst
2f52f37f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
fldmgr.cxx
sw/source/ui/fldui/fldmgr.cxx
+9
-1
fldmgr.hxx
sw/source/ui/inc/fldmgr.hxx
+2
-1
textfld.cxx
sw/source/ui/shells/textfld.cxx
+7
-2
No files found.
sw/source/ui/fldui/fldmgr.cxx
Dosyayı görüntüle @
acaa4d59
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
#include <svl/zforlist.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/zformat.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/mnemonic.hxx>
#include <xmloff/odffields.hxx>
#include <view.hxx>
#include <view.hxx>
#include <wrtsh.hxx> // active window
#include <wrtsh.hxx> // active window
#include <doc.hxx> // active window
#include <doc.hxx> // active window
...
@@ -849,7 +850,7 @@ sal_uInt16 SwFldMgr::GetCurTypeId() const
...
@@ -849,7 +850,7 @@ sal_uInt16 SwFldMgr::GetCurTypeId() const
--------------------------------------------------------------------*/
--------------------------------------------------------------------*/
sal_Bool
SwFldMgr
::
InsertFld
(
const
SwInsertFld_Data
&
rData
)
sal_Bool
SwFldMgr
::
InsertFld
(
const
SwInsertFld_Data
&
rData
,
SwPaM
*
pPam
)
{
{
SwField
*
pFld
=
0
;
SwField
*
pFld
=
0
;
sal_Bool
bExp
=
sal_False
;
sal_Bool
bExp
=
sal_False
;
...
@@ -1378,6 +1379,13 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
...
@@ -1378,6 +1379,13 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
// insert
// insert
pCurShell
->
StartAllAction
();
pCurShell
->
StartAllAction
();
if
(
pPam
&&
*
pPam
->
GetPoint
()
!=
*
pPam
->
GetMark
()
&&
rData
.
nTypeId
==
TYP_POSTITFLD
)
{
// If an annotation field is inserted, take care of the relevant fieldmark.
IDocumentMarkAccess
*
pMarksAccess
=
pCurShell
->
GetDoc
()
->
getIDocumentMarkAccess
();
pMarksAccess
->
makeFieldBookmark
(
*
pPam
,
OUString
(),
ODF_COMMENTRANGE
);
}
pCurShell
->
Insert
(
*
pFld
);
pCurShell
->
Insert
(
*
pFld
);
if
(
bExp
&&
bEvalExp
)
if
(
bExp
&&
bEvalExp
)
...
...
sw/source/ui/inc/fldmgr.hxx
Dosyayı görüntüle @
acaa4d59
...
@@ -48,6 +48,7 @@ namespace com{namespace sun{namespace star{
...
@@ -48,6 +48,7 @@ namespace com{namespace sun{namespace star{
class
SwWrtShell
;
class
SwWrtShell
;
class
SwField
;
class
SwField
;
class
SwFieldType
;
class
SwFieldType
;
class
SwPaM
;
class
SbModule
;
class
SbModule
;
class
SvxMacroItem
;
class
SvxMacroItem
;
class
SvNumberFormatter
;
class
SvNumberFormatter
;
...
@@ -141,7 +142,7 @@ public:
...
@@ -141,7 +142,7 @@ public:
{
pWrtShell
=
pShell
;
}
{
pWrtShell
=
pShell
;
}
// insert field using TypeID (TYP_ ...)
// insert field using TypeID (TYP_ ...)
sal_Bool
InsertFld
(
const
SwInsertFld_Data
&
rData
);
sal_Bool
InsertFld
(
const
SwInsertFld_Data
&
rData
,
SwPaM
*
pPam
=
0
);
// change the current field directly
// change the current field directly
void
UpdateCurFld
(
sal_uLong
nFormat
,
void
UpdateCurFld
(
sal_uLong
nFormat
,
...
...
sw/source/ui/shells/textfld.cxx
Dosyayı görüntüle @
acaa4d59
...
@@ -356,14 +356,19 @@ void SwTextShell::ExecField(SfxRequest &rReq)
...
@@ -356,14 +356,19 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if
(
!
(
sAuthor
=
aUserOpt
.
GetFullName
()).
Len
())
if
(
!
(
sAuthor
=
aUserOpt
.
GetFullName
()).
Len
())
if
(
!
(
sAuthor
=
aUserOpt
.
GetID
()).
Len
()
)
if
(
!
(
sAuthor
=
aUserOpt
.
GetID
()).
Len
()
)
sAuthor
=
String
(
SW_RES
(
STR_REDLINE_UNKNOWN_AUTHOR
));
sAuthor
=
String
(
SW_RES
(
STR_REDLINE_UNKNOWN_AUTHOR
));
// Save the current selection, it will be required later for fieldmark insertion.
SwPaM
&
rCurrPam
=
rSh
.
GetCurrentShellCursor
();
SwPaM
aSaved
(
*
rCurrPam
.
GetPoint
(),
*
rCurrPam
.
GetMark
());
if
(
rSh
.
HasSelection
()
)
if
(
rSh
.
HasSelection
()
)
{
{
rSh
.
NormalizePam
(
tru
e
);
rSh
.
NormalizePam
(
fals
e
);
rSh
.
KillPams
();
rSh
.
KillPams
();
rSh
.
ClearMark
();
rSh
.
ClearMark
();
}
}
SwInsertFld_Data
aData
(
TYP_POSTITFLD
,
0
,
sAuthor
,
aEmptyStr
,
0
);
SwInsertFld_Data
aData
(
TYP_POSTITFLD
,
0
,
sAuthor
,
aEmptyStr
,
0
);
aFldMgr
.
InsertFld
(
aData
);
aFldMgr
.
InsertFld
(
aData
,
&
aSaved
);
rSh
.
Push
();
rSh
.
Push
();
rSh
.
SwCrsrShell
::
Left
(
1
,
CRSR_SKIP_CHARS
,
sal_False
);
rSh
.
SwCrsrShell
::
Left
(
1
,
CRSR_SKIP_CHARS
,
sal_False
);
pPostIt
=
(
SwPostItField
*
)
aFldMgr
.
GetCurFld
();
pPostIt
=
(
SwPostItField
*
)
aFldMgr
.
GetCurFld
();
...
...
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