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
ce96c595
Kaydet (Commit)
ce96c595
authored
Şub 15, 2017
tarafından
Pranav Kant
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SvxPostItIdItem is now string type
Change-Id: Id44bf5dd623749b6e9a46f121f035aa5ce617557
üst
a29b0d68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
test_desktop_lib.cxx
desktop/qa/desktop_lib/test_desktop_lib.cxx
+4
-4
postattr.hxx
include/svx/postattr.hxx
+2
-2
postattr.cxx
svx/source/items/postattr.cxx
+2
-2
textfld.cxx
sw/source/uibase/shells/textfld.cxx
+7
-7
No files found.
desktop/qa/desktop_lib/test_desktop_lib.cxx
Dosyayı görüntüle @
ce96c595
...
@@ -1918,7 +1918,7 @@ void DesktopLOKTest::testCommentsCallbacks()
...
@@ -1918,7 +1918,7 @@ void DesktopLOKTest::testCommentsCallbacks()
int
nCommentId1
=
aView1
.
m_aCommentCallbackResult
.
get
<
int
>
(
"id"
);
int
nCommentId1
=
aView1
.
m_aCommentCallbackResult
.
get
<
int
>
(
"id"
);
// Reply to a comment just added
// Reply to a comment just added
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
lo
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId1
)
+
"
\"
},
\"
Text
\"
: {
\"
type
\"
:
\"
string
\"
,
\"
value
\"
:
\"
Reply comment
\"
} }"
;
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
stri
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId1
)
+
"
\"
},
\"
Text
\"
: {
\"
type
\"
:
\"
string
\"
,
\"
value
\"
:
\"
Reply comment
\"
} }"
;
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:ReplyComment"
,
aCommandArgs
.
getStr
(),
false
);
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:ReplyComment"
,
aCommandArgs
.
getStr
(),
false
);
Scheduler
::
ProcessEventsToIdle
();
Scheduler
::
ProcessEventsToIdle
();
...
@@ -1932,7 +1932,7 @@ void DesktopLOKTest::testCommentsCallbacks()
...
@@ -1932,7 +1932,7 @@ void DesktopLOKTest::testCommentsCallbacks()
int
nCommentId2
=
aView1
.
m_aCommentCallbackResult
.
get
<
int
>
(
"id"
);
int
nCommentId2
=
aView1
.
m_aCommentCallbackResult
.
get
<
int
>
(
"id"
);
// Edit the previously added comment
// Edit the previously added comment
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
lo
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId2
)
+
"
\"
},
\"
Text
\"
: {
\"
type
\"
:
\"
string
\"
,
\"
value
\"
:
\"
Edited comment
\"
} }"
;
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
stri
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId2
)
+
"
\"
},
\"
Text
\"
: {
\"
type
\"
:
\"
string
\"
,
\"
value
\"
:
\"
Edited comment
\"
} }"
;
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:EditAnnotation"
,
aCommandArgs
.
getStr
(),
false
);
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:EditAnnotation"
,
aCommandArgs
.
getStr
(),
false
);
Scheduler
::
ProcessEventsToIdle
();
Scheduler
::
ProcessEventsToIdle
();
...
@@ -1946,7 +1946,7 @@ void DesktopLOKTest::testCommentsCallbacks()
...
@@ -1946,7 +1946,7 @@ void DesktopLOKTest::testCommentsCallbacks()
CPPUNIT_ASSERT_EQUAL
(
std
::
string
(
"Edited comment"
),
aView2
.
m_aCommentCallbackResult
.
get
<
std
::
string
>
(
"text"
));
CPPUNIT_ASSERT_EQUAL
(
std
::
string
(
"Edited comment"
),
aView2
.
m_aCommentCallbackResult
.
get
<
std
::
string
>
(
"text"
));
// Delete the reply comment just added
// Delete the reply comment just added
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
lo
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId2
)
+
"
\"
} }"
;
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
stri
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId2
)
+
"
\"
} }"
;
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:DeleteComment"
,
aCommandArgs
.
getStr
(),
false
);
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:DeleteComment"
,
aCommandArgs
.
getStr
(),
false
);
Scheduler
::
ProcessEventsToIdle
();
Scheduler
::
ProcessEventsToIdle
();
...
@@ -1957,7 +1957,7 @@ void DesktopLOKTest::testCommentsCallbacks()
...
@@ -1957,7 +1957,7 @@ void DesktopLOKTest::testCommentsCallbacks()
CPPUNIT_ASSERT_EQUAL
(
nCommentId2
,
aView2
.
m_aCommentCallbackResult
.
get
<
int
>
(
"id"
));
CPPUNIT_ASSERT_EQUAL
(
nCommentId2
,
aView2
.
m_aCommentCallbackResult
.
get
<
int
>
(
"id"
));
// Reply to nCommentId1 again
// Reply to nCommentId1 again
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
lo
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId1
)
+
"
\"
},
\"
Text
\"
: {
\"
type
\"
:
\"
string
\"
,
\"
value
\"
:
\"
Reply comment again
\"
} }"
;
aCommandArgs
=
"{
\"
Id
\"
: {
\"
type
\"
:
\"
stri
ng
\"
,
\"
value
\"
:
\"
"
+
OString
::
number
(
nCommentId1
)
+
"
\"
},
\"
Text
\"
: {
\"
type
\"
:
\"
string
\"
,
\"
value
\"
:
\"
Reply comment again
\"
} }"
;
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:ReplyComment"
,
aCommandArgs
.
getStr
(),
false
);
pDocument
->
pClass
->
postUnoCommand
(
pDocument
,
".uno:ReplyComment"
,
aCommandArgs
.
getStr
(),
false
);
Scheduler
::
ProcessEventsToIdle
();
Scheduler
::
ProcessEventsToIdle
();
...
...
include/svx/postattr.hxx
Dosyayı görüntüle @
ce96c595
...
@@ -120,14 +120,14 @@ public:
...
@@ -120,14 +120,14 @@ public:
The internal id of a note
The internal id of a note
*/
*/
class
SVX_DLLPUBLIC
SvxPostItIdItem
:
public
Sfx
UInt32
Item
class
SVX_DLLPUBLIC
SvxPostItIdItem
:
public
Sfx
String
Item
{
{
public
:
public
:
static
SfxPoolItem
*
CreateDefault
();
static
SfxPoolItem
*
CreateDefault
();
SvxPostItIdItem
(
sal_uInt16
nWhich
);
SvxPostItIdItem
(
sal_uInt16
nWhich
);
SvxPostItIdItem
(
sal_uInt32
rId
,
sal_uInt16
nWhich
);
SvxPostItIdItem
(
const
OUString
&
rId
,
sal_uInt16
nWhich
);
virtual
SfxPoolItem
*
Clone
(
SfxItemPool
*
pPool
=
nullptr
)
const
override
;
virtual
SfxPoolItem
*
Clone
(
SfxItemPool
*
pPool
=
nullptr
)
const
override
;
...
...
svx/source/items/postattr.cxx
Dosyayı görüntüle @
ce96c595
...
@@ -151,8 +151,8 @@ SvxPostItIdItem::SvxPostItIdItem( sal_uInt16 _nWhich )
...
@@ -151,8 +151,8 @@ SvxPostItIdItem::SvxPostItIdItem( sal_uInt16 _nWhich )
SetWhich
(
_nWhich
);
SetWhich
(
_nWhich
);
}
}
SvxPostItIdItem
::
SvxPostItIdItem
(
sal_uInt32
rId
,
sal_uInt16
_nWhich
)
:
SvxPostItIdItem
::
SvxPostItIdItem
(
const
OUString
&
rId
,
sal_uInt16
_nWhich
)
:
Sfx
UInt32
Item
(
_nWhich
,
rId
)
Sfx
String
Item
(
_nWhich
,
rId
)
{
{
}
}
...
...
sw/source/uibase/shells/textfld.cxx
Dosyayı görüntüle @
ce96c595
...
@@ -330,9 +330,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
...
@@ -330,9 +330,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case
FN_DELETE_COMMENT
:
case
FN_DELETE_COMMENT
:
{
{
const
SvxPostItIdItem
*
pIdItem
=
rReq
.
GetArg
<
SvxPostItIdItem
>
(
SID_ATTR_POSTIT_ID
);
const
SvxPostItIdItem
*
pIdItem
=
rReq
.
GetArg
<
SvxPostItIdItem
>
(
SID_ATTR_POSTIT_ID
);
if
(
pIdItem
&&
pIdItem
->
GetValue
()
&&
GetView
().
GetPostItMgr
())
if
(
pIdItem
&&
!
pIdItem
->
GetValue
().
isEmpty
()
&&
GetView
().
GetPostItMgr
())
{
{
GetView
().
GetPostItMgr
()
->
Delete
(
pIdItem
->
GetValue
());
GetView
().
GetPostItMgr
()
->
Delete
(
pIdItem
->
GetValue
()
.
toUInt32
()
);
}
}
else
if
(
GetView
().
GetPostItMgr
()
&&
else
if
(
GetView
().
GetPostItMgr
()
&&
GetView
().
GetPostItMgr
()
->
HasActiveSidebarWin
()
)
GetView
().
GetPostItMgr
()
->
HasActiveSidebarWin
()
)
...
@@ -380,16 +380,16 @@ void SwTextShell::ExecField(SfxRequest &rReq)
...
@@ -380,16 +380,16 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case
FN_REPLY
:
case
FN_REPLY
:
{
{
const
SvxPostItIdItem
*
pIdItem
=
rReq
.
GetArg
<
SvxPostItIdItem
>
(
SID_ATTR_POSTIT_ID
);
const
SvxPostItIdItem
*
pIdItem
=
rReq
.
GetArg
<
SvxPostItIdItem
>
(
SID_ATTR_POSTIT_ID
);
if
(
pIdItem
&&
pIdItem
->
GetValue
())
if
(
pIdItem
&&
!
pIdItem
->
GetValue
().
isEmpty
())
{
{
SwFieldType
*
pType
=
rSh
.
GetDoc
()
->
getIDocumentFieldsAccess
().
GetFieldType
(
RES_POSTITFLD
,
OUString
(),
false
);
SwFieldType
*
pType
=
rSh
.
GetDoc
()
->
getIDocumentFieldsAccess
().
GetFieldType
(
RES_POSTITFLD
,
OUString
(),
false
);
SwIterator
<
SwFormatField
,
SwFieldType
>
aIter
(
*
pType
);
SwIterator
<
SwFormatField
,
SwFieldType
>
aIter
(
*
pType
);
SwFormatField
*
pSwFormatField
=
aIter
.
First
();
SwFormatField
*
pSwFormatField
=
aIter
.
First
();
while
(
pSwFormatField
)
while
(
pSwFormatField
)
{
{
if
(
static_cast
<
SwPostItField
*>
(
pSwFormatField
->
GetField
())
->
GetPostItId
()
==
pIdItem
->
GetValue
())
if
(
static_cast
<
SwPostItField
*>
(
pSwFormatField
->
GetField
())
->
GetPostItId
()
==
pIdItem
->
GetValue
()
.
toUInt32
()
)
{
{
sw
::
annotation
::
SwAnnotationWin
*
pWin
=
GetView
().
GetPostItMgr
()
->
GetAnnotationWin
(
pIdItem
->
GetValue
());
sw
::
annotation
::
SwAnnotationWin
*
pWin
=
GetView
().
GetPostItMgr
()
->
GetAnnotationWin
(
pIdItem
->
GetValue
()
.
toUInt32
()
);
if
(
pWin
)
if
(
pWin
)
{
{
const
SvxPostItTextItem
*
pTextItem
=
rReq
.
GetArg
<
SvxPostItTextItem
>
(
SID_ATTR_POSTIT_TEXT
);
const
SvxPostItTextItem
*
pTextItem
=
rReq
.
GetArg
<
SvxPostItTextItem
>
(
SID_ATTR_POSTIT_TEXT
);
...
@@ -479,14 +479,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
...
@@ -479,14 +479,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case
SID_EDIT_POSTIT
:
case
SID_EDIT_POSTIT
:
{
{
const
SvxPostItIdItem
*
pIdItem
=
rReq
.
GetArg
<
SvxPostItIdItem
>
(
SID_ATTR_POSTIT_ID
);
const
SvxPostItIdItem
*
pIdItem
=
rReq
.
GetArg
<
SvxPostItIdItem
>
(
SID_ATTR_POSTIT_ID
);
if
(
pIdItem
&&
pIdItem
->
GetValue
())
if
(
pIdItem
&&
!
pIdItem
->
GetValue
().
isEmpty
())
{
{
const
SvxPostItTextItem
*
pTextItem
=
rReq
.
GetArg
<
SvxPostItTextItem
>
(
SID_ATTR_POSTIT_TEXT
);
const
SvxPostItTextItem
*
pTextItem
=
rReq
.
GetArg
<
SvxPostItTextItem
>
(
SID_ATTR_POSTIT_TEXT
);
OUString
sText
;
OUString
sText
;
if
(
pTextItem
)
if
(
pTextItem
)
sText
=
pTextItem
->
GetValue
();
sText
=
pTextItem
->
GetValue
();
sw
::
annotation
::
SwAnnotationWin
*
pAnnotationWin
=
GetView
().
GetPostItMgr
()
->
GetAnnotationWin
(
pIdItem
->
GetValue
());
sw
::
annotation
::
SwAnnotationWin
*
pAnnotationWin
=
GetView
().
GetPostItMgr
()
->
GetAnnotationWin
(
pIdItem
->
GetValue
()
.
toUInt32
()
);
if
(
pAnnotationWin
)
if
(
pAnnotationWin
)
pAnnotationWin
->
UpdateText
(
sText
);
pAnnotationWin
->
UpdateText
(
sText
);
}
}
...
...
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