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
f8056369
Kaydet (Commit)
f8056369
authored
Mar 08, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
let ScNoteUtil::CreateTempCaption() return ScCaptionPtr
Change-Id: Idcb7fc24a13d650d88bec9ba359d7c78006096ec
üst
37376e6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
17 deletions
+15
-17
postit.hxx
sc/inc/postit.hxx
+1
-1
postit.cxx
sc/source/core/data/postit.cxx
+3
-4
notemark.hxx
sc/source/ui/inc/notemark.hxx
+2
-2
notemark.cxx
sc/source/ui/view/notemark.cxx
+9
-10
No files found.
sc/inc/postit.hxx
Dosyayı görüntüle @
f8056369
...
@@ -249,7 +249,7 @@ class SC_DLLPUBLIC ScNoteUtil
...
@@ -249,7 +249,7 @@ class SC_DLLPUBLIC ScNoteUtil
public
:
public
:
/** Creates and returns a caption object for a temporary caption. */
/** Creates and returns a caption object for a temporary caption. */
static
S
drCaptionObj
*
CreateTempCaption
(
ScDocument
&
rDoc
,
const
ScAddress
&
rPos
,
static
S
cCaptionPtr
CreateTempCaption
(
ScDocument
&
rDoc
,
const
ScAddress
&
rPos
,
SdrPage
&
rDrawPage
,
const
OUString
&
rUserText
,
SdrPage
&
rDrawPage
,
const
OUString
&
rUserText
,
const
Rectangle
&
rVisRect
,
bool
bTailFront
);
const
Rectangle
&
rVisRect
,
bool
bTailFront
);
...
...
sc/source/core/data/postit.cxx
Dosyayı görüntüle @
f8056369
...
@@ -1078,7 +1078,7 @@ void ScPostIt::RemoveCaption()
...
@@ -1078,7 +1078,7 @@ void ScPostIt::RemoveCaption()
maNoteData
.
mxCaption
.
reset
(
nullptr
);
maNoteData
.
mxCaption
.
reset
(
nullptr
);
}
}
S
drCaptionObj
*
ScNoteUtil
::
CreateTempCaption
(
S
cCaptionPtr
ScNoteUtil
::
CreateTempCaption
(
ScDocument
&
rDoc
,
const
ScAddress
&
rPos
,
SdrPage
&
rDrawPage
,
ScDocument
&
rDoc
,
const
ScAddress
&
rPos
,
SdrPage
&
rDrawPage
,
const
OUString
&
rUserText
,
const
Rectangle
&
rVisRect
,
bool
bTailFront
)
const
OUString
&
rUserText
,
const
Rectangle
&
rVisRect
,
bool
bTailFront
)
{
{
...
@@ -1095,7 +1095,7 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
...
@@ -1095,7 +1095,7 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
// create a caption if any text exists
// create a caption if any text exists
if
(
!
pNoteCaption
&&
aBuffer
.
isEmpty
()
)
if
(
!
pNoteCaption
&&
aBuffer
.
isEmpty
()
)
return
nullptr
;
return
ScCaptionPtr
()
;
// prepare visible rectangle (add default distance to all borders)
// prepare visible rectangle (add default distance to all borders)
Rectangle
aVisRect
(
Rectangle
aVisRect
(
...
@@ -1138,9 +1138,8 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
...
@@ -1138,9 +1138,8 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
// move caption into visible area
// move caption into visible area
aCreator
.
AutoPlaceCaption
(
&
aVisRect
);
aCreator
.
AutoPlaceCaption
(
&
aVisRect
);
// The caption object returned is completely unmanaged and stored elsewhere.
// XXX Note it is already inserted to the draw page.
// XXX Note it is already inserted to the draw page.
return
aCreator
.
GetCaption
()
.
release
()
;
return
aCreator
.
GetCaption
();
}
}
ScPostIt
*
ScNoteUtil
::
CreateNoteFromCaption
(
ScPostIt
*
ScNoteUtil
::
CreateNoteFromCaption
(
...
...
sc/source/ui/inc/notemark.hxx
Dosyayı görüntüle @
f8056369
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
#include <vcl/timer.hxx>
#include <vcl/timer.hxx>
#include "global.hxx"
#include "global.hxx"
#include "address.hxx"
#include "address.hxx"
#include "postit.hxx"
class
SdrModel
;
class
SdrModel
;
class
SdrObject
;
class
ScNoteMarker
class
ScNoteMarker
{
{
...
@@ -46,7 +46,7 @@ private:
...
@@ -46,7 +46,7 @@ private:
Rectangle
aRect
;
Rectangle
aRect
;
SdrModel
*
pModel
;
SdrModel
*
pModel
;
S
drObject
*
p
Object
;
S
cCaptionPtr
mx
Object
;
bool
bVisible
;
bool
bVisible
;
Point
aGridOff
;
Point
aGridOff
;
DECL_LINK
(
TimeHdl
,
Timer
*
,
void
);
DECL_LINK
(
TimeHdl
,
Timer
*
,
void
);
...
...
sc/source/ui/view/notemark.cxx
Dosyayı görüntüle @
f8056369
...
@@ -48,7 +48,6 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window*
...
@@ -48,7 +48,6 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window*
bLeft
(
bLeftEdge
),
bLeft
(
bLeftEdge
),
bByKeyboard
(
bKeyboard
),
bByKeyboard
(
bKeyboard
),
pModel
(
nullptr
),
pModel
(
nullptr
),
pObject
(
nullptr
),
bVisible
(
false
)
bVisible
(
false
)
{
{
Size
aSizePixel
=
pWindow
->
GetOutputSizePixel
();
Size
aSizePixel
=
pWindow
->
GetOutputSizePixel
();
...
@@ -94,11 +93,11 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
...
@@ -94,11 +93,11 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
if
(
SdrPage
*
pPage
=
pModel
->
AllocPage
(
false
)
)
if
(
SdrPage
*
pPage
=
pModel
->
AllocPage
(
false
)
)
{
{
p
Object
=
ScNoteUtil
::
CreateTempCaption
(
*
pDoc
,
aDocPos
,
*
pPage
,
aUserText
,
aVisRect
,
bLeft
);
mx
Object
=
ScNoteUtil
::
CreateTempCaption
(
*
pDoc
,
aDocPos
,
*
pPage
,
aUserText
,
aVisRect
,
bLeft
);
if
(
p
Object
)
if
(
mx
Object
)
{
{
p
Object
->
SetGridOffset
(
aGridOff
);
mx
Object
->
SetGridOffset
(
aGridOff
);
aRect
=
p
Object
->
GetCurrentBoundRect
();
aRect
=
mx
Object
->
GetCurrentBoundRect
();
}
}
// Insert page so that the model recognise it and also deleted
// Insert page so that the model recognise it and also deleted
...
@@ -141,21 +140,21 @@ static MapMode lcl_MoveMapMode( const MapMode& rMap, const Size& rMove )
...
@@ -141,21 +140,21 @@ static MapMode lcl_MoveMapMode( const MapMode& rMap, const Size& rMove )
void
ScNoteMarker
::
Draw
()
void
ScNoteMarker
::
Draw
()
{
{
if
(
p
Object
&&
bVisible
)
if
(
mx
Object
&&
bVisible
)
{
{
lcl_DrawWin
(
pObject
,
pWindow
,
aMapMode
);
lcl_DrawWin
(
mxObject
.
get
()
,
pWindow
,
aMapMode
);
if
(
pRightWin
||
pBottomWin
)
if
(
pRightWin
||
pBottomWin
)
{
{
Size
aWinSize
=
pWindow
->
PixelToLogic
(
pWindow
->
GetOutputSizePixel
(),
aMapMode
);
Size
aWinSize
=
pWindow
->
PixelToLogic
(
pWindow
->
GetOutputSizePixel
(),
aMapMode
);
if
(
pRightWin
)
if
(
pRightWin
)
lcl_DrawWin
(
pObject
,
pRightWin
,
lcl_DrawWin
(
mxObject
.
get
()
,
pRightWin
,
lcl_MoveMapMode
(
aMapMode
,
Size
(
aWinSize
.
Width
(),
0
)
)
);
lcl_MoveMapMode
(
aMapMode
,
Size
(
aWinSize
.
Width
(),
0
)
)
);
if
(
pBottomWin
)
if
(
pBottomWin
)
lcl_DrawWin
(
pObject
,
pBottomWin
,
lcl_DrawWin
(
mxObject
.
get
()
,
pBottomWin
,
lcl_MoveMapMode
(
aMapMode
,
Size
(
0
,
aWinSize
.
Height
()
)
)
);
lcl_MoveMapMode
(
aMapMode
,
Size
(
0
,
aWinSize
.
Height
()
)
)
);
if
(
pDiagWin
)
if
(
pDiagWin
)
lcl_DrawWin
(
pObject
,
pDiagWin
,
lcl_MoveMapMode
(
aMapMode
,
aWinSize
)
);
lcl_DrawWin
(
mxObject
.
get
()
,
pDiagWin
,
lcl_MoveMapMode
(
aMapMode
,
aWinSize
)
);
}
}
}
}
}
}
...
...
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