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
2613e93b
Kaydet (Commit)
2613e93b
authored
Şub 20, 2017
tarafından
Pranav Kant
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sd lok: Support deleting annotations by id
Change-Id: Id415fcbe8ad478c022bce23158699a17f031c1f9
üst
c62d2317
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
annotationmanager.cxx
sd/source/ui/annotations/annotationmanager.cxx
+34
-2
annotationmanagerimpl.hxx
sd/source/ui/annotations/annotationmanagerimpl.hxx
+2
-0
svx.sdi
svx/sdi/svx.sdi
+1
-1
No files found.
sd/source/ui/annotations/annotationmanager.cxx
Dosyayı görüntüle @
2613e93b
...
...
@@ -61,6 +61,7 @@
#include <editeng/udlnitem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <svx/postattr.hxx>
#include <svx/svdetc.hxx>
#include "annotationmanager.hxx"
...
...
@@ -68,6 +69,7 @@
#include "annotationwindow.hxx"
#include "annotations.hrc"
#include "Annotation.hxx"
#include "ToolBarManager.hxx"
#include "DrawDocShell.hxx"
#include "DrawViewShell.hxx"
...
...
@@ -244,6 +246,30 @@ void SAL_CALL AnnotationManagerImpl::disposing( const css::lang::EventObject& /*
{
}
Reference
<
XAnnotation
>
AnnotationManagerImpl
::
GetAnnotationById
(
sal_uInt32
nAnnotationId
)
{
SdPage
*
pPage
=
nullptr
;
do
{
pPage
=
GetNextPage
(
pPage
,
true
);
if
(
pPage
&&
!
pPage
->
getAnnotations
().
empty
()
)
{
AnnotationVector
aAnnotations
(
pPage
->
getAnnotations
());
for
(
AnnotationVector
::
iterator
iter
=
aAnnotations
.
begin
();
iter
!=
aAnnotations
.
end
();
++
iter
)
{
Reference
<
XAnnotation
>
xAnnotation
(
*
iter
);
if
(
sd
::
getAnnotationId
(
xAnnotation
)
==
nAnnotationId
)
{
return
xAnnotation
;
}
}
}
}
while
(
pPage
);
Reference
<
XAnnotation
>
xAnnotationEmpty
;
return
xAnnotationEmpty
;
}
void
AnnotationManagerImpl
::
ShowAnnotations
(
bool
bShow
)
{
// enforce show annotations if a new annotation is inserted
...
...
@@ -315,14 +341,19 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq)
case
SID_DELETE_POSTIT
:
{
Reference
<
XAnnotation
>
xAnnotation
;
sal_uInt32
nId
=
0
;
if
(
pArgs
)
{
const
SfxPoolItem
*
pPoolItem
=
nullptr
;
if
(
SfxItemState
::
SET
==
pArgs
->
GetItemState
(
SID_DELETE_POSTIT
,
true
,
&
pPoolItem
)
)
static_cast
<
const
SfxUnoAnyItem
*>
(
pPoolItem
)
->
GetValue
()
>>=
xAnnotation
;
if
(
SfxItemState
::
SET
==
pArgs
->
GetItemState
(
SID_ATTR_POSTIT_ID
,
true
,
&
pPoolItem
)
)
nId
=
static_cast
<
const
SvxPostItIdItem
*>
(
pPoolItem
)
->
GetValue
().
toUInt32
();
}
if
(
!
xAnnotation
.
is
()
)
if
(
nId
!=
0
)
xAnnotation
=
GetAnnotationById
(
nId
);
else
if
(
!
xAnnotation
.
is
()
)
GetSelectedAnnotation
(
xAnnotation
);
DeleteAnnotation
(
xAnnotation
);
...
...
@@ -576,7 +607,8 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
Reference
<
XAnnotation
>
xAnnotation
;
GetSelectedAnnotation
(
xAnnotation
);
if
(
!
xAnnotation
.
is
()
||
bReadOnly
)
// Don't disable SID_DELETE_POSTIT slot in case of LOK
if
(
(
!
xAnnotation
.
is
()
&&
!
comphelper
::
LibreOfficeKit
::
isActive
())
||
bReadOnly
)
rSet
.
DisableItem
(
SID_DELETE_POSTIT
);
SdPage
*
pPage
=
nullptr
;
...
...
sd/source/ui/annotations/annotationmanagerimpl.hxx
Dosyayı görüntüle @
2613e93b
...
...
@@ -128,6 +128,8 @@ private:
bool
mbPopupMenuActive
;
ImplSVEvent
*
mnUpdateTagsEvent
;
vcl
::
Font
maFont
;
css
::
uno
::
Reference
<
css
::
office
::
XAnnotation
>
GetAnnotationById
(
sal_uInt32
nAnnotationId
);
};
OUString
getAnnotationDateTimeString
(
const
css
::
uno
::
Reference
<
css
::
office
::
XAnnotation
>&
xAnnotation
);
...
...
svx/sdi/svx.sdi
Dosyayı görüntüle @
2613e93b
...
...
@@ -4609,7 +4609,7 @@ SfxVoidItem ReplyToAnnotation SID_REPLYTO_POSTIT
SfxVoidItem DeleteAnnotation SID_DELETE_POSTIT
()
(
SvxPostItIdItem Id SID_ATTR_POSTIT_ID
)
[
AutoUpdate = FALSE,
FastCall = FALSE,
...
...
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