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
08159967
Kaydet (Commit)
08159967
authored
May 27, 2013
tarafından
Andre Fischer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
122387: Use the right tool box for font color in text sidebar.
üst
6cac4f8a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
3 deletions
+52
-3
EnumContext.hxx
sfx2/inc/sfx2/sidebar/EnumContext.hxx
+1
-0
EnumContext.cxx
sfx2/source/sidebar/EnumContext.cxx
+8
-0
TextPropertyPanel.cxx
svx/source/sidebar/text/TextPropertyPanel.cxx
+34
-3
TextPropertyPanel.hxx
svx/source/sidebar/text/TextPropertyPanel.hxx
+9
-0
No files found.
sfx2/inc/sfx2/sidebar/EnumContext.hxx
Dosyayı görüntüle @
08159967
...
...
@@ -133,6 +133,7 @@ public:
Application
GetApplication_DI
(
void
)
const
;
const
::
rtl
::
OUString
&
GetContextName
(
void
)
const
;
Context
GetContext
(
void
)
const
;
bool
operator
==
(
const
EnumContext
aOther
);
bool
operator
!=
(
const
EnumContext
aOther
);
...
...
sfx2/source/sidebar/EnumContext.cxx
Dosyayı görüntüle @
08159967
...
...
@@ -142,6 +142,14 @@ const ::rtl::OUString& EnumContext::GetContextName (void) const
EnumContext
::
Context
EnumContext
::
GetContext
(
void
)
const
{
return
meContext
;
}
bool
EnumContext
::
operator
==
(
const
EnumContext
aOther
)
{
return
meApplication
==
aOther
.
meApplication
...
...
svx/source/sidebar/text/TextPropertyPanel.cxx
Dosyayı görüntüle @
08159967
...
...
@@ -161,9 +161,12 @@ TextPropertyPanel::TextPropertyPanel (
mpToolBoxFontColorBackground
(
ControlFactory
::
CreateToolBoxBackground
(
this
)),
mpToolBoxFontColor
(
ControlFactory
::
CreateToolBox
(
mpToolBoxFontColorBackground
.
get
(),
rContext
.
GetApplication_DI
()
==
sfx2
::
sidebar
::
EnumContext
::
Application_WriterVariants
?
SVX_RES
(
TB_FONTCOLOR_SW
)
:
SVX_RES
(
TB_FONTCOLOR
),
SVX_RES
(
TB_FONTCOLOR
),
rxFrame
)),
mpToolBoxFontColorBackgroundSW
(
ControlFactory
::
CreateToolBoxBackground
(
this
)),
mpToolBoxFontColorSW
(
ControlFactory
::
CreateToolBox
(
mpToolBoxFontColorBackgroundSW
.
get
(),
SVX_RES
(
TB_FONTCOLOR_SW
),
rxFrame
)),
mpToolBoxHighlightBackground
(
ControlFactory
::
CreateToolBoxBackground
(
this
)),
mpToolBoxHighlight
(
ControlFactory
::
CreateToolBox
(
...
...
@@ -199,6 +202,8 @@ TextPropertyPanel::TextPropertyPanel (
Initialize
();
FreeResource
();
UpdateFontColorToolbox
(
rContext
);
}
...
...
@@ -213,6 +218,7 @@ TextPropertyPanel::~TextPropertyPanel (void)
mpToolBoxIncDec
.
reset
();
mpToolBoxFont
.
reset
();
mpToolBoxFontColor
.
reset
();
mpToolBoxFontColorSW
.
reset
();
mpToolBoxScript
.
reset
();
mpToolBoxScriptSw
.
reset
();
mpToolBoxSpacing
.
reset
();
...
...
@@ -222,6 +228,7 @@ TextPropertyPanel::~TextPropertyPanel (void)
mpToolBoxIncDecBackground
.
reset
();
mpToolBoxFontBackground
.
reset
();
mpToolBoxFontColorBackground
.
reset
();
mpToolBoxFontColorBackgroundSW
.
reset
();
mpToolBoxScriptBackground
.
reset
();
mpToolBoxScriptSwBackground
.
reset
();
mpToolBoxSpacingBackground
.
reset
();
...
...
@@ -297,6 +304,30 @@ void TextPropertyPanel::HandleContextChange (
default
:
break
;
}
UpdateFontColorToolbox
(
aContext
);
}
void
TextPropertyPanel
::
UpdateFontColorToolbox
(
const
::
sfx2
::
sidebar
::
EnumContext
aContext
)
{
bool
bIsWriterFontColor
(
false
);
if
(
maContext
.
GetApplication_DI
()
==
sfx2
::
sidebar
::
EnumContext
::
Application_WriterVariants
)
if
(
maContext
.
GetContext
()
!=
sfx2
::
sidebar
::
EnumContext
::
Context_DrawText
)
bIsWriterFontColor
=
true
;
if
(
bIsWriterFontColor
)
{
mpToolBoxFontColor
->
Hide
();
mpToolBoxFontColorSW
->
Show
();
}
else
{
mpToolBoxFontColor
->
Show
();
mpToolBoxFontColorSW
->
Hide
();
}
}
...
...
svx/source/sidebar/text/TextPropertyPanel.hxx
Dosyayı görüntüle @
08159967
...
...
@@ -101,6 +101,8 @@ private:
::
boost
::
scoped_ptr
<
ToolBox
>
mpToolBoxSpacing
;
::
boost
::
scoped_ptr
<
Window
>
mpToolBoxFontColorBackground
;
::
boost
::
scoped_ptr
<
ToolBox
>
mpToolBoxFontColor
;
::
boost
::
scoped_ptr
<
Window
>
mpToolBoxFontColorBackgroundSW
;
::
boost
::
scoped_ptr
<
ToolBox
>
mpToolBoxFontColorSW
;
::
boost
::
scoped_ptr
<
Window
>
mpToolBoxHighlightBackground
;
::
boost
::
scoped_ptr
<
ToolBox
>
mpToolBoxHighlight
;
::
boost
::
scoped_ptr
<
ToolboxButtonColorUpdater
>
mpFontColorUpdater
;
...
...
@@ -177,6 +179,13 @@ private:
DECL_LINK
(
ToolBoxScriptSelectHdl
,
ToolBox
*
);
void
UpdateItem
(
const
sal_uInt16
nSlotId
);
/** Depending on the given context make one of the toolboxes
mpToolBoxFontColor and mpToolBoxFontColorSW visible. Both
occupy the same space.
*/
void
UpdateFontColorToolbox
(
const
::
sfx2
::
sidebar
::
EnumContext
aContext
);
};
}
}
// end of namespace ::svx::sidebar
...
...
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