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
835556b5
Kaydet (Commit)
835556b5
authored
8 years ago
tarafından
Maxim Monastirsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Prefix SvxLineEndWindow members
Change-Id: I0cfe88c65cc75757938a9f8004c219fbe39f88dd
üst
9e4ae869
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
53 deletions
+53
-53
linectrl.hxx
include/svx/linectrl.hxx
+5
-5
linectrl.cxx
svx/source/tbxctrls/linectrl.cxx
+48
-48
No files found.
include/svx/linectrl.hxx
Dosyayı görüntüle @
835556b5
...
...
@@ -78,11 +78,11 @@ public:
class
SvxLineEndWindow
:
public
SfxPopupWindow
{
private
:
XLineEndListRef
pLineEndList
;
VclPtr
<
ValueSet
>
a
LineEndSet
;
sal_uInt16
nCols
;
sal_uInt16
nLines
;
Size
aBmpSize
;
XLineEndListRef
m
pLineEndList
;
VclPtr
<
ValueSet
>
mp
LineEndSet
;
sal_uInt16
m
nCols
;
sal_uInt16
m
nLines
;
Size
m
aBmpSize
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
mxFrame
;
...
...
This diff is collapsed.
Click to expand it.
svx/source/tbxctrls/linectrl.cxx
Dosyayı görüntüle @
835556b5
...
...
@@ -252,9 +252,9 @@ SvxLineEndWindow::SvxLineEndWindow(
rFrame
,
pParentWindow
,
WinBits
(
WB_STDPOPUP
|
WB_OWNERDRAWDECORATION
)
),
aLineEndSet
(
VclPtr
<
ValueSet
>::
Create
(
this
,
WinBits
(
WB_ITEMBORDER
|
WB_3DLOOK
|
WB_NO_DIRECTSELECT
)
)),
nCols
(
2
),
nLines
(
12
),
mpLineEndSet
(
VclPtr
<
ValueSet
>::
Create
(
this
,
WinBits
(
WB_ITEMBORDER
|
WB_3DLOOK
|
WB_NO_DIRECTSELECT
)
)),
mnCols
(
2
),
mnLines
(
12
),
mxFrame
(
rFrame
)
{
SetText
(
rWndTitle
);
...
...
@@ -266,18 +266,18 @@ void SvxLineEndWindow::implInit()
SfxObjectShell
*
pDocSh
=
SfxObjectShell
::
Current
();
SetHelpId
(
HID_POPUP_LINEEND
);
a
LineEndSet
->
SetHelpId
(
HID_POPUP_LINEEND_CTRL
);
mp
LineEndSet
->
SetHelpId
(
HID_POPUP_LINEEND_CTRL
);
if
(
pDocSh
)
{
const
SfxPoolItem
*
pItem
=
pDocSh
->
GetItem
(
SID_LINEEND_LIST
);
if
(
pItem
)
pLineEndList
=
static_cast
<
const
SvxLineEndListItem
*>
(
pItem
)
->
GetLineEndList
();
m
pLineEndList
=
static_cast
<
const
SvxLineEndListItem
*>
(
pItem
)
->
GetLineEndList
();
}
DBG_ASSERT
(
pLineEndList
.
is
(),
"LineEndList not found"
);
DBG_ASSERT
(
m
pLineEndList
.
is
(),
"LineEndList not found"
);
a
LineEndSet
->
SetSelectHdl
(
LINK
(
this
,
SvxLineEndWindow
,
SelectHdl
)
);
aLineEndSet
->
SetColCount
(
nCols
);
mp
LineEndSet
->
SetSelectHdl
(
LINK
(
this
,
SvxLineEndWindow
,
SelectHdl
)
);
mpLineEndSet
->
SetColCount
(
m
nCols
);
// ValueSet fill with entries of LineEndList
FillValueSet
();
...
...
@@ -285,7 +285,7 @@ void SvxLineEndWindow::implInit()
AddStatusListener
(
".uno:LineEndListState"
);
//ChangeHelpId( HID_POPUP_LINEENDSTYLE );
a
LineEndSet
->
Show
();
mp
LineEndSet
->
Show
();
}
SvxLineEndWindow
::~
SvxLineEndWindow
()
...
...
@@ -295,7 +295,7 @@ SvxLineEndWindow::~SvxLineEndWindow()
void
SvxLineEndWindow
::
dispose
()
{
a
LineEndSet
.
disposeAndClear
();
mp
LineEndSet
.
disposeAndClear
();
SfxPopupWindow
::
dispose
();
}
...
...
@@ -303,7 +303,7 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, void)
{
std
::
unique_ptr
<
XLineEndItem
>
pLineEndItem
;
std
::
unique_ptr
<
XLineStartItem
>
pLineStartItem
;
sal_uInt16
nId
=
a
LineEndSet
->
GetSelectItemId
();
sal_uInt16
nId
=
mp
LineEndSet
->
GetSelectItemId
();
if
(
nId
==
1
)
{
...
...
@@ -315,12 +315,12 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, void)
}
else
if
(
nId
%
2
)
// beginning of line
{
const
XLineEndEntry
*
pEntry
=
pLineEndList
->
GetLineEnd
(
(
nId
-
1
)
/
2
-
1
);
const
XLineEndEntry
*
pEntry
=
m
pLineEndList
->
GetLineEnd
(
(
nId
-
1
)
/
2
-
1
);
pLineStartItem
.
reset
(
new
XLineStartItem
(
pEntry
->
GetName
(),
pEntry
->
GetLineEnd
()));
}
else
// end of line
{
const
XLineEndEntry
*
pEntry
=
pLineEndList
->
GetLineEnd
(
nId
/
2
-
2
);
const
XLineEndEntry
*
pEntry
=
m
pLineEndList
->
GetLineEnd
(
nId
/
2
-
2
);
pLineEndItem
.
reset
(
new
XLineEndItem
(
pEntry
->
GetName
(),
pEntry
->
GetLineEnd
()));
}
...
...
@@ -346,7 +346,7 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, void)
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
while in Dispatch()), accessing members will crash in this case. */
a
LineEndSet
->
SetNoSelection
();
mp
LineEndSet
->
SetNoSelection
();
SfxToolBoxControl
::
Dispatch
(
Reference
<
XDispatchProvider
>
(
mxFrame
->
getController
(),
UNO_QUERY
),
".uno:LineEndStyle"
,
...
...
@@ -356,47 +356,47 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, void)
void
SvxLineEndWindow
::
FillValueSet
()
{
if
(
pLineEndList
.
is
()
)
if
(
m
pLineEndList
.
is
()
)
{
ScopedVclPtrInstance
<
VirtualDevice
>
pVD
;
long
nCount
=
pLineEndList
->
Count
();
long
nCount
=
m
pLineEndList
->
Count
();
// First entry: no line end.
// An entry is temporarly added to get the UI bitmap
basegfx
::
B2DPolyPolygon
aNothing
;
pLineEndList
->
Insert
(
o3tl
::
make_unique
<
XLineEndEntry
>
(
aNothing
,
SVX_RESSTR
(
RID_SVXSTR_NONE
)));
const
XLineEndEntry
*
pEntry
=
pLineEndList
->
GetLineEnd
(
nCount
);
Bitmap
aBmp
=
pLineEndList
->
GetUiBitmap
(
nCount
);
m
pLineEndList
->
Insert
(
o3tl
::
make_unique
<
XLineEndEntry
>
(
aNothing
,
SVX_RESSTR
(
RID_SVXSTR_NONE
)));
const
XLineEndEntry
*
pEntry
=
m
pLineEndList
->
GetLineEnd
(
nCount
);
Bitmap
aBmp
=
m
pLineEndList
->
GetUiBitmap
(
nCount
);
OSL_ENSURE
(
!
aBmp
.
IsEmpty
(),
"UI bitmap was not created"
);
aBmpSize
=
aBmp
.
GetSizePixel
();
pVD
->
SetOutputSizePixel
(
aBmpSize
,
false
);
aBmpSize
.
Width
()
=
aBmpSize
.
Width
()
/
2
;
m
aBmpSize
=
aBmp
.
GetSizePixel
();
pVD
->
SetOutputSizePixel
(
m
aBmpSize
,
false
);
maBmpSize
.
Width
()
=
m
aBmpSize
.
Width
()
/
2
;
Point
aPt0
(
0
,
0
);
Point
aPt1
(
aBmpSize
.
Width
(),
0
);
Point
aPt1
(
m
aBmpSize
.
Width
(),
0
);
pVD
->
DrawBitmap
(
Point
(),
aBmp
);
aLineEndSet
->
InsertItem
(
1
,
Image
(
pVD
->
GetBitmap
(
aPt0
,
aBmpSize
)),
pEntry
->
GetName
());
aLineEndSet
->
InsertItem
(
2
,
Image
(
pVD
->
GetBitmap
(
aPt1
,
aBmpSize
)),
pEntry
->
GetName
());
mpLineEndSet
->
InsertItem
(
1
,
Image
(
pVD
->
GetBitmap
(
aPt0
,
m
aBmpSize
)),
pEntry
->
GetName
());
mpLineEndSet
->
InsertItem
(
2
,
Image
(
pVD
->
GetBitmap
(
aPt1
,
m
aBmpSize
)),
pEntry
->
GetName
());
pLineEndList
->
Remove
(
nCount
);
m
pLineEndList
->
Remove
(
nCount
);
for
(
long
i
=
0
;
i
<
nCount
;
i
++
)
{
pEntry
=
pLineEndList
->
GetLineEnd
(
i
);
pEntry
=
m
pLineEndList
->
GetLineEnd
(
i
);
DBG_ASSERT
(
pEntry
,
"Could not access LineEndEntry"
);
aBmp
=
pLineEndList
->
GetUiBitmap
(
i
);
aBmp
=
m
pLineEndList
->
GetUiBitmap
(
i
);
OSL_ENSURE
(
!
aBmp
.
IsEmpty
(),
"UI bitmap was not created"
);
pVD
->
DrawBitmap
(
aPt0
,
aBmp
);
a
LineEndSet
->
InsertItem
((
sal_uInt16
)((
i
+
1L
)
*
2L
+
1L
),
Image
(
pVD
->
GetBitmap
(
aPt0
,
aBmpSize
)),
pEntry
->
GetName
());
a
LineEndSet
->
InsertItem
((
sal_uInt16
)((
i
+
2L
)
*
2L
),
Image
(
pVD
->
GetBitmap
(
aPt1
,
aBmpSize
)),
pEntry
->
GetName
());
mp
LineEndSet
->
InsertItem
((
sal_uInt16
)((
i
+
1L
)
*
2L
+
1L
),
Image
(
pVD
->
GetBitmap
(
aPt0
,
m
aBmpSize
)),
pEntry
->
GetName
());
mp
LineEndSet
->
InsertItem
((
sal_uInt16
)((
i
+
2L
)
*
2L
),
Image
(
pVD
->
GetBitmap
(
aPt1
,
m
aBmpSize
)),
pEntry
->
GetName
());
}
nLines
=
std
::
min
(
(
sal_uInt16
)(
nCount
+
1
),
(
sal_uInt16
)
MAX_LINES
);
aLineEndSet
->
SetLineCount
(
nLines
);
m
nLines
=
std
::
min
(
(
sal_uInt16
)(
nCount
+
1
),
(
sal_uInt16
)
MAX_LINES
);
mpLineEndSet
->
SetLineCount
(
m
nLines
);
SetSize
();
}
...
...
@@ -404,7 +404,7 @@ void SvxLineEndWindow::FillValueSet()
void
SvxLineEndWindow
::
StartSelection
()
{
a
LineEndSet
->
StartSelection
();
mp
LineEndSet
->
StartSelection
();
}
...
...
@@ -416,10 +416,10 @@ void SvxLineEndWindow::statusChanged( const css::frame::FeatureStateEvent& rEven
css
::
uno
::
Reference
<
css
::
uno
::
XWeak
>
xWeak
;
if
(
rEvent
.
State
>>=
xWeak
)
{
pLineEndList
.
set
(
static_cast
<
XLineEndList
*
>
(
xWeak
.
get
()
)
);
DBG_ASSERT
(
pLineEndList
.
is
(),
"LineEndList not found"
);
m
pLineEndList
.
set
(
static_cast
<
XLineEndList
*
>
(
xWeak
.
get
()
)
);
DBG_ASSERT
(
m
pLineEndList
.
is
(),
"LineEndList not found"
);
a
LineEndSet
->
Clear
();
mp
LineEndSet
->
Clear
();
FillValueSet
();
}
}
...
...
@@ -427,21 +427,21 @@ void SvxLineEndWindow::statusChanged( const css::frame::FeatureStateEvent& rEven
void
SvxLineEndWindow
::
SetSize
()
{
sal_uInt16
nItemCount
=
a
LineEndSet
->
GetItemCount
();
sal_uInt16
nMaxLines
=
nItemCount
/
nCols
;
sal_uInt16
nItemCount
=
mp
LineEndSet
->
GetItemCount
();
sal_uInt16
nMaxLines
=
nItemCount
/
m
nCols
;
WinBits
nBits
=
a
LineEndSet
->
GetStyle
();
if
(
nLines
==
nMaxLines
)
WinBits
nBits
=
mp
LineEndSet
->
GetStyle
();
if
(
m
nLines
==
nMaxLines
)
nBits
&=
~
WB_VSCROLL
;
else
nBits
|=
WB_VSCROLL
;
a
LineEndSet
->
SetStyle
(
nBits
);
mp
LineEndSet
->
SetStyle
(
nBits
);
Size
aSize
(
aBmpSize
);
Size
aSize
(
m
aBmpSize
);
aSize
.
Width
()
+=
6
;
aSize
.
Height
()
+=
6
;
aSize
=
a
LineEndSet
->
CalcWindowSizePixel
(
aSize
);
a
LineEndSet
->
SetPosSizePixel
(
Point
(
2
,
2
),
aSize
);
aSize
=
mp
LineEndSet
->
CalcWindowSizePixel
(
aSize
);
mp
LineEndSet
->
SetPosSizePixel
(
Point
(
2
,
2
),
aSize
);
aSize
.
Width
()
+=
4
;
aSize
.
Height
()
+=
4
;
SetOutputSizePixel
(
aSize
);
...
...
@@ -452,8 +452,8 @@ void SvxLineEndWindow::GetFocus()
SfxPopupWindow
::
GetFocus
();
// Grab the focus to the line ends value set so that it can be controlled
// with the keyboard.
if
(
a
LineEndSet
)
a
LineEndSet
->
GrabFocus
();
if
(
mp
LineEndSet
)
mp
LineEndSet
->
GrabFocus
();
}
SvxLineEndToolBoxControl
::
SvxLineEndToolBoxControl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
)
:
...
...
This diff is collapsed.
Click to expand it.
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