summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-06-02 02:10:34 +0200
committerJan Holesovsky <kendy@suse.cz>2013-06-02 04:54:55 +0200
commit415b70061036e67e00786836856f7eeda8cea938 (patch)
tree2fb1b5146a2d01017d51f320cb6927af28d9971c
parent0e81c49f49a58efdd69f8072b8d3df235753a847 (diff)
sidebar: Convert TextPropertyPanel to .ui + adapt code.
Change-Id: I1e446ca520b10f0fba4f79d2e840d10835850f66
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/source/sidebar/text/SvxSBFontNameBox.cxx16
-rw-r--r--svx/source/sidebar/text/SvxSBFontNameBox.hxx3
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx482
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.hrc26
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.hxx34
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.src249
-rw-r--r--svx/uiconfig/ui/sidebartextpanel.ui341
8 files changed, 588 insertions, 564 deletions
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 75d0e677a0b7..9e3c2cf85fd3 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinefilterpage \
svx/uiconfig/ui/redlineviewpage \
+ svx/uiconfig/ui/sidebartextpanel \
))
# vim: set noet sw=4 ts=4:
diff --git a/svx/source/sidebar/text/SvxSBFontNameBox.cxx b/svx/source/sidebar/text/SvxSBFontNameBox.cxx
index 11376179b329..f5ca5c38cda8 100644
--- a/svx/source/sidebar/text/SvxSBFontNameBox.cxx
+++ b/svx/source/sidebar/text/SvxSBFontNameBox.cxx
@@ -93,6 +93,22 @@ SvxSBFontNameBox::SvxSBFontNameBox( Window* pParent, const ResId& rResId ) :
// StartListening( *SFX_APP() );
}
+SvxSBFontNameBox::SvxSBFontNameBox( Window* pParent ) :
+ FontNameBox ( pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|WB_DROPDOWN )
+, pFontList ( NULL )
+, nFtCount ( 0 )
+, pBindings(NULL)
+{
+ EnableControls_Impl();
+ EnableAutoSize(true);
+// StartListening( *SFX_APP() );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxSBFontNameBox(Window *pParent)
+{
+ return new SvxSBFontNameBox(pParent);
+}
+
void SvxSBFontNameBox::EnableControls_Impl()
{
SvtFontOptions aFontOpt;
diff --git a/svx/source/sidebar/text/SvxSBFontNameBox.hxx b/svx/source/sidebar/text/SvxSBFontNameBox.hxx
index 82289e3644ac..7470f06d55e0 100644
--- a/svx/source/sidebar/text/SvxSBFontNameBox.hxx
+++ b/svx/source/sidebar/text/SvxSBFontNameBox.hxx
@@ -58,7 +58,8 @@ protected:
virtual void Select();
public:
- SvxSBFontNameBox( Window* pParent, const ResId& rResId );
+ SvxSBFontNameBox( Window* pParent, const ResId& rResId );
+ SvxSBFontNameBox( Window* pParent );
void FillList();
sal_uInt16 GetListCount() { return nFtCount; }
void Clear() { FontNameBox::Clear(); nFtCount = 0; }
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 258a730ac6dc..abb05a526404 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -63,6 +63,20 @@ using namespace cssu;
using ::sfx2::sidebar::Theme;
using ::sfx2::sidebar::ControlFactory;
+const char UNO_BACKCOLOR[] = ".uno:BackColor";
+const char UNO_BOLD[] = ".uno:Bold";
+const char UNO_COLOR[] = ".uno:Color";
+const char UNO_FONTCOLOR[] = ".uno:FontColor";
+const char UNO_GROW[] = ".uno:Grow";
+const char UNO_ITALIC[] = ".uno:Italic";
+const char UNO_STRIKEOUT[] = ".uno:Strikeout";
+const char UNO_SHADOWED[] = ".uno:Shadowed";
+const char UNO_SHRINK[] = ".uno:Shrink";
+const char UNO_SPACING[] = ".uno:Spacing";
+const char UNO_SUBSCRIPT[] = ".uno:SubScript";
+const char UNO_SUPERSCRIPT[] = ".uno:SuperScript";
+const char UNO_UNDERLINE[] = ".uno:Underline";
+
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace svx { namespace sidebar {
@@ -116,52 +130,8 @@ TextPropertyPanel* TextPropertyPanel::Create (
return maSpacingControl;
}
-TextPropertyPanel::TextPropertyPanel (
- Window* pParent,
- const cssu::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings,
- const ::sfx2::sidebar::EnumContext& rContext)
- : Control(pParent, SVX_RES(RID_SIDEBAR_TEXT_PANEL)),
- mpFontNameBox (new SvxSBFontNameBox(this, SVX_RES(CB_SBFONT_FONT))),
- maFontSizeBox (this, SVX_RES(MB_SBFONT_FONTSIZE)),
- mpToolBoxFontBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxFont(ControlFactory::CreateToolBox(
- mpToolBoxFontBackground.get(),
- SVX_RES(TB_FONT))),
- mpToolBoxIncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxIncDec(ControlFactory::CreateToolBox(
- mpToolBoxIncDecBackground.get(),
- SVX_RES(TB_INCREASE_DECREASE))),
- mpToolBoxScriptBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxScript(ControlFactory::CreateToolBox(
- mpToolBoxScriptBackground.get(),
- SVX_RES(TB_SCRIPT))),
- mpToolBoxScriptSwBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxScriptSw(ControlFactory::CreateToolBox(
- mpToolBoxScriptSwBackground.get(),
- SVX_RES(TB_SCRIPT_SW))),
- mpToolBoxSpacingBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxSpacing(ControlFactory::CreateToolBox(
- mpToolBoxSpacingBackground.get(),
- SVX_RES(TB_SPACING))),
- mpToolBoxFontColorBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxFontColor(ControlFactory::CreateToolBox(
- mpToolBoxFontColorBackground.get(),
- 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(
- mpToolBoxHighlightBackground.get(),
- SVX_RES(TB_HIGHLIGHT),
- rxFrame)),
- mpFontColorUpdater(),
- mpHighlightUpdater(),
-
+TextPropertyPanel::TextPropertyPanel ( Window* pParent, const cssu::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings, const ::sfx2::sidebar::EnumContext& rContext )
+ : PanelLayout(pParent, "SidebarTextPanel", "svx/ui/sidebartextpanel.ui", rxFrame),
maFontNameControl (SID_ATTR_CHAR_FONT, *pBindings, *this, A2S("CharFontName"), rxFrame),
maFontSizeControl (SID_ATTR_CHAR_FONTHEIGHT, *pBindings, *this, A2S("FontHeight"), rxFrame),
maWeightControl (SID_ATTR_CHAR_WEIGHT, *pBindings, *this, A2S("Bold"), rxFrame),
@@ -182,13 +152,18 @@ TextPropertyPanel::TextPropertyPanel (
maCharSpacePopup(this, ::boost::bind(&TextPropertyPanel::CreateCharacterSpacingControl, this, _1)),
maUnderlinePopup(this, ::boost::bind(&TextPropertyPanel::CreateUnderlinePopupControl, this, _1)),
- mxFrame(rxFrame),
maContext(),
mpBindings(pBindings)
{
- Initialize();
+ get(mpFontNameBox, "font");
+ get(mpFontSizeBox, "fontsize");
+ get(mpToolBoxFont, "fonteffects");
+ get(mpToolBoxIncDec, "fontadjust");
+ get(mpToolBoxScript, "position");
+ get(mpToolBoxSpacing, "spacingbar");
+ get(mpToolBoxFontColor, "colorbar");
- FreeResource();
+ Initialize();
UpdateFontColorToolbox(rContext);
}
@@ -200,26 +175,6 @@ TextPropertyPanel::~TextPropertyPanel (void)
{
if(mbMustDelete)
delete mpFontList;
-
- // Destroy the toolbox windows.
- mpToolBoxIncDec.reset();
- mpToolBoxFont.reset();
- mpToolBoxFontColor.reset();
- mpToolBoxFontColorSW.reset();
- mpToolBoxScript.reset();
- mpToolBoxScriptSw.reset();
- mpToolBoxSpacing.reset();
- mpToolBoxHighlight.reset();
-
- // Destroy the background windows of the toolboxes.
- mpToolBoxIncDecBackground.reset();
- mpToolBoxFontBackground.reset();
- mpToolBoxFontColorBackground.reset();
- mpToolBoxFontColorBackgroundSW.reset();
- mpToolBoxScriptBackground.reset();
- mpToolBoxScriptSwBackground.reset();
- mpToolBoxSpacingBackground.reset();
- mpToolBoxHighlightBackground.reset();
}
@@ -245,34 +200,30 @@ void TextPropertyPanel::HandleContextChange (
{
case CombinedEnumContext(Application_Calc, Context_Cell):
case CombinedEnumContext(Application_Calc, Context_Pivot):
- mpToolBoxScriptSw->Hide();
- mpToolBoxHighlight->Hide();
+ mpToolBoxFontColor->HideItem(mpToolBoxFontColor->GetItemId(UNO_BACKCOLOR));
mpToolBoxScript->Disable();
mpToolBoxSpacing->Disable();
break;
case CombinedEnumContext(Application_Calc, Context_EditCell):
case CombinedEnumContext(Application_Calc, Context_DrawText):
- mpToolBoxScriptSw->Hide();
- mpToolBoxHighlight->Hide();
+ mpToolBoxFontColor->HideItem(mpToolBoxFontColor->GetItemId(UNO_BACKCOLOR));
mpToolBoxScript->Enable();
mpToolBoxSpacing->Enable();
break;
case CombinedEnumContext(Application_WriterVariants, Context_Text):
case CombinedEnumContext(Application_WriterVariants, Context_Table):
- mpToolBoxScriptSw->Show();
- mpToolBoxScript->Hide();
- mpToolBoxHighlight->Show();
+ mpToolBoxFontColor->ShowItem(mpToolBoxFontColor->GetItemId(UNO_BACKCOLOR));
+ mpToolBoxScript->Enable();
mpToolBoxSpacing->Show();
break;
case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
- mpToolBoxScriptSw->Show();
- mpToolBoxScript->Hide();
+ mpToolBoxFontColor->HideItem(mpToolBoxFontColor->GetItemId(UNO_BACKCOLOR));
+ mpToolBoxScript->Enable();
mpToolBoxSpacing->Show();
- mpToolBoxHighlight->Hide();
break;
case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
@@ -282,10 +233,9 @@ void TextPropertyPanel::HandleContextChange (
case CombinedEnumContext(Application_DrawImpress, Context_Draw):
case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
- mpToolBoxScriptSw->Hide();
- mpToolBoxScript->Show();
+ mpToolBoxFontColor->HideItem(mpToolBoxFontColor->GetItemId(UNO_BACKCOLOR));
+ mpToolBoxScript->Enable();
mpToolBoxSpacing->Show();
- mpToolBoxHighlight->Hide();
break;
default:
@@ -307,13 +257,13 @@ void TextPropertyPanel::UpdateFontColorToolbox (
bIsWriterFontColor = true;
if (bIsWriterFontColor)
{
- mpToolBoxFontColor->Hide();
- mpToolBoxFontColorSW->Show();
+ mpToolBoxFontColor->HideItem(mpToolBoxFontColor->GetItemId(UNO_COLOR));
+ mpToolBoxFontColor->ShowItem(mpToolBoxFontColor->GetItemId(UNO_FONTCOLOR));
}
else
{
- mpToolBoxFontColor->Show();
- mpToolBoxFontColorSW->Hide();
+ mpToolBoxFontColor->ShowItem(mpToolBoxFontColor->GetItemId(UNO_COLOR));
+ mpToolBoxFontColor->HideItem(mpToolBoxFontColor->GetItemId(UNO_FONTCOLOR));
}
}
@@ -348,8 +298,8 @@ void TextPropertyPanel::Initialize (void)
mpFontNameBox->SetAccessibleName(mpFontNameBox->GetQuickHelpText());
const FontInfo aFontInfo (mpFontList->Get( OUString( "" ), OUString( "" )));
- maFontSizeBox.Fill(&aFontInfo,mpFontList);
- maFontSizeBox.SetAccessibleName(maFontSizeBox.GetQuickHelpText());
+ mpFontSizeBox->Fill(&aFontInfo,mpFontList);
+ mpFontSizeBox->SetAccessibleName(mpFontSizeBox->GetQuickHelpText());
//toolbox
SetupToolboxItems();
@@ -359,17 +309,15 @@ void TextPropertyPanel::Initialize (void)
InitToolBoxSpacing();
#ifdef HAS_IA2
- mpFontNameBox->SetAccRelationLabeledBy(&mpFontNameBox);
- mpFontNameBox->SetMpSubEditAccLableBy(&mpFontNameBox);
- maFontSizeBox.SetAccRelationLabeledBy(&maFontSizeBox);
- maFontSizeBox.SetMpSubEditAccLableBy(&maFontSizeBox);
- mpToolBoxFont.SetAccRelationLabeledBy(&mpToolBoxFont);
- mpToolBoxIncDec.SetAccRelationLabeledBy(&mpToolBoxIncDec);
- mpToolBoxFontColor.SetAccRelationLabeledBy(&mpToolBoxFontColor);
- mpToolBoxScript.SetAccRelationLabeledBy(&mpToolBoxScript);
- mpToolBoxScriptSw.SetAccRelationLabeledBy(&mpToolBoxScriptSw);
- mpToolBoxSpacing.SetAccRelationLabeledBy(&mpToolBoxSpacing);
- mpToolBoxHighlight.SetAccRelationLabeledBy(&mpToolBoxHighlight);
+ mpFontNameBox->SetAccRelationLabeledBy(mpFontNameBox);
+ mpFontNameBox->SetMpSubEditAccLableBy(mpFontNameBox);
+ mpFontSizeBox->SetAccRelationLabeledBy(mpFontSizeBox);
+ mpFontSizeBox->SetMpSubEditAccLableBy(mpFontSizeBox);
+ mpToolBoxFont->SetAccRelationLabeledBy(mpToolBoxFont);
+ mpToolBoxIncDec->SetAccRelationLabeledBy(mpToolBoxIncDec);
+ mpToolBoxFontColor->SetAccRelationLabeledBy(mpToolBoxFontColor);
+ mpToolBoxScriptSetAccRelationLabeledBy(mpToolBoxScript);
+ mpToolBoxSpacing->SetAccRelationLabeledBy(mpToolBoxSpacing);
#endif
//init state
@@ -394,11 +342,11 @@ void TextPropertyPanel::Initialize (void)
Link aLink = LINK(this, TextPropertyPanel, FontSelHdl);
mpFontNameBox->SetSelectHdl(aLink);
aLink = LINK(this, TextPropertyPanel, FontSizeModifyHdl);
- maFontSizeBox.SetModifyHdl(aLink);
+ mpFontSizeBox->SetModifyHdl(aLink);
aLink = LINK(this, TextPropertyPanel, FontSizeSelHdl);
- maFontSizeBox.SetSelectHdl(aLink);
+ mpFontSizeBox->SetSelectHdl(aLink);
aLink = LINK(this, TextPropertyPanel, FontSizeLoseFocus);
- maFontSizeBox.SetLoseFocusHdl(aLink);
+ mpFontSizeBox->SetLoseFocusHdl(aLink);
}
void TextPropertyPanel::EndSpacingPopupMode (void)
@@ -414,14 +362,9 @@ void TextPropertyPanel::EndUnderlinePopupMode (void)
void TextPropertyPanel::InitToolBoxFont()
{
- mpToolBoxFont->SetBackground(Wallpaper());
- mpToolBoxFont->SetPaintTransparent(true);
-
- Size aTbxSize( mpToolBoxFont->CalcWindowSizePixel() );
- mpToolBoxFont->SetOutputSizePixel( aTbxSize );
-
- Link aLink = LINK(this, TextPropertyPanel, ToolboxFontSelectHandler);
+ Link aLink = LINK(this, TextPropertyPanel, ToolboxFontSelectHandler);
mpToolBoxFont->SetSelectHdl ( aLink );
+
aLink = LINK(this, TextPropertyPanel, ToolBoxUnderlineClickHdl);
mpToolBoxFont->SetDropdownClickHdl(aLink);
}
@@ -431,9 +374,6 @@ void TextPropertyPanel::InitToolBoxFont()
void TextPropertyPanel::InitToolBoxIncDec()
{
- Size aTbxSize( mpToolBoxIncDec->CalcWindowSizePixel() );
- mpToolBoxIncDec->SetOutputSizePixel( aTbxSize );
-
Link aLink = LINK(this, TextPropertyPanel, ToolboxIncDecSelectHdl);
mpToolBoxIncDec->SetSelectHdl ( aLink );
}
@@ -443,23 +383,14 @@ void TextPropertyPanel::InitToolBoxIncDec()
void TextPropertyPanel::InitToolBoxScript()
{
- Size aTbxSize( mpToolBoxScriptSw->CalcWindowSizePixel() );
- mpToolBoxScriptSw->SetOutputSizePixel( aTbxSize );
-
- Link aLink = LINK(this, TextPropertyPanel, ToolBoxSwScriptSelectHdl);
- mpToolBoxScriptSw->SetSelectHdl ( aLink );
-
- aTbxSize = mpToolBoxScript->CalcWindowSizePixel() ;
- mpToolBoxScript->SetOutputSizePixel( aTbxSize );
-
- aLink = LINK(this, TextPropertyPanel, ToolBoxScriptSelectHdl);
+ Link aLink = LINK(this, TextPropertyPanel, ToolBoxScriptSelectHdl);
mpToolBoxScript->SetSelectHdl ( aLink );
}
+
void TextPropertyPanel::InitToolBoxSpacing()
{
- Size aTbxSize( mpToolBoxSpacing->CalcWindowSizePixel() );
- mpToolBoxSpacing->SetOutputSizePixel( aTbxSize );
- mpToolBoxSpacing->SetItemBits( TBI_SPACING, mpToolBoxSpacing->GetItemBits( TBI_SPACING ) | TIB_DROPDOWNONLY );
+ const sal_uInt16 nId = mpToolBoxSpacing->GetItemId(UNO_SPACING);
+ mpToolBoxSpacing->SetItemBits(nId, mpToolBoxSpacing->GetItemBits(nId) | TIB_DROPDOWNONLY);
Link aLink = LINK(this, TextPropertyPanel, SpacingClickHdl);
mpToolBoxSpacing->SetDropdownClickHdl ( aLink );
@@ -471,22 +402,19 @@ void TextPropertyPanel::InitToolBoxSpacing()
void TextPropertyPanel::SetupToolboxItems (void)
{
- maSDFontGrow.SetupToolBoxItem(*mpToolBoxIncDec, TBI_INCREASE);
- maSDFontShrink.SetupToolBoxItem(*mpToolBoxIncDec, TBI_DECREASE);
-
- maWeightControl.SetupToolBoxItem(*mpToolBoxFont, TBI_BOLD);
- maItalicControl.SetupToolBoxItem(*mpToolBoxFont, TBI_ITALIC);
- maUnderlineControl.SetupToolBoxItem(*mpToolBoxFont, TBI_UNDERLINE);
- maStrikeControl.SetupToolBoxItem(*mpToolBoxFont, TBI_STRIKEOUT);
- maShadowControl.SetupToolBoxItem(*mpToolBoxFont, TBI_SHADOWED);
-
- //for sw
- maSuperScriptControl.SetupToolBoxItem(*mpToolBoxScriptSw, TBI_SUPER_SW);
- maSubScriptControl.SetupToolBoxItem(*mpToolBoxScriptSw, TBI_SUB_SW);
- //for sc and sd
- maSuperScriptControl.SetupToolBoxItem(*mpToolBoxScript, TBI_SUPER);
- maSubScriptControl.SetupToolBoxItem(*mpToolBoxScript, TBI_SUB);
- maSpacingControl.SetupToolBoxItem(*mpToolBoxSpacing, TBI_SPACING);
+ maSDFontGrow.SetupToolBoxItem(*mpToolBoxIncDec, mpToolBoxIncDec->GetItemId(UNO_GROW));
+ maSDFontShrink.SetupToolBoxItem(*mpToolBoxIncDec, mpToolBoxIncDec->GetItemId(UNO_SHRINK));
+
+ maWeightControl.SetupToolBoxItem(*mpToolBoxFont, mpToolBoxFont->GetItemId(UNO_BOLD));
+ maItalicControl.SetupToolBoxItem(*mpToolBoxFont, mpToolBoxFont->GetItemId(UNO_ITALIC));
+ maUnderlineControl.SetupToolBoxItem(*mpToolBoxFont, mpToolBoxFont->GetItemId(UNO_UNDERLINE));
+ maStrikeControl.SetupToolBoxItem(*mpToolBoxFont, mpToolBoxFont->GetItemId(UNO_STRIKEOUT));
+ maShadowControl.SetupToolBoxItem(*mpToolBoxFont, mpToolBoxFont->GetItemId(UNO_SHADOWED));
+
+ maSuperScriptControl.SetupToolBoxItem(*mpToolBoxScript, mpToolBoxScript->GetItemId(UNO_SUPERSCRIPT));
+ maSubScriptControl.SetupToolBoxItem(*mpToolBoxScript, mpToolBoxScript->GetItemId(UNO_SUBSCRIPT));
+
+ maSpacingControl.SetupToolBoxItem(*mpToolBoxSpacing, mpToolBoxSpacing->GetItemId(UNO_SPACING));
}
@@ -509,7 +437,7 @@ IMPL_LINK( TextPropertyPanel, FontSelHdl, FontNameBox*, pBox )
IMPL_LINK( TextPropertyPanel, FontSizeModifyHdl, FontSizeBox*, pSizeBox )
{
- if (pSizeBox == &maFontSizeBox)
+ if (pSizeBox == mpFontSizeBox)
{
long nSize = pSizeBox->GetValue();
mbFocusOnFontSizeCtrl = true;
@@ -542,7 +470,7 @@ IMPL_LINK( TextPropertyPanel, FontSizeSelHdl, FontSizeBox*, pSizeBox )
IMPL_LINK(TextPropertyPanel, FontSizeLoseFocus, FontSizeBox*, pSizeBox)
{
- if(pSizeBox == &maFontSizeBox)
+ if(pSizeBox == mpFontSizeBox)
{
mbFocusOnFontSizeCtrl = false;
}
@@ -552,10 +480,9 @@ IMPL_LINK(TextPropertyPanel, FontSizeLoseFocus, FontSizeBox*, pSizeBox)
IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
{
const sal_uInt16 nId = pToolBox->GetCurItemId();
+ const OUString aCommand(pToolBox->GetItemCommand(nId));
- switch (nId)
- {
- case TBI_BOLD:
+ if (aCommand == UNO_BOLD)
{
EndTracking();
if(meWeight != WEIGHT_BOLD)
@@ -565,9 +492,8 @@ IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
SvxWeightItem aWeightItem(meWeight, SID_ATTR_CHAR_WEIGHT);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_WEIGHT, SFX_CALLMODE_RECORD, &aWeightItem, 0L);
UpdateItem(SID_ATTR_CHAR_WEIGHT);
- break;
}
- case TBI_ITALIC:
+ else if (aCommand == UNO_ITALIC)
{
EndTracking();
if(meItalic != ITALIC_NORMAL)
@@ -577,9 +503,8 @@ IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
SvxPostureItem aPostureItem(meItalic, SID_ATTR_CHAR_POSTURE);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_POSTURE, SFX_CALLMODE_RECORD, &aPostureItem, 0L);
UpdateItem(SID_ATTR_CHAR_POSTURE);
- break;
}
- case TBI_UNDERLINE:
+ else if (aCommand == UNO_UNDERLINE)
{
EndTracking();
if(meUnderline == UNDERLINE_NONE)
@@ -596,9 +521,8 @@ IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_UNDERLINE, SFX_CALLMODE_RECORD, &aLineItem, 0L);
}
UpdateItem(SID_ATTR_CHAR_UNDERLINE);
- break;
}
- case TBI_STRIKEOUT:
+ else if (aCommand == UNO_STRIKEOUT)
{
EndTracking();
if(meStrike != STRIKEOUT_NONE && meStrike != STRIKEOUT_DONTKNOW)
@@ -608,18 +532,16 @@ IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
SvxCrossedOutItem aStrikeItem(meStrike,SID_ATTR_CHAR_STRIKEOUT);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_STRIKEOUT, SFX_CALLMODE_RECORD, &aStrikeItem, 0L);
UpdateItem(SID_ATTR_CHAR_STRIKEOUT);
- break;
}
- case TBI_SHADOWED:
+ else if (aCommand == UNO_SHADOWED)
{
EndTracking();
mbShadow = !mbShadow;
SvxShadowedItem aShadowItem(mbShadow, SID_ATTR_CHAR_SHADOWED);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_SHADOWED, SFX_CALLMODE_RECORD, &aShadowItem, 0L);
UpdateItem(SID_ATTR_CHAR_SHADOWED);
- break;
}
- }
+
return 0;
}
@@ -629,6 +551,7 @@ IMPL_LINK(TextPropertyPanel, ToolboxFontSelectHandler, ToolBox*, pToolBox)
IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
{
const sal_uInt16 nId = pToolBox->GetCurItemId();
+ const OUString aCommand(pToolBox->GetItemCommand(nId));
// font size +/- enhancement in sd
switch (maContext.GetCombinedContext_DI())
@@ -640,13 +563,13 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
case CombinedEnumContext(Application_DrawImpress, Context_Draw):
case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
- if(nId == TBI_INCREASE)
+ if(aCommand == UNO_GROW)
{
EndTracking();
SfxVoidItem aItem(SID_GROW_FONT_SIZE);
mpBindings->GetDispatcher()->Execute( SID_GROW_FONT_SIZE, SFX_CALLMODE_RECORD, &aItem, 0L );
}
- else if(nId == TBI_DECREASE)
+ else if(aCommand == UNO_SHRINK)
{
EndTracking();
SfxVoidItem aItem(SID_SHRINK_FONT_SIZE);
@@ -655,15 +578,15 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
break;
default:
- if(nId == TBI_INCREASE)
+ if(aCommand == UNO_GROW)
{
EndTracking();
mbFocusOnFontSizeCtrl = false;
- sal_Int64 iValue = maFontSizeBox.GetValue();
- int iPos = maFontSizeBox.GetValuePos(iValue, FUNIT_NONE);
+ sal_Int64 iValue = mpFontSizeBox->GetValue();
+ int iPos = mpFontSizeBox->GetValuePos(iValue, FUNIT_NONE);
long nSize = iValue;
if(iPos != LISTBOX_ENTRY_NOTFOUND)
- nSize = maFontSizeBox.GetValue(iPos+1 , FUNIT_NONE);
+ nSize = mpFontSizeBox->GetValue(iPos+1 , FUNIT_NONE);
else if(iValue >= 100 && iValue < 105)
nSize = 105;
else if(iValue >= 105 && iValue < 110)
@@ -671,7 +594,7 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
else if(iValue < 960)
{
nSize = (nSize / 10) * 10 + 10;
- while(maFontSizeBox.GetValuePos(nSize, FUNIT_NONE) == LISTBOX_ENTRY_NOTFOUND)
+ while(nSize < 960 && mpFontSizeBox->GetValuePos(nSize, FUNIT_NONE) == LISTBOX_ENTRY_NOTFOUND)
nSize += 10;
}
else
@@ -686,17 +609,17 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
mpBindings->GetDispatcher()->Execute( SID_ATTR_CHAR_FONTHEIGHT, SFX_CALLMODE_RECORD, &aItem, 0L );
mpBindings->Invalidate(SID_ATTR_CHAR_FONTHEIGHT,true,false);
- maFontSizeBox.SetValue( nSize );
+ mpFontSizeBox->SetValue( nSize );
}
- else if(nId == TBI_DECREASE)
+ else if(aCommand == UNO_SHRINK)
{
EndTracking();
mbFocusOnFontSizeCtrl = false;
- sal_Int64 iValue = maFontSizeBox.GetValue();
- int iPos = maFontSizeBox.GetValuePos(iValue, FUNIT_NONE);
+ sal_Int64 iValue = mpFontSizeBox->GetValue();
+ int iPos = mpFontSizeBox->GetValuePos(iValue, FUNIT_NONE);
long nSize = iValue;
if(iPos != LISTBOX_ENTRY_NOTFOUND)
- nSize = maFontSizeBox.GetValue(iPos-1 , FUNIT_NONE);
+ nSize = mpFontSizeBox->GetValue(iPos-1, FUNIT_NONE);
else if(iValue > 100 && iValue <= 105)
nSize = 100;
else if(iValue > 105 && iValue <= 110)
@@ -708,7 +631,7 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
else if(iValue > 60)
{
nSize = (nSize / 10) * 10 ;
- while(maFontSizeBox.GetValuePos(nSize, FUNIT_NONE) == LISTBOX_ENTRY_NOTFOUND)
+ while(nSize > 60 && mpFontSizeBox->GetValuePos(nSize, FUNIT_NONE) == LISTBOX_ENTRY_NOTFOUND)
nSize -= 10;
}
else
@@ -723,7 +646,7 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
mpBindings->GetDispatcher()->Execute( SID_ATTR_CHAR_FONTHEIGHT, SFX_CALLMODE_RECORD, &aItem, 0L );
mpBindings->Invalidate(SID_ATTR_CHAR_FONTHEIGHT,true,false);
- maFontSizeBox.SetValue( nSize );
+ mpFontSizeBox->SetValue( nSize );
}
}
UpdateItem(SID_ATTR_CHAR_FONTHEIGHT);
@@ -736,24 +659,27 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
IMPL_LINK(TextPropertyPanel, ToolBoxUnderlineClickHdl, ToolBox*, pToolBox)
{
const sal_uInt16 nId = pToolBox->GetCurItemId();
- OSL_ASSERT(nId == TBI_UNDERLINE);
- if(nId == TBI_UNDERLINE)
+ const OUString aCommand(pToolBox->GetItemCommand(nId));
+
+ if (aCommand == UNO_UNDERLINE)
{
pToolBox->SetItemDown( nId, true );
maUnderlinePopup.Rearrange(meUnderline);
maUnderlinePopup.Show(*pToolBox);
-
}
+
return 0L;
}
-IMPL_LINK(TextPropertyPanel, ToolBoxSwScriptSelectHdl, ToolBox*, pToolBox)
+IMPL_LINK(TextPropertyPanel, ToolBoxScriptSelectHdl, ToolBox*, pToolBox)
{
const sal_uInt16 nId = pToolBox->GetCurItemId();
- if( nId == TBI_SUPER_SW )
+ const OUString aCommand(pToolBox->GetItemCommand(nId));
+
+ if (isWriter() && aCommand == UNO_SUPERSCRIPT)
{
if(meEscape != SVX_ESCAPEMENT_SUPERSCRIPT)
{
@@ -767,8 +693,9 @@ IMPL_LINK(TextPropertyPanel, ToolBoxSwScriptSelectHdl, ToolBox*, pToolBox)
SvxEscapementItem aNoneItem(0, 100, SID_ATTR_CHAR_ESCAPEMENT);
mpBindings->GetDispatcher()->Execute( SID_ATTR_CHAR_ESCAPEMENT, SFX_CALLMODE_RECORD, &aNoneItem, 0L );
}
+ UpdateItem(SID_ATTR_CHAR_ESCAPEMENT);
}
- else if(TBI_SUB_SW == nId)
+ else if (isWriter() && aCommand == UNO_SUBSCRIPT)
{
if(meEscape != SVX_ESCAPEMENT_SUBSCRIPT)
{
@@ -782,26 +709,16 @@ IMPL_LINK(TextPropertyPanel, ToolBoxSwScriptSelectHdl, ToolBox*, pToolBox)
SvxEscapementItem aNoneItem(0, 100, SID_ATTR_CHAR_ESCAPEMENT);
mpBindings->GetDispatcher()->Execute( SID_ATTR_CHAR_ESCAPEMENT, SFX_CALLMODE_RECORD, &aNoneItem, 0L );
}
+ UpdateItem(SID_ATTR_CHAR_ESCAPEMENT);
}
- UpdateItem(SID_ATTR_CHAR_ESCAPEMENT);
-
- return 0;
-}
-
-
-
-
-IMPL_LINK(TextPropertyPanel, ToolBoxScriptSelectHdl, ToolBox*, pToolBox)
-{
- const sal_uInt16 nId = pToolBox->GetCurItemId();
- if( nId == TBI_SUPER )
+ else if (!isWriter() && aCommand == UNO_SUPERSCRIPT)
{
mbSuper = !mbSuper;
SfxBoolItem aSupItem(SID_SET_SUPER_SCRIPT, mbSuper);
mpBindings->GetDispatcher()->Execute( SID_SET_SUPER_SCRIPT, SFX_CALLMODE_RECORD, &aSupItem, 0L );
UpdateItem(SID_SET_SUPER_SCRIPT);
}
- else if(TBI_SUB == nId)
+ else if (!isWriter() && aCommand == UNO_SUBSCRIPT)
{
mbSub = !mbSub;
@@ -809,6 +726,7 @@ IMPL_LINK(TextPropertyPanel, ToolBoxScriptSelectHdl, ToolBox*, pToolBox)
mpBindings->GetDispatcher()->Execute( SID_SET_SUB_SCRIPT, SFX_CALLMODE_RECORD, &aSubItem, 0L );
UpdateItem(SID_SET_SUB_SCRIPT);
}
+
return 0;
}
@@ -818,14 +736,15 @@ IMPL_LINK(TextPropertyPanel, ToolBoxScriptSelectHdl, ToolBox*, pToolBox)
IMPL_LINK(TextPropertyPanel, SpacingClickHdl, ToolBox*, pToolBox)
{
const sal_uInt16 nId = pToolBox->GetCurItemId();
- OSL_ASSERT(nId == TBI_SPACING);
- if(nId == TBI_SPACING)
+ const OUString aCommand(pToolBox->GetItemCommand(nId));
+
+ if (aCommand == UNO_SPACING)
{
pToolBox->SetItemDown( nId, true );
maCharSpacePopup.Rearrange(mbKernLBAvailable,mbKernAvailable,mlKerning);
maCharSpacePopup.Show(*pToolBox);
-
}
+
return 0L;
}
@@ -840,7 +759,7 @@ void TextPropertyPanel::NotifyItemUpdate (
{
switch(nSID)
{
- case SID_ATTR_CHAR_FONT:
+ case SID_ATTR_CHAR_FONT:
{
bool bIsControlEnabled (bIsEnabled);
if ( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxFontItem) )
@@ -855,10 +774,12 @@ void TextPropertyPanel::NotifyItemUpdate (
bIsControlEnabled = false;
}
mpFontNameBox->Enable(bIsControlEnabled);
- break;
}
- case SID_ATTR_CHAR_FONTHEIGHT:
+ break;
+ case SID_ATTR_CHAR_FONTHEIGHT:
{
+ const sal_uInt16 nIncreaseId = mpToolBoxIncDec->GetItemId(UNO_GROW);
+ const sal_uInt16 nDecreaseId = mpToolBoxIncDec->GetItemId(UNO_SHRINK);
bool bIsControlEnabled (bIsEnabled);
if ( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxFontHeightItem) )
{
@@ -867,8 +788,8 @@ void TextPropertyPanel::NotifyItemUpdate (
const sal_Int64 nValue (CalcToPoint(mpHeightItem->GetHeight(), eUnit, 10 ));
mpToolBoxIncDec->Enable();
- mpToolBoxIncDec->SetItemState(TBI_INCREASE, STATE_NOCHECK);
- mpToolBoxIncDec->SetItemState(TBI_DECREASE, STATE_NOCHECK);
+ mpToolBoxIncDec->SetItemState(nIncreaseId, STATE_NOCHECK);
+ mpToolBoxIncDec->SetItemState(nDecreaseId, STATE_NOCHECK);
// For Writer we have to update the states of the
// increase and decrease buttons here, because we have
@@ -886,8 +807,8 @@ void TextPropertyPanel::NotifyItemUpdate (
default:
{
- mpToolBoxIncDec->EnableItem(TBI_INCREASE, bIsEnabled && nValue<960);
- mpToolBoxIncDec->EnableItem(TBI_DECREASE, bIsEnabled && nValue>60);
+ mpToolBoxIncDec->EnableItem(nIncreaseId, bIsEnabled && nValue<960);
+ mpToolBoxIncDec->EnableItem(nDecreaseId, bIsEnabled && nValue>60);
break;
}
}
@@ -895,8 +816,8 @@ void TextPropertyPanel::NotifyItemUpdate (
if( mbFocusOnFontSizeCtrl )
return;
- maFontSizeBox.SetValue(nValue);
- maFontSizeBox.LoseFocus();
+ mpFontSizeBox->SetValue(nValue);
+ mpFontSizeBox->LoseFocus();
UpdateItem(SID_SHRINK_FONT_SIZE);
UpdateItem(SID_GROW_FONT_SIZE);
@@ -904,7 +825,7 @@ void TextPropertyPanel::NotifyItemUpdate (
else
{
mpHeightItem = NULL;
- maFontSizeBox.SetText( String() );
+ mpFontSizeBox->SetText( String() );
//increase decrease diabled when multi-seletion have different font size
// font size +/- enhancement in sd
@@ -925,11 +846,11 @@ void TextPropertyPanel::NotifyItemUpdate (
if ( eState <= SFX_ITEM_READONLY )
bIsControlEnabled = false;
}
- maFontSizeBox.Enable(bIsControlEnabled);
- break;
+ mpFontSizeBox->Enable(bIsControlEnabled);
}
-
- case SID_ATTR_CHAR_WEIGHT:
+ break;
+ case SID_ATTR_CHAR_WEIGHT:
+ {
mbWeightAvailable = (eState >= SFX_ITEM_DONTCARE);
if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxWeightItem))
{
@@ -940,11 +861,13 @@ void TextPropertyPanel::NotifyItemUpdate (
{
meWeight = WEIGHT_NORMAL;
}
- mpToolBoxFont->EnableItem(TBI_BOLD, mbWeightAvailable && bIsEnabled);
- mpToolBoxFont->SetItemState(TBI_BOLD, meWeight==WEIGHT_BOLD ? STATE_CHECK : STATE_NOCHECK);
- break;
-
- case SID_ATTR_CHAR_POSTURE:
+ const sal_uInt16 nId = mpToolBoxFont->GetItemId(UNO_BOLD);
+ mpToolBoxFont->EnableItem(nId, mbWeightAvailable && bIsEnabled);
+ mpToolBoxFont->SetItemState(nId, meWeight==WEIGHT_BOLD ? STATE_CHECK : STATE_NOCHECK);
+ }
+ break;
+ case SID_ATTR_CHAR_POSTURE:
+ {
mbPostureAvailable = (eState >= SFX_ITEM_DONTCARE);
if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxPostureItem))
{
@@ -955,11 +878,13 @@ void TextPropertyPanel::NotifyItemUpdate (
{
meItalic = ITALIC_NONE;
}
- mpToolBoxFont->EnableItem(TBI_ITALIC, mbPostureAvailable && bIsEnabled);
- mpToolBoxFont->SetItemState(TBI_ITALIC, meItalic==ITALIC_NORMAL ? STATE_CHECK : STATE_NOCHECK);
- break;
-
- case SID_ATTR_CHAR_UNDERLINE:
+ const sal_uInt16 nId = mpToolBoxFont->GetItemId(UNO_ITALIC);
+ mpToolBoxFont->EnableItem(nId, mbPostureAvailable && bIsEnabled);
+ mpToolBoxFont->SetItemState(nId, meItalic==ITALIC_NORMAL ? STATE_CHECK : STATE_NOCHECK);
+ }
+ break;
+ case SID_ATTR_CHAR_UNDERLINE:
+ {
if( eState >= SFX_ITEM_DEFAULT)
{
if(pState->ISA(SvxUnderlineItem))
@@ -973,11 +898,13 @@ void TextPropertyPanel::NotifyItemUpdate (
{
meUnderline = UNDERLINE_NONE;
}
- mpToolBoxFont->EnableItem(TBI_UNDERLINE, bIsEnabled);
- mpToolBoxFont->SetItemState(TBI_UNDERLINE, meUnderline==UNDERLINE_NONE ? STATE_NOCHECK : STATE_CHECK);
- break;
-
- case SID_ATTR_CHAR_SHADOWED:
+ const sal_uInt16 nId = mpToolBoxFont->GetItemId(UNO_UNDERLINE);
+ mpToolBoxFont->EnableItem(nId, bIsEnabled);
+ mpToolBoxFont->SetItemState(nId, meUnderline==UNDERLINE_NONE ? STATE_NOCHECK : STATE_CHECK);
+ }
+ break;
+ case SID_ATTR_CHAR_SHADOWED:
+ {
if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxShadowedItem))
{
const SvxShadowedItem* pItem = (const SvxShadowedItem*)pState;
@@ -987,11 +914,13 @@ void TextPropertyPanel::NotifyItemUpdate (
{
mbShadow = false;
}
- mpToolBoxFont->EnableItem(TBI_SHADOWED, bIsEnabled);
- mpToolBoxFont->SetItemState(TBI_SHADOWED, mbShadow ? STATE_CHECK : STATE_NOCHECK);
- break;
-
- case SID_ATTR_CHAR_STRIKEOUT:
+ const sal_uInt16 nId = mpToolBoxFont->GetItemId(UNO_SHADOWED);
+ mpToolBoxFont->EnableItem(nId, bIsEnabled);
+ mpToolBoxFont->SetItemState(nId, mbShadow ? STATE_CHECK : STATE_NOCHECK);
+ }
+ break;
+ case SID_ATTR_CHAR_STRIKEOUT:
+ {
if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxCrossedOutItem))
{
const SvxCrossedOutItem* pItem = (const SvxCrossedOutItem*)pState;
@@ -1001,16 +930,20 @@ void TextPropertyPanel::NotifyItemUpdate (
{
meStrike = STRIKEOUT_NONE;
}
- mpToolBoxFont->EnableItem(TBI_STRIKEOUT, bIsEnabled);
- mpToolBoxFont->SetItemState(TBI_STRIKEOUT,
+ const sal_uInt16 nId = mpToolBoxFont->GetItemId(UNO_STRIKEOUT);
+ mpToolBoxFont->EnableItem(nId, bIsEnabled);
+ mpToolBoxFont->SetItemState(nId,
meStrike!=STRIKEOUT_NONE && meStrike!=STRIKEOUT_DONTKNOW
? STATE_CHECK
: STATE_NOCHECK);
- break;
-
- case SID_ATTR_CHAR_ESCAPEMENT:
+ }
+ break;
+ case SID_ATTR_CHAR_ESCAPEMENT:
+ if (isWriter())
{
bool bIsItemEnabled (true);
+ const sal_uInt16 nSuperscriptId = mpToolBoxScript->GetItemId(UNO_SUPERSCRIPT);
+ const sal_uInt16 nSubscriptId = mpToolBoxScript->GetItemId(UNO_SUBSCRIPT);
if (eState == SFX_ITEM_AVAILABLE)
{
if (pState->ISA(SvxEscapementItem))
@@ -1020,27 +953,27 @@ void TextPropertyPanel::NotifyItemUpdate (
if(nEsc == 0)
{
meEscape = SVX_ESCAPEMENT_OFF;
- mpToolBoxScriptSw->SetItemState(TBI_SUPER_SW, STATE_NOCHECK);
- mpToolBoxScriptSw->SetItemState(TBI_SUB_SW, STATE_NOCHECK);
+ mpToolBoxScript->SetItemState(nSuperscriptId, STATE_NOCHECK);
+ mpToolBoxScript->SetItemState(nSubscriptId, STATE_NOCHECK);
}
else if(nEsc > 0)
{
meEscape = SVX_ESCAPEMENT_SUPERSCRIPT;
- mpToolBoxScriptSw->SetItemState(TBI_SUPER_SW, STATE_CHECK);
- mpToolBoxScriptSw->SetItemState(TBI_SUB_SW, STATE_NOCHECK);
+ mpToolBoxScript->SetItemState(nSuperscriptId, STATE_CHECK);
+ mpToolBoxScript->SetItemState(nSubscriptId, STATE_NOCHECK);
}
else
{
meEscape = SVX_ESCAPEMENT_SUBSCRIPT;
- mpToolBoxScriptSw->SetItemState(TBI_SUPER_SW, STATE_NOCHECK);
- mpToolBoxScriptSw->SetItemState(TBI_SUB_SW, STATE_CHECK);
+ mpToolBoxScript->SetItemState(nSuperscriptId, STATE_NOCHECK);
+ mpToolBoxScript->SetItemState(nSubscriptId, STATE_CHECK);
}
}
else
{
meEscape = SVX_ESCAPEMENT_OFF;
- mpToolBoxScriptSw->SetItemState(TBI_SUPER_SW, STATE_NOCHECK);
- mpToolBoxScriptSw->SetItemState(TBI_SUB_SW, STATE_NOCHECK);
+ mpToolBoxScript->SetItemState(nSuperscriptId, STATE_NOCHECK);
+ mpToolBoxScript->SetItemState(nSubscriptId, STATE_NOCHECK);
}
}
else if (eState == SFX_ITEM_DISABLED)
@@ -1051,12 +984,13 @@ void TextPropertyPanel::NotifyItemUpdate (
{
meEscape = SVX_ESCAPEMENT_OFF;
}
- mpToolBoxScriptSw->EnableItem(TBI_SUPER_SW, bIsItemEnabled && bIsEnabled);
- mpToolBoxScriptSw->EnableItem(TBI_SUB_SW, bIsItemEnabled && bIsEnabled);
- break;
+ mpToolBoxScript->EnableItem(nSuperscriptId, bIsItemEnabled && bIsEnabled);
+ mpToolBoxScript->EnableItem(nSubscriptId, bIsItemEnabled && bIsEnabled);
}
-
- case SID_SET_SUB_SCRIPT:
+ break;
+ case SID_SET_SUB_SCRIPT:
+ if (!isWriter())
+ {
if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SfxBoolItem))
{
const SfxBoolItem* pItem = (const SfxBoolItem*)pState;
@@ -1066,11 +1000,14 @@ void TextPropertyPanel::NotifyItemUpdate (
{
mbSub = false;
}
- mpToolBoxScript->EnableItem(TBI_SUB, bIsEnabled);
- mpToolBoxScript->SetItemState(TBI_SUB, mbSub ? STATE_CHECK : STATE_NOCHECK);
- break;
-
- case SID_SET_SUPER_SCRIPT:
+ const sal_uInt16 nSubscriptId = mpToolBoxScript->GetItemId(UNO_SUBSCRIPT);
+ mpToolBoxScript->EnableItem(nSubscriptId, bIsEnabled);
+ mpToolBoxScript->SetItemState(nSubscriptId, mbSub ? STATE_CHECK : STATE_NOCHECK);
+ }
+ break;
+ case SID_SET_SUPER_SCRIPT:
+ if (!isWriter())
+ {
if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SfxBoolItem))
{
const SfxBoolItem* pItem = (const SfxBoolItem*)pState;
@@ -1080,11 +1017,13 @@ void TextPropertyPanel::NotifyItemUpdate (
{
mbSuper = false;
}
- mpToolBoxScript->EnableItem(TBI_SUPER, bIsEnabled);
- mpToolBoxScript->SetItemState(TBI_SUPER, mbSuper ? STATE_CHECK : STATE_NOCHECK);
- break;
-
- case SID_ATTR_CHAR_KERNING:
+ const sal_uInt16 nSuperscriptId = mpToolBoxScript->GetItemId(UNO_SUPERSCRIPT);
+ mpToolBoxScript->EnableItem(nSuperscriptId, bIsEnabled);
+ mpToolBoxScript->SetItemState(nSuperscriptId, mbSuper ? STATE_CHECK : STATE_NOCHECK);
+ }
+ break;
+ case SID_ATTR_CHAR_KERNING:
+ {
if ( SFX_ITEM_AVAILABLE == eState )
{
mbKernLBAvailable = true;
@@ -1113,12 +1052,12 @@ void TextPropertyPanel::NotifyItemUpdate (
mbKernAvailable = false;
mlKerning = 0;
}
- mpToolBoxSpacing->EnableItem(TBI_SPACING, bIsEnabled);
- break;
-
- // font size +/- enhancement in sd
- case SID_SHRINK_FONT_SIZE:
- case SID_GROW_FONT_SIZE:
+ mpToolBoxSpacing->EnableItem(mpToolBoxSpacing->GetItemId(UNO_SPACING), bIsEnabled);
+ }
+ break;
+ case SID_SHRINK_FONT_SIZE:
+ case SID_GROW_FONT_SIZE:
+ {
switch(maContext.GetCombinedContext_DI())
{
case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
@@ -1133,15 +1072,15 @@ void TextPropertyPanel::NotifyItemUpdate (
mpToolBoxIncDec->Disable();
else
mpToolBoxIncDec->Enable();
- const sal_Int64 nSize (maFontSizeBox.GetValue());
+ const sal_Int64 nSize (mpFontSizeBox->GetValue());
switch(nSID)
{
case SID_GROW_FONT_SIZE:
- mpToolBoxIncDec->EnableItem(TBI_INCREASE, bIsEnabled && nSize<960);
+ mpToolBoxIncDec->EnableItem(mpToolBoxIncDec->GetItemId(UNO_GROW), bIsEnabled && nSize<960);
break;
case SID_SHRINK_FONT_SIZE:
- mpToolBoxIncDec->EnableItem(TBI_DECREASE, bIsEnabled && nSize>60);
+ mpToolBoxIncDec->EnableItem(mpToolBoxIncDec->GetItemId(UNO_SHRINK), bIsEnabled && nSize>60);
break;
default:
@@ -1149,7 +1088,8 @@ void TextPropertyPanel::NotifyItemUpdate (
}
}
}
- break;
+ }
+ break;
}
}
@@ -1216,6 +1156,18 @@ void TextPropertyPanel::SetUnderline(FontUnderline eUnderline)
meUnderline = eUnderline;
}
-
+bool TextPropertyPanel::isWriter()
+{
+ switch (maContext.GetCombinedContext_DI())
+ {
+ case CombinedEnumContext(Application_WriterVariants, Context_Text):
+ case CombinedEnumContext(Application_WriterVariants, Context_Table):
+ case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+ case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
+ return true;
+ default:
+ return false;
+ }
+}
} } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hrc b/svx/source/sidebar/text/TextPropertyPanel.hrc
index 36fc2503a656..38baa07357c8 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hrc
+++ b/svx/source/sidebar/text/TextPropertyPanel.hrc
@@ -24,32 +24,6 @@
#define CUSTOM_Y OFFSET_Y + POPUPPANEL_MARGIN_SMALL * 3 + 15 * 6 + TEXT_HEIGHT
#define VS_UNDERLINE_WIDTH 57
#define VS_UNDERLINE_HEIGHT 12 * 10
-//#define FT_TEST 1
-#define CB_SBFONT_FONT 2
-#define MB_SBFONT_FONTSIZE 3
-#define TB_FONT 4
-#define TB_INCREASE_DECREASE 5
-#define TB_FONTCOLOR 6
-#define TB_FONTCOLOR_SW 7
-#define TB_HIGHLIGHT 8
-#define TB_SPACING 9
-#define TB_SCRIPT 10
-#define TB_SCRIPT_SW 11
-
-#define TBI_FONTCOLOR 50
-#define TBI_BOLD 51
-#define TBI_ITALIC 52
-#define TBI_UNDERLINE 53
-#define TBI_STRIKEOUT 54
-#define TBI_SHADOWED 55
-#define TBI_INCREASE 56
-#define TBI_DECREASE 57
-#define TBI_HIGHLIGHT 58
-#define TBI_SUPER 59
-#define TBI_SUB 60
-#define TBI_SUPER_SW 61
-#define TBI_SUB_SW 62
-#define TBI_SPACING 63
#define IMG_SPACING_D 71
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index 7f2f641f3ccb..342b9a970c5b 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -36,6 +36,7 @@
#include "TextCharacterSpacingPopup.hxx"
#include "TextUnderlinePopup.hxx"
#include <svx/sidebar/ColorPopup.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
#include <vcl/vclenum.hxx>
class FloatingWindow;
@@ -48,7 +49,7 @@ class PopupControl;
class PopupContainer;
class TextPropertyPanel
- : public Control,
+ : public PanelLayout,
public ::sfx2::sidebar::IContextChangeReceiver,
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
@@ -83,26 +84,13 @@ public:
private:
//ui controls
- ::boost::scoped_ptr<SvxSBFontNameBox> mpFontNameBox;
- FontSizeBox maFontSizeBox;
- ::boost::scoped_ptr<Window> mpToolBoxFontBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxFont;
- ::boost::scoped_ptr<Window> mpToolBoxIncDecBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxIncDec;
- ::boost::scoped_ptr<Window> mpToolBoxScriptBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxScript;
- ::boost::scoped_ptr<Window> mpToolBoxScriptSwBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxScriptSw;
- ::boost::scoped_ptr<Window> mpToolBoxSpacingBackground;
- ::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;
- ::boost::scoped_ptr<ToolboxButtonColorUpdater> mpHighlightUpdater;
+ SvxSBFontNameBox* mpFontNameBox;
+ FontSizeBox* mpFontSizeBox;
+ ToolBox* mpToolBoxFont;
+ ToolBox* mpToolBoxIncDec;
+ ToolBox* mpToolBoxScript;
+ ToolBox* mpToolBoxSpacing;
+ ToolBox* mpToolBoxFontColor;
//control items
::sfx2::sidebar::ControllerItem maFontNameControl;
@@ -141,7 +129,6 @@ private:
TextCharacterSpacingPopup maCharSpacePopup;
TextUnderlinePopup maUnderlinePopup;
- cssu::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
SfxBindings* mpBindings;
@@ -171,7 +158,6 @@ private:
DECL_LINK(FontSizeLoseFocus, FontSizeBox *);
DECL_LINK(ToolboxFontSelectHandler, ToolBox *);
DECL_LINK(ToolboxIncDecSelectHdl, ToolBox *);
- DECL_LINK(ToolBoxSwScriptSelectHdl, ToolBox *);
DECL_LINK(ToolBoxScriptSelectHdl, ToolBox *);
void UpdateItem (const sal_uInt16 nSlotId);
@@ -182,6 +168,8 @@ private:
*/
void UpdateFontColorToolbox (
const ::sfx2::sidebar::EnumContext aContext);
+
+ bool isWriter();
};
} } // end of namespace ::svx::sidebar
diff --git a/svx/source/sidebar/text/TextPropertyPanel.src b/svx/source/sidebar/text/TextPropertyPanel.src
index fcd10dab3e15..f22a89922828 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.src
+++ b/svx/source/sidebar/text/TextPropertyPanel.src
@@ -19,255 +19,6 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include "helpid.hrc"
-#define CONTROL_HEIGHT_FONT_NAME 250
-#define CONTROL_HEIGHT_FONT_SIZE 180
-#define FONTSIZE_WIDTH (TOOLBOX_ITEM_WIDTH * 2 - 1)
-#define FONTNAME_WIDTH (PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH) - 6)
-
-#define TB_SPACE 18
-#define TB_SPACE_V 4
-#define TEXT_WIDTH TOOLBOX_42_42_ITEM_DD_WIDTH + TB_SPACE - 3
-
-#define FT_TB_SPACE 1
-#define BK_IMG 20
-
-#define X0 SECTIONPAGE_MARGIN_HORIZONTAL
-#define X1 SECTIONPAGE_MARGIN_HORIZONTAL + 1 + TOOLBOX_ITEM_WIDTH * 2 + 4
-#define X2 (PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH))
-#define X3 (X2 - (TOOLBOX_ITEM_DD_WIDTH) - 2)
-
-#define FIRST_LINE_Y SECTIONPAGE_MARGIN_VERTICAL_TOP
-#define SECOND_LINE_Y FIRST_LINE_Y + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL + 1
-#define THIRD_LINE_Y SECOND_LINE_Y + CONTROL_SPACING_VERTICAL + (TOOLBOX_ITEM_HEIGHT + 2)
-
-
-Control RID_SIDEBAR_TEXT_PANEL
-{
- OutputSize = TRUE;
- DialogControl = TRUE;
- Border = FALSE;
-
- Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, SECTIONPAGE_MARGIN_VERTICAL_TOP + CBOX_HEIGHT + TOOLBOX_ITEM_HEIGHT * 2 + CONTROL_SPACING_VERTICAL * 2 + SECTIONPAGE_MARGIN_VERTICAL_BOT );
- HelpID = HID_PROPERTYPANEL_TEXT_SECTION ;
- Text = "Text";
-
- ComboBox CB_SBFONT_FONT
- {
- Border = TRUE;
- Pos = MAP_APPFONT (X0 , FIRST_LINE_Y);
- Size = MAP_APPFONT (FONTNAME_WIDTH , CONTROL_HEIGHT_FONT_NAME);
- TabStop = TRUE;
- DropDown = TRUE;
- HelpID = HID_COMBO_FONT_NAME ;
- QuickHelpText [ en-US ] = "Font";
-// Command = ".uno:CharFontName";
- };
- MetricBox MB_SBFONT_FONTSIZE
- {
- Border = TRUE;
- Pos = MAP_APPFONT (X2, FIRST_LINE_Y);
- Size = MAP_APPFONT (FONTSIZE_WIDTH, CONTROL_HEIGHT_FONT_SIZE);
- TabStop = TRUE;
- DropDown = TRUE;
- HelpID = HID_METRIC_FONT_SIZE;
- QuickHelpText [ en-US ] = "Font Size";
-// Command = ".uno:FontHeight";
- };
-
- ToolBox TB_INCREASE_DECREASE
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X2, SECOND_LINE_Y) ;
- Size = MAP_APPFONT ( TOOLBOX_ITEM_WIDTH * 2 ,TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_FONTSIZE_INDE;
- Text = "Font Size Adjusting" ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_INCREASE;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_INCREASE;
- Command = ".uno:Grow";
- };
- ToolBoxItem
- {
- Identifier = TBI_DECREASE;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_DECREASE;
- Command = ".uno:Shrink";
- };
- };
- };
- ToolBox TB_FONT
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X0 + 1, SECOND_LINE_Y) ;
- Size = MAP_APPFONT ( TOOLBOX_ITEM_WIDTH * 4 + TOOLBOX_ITEM_DD_WIDTH, TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_FONT;
- Text = "Font Effects" ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_BOLD;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_BOLD;
- Command = ".uno:Bold";
- };
- ToolBoxItem
- {
- Identifier = TBI_ITALIC;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_ITALIC;
- Command = ".uno:Italic";
- };
- ToolBoxItem
- {
- Identifier = TBI_UNDERLINE;
- DropDown = TRUE ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_UNDERLINE;
- Command = ".uno:Underline";
- };
- ToolBoxItem
- {
- Identifier = TBI_STRIKEOUT;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_STRIKEOUT;
- Command = ".uno:Strikeout";
- };
- ToolBoxItem
- {
- Identifier = TBI_SHADOWED;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SHADOWED;
- Command = ".uno:Shadowed";
- };
- };
- };
-
- ToolBox TB_FONTCOLOR
- {
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_FONT_COLOR;
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X3, THIRD_LINE_Y) ;
- Size = MAP_APPFONT (TOOLBOX_ITEM_DD_WIDTH ,TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_FONTCOLOR ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_FONT_COLOR;
- DropDown = TRUE ;
- Command = ".uno:Color";
- };
- };
- };
- ToolBox TB_FONTCOLOR_SW
- {
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_FONT_COLOR;
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X3, THIRD_LINE_Y) ;
- Size = MAP_APPFONT (TOOLBOX_ITEM_DD_WIDTH ,TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_FONTCOLOR ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_FONT_COLOR;
- DropDown = TRUE ;
- Command = ".uno:FontColor";
- };
- };
- };
-
- ToolBox TB_HIGHLIGHT
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X2, THIRD_LINE_Y) ;
- Size = MAP_APPFONT (TOOLBOX_ITEM_DD_WIDTH ,TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_HIGHLIGHT_COLOR;
- Text = "Highlight Color" ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_HIGHLIGHT ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_HIGHLIGHT_COLOR;
- DropDown = TRUE ;
- Command = ".uno:BackColor";
- };
- };
- };
-
- ToolBox TB_SCRIPT_SW
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X0 + 1 , THIRD_LINE_Y) ;
- Size = MAP_APPFONT (TOOLBOX_ITEM_WIDTH * 2 ,TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_SCRIPT_SW;
- Text = "Font Position" ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_SUPER_SW;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUPER_SW;
- Command = ".uno:SuperScript";
- };
- ToolBoxItem
- {
- Identifier = TBI_SUB_SW;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUB_SW;
- Command = ".uno:SubScript";
- };
- };
- };
- ToolBox TB_SCRIPT
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X0 + 1 , THIRD_LINE_Y) ;
- Size = MAP_APPFONT (TOOLBOX_ITEM_WIDTH * 2 ,TOOLBOX_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBX_SCRIPT;
- Text = "Font Position" ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_SUPER;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUPER;
- Command = ".uno:SuperScript";
- };
- ToolBoxItem
- {
- Identifier = TBI_SUB;
- HelpID = HID_PPROPERTYPANEL_TEXT_TBI_SUB;
- Command = ".uno:SubScript";
- };
- };
- };
-
- ToolBox TB_SPACING
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT (X1, THIRD_LINE_Y) ;
- Size = MAP_APPFONT (TOOLBOX_24_16_ITEM_DD_WIDTH, TOOLBOX_24_16_ITEM_HEIGHT ) ;
- TabStop = TRUE ;
- HelpID = HID_TB_SPACING;
- Text = "Character Spacing" ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = TBI_SPACING;
- DropDown = TRUE ;
- HelpID = HID_TBI_SPACING;
- Command = ".uno:Spacing";
- };
- };
- };
-};
Control RID_POPUPPANEL_TEXTPAGE_UNDERLINE
{
diff --git a/svx/uiconfig/ui/sidebartextpanel.ui b/svx/uiconfig/ui/sidebartextpanel.ui
new file mode 100644
index 000000000000..4f7643861e5c
--- /dev/null
+++ b/svx/uiconfig/ui/sidebartextpanel.ui
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkGrid" id="SidebarTextPanel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_homogeneous">True</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="svxlo-SvxSBFontNameBox" id="font">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svtlo-FontSizeBox" id="fontsize">
+ <property name="width_request">50</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="sfxlo-SidebarToolBox" id="fonteffects">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <child>
+ <object class="GtkToolButton" id="bold">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Bold</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="italic">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Italic</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkMenuToolButton" id="underline">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Underline</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="strikeout">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Strikeout</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="shadowed">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Shadowed</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-SidebarToolBox" id="fontadjust">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <child>
+ <object class="GtkToolButton" id="grow">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Grow</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="shrink">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Shrink</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="sfxlo-SidebarToolBox" id="colorbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <child>
+ <object class="GtkMenuToolButton" id="color">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Color</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkMenuToolButton" id="fontcolor">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:FontColor</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkMenuToolButton" id="highlight">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:BackColor</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-SidebarToolBox" id="position">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <child>
+ <object class="GtkToolButton" id="superscript">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:SuperScript</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="subscript">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="action_name">.uno:SubScript</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-SidebarToolBox" id="spacingbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkToolButton" id="spacing">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="is_important">True</property>
+ <property name="action_name">.uno:Spacing</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>