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
731a562f
Kaydet (Commit)
731a562f
authored
Eyl 12, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
start of embedding check-button & cui code cleanup
üst
9f397368
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
24 deletions
+85
-24
cuitabarea.hxx
cui/source/inc/cuitabarea.hxx
+17
-3
tpcolor.cxx
cui/source/tabpages/tpcolor.cxx
+68
-21
No files found.
cui/source/inc/cuitabarea.hxx
Dosyayı görüntüle @
731a562f
...
...
@@ -641,9 +641,25 @@ public:
virtual
Window
*
GetParentLabeledBy
(
const
Window
*
pLabeled
)
const
;
};
// Load save embed functionality
class
SvxLoadSaveEmbed
{
Window
*
pTopDlg
;
CheckBox
aBoxEmbed
;
DECL_LINK
(
EmbedToggleHdl_Impl
,
void
*
);
public
:
// FIXME: privatise these members ...
ImageButton
aBtnLoad
;
ImageButton
aBtnSave
;
SvxLoadSaveEmbed
(
Window
*
pParent
,
const
ResId
&
aLoad
,
const
ResId
&
aSave
,
const
ResId
&
aEmbed
);
XPropertyList
*
GetList
();
void
HideLoadSaveEmbed
();
bool
GetEmbed
();
void
SetEmbed
(
bool
bEmbed
);
};
/************************************************************************/
class
SvxColorTabPage
:
public
SfxTabPage
class
SvxColorTabPage
:
public
SfxTabPage
,
public
SvxLoadSaveEmbed
{
using
TabPage
::
ActivatePage
;
using
TabPage
::
DeactivatePage
;
...
...
@@ -676,8 +692,6 @@ private:
PushButton
aBtnModify
;
PushButton
aBtnWorkOn
;
PushButton
aBtnDelete
;
ImageButton
aBtnLoad
;
ImageButton
aBtnSave
;
const
SfxItemSet
&
rOutAttrs
;
...
...
cui/source/tabpages/tpcolor.cxx
Dosyayı görüntüle @
731a562f
...
...
@@ -55,12 +55,6 @@
#define DLGWIN GetParentDialog( this )
/*************************************************************************
|*
|* Dialog zum Aendern und Definieren der Farben
|*
\************************************************************************/
static
Window
*
GetParentDialog
(
Window
*
pWindow
)
{
while
(
pWindow
)
...
...
@@ -74,6 +68,66 @@ static Window* GetParentDialog( Window* pWindow )
return
pWindow
;
}
// Load save embed functionality
SvxLoadSaveEmbed
::
SvxLoadSaveEmbed
(
Window
*
pParent
,
const
ResId
&
rLoad
,
const
ResId
&
rSave
,
const
ResId
&
rEmbed
)
:
pTopDlg
(
GetParentDialog
(
pParent
)
)
,
aBoxEmbed
(
pParent
,
rEmbed
)
,
aBtnLoad
(
pParent
,
rLoad
)
,
aBtnSave
(
pParent
,
rSave
)
{
aBoxEmbed
.
SetToggleHdl
(
LINK
(
this
,
SvxLoadSaveEmbed
,
EmbedToggleHdl_Impl
)
);
SetEmbed
(
GetEmbed
()
);
}
XPropertyList
*
SvxLoadSaveEmbed
::
GetList
()
{
SvxAreaTabDialog
*
pArea
=
dynamic_cast
<
SvxAreaTabDialog
*
>
(
pTopDlg
);
SvxLineTabDialog
*
pLine
=
dynamic_cast
<
SvxLineTabDialog
*
>
(
pTopDlg
);
const
XPropertyList
*
pList
=
NULL
;
if
(
pArea
)
pList
=
pArea
->
GetNewColorTable
();
if
(
pLine
)
pList
=
pLine
->
GetNewColorTable
();
if
(
!
pList
)
{
if
(
pArea
)
pList
=
pArea
->
GetColorTable
();
if
(
pLine
)
pList
=
pLine
->
GetColorTable
();
}
return
const_cast
<
XPropertyList
*>
(
pList
);
}
void
SvxLoadSaveEmbed
::
SetEmbed
(
bool
bEmbed
)
{
XPropertyList
*
pList
=
GetList
();
if
(
pList
)
pList
->
SetEmbedInDocument
(
bEmbed
);
aBoxEmbed
.
Check
(
bEmbed
);
}
bool
SvxLoadSaveEmbed
::
GetEmbed
()
{
XPropertyList
*
pList
=
GetList
();
return
pList
?
pList
->
IsEmbedInDocument
()
:
0
;
}
IMPL_LINK
(
SvxLoadSaveEmbed
,
EmbedToggleHdl_Impl
,
void
*
,
EMPTYARG
)
{
SetEmbed
(
aBoxEmbed
.
IsChecked
()
);
return
0
;
}
void
SvxLoadSaveEmbed
::
HideLoadSaveEmbed
()
{
aBtnLoad
.
Hide
();
aBtnSave
.
Hide
();
aBoxEmbed
.
Hide
();
}
SvxColorTabPage
::
SvxColorTabPage
(
Window
*
pParent
,
...
...
@@ -81,6 +135,8 @@ SvxColorTabPage::SvxColorTabPage
)
:
SfxTabPage
(
pParent
,
CUI_RES
(
RID_SVXPAGE_COLOR
),
rInAttrs
),
SvxLoadSaveEmbed
(
this
,
CUI_RES
(
BTN_LOAD
),
CUI_RES
(
BTN_SAVE
),
CUI_RES
(
BTN_EMBED
)
),
aFlProp
(
this
,
CUI_RES
(
FL_PROP
)
),
aFtName
(
this
,
CUI_RES
(
FT_NAME
)
),
...
...
@@ -107,8 +163,6 @@ SvxColorTabPage::SvxColorTabPage
aBtnModify
(
this
,
CUI_RES
(
BTN_MODIFY
)
),
aBtnWorkOn
(
this
,
CUI_RES
(
BTN_WORK_ON
)
),
aBtnDelete
(
this
,
CUI_RES
(
BTN_DELETE
)
),
aBtnLoad
(
this
,
CUI_RES
(
BTN_LOAD
)
),
aBtnSave
(
this
,
CUI_RES
(
BTN_SAVE
)
),
rOutAttrs
(
rInAttrs
),
pColorTab
(
NULL
),
...
...
@@ -250,15 +304,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
}
}
else
{
// Buttons werden gehided, weil Paletten z.Z. nur
// ueber den AreaDlg funktionieren!!!
// ActivatePage() muss von anderen Dialogen explizit
// gerufen werden, da ActivatePage() nicht gerufen wird,
// wenn Seite als Erste im Dialog angezeigt wird
aBtnLoad
.
Hide
();
aBtnSave
.
Hide
();
}
HideLoadSaveEmbed
();
}
// -----------------------------------------------------------------------
...
...
@@ -761,19 +807,19 @@ IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
if
(
pColTab
->
Load
()
)
{
// Pruefen, ob Tabelle geloescht werden darf:
const
XColorList
*
pTemp
Table
=
0
;
const
XColorList
*
pTemp
List
=
0
;
SvxAreaTabDialog
*
pArea
=
dynamic_cast
<
SvxAreaTabDialog
*
>
(
DLGWIN
);
SvxLineTabDialog
*
pLine
=
dynamic_cast
<
SvxLineTabDialog
*
>
(
DLGWIN
);
if
(
pArea
)
{
pTemp
Table
=
pArea
->
GetColorTable
();
pTemp
List
=
pArea
->
GetColorTable
();
}
else
if
(
pLine
)
{
pTemp
Table
=
pLine
->
GetColorTable
();
pTemp
List
=
pLine
->
GetColorTable
();
}
if
(
pColorTab
!=
pTemp
Table
)
if
(
pColorTab
!=
pTemp
List
)
{
if
(
bDeleteColorTable
)
delete
pColorTab
;
...
...
@@ -825,6 +871,7 @@ IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
ChangeColorHdl_Impl
(
this
);
SelectColorLBHdl_Impl
(
this
);
SetEmbed
(
true
);
}
else
{
...
...
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