diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-04-29 13:27:28 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-05-04 09:46:45 +0000 |
commit | 019a0fbdd860994ba727f19eba0879136406d0f9 (patch) | |
tree | d7e7ecc6c575fb4f5595db8bba1938962542adf2 | |
parent | 00fc1ee1b50229be13b5a5082022d14adf28fc2f (diff) |
underline popup control possible to use outside sidebar
Change-Id: I48097007c7dc0439b33233939c1d73902dfeb679
Reviewed-on: https://gerrit.libreoffice.org/24491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | include/svx/TextUnderlinePopup.hxx (renamed from svx/source/sidebar/text/TextUnderlinePopup.hxx) | 22 | ||||
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/app/sddll.cxx | 2 | ||||
-rw-r--r-- | svx/AllLangResTarget_svx.mk | 1 | ||||
-rw-r--r-- | svx/UIConfig_svx.mk | 1 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 70 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.hrc | 47 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.hxx | 18 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.src | 181 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextUnderlineControl.cxx | 274 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextUnderlineControl.hxx | 62 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextUnderlinePopup.cxx | 29 | ||||
-rw-r--r-- | svx/uiconfig/ui/textunderlinecontrol.ui | 281 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 2 |
14 files changed, 426 insertions, 566 deletions
diff --git a/svx/source/sidebar/text/TextUnderlinePopup.hxx b/include/svx/TextUnderlinePopup.hxx index 10fdc5fedbd8..99d0eba31d47 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.hxx +++ b/include/svx/TextUnderlinePopup.hxx @@ -16,30 +16,30 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTUNDERLINEPOPUP_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTUNDERLINEPOPUP_HXX +#ifndef INCLUDED_SVX_SIDEBAR_TEXT_TEXTUNDERLINEPOPUP_HXX +#define INCLUDED_SVX_SIDEBAR_TEXT_TEXTUNDERLINEPOPUP_HXX -#include "svx/sidebar/Popup.hxx" +#include <sfx2/tbxctrl.hxx> +#include <svx/svxdllapi.h> #include <vcl/vclenum.hxx> #include <functional> -namespace svx { namespace sidebar { +namespace svx { -class TextUnderlinePopup - : public Popup +class SVX_DLLPUBLIC TextUnderlinePopup : public SfxToolBoxControl { public: - TextUnderlinePopup ( - vcl::Window* pParent, - const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator); + SFX_DECL_TOOLBOX_CONTROL(); + + TextUnderlinePopup(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx); virtual ~TextUnderlinePopup(); - void Rearrange (FontLineStyle eLine); + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override; }; -} } // end of namespace svx::sidebar +} // end of namespace svx #endif diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index ad5217d188db..087477f69c6f 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -34,6 +34,7 @@ #include <comphelper/types.hxx> #include <svx/ParaLineSpacingPopup.hxx> #include <svx/TextCharacterSpacingPopup.hxx> +#include <svx/TextUnderlinePopup.hxx> #include <svtools/parhtml.hxx> #include <sot/formats.hxx> @@ -171,6 +172,7 @@ void ScDLL::Init() SvxUndoRedoControl ::RegisterControl(SID_REDO, pMod ); svx::ParaLineSpacingPopup ::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod ); svx::TextCharacterSpacingPopup ::RegisterControl(SID_ATTR_CHAR_KERNING, pMod ); + svx::TextUnderlinePopup ::RegisterControl(SID_ATTR_CHAR_UNDERLINE, pMod ); svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH, pMod ); SvxGrafModeToolBoxControl ::RegisterControl(SID_ATTR_GRAF_MODE, pMod); diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 4251f5f07702..957639119e20 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -70,6 +70,7 @@ #include <svx/formatpaintbrushctrl.hxx> #include <svx/ParaLineSpacingPopup.hxx> #include <svx/TextCharacterSpacingPopup.hxx> +#include <svx/TextUnderlinePopup.hxx> #include <svx/grafctrl.hxx> #include <svx/hyperdlg.hxx> #include <svx/imapdlg.hxx> @@ -229,6 +230,7 @@ void SdDLL::RegisterControllers() SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod); svx::TextCharacterSpacingPopup::RegisterControl(SID_ATTR_CHAR_KERNING, pMod); + svx::TextUnderlinePopup::RegisterControl(SID_ATTR_CHAR_UNDERLINE, pMod); ::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod ); XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pMod ); diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk index 271a06bab961..f8e67b3ae017 100644 --- a/svx/AllLangResTarget_svx.mk +++ b/svx/AllLangResTarget_svx.mk @@ -65,7 +65,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\ svx/source/sidebar/EmptyPanel.src \ svx/source/sidebar/area/AreaPropertyPanel.src \ svx/source/sidebar/line/LinePropertyPanel.src \ - svx/source/sidebar/text/TextPropertyPanel.src \ svx/source/sidebar/paragraph/ParaPropertyPanel.src \ svx/source/stbctrls/stbctrls.src \ svx/source/svdraw/svdstr.src \ diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index df6167d862a0..56ca90da4038 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -71,6 +71,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/textcharacterspacingcontrol \ svx/uiconfig/ui/textcontrolchardialog \ svx/uiconfig/ui/textcontrolparadialog \ + svx/uiconfig/ui/textunderlinecontrol \ svx/uiconfig/ui/xformspage \ )) diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index b4794efd7a37..7e033270491a 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -27,24 +27,14 @@ #include <svtools/unitconv.hxx> #include <vcl/toolbox.hxx> -#include "TextCharacterSpacingControl.hxx" -#include "TextUnderlineControl.hxx" -#include "TextUnderlinePopup.hxx" #include <svx/sidebar/PopupContainer.hxx> using namespace css; using namespace css::uno; -const char UNO_UNDERLINE[] = ".uno:Underline"; - namespace svx { namespace sidebar { -VclPtr<PopupControl> TextPropertyPanel::CreateUnderlinePopupControl (PopupContainer* pParent) -{ - return VclPtrInstance<TextUnderlineControl>(pParent, *this, mpBindings); -} - VclPtr<vcl::Window> TextPropertyPanel::Create ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, @@ -68,11 +58,8 @@ VclPtr<vcl::Window> TextPropertyPanel::Create ( TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings, const ::sfx2::sidebar::EnumContext& /*rContext*/ ) : PanelLayout(pParent, "SidebarTextPanel", "svx/ui/sidebartextpanel.ui", rxFrame), maFontSizeControl (SID_ATTR_CHAR_FONTHEIGHT, *pBindings, *this, OUString("FontHeight"), rxFrame), - maUnderlineControl (SID_ATTR_CHAR_UNDERLINE, *pBindings, *this, OUString("Underline"), rxFrame), - maUnderlinePopup(this, [this] (PopupContainer *const pContainer) { return this->CreateUnderlinePopupControl(pContainer); }), - maContext(), - mpBindings(pBindings) + maContext() { get(mpToolBoxFont, "fonteffects"); get(mpToolBoxIncDec, "fontadjust"); @@ -81,14 +68,8 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref get(mpToolBoxFontColor, "colorbar_others"); get(mpToolBoxBackgroundColor, "colorbar_background"); - //toolbox - SetupToolboxItems(); - InitToolBoxFont(); - //init state mpHeightItem = nullptr; - meUnderline = LINESTYLE_NONE; - meUnderlineColor = COL_AUTO; } TextPropertyPanel::~TextPropertyPanel() @@ -105,9 +86,6 @@ void TextPropertyPanel::dispose() mpToolBoxFontColor.clear(); maFontSizeControl.dispose(); - maUnderlineControl.dispose(); - - maUnderlinePopup.dispose(); PanelLayout::dispose(); } @@ -163,40 +141,6 @@ void TextPropertyPanel::HandleContextChange ( mpToolBoxBackgroundColor->Show(bDrawText); } -void TextPropertyPanel::DataChanged (const DataChangedEvent& /*rEvent*/) -{ - SetupToolboxItems(); -} - -void TextPropertyPanel::EndUnderlinePopupMode() -{ - maUnderlinePopup.Hide(); -} - -void TextPropertyPanel::InitToolBoxFont() -{ - Link<ToolBox *, void> aLink = LINK(this, TextPropertyPanel, UnderlineClickHdl); - mpToolBoxFont->SetDropdownClickHdl(aLink); -} - -void TextPropertyPanel::SetupToolboxItems() -{ - maUnderlineControl.SetupToolBoxItem(*mpToolBoxFont, mpToolBoxFont->GetItemId(UNO_UNDERLINE)); -} - -IMPL_LINK_TYPED(TextPropertyPanel, UnderlineClickHdl, ToolBox*, pToolBox, void) -{ - const sal_uInt16 nId = pToolBox->GetCurItemId(); - const OUString aCommand(pToolBox->GetItemCommand(nId)); - - if (aCommand == UNO_UNDERLINE) - { - pToolBox->SetItemDown( nId, true ); - maUnderlinePopup.Rearrange(meUnderline); - maUnderlinePopup.Show(*pToolBox); - } -} - void TextPropertyPanel::NotifyItemUpdate ( const sal_uInt16 nSID, const SfxItemState eState, @@ -213,18 +157,6 @@ void TextPropertyPanel::NotifyItemUpdate ( mpHeightItem = nullptr; } break; - case SID_ATTR_CHAR_UNDERLINE: - { - if( eState >= SfxItemState::DEFAULT && dynamic_cast<const SvxUnderlineItem*>( pState) != nullptr ) - { - const SvxUnderlineItem* pItem = static_cast<const SvxUnderlineItem*>(pState); - meUnderline = (FontLineStyle)pItem->GetValue(); - meUnderlineColor = pItem->GetColor(); - } - else - meUnderline = LINESTYLE_NONE; - } - break; case SID_ATTR_CHAR_KERNING: { mpToolBoxSpacing->Enable(bIsEnabled); diff --git a/svx/source/sidebar/text/TextPropertyPanel.hrc b/svx/source/sidebar/text/TextPropertyPanel.hrc index 4271ddf749dd..fd11349f89fe 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hrc +++ b/svx/source/sidebar/text/TextPropertyPanel.hrc @@ -18,53 +18,6 @@ */ #include "svx/dialogs.hrc" -#define VS_SPACING_WIDTH 80 -#define CUSTOM_HEIGHT CBOX_HEIGHT + MBOX_HEIGHT + POPUPPANEL_MARGIN_LARGE * 3 + POPUPPANEL_MARGIN_SMALL * 2 + TEXT_HEIGHT * 2 -#define CUSTOM_WIDTH VS_SPACING_WIDTH - 8 -#define CUSTOM_X POPUPPANEL_MARGIN_LARGE + OFFSET_X + 1 -#define CUSTOM_Y OFFSET_Y + POPUPPANEL_MARGIN_SMALL * 3 + 15 * 6 + TEXT_HEIGHT -#define VS_UNDERLINE_WIDTH 57 -#define VS_UNDERLINE_HEIGHT 12 * 10 - -//popup window underline -#define VS_UNDERLINE 1 -#define PB_OPTIONS 2 - -#define IMG_SINGLE 10 -#define IMG_DOUBLE 11 -#define IMG_BOLD2 12 -#define IMG_DOT 13 -#define IMG_DOT_BOLD 14 -#define IMG_DASH 15 -#define IMG_DASH_LONG 16 -#define IMG_DASH_DOT 17 -#define IMG_DASH_DOT_DOT 18 -#define IMG_WAVE 19 - -#define STR_SINGLE 20 -#define STR_DOUBLE 21 -#define STR_BOLD 22 -#define STR_DOT 23 -#define STR_DOT_BOLD 24 -#define STR_DASH 25 -#define STR_DASH_LONG 26 -#define STR_DASH_DOT 27 -#define STR_DASH_DOT_DOT 28 -#define STR_WAVE 29 - -#define IMG_SINGLE_SEL 40 -#define IMG_DOUBLE_SEL 41 -#define IMG_BOLD2_SEL 42 -#define IMG_DOT_SEL 43 -#define IMG_DOT_BOLD_SEL 44 -#define IMG_DASH_SEL 45 -#define IMG_DASH_LONG_SEL 46 -#define IMG_DASH_DOT_SEL 47 -#define IMG_DASH_DOT_DOT_SEL 48 -#define IMG_WAVE_SEL 49 - -#define STR_WITHOUT 50 - //help ids #define HID_UNDERLINE_BTN "SVX_HID_UNDERLINE_BTN" #define HID_SPACING_CB_KERN "SVX_HID_SPACING_CB_KERN" diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx index 863a0379e634..fbdb7118cb06 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hxx +++ b/svx/source/sidebar/text/TextPropertyPanel.hxx @@ -29,7 +29,6 @@ #include <com/sun/star/ui/XSidebar.hpp> #include <com/sun/star/frame/XToolbarController.hpp> -#include "TextUnderlinePopup.hxx" #include <svx/sidebar/PanelLayout.hxx> class ToolBox; @@ -54,11 +53,6 @@ public: SfxBindings* pBindings, const ::sfx2::sidebar::EnumContext& rContext); - virtual void DataChanged (const DataChangedEvent& rEvent) override; - - void EndUnderlinePopupMode(); - Color& GetUnderlineColor() { return meUnderlineColor;} - virtual void HandleContextChange ( const ::sfx2::sidebar::EnumContext& rContext) override; @@ -87,22 +81,10 @@ private: //control items ::sfx2::sidebar::ControllerItem maFontSizeControl; - ::sfx2::sidebar::ControllerItem maUnderlineControl; - FontLineStyle meUnderline; - Color meUnderlineColor; SvxFontHeightItem* mpHeightItem; - TextUnderlinePopup maUnderlinePopup; - ::sfx2::sidebar::EnumContext maContext; - SfxBindings* mpBindings; - - VclPtr<PopupControl> CreateUnderlinePopupControl (PopupContainer* pParent); - DECL_LINK_TYPED(UnderlineClickHdl, ToolBox*, void); - - void SetupToolboxItems(); - void InitToolBoxFont(); }; } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/text/TextPropertyPanel.src b/svx/source/sidebar/text/TextPropertyPanel.src deleted file mode 100644 index 74a8198ca842..000000000000 --- a/svx/source/sidebar/text/TextPropertyPanel.src +++ /dev/null @@ -1,181 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "TextPropertyPanel.hrc" -#include <sfx2/sidebar/ResourceDefinitions.hrc> -#include "helpid.hrc" - -Control RID_POPUPPANEL_TEXTPAGE_UNDERLINE -{ - OutputSize = TRUE; - DialogControl = TRUE; - Border = FALSE; - - Size = MAP_APPFONT( POPUPPANEL_MARGIN_SMALL * 2 + POPUP_BORDER_WIDTH + VS_UNDERLINE_WIDTH, 13+ VS_UNDERLINE_HEIGHT + POPUP_BORDER_HEIGHT + POPUPPANEL_MARGIN_SMALL * 2 + POPUPPANEL_MARGIN_LARGE); - Control VS_UNDERLINE - { - HelpID = HID_PPROPERTYPANEL_TEXT_UNDERLINE_VS; - Hide = TRUE ; - Pos = MAP_APPFONT( POPUPPANEL_MARGIN_SMALL + OFFSET_X , POPUPPANEL_MARGIN_SMALL + OFFSET_Y ); - Size = MAP_APPFONT ( VS_UNDERLINE_WIDTH ,VS_UNDERLINE_HEIGHT); - TabStop = TRUE ; - Text = "Underline"; - }; - - PushButton PB_OPTIONS - { - HelpID = HID_UNDERLINE_BTN; - Pos = MAP_APPFONT ( POPUPPANEL_MARGIN_SMALL + OFFSET_X , POPUPPANEL_MARGIN_SMALL * 2 + OFFSET_Y + VS_UNDERLINE_HEIGHT ); - Size = MAP_APPFONT ( VS_UNDERLINE_WIDTH, 13 ); - TabStop = TRUE; - Text [ en-US ] = "~More Options..."; - }; - - Image IMG_SINGLE - { - ImageBitmap = Bitmap{File = "symphony/line1.bmp";}; - }; - Image IMG_DOUBLE - { - ImageBitmap = Bitmap{File = "symphony/line2.bmp";}; - }; - Image IMG_BOLD2 - { - ImageBitmap = Bitmap{File = "symphony/line3.bmp";}; - }; - Image IMG_DOT - { - ImageBitmap = Bitmap{File = "symphony/line4.bmp";}; - }; - Image IMG_DOT_BOLD - { - ImageBitmap = Bitmap{File = "symphony/line5.bmp";}; - }; - Image IMG_DASH - { - ImageBitmap = Bitmap{File = "symphony/line6.bmp";}; - }; - Image IMG_DASH_LONG - { - ImageBitmap = Bitmap{File = "symphony/line7.bmp";}; - }; - Image IMG_DASH_DOT - { - ImageBitmap = Bitmap{File = "symphony/line8.bmp";}; - }; - Image IMG_DASH_DOT_DOT - { - ImageBitmap = Bitmap{File = "symphony/line9.bmp";}; - }; - Image IMG_WAVE - { - ImageBitmap = Bitmap{File = "symphony/line10.bmp";}; - }; - - //image when selected - Image IMG_SINGLE_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line1.bmp";}; - }; - Image IMG_DOUBLE_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line2.bmp";}; - }; - Image IMG_BOLD2_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line3.bmp";}; - }; - Image IMG_DOT_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line4.bmp";}; - }; - Image IMG_DOT_BOLD_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line5.bmp";}; - }; - Image IMG_DASH_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line6.bmp";}; - }; - Image IMG_DASH_LONG_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line7.bmp";}; - }; - Image IMG_DASH_DOT_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line8.bmp";}; - }; - Image IMG_DASH_DOT_DOT_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line9.bmp";}; - }; - Image IMG_WAVE_SEL - { - ImageBitmap = Bitmap{File = "symphony/selected-line10.bmp";}; - }; - - String STR_WITHOUT - { - Text [ en-US ] = "(Without)"; - }; - - //tips - String STR_SINGLE - { - Text [ en-US ] = "Single"; - }; - String STR_DOUBLE - { - Text [ en-US ] = "Double"; - }; - String STR_BOLD - { - Text [ en-US ] = "Bold"; - }; - String STR_DOT - { - Text [ en-US ] = "Dotted"; - }; - String STR_DOT_BOLD - { - Text [ en-US ] = "Dotted (Bold)"; - }; - String STR_DASH - { - Text [ en-US ] = "Dash"; - }; - String STR_DASH_LONG - { - Text [ en-US ] = "Long Dash"; - }; - String STR_DASH_DOT - { - Text [ en-US ] = "Dot Dash"; - }; - String STR_DASH_DOT_DOT - { - Text [ en-US ] = "Dot Dot Dash"; - }; - String STR_WAVE - { - Text [ en-US ] = "Wave"; - }; - -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx index 773103cb87ab..1405d1d3a153 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.cxx +++ b/svx/source/sidebar/text/TextUnderlineControl.cxx @@ -26,43 +26,39 @@ #include <editeng/udlnitem.hxx> #include <vcl/settings.hxx> -namespace svx { namespace sidebar { - -TextUnderlineControl::TextUnderlineControl ( - vcl::Window* pParent, - svx::sidebar::TextPropertyPanel& rPanel, - SfxBindings* pBindings) -: svx::sidebar::PopupControl( pParent,SVX_RES(RID_POPUPPANEL_TEXTPAGE_UNDERLINE)) -, mrTextPropertyPanel(rPanel) -, mpBindings(pBindings) -, maVSUnderline(VclPtr<ValueSet>::Create(this, SVX_RES(VS_UNDERLINE))) -, maPBOptions (VclPtr<PushButton>::Create(this, SVX_RES(PB_OPTIONS))) - -, maIMGSingle (SVX_RES(IMG_SINGLE)) -, maIMGDouble (SVX_RES(IMG_DOUBLE)) -, maIMGBold (SVX_RES(IMG_BOLD2)) -, maIMGDot (SVX_RES(IMG_DOT)) -, maIMGDotBold (SVX_RES(IMG_DOT_BOLD)) -, maIMGDash (SVX_RES(IMG_DASH)) -, maIMGDashLong (SVX_RES(IMG_DASH_LONG)) -, maIMGDashDot (SVX_RES(IMG_DASH_DOT)) -, maIMGDashDotDot (SVX_RES(IMG_DASH_DOT_DOT)) -, maIMGWave (SVX_RES(IMG_WAVE)) - -, maIMGSingleSel (SVX_RES(IMG_SINGLE_SEL)) -, maIMGDoubleSel (SVX_RES(IMG_DOUBLE_SEL)) -, maIMGBoldSel (SVX_RES(IMG_BOLD2_SEL)) -, maIMGDotSel (SVX_RES(IMG_DOT_SEL)) -, maIMGDotBoldSel (SVX_RES(IMG_DOT_BOLD_SEL)) -, maIMGDashSel (SVX_RES(IMG_DASH_SEL)) -, maIMGDashLongSel (SVX_RES(IMG_DASH_LONG_SEL)) -, maIMGDashDotSel (SVX_RES(IMG_DASH_DOT_SEL)) -, maIMGDashDotDotSel (SVX_RES(IMG_DASH_DOT_DOT_SEL)) -, maIMGWaveSel (SVX_RES(IMG_WAVE_SEL)) +namespace svx { +TextUnderlineControl::TextUnderlineControl(sal_uInt16 nId) +: SfxPopupWindow(nId, "TextUnderlineControl", "svx/ui/textunderlinecontrol.ui") { - initial(); - FreeResource(); + get(maNone, "none"); + get(maSingle, "single"); + get(maDouble, "double"); + get(maBold, "bold"); + get(maDot, "dot"); + get(maDotBold, "dotbold"); + get(maDash, "dash"); + get(maDashLong, "dashlong"); + get(maDashDot, "dashdot"); + get(maDashDotDot, "dashdotdot"); + get(maWave, "wave"); + get(maMoreOptions, "moreoptions"); + + maMoreOptions->SetHelpId(HID_UNDERLINE_BTN); + + Link<Button*,void> aLink = LINK(this, TextUnderlineControl, PBClickHdl); + maNone->SetClickHdl(aLink); + maSingle->SetClickHdl(aLink); + maDouble->SetClickHdl(aLink); + maBold->SetClickHdl(aLink); + maDot->SetClickHdl(aLink); + maDotBold->SetClickHdl(aLink); + maDash->SetClickHdl(aLink); + maDashLong->SetClickHdl(aLink); + maDashDot->SetClickHdl(aLink); + maDashDotDot->SetClickHdl(aLink); + maWave->SetClickHdl(aLink); + maMoreOptions->SetClickHdl(aLink); } TextUnderlineControl::~TextUnderlineControl() @@ -72,174 +68,84 @@ TextUnderlineControl::~TextUnderlineControl() void TextUnderlineControl::dispose() { - maVSUnderline.disposeAndClear(); - maPBOptions.disposeAndClear(); - svx::sidebar::PopupControl::dispose(); + maNone.clear(); + maSingle.clear(); + maDouble.clear(); + maBold.clear(); + maDot.clear(); + maDotBold.clear(); + maDash.clear(); + maDashLong.clear(); + maDashDot.clear(); + maDashDotDot.clear(); + maWave.clear(); + maMoreOptions.clear(); + + SfxPopupWindow::dispose(); } -void TextUnderlineControl::initial() +FontLineStyle TextUnderlineControl::getLineStyle(Button* pButton) { - maVSUnderline->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode() ? - GetSettings().GetStyleSettings().GetMenuColor() : - sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); - maVSUnderline->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode() ? - GetSettings().GetStyleSettings().GetMenuColor() : - sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); - - Link<Button*,void> aLink = LINK( this, TextUnderlineControl, PBClickHdl ) ; - maPBOptions->SetClickHdl(aLink); - - maVSUnderline->SetStyle( maVSUnderline->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT ); - - // 'none' item - maVSUnderline->SetStyle( maVSUnderline->GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET ); - maVSUnderline->SetText( SVX_RESSTR(STR_WITHOUT) ); - - maVSUnderline->InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE)); - maVSUnderline->SetItemData(1, reinterpret_cast<void*>(LINESTYLE_SINGLE)); - - maVSUnderline->InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE)); - maVSUnderline->SetItemData(2, reinterpret_cast<void*>(LINESTYLE_DOUBLE)); - - maVSUnderline->InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD)); - maVSUnderline->SetItemData(3, reinterpret_cast<void*>(LINESTYLE_BOLD)); - - maVSUnderline->InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT)); - maVSUnderline->SetItemData(4, reinterpret_cast<void*>(LINESTYLE_DOTTED)); - - maVSUnderline->InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD)); - maVSUnderline->SetItemData(5, reinterpret_cast<void*>(LINESTYLE_BOLDDOTTED)); - - maVSUnderline->InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH)); - maVSUnderline->SetItemData(6, reinterpret_cast<void*>(LINESTYLE_DASH)); - - maVSUnderline->InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG)); - maVSUnderline->SetItemData(7, reinterpret_cast<void*>(LINESTYLE_LONGDASH)); - - maVSUnderline->InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT)); - maVSUnderline->SetItemData(8, reinterpret_cast<void*>(LINESTYLE_DASHDOT)); + if(pButton == maSingle) + return LINESTYLE_SINGLE; + else if(pButton == maDouble) + return LINESTYLE_DOUBLE; + else if(pButton == maBold) + return LINESTYLE_BOLD; + else if(pButton == maDot) + return LINESTYLE_DOTTED; + else if(pButton == maDotBold) + return LINESTYLE_BOLDDOTTED; + else if(pButton == maDash) + return LINESTYLE_DASH; + else if(pButton == maDashLong) + return LINESTYLE_LONGDASH; + else if(pButton == maDashDot) + return LINESTYLE_DASHDOT; + else if(pButton == maDashDotDot) + return LINESTYLE_DASHDOTDOT; + else if(pButton == maWave) + return LINESTYLE_WAVE; + + return LINESTYLE_NONE; +} - maVSUnderline->InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT)); - maVSUnderline->SetItemData(9, reinterpret_cast<void*>(LINESTYLE_DASHDOTDOT)); +Color TextUnderlineControl::GetUnderlineColor() +{ + const SfxPoolItem* pItem; + SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_UNDERLINE, pItem); - maVSUnderline->InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE)); - maVSUnderline->SetItemData(10, reinterpret_cast<void*>(LINESTYLE_WAVE)); + const SvxUnderlineItem* pUnderlineItem = static_cast<const SvxUnderlineItem*>(pItem); - maVSUnderline->SetColCount(); - maVSUnderline->SetSelectHdl(LINK( this, TextUnderlineControl, VSSelectHdl )); + if(pUnderlineItem) + return pUnderlineItem->GetColor(); - maVSUnderline->StartSelection(); - maVSUnderline->Show(); + return COL_AUTO; } -void TextUnderlineControl::Rearrange(FontLineStyle eLine) +IMPL_LINK_TYPED(TextUnderlineControl, PBClickHdl, Button*, pButton, void) { - maVSUnderline->SetItemImage(1, maIMGSingle); - maVSUnderline->SetItemImage(2, maIMGDouble ); - maVSUnderline->SetItemImage(3, maIMGBold); - maVSUnderline->SetItemImage(4, maIMGDot); - maVSUnderline->SetItemImage(5, maIMGDotBold); - maVSUnderline->SetItemImage(6, maIMGDash); - maVSUnderline->SetItemImage(7, maIMGDashLong); - maVSUnderline->SetItemImage(8, maIMGDashDot); - maVSUnderline->SetItemImage(9, maIMGDashDotDot); - maVSUnderline->SetItemImage(10, maIMGWave); - - switch(eLine) + if(pButton == maMoreOptions) { - case LINESTYLE_SINGLE: - maVSUnderline->SetItemImage(1, maIMGSingleSel); - maVSUnderline->SelectItem(1); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_DOUBLE: - maVSUnderline->SetItemImage(2, maIMGDoubleSel); - maVSUnderline->SelectItem(2); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_BOLD: - maVSUnderline->SetItemImage(3, maIMGBoldSel); - maVSUnderline->SelectItem(3); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_DOTTED: - maVSUnderline->SetItemImage(4, maIMGDotSel); - maVSUnderline->SelectItem(4); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_BOLDDOTTED: - maVSUnderline->SetItemImage(5, maIMGDotBoldSel); - maVSUnderline->SelectItem(5); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_DASH: - maVSUnderline->SetItemImage(6, maIMGDashSel); - maVSUnderline->SelectItem(6); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_LONGDASH: - maVSUnderline->SetItemImage(7, maIMGDashLongSel); - maVSUnderline->SelectItem(7); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_DASHDOT: - maVSUnderline->SetItemImage(8, maIMGDashDotSel); - maVSUnderline->SelectItem(8); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_DASHDOTDOT: - maVSUnderline->SetItemImage(9, maIMGDashDotDotSel); - maVSUnderline->SelectItem(9); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_WAVE: - maVSUnderline->SetItemImage(10, maIMGWaveSel); - maVSUnderline->SelectItem(10); - maVSUnderline->GrabFocus(); - break; - case LINESTYLE_NONE: - maVSUnderline->SelectItem(0); - maVSUnderline->GrabFocus(); - break; - default: - maVSUnderline->SelectItem(1); - maVSUnderline->SetNoSelection(); - maPBOptions->GrabFocus(); - } - maVSUnderline->StartSelection(); -} + SfxDispatcher* pDisp = SfxViewFrame::Current()->GetBindings().GetDispatcher(); + pDisp->Execute(SID_CHAR_DLG_EFFECT, SfxCallMode::ASYNCHRON); -IMPL_LINK_TYPED(TextUnderlineControl, VSSelectHdl, ValueSet*, pControl, void) -{ - if ( pControl == maVSUnderline.get() ) + EndPopupMode(); + } + else { - const sal_uInt16 iPos = maVSUnderline->GetSelectItemId(); - const FontLineStyle eUnderline = ( iPos == 0 ) - ? LINESTYLE_NONE - : static_cast<FontLineStyle>(reinterpret_cast<sal_uInt64>(maVSUnderline->GetItemData( iPos ))); + const FontLineStyle eUnderline = getLineStyle(pButton); SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE); + aLineItem.SetColor(GetUnderlineColor()); - aLineItem.SetColor(mrTextPropertyPanel.GetUnderlineColor()); - mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_UNDERLINE, - SfxCallMode::RECORD, { &aLineItem }); - mrTextPropertyPanel.EndUnderlinePopupMode(); - } -} + SfxViewFrame::Current()->GetBindings().GetDispatcher()->ExecuteList(SID_ATTR_CHAR_UNDERLINE, + SfxCallMode::RECORD, { &aLineItem }); -IMPL_LINK_TYPED(TextUnderlineControl, PBClickHdl, Button *, pPBtn, void) -{ - if(pPBtn == maPBOptions.get()) - { - if (mpBindings) - { - SfxDispatcher* pDisp = mpBindings->GetDispatcher(); - pDisp->Execute( SID_CHAR_DLG_EFFECT, SfxCallMode::ASYNCHRON ); - } - mrTextPropertyPanel.EndUnderlinePopupMode(); + EndPopupMode(); } } -}} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx index 2e8b85e4463c..8ff75b5585af 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.hxx +++ b/svx/source/sidebar/text/TextUnderlineControl.hxx @@ -22,58 +22,40 @@ #include "svx/sidebar/PopupControl.hxx" #include <sfx2/bindings.hxx> -#include "TextPropertyPanel.hxx" #include <vcl/button.hxx> #include <vcl/vclenum.hxx> #include <svtools/valueset.hxx> +#include <sfx2/tbxctrl.hxx> -namespace svx{ namespace sidebar { +namespace svx { -class TextUnderlineControl:public svx::sidebar::PopupControl +class TextUnderlineControl : public SfxPopupWindow { public: - TextUnderlineControl ( - vcl::Window* pParent, - svx::sidebar::TextPropertyPanel& rPanel, - SfxBindings* pBindings); + TextUnderlineControl(sal_uInt16 nId); virtual ~TextUnderlineControl(); virtual void dispose() override; - void Rearrange(FontLineStyle eLine); private: - svx::sidebar::TextPropertyPanel& mrTextPropertyPanel; - SfxBindings* mpBindings; - VclPtr<ValueSet> maVSUnderline; - VclPtr<PushButton> maPBOptions; - - Image maIMGSingle; - Image maIMGDouble; - Image maIMGBold; - Image maIMGDot; - Image maIMGDotBold; - Image maIMGDash; - Image maIMGDashLong; - Image maIMGDashDot; - Image maIMGDashDotDot; - Image maIMGWave; - - Image maIMGSingleSel; - Image maIMGDoubleSel; - Image maIMGBoldSel; - Image maIMGDotSel; - Image maIMGDotBoldSel; - Image maIMGDashSel; - Image maIMGDashLongSel; - Image maIMGDashDotSel; - Image maIMGDashDotDotSel; - Image maIMGWaveSel; - - void initial(); - - DECL_LINK_TYPED( PBClickHdl, Button*, void); - DECL_LINK_TYPED(VSSelectHdl, ValueSet*, void); + VclPtr<PushButton> maNone; + VclPtr<PushButton> maSingle; + VclPtr<PushButton> maDouble; + VclPtr<PushButton> maBold; + VclPtr<PushButton> maDot; + VclPtr<PushButton> maDotBold; + VclPtr<PushButton> maDash; + VclPtr<PushButton> maDashLong; + VclPtr<PushButton> maDashDot; + VclPtr<PushButton> maDashDotDot; + VclPtr<PushButton> maWave; + VclPtr<PushButton> maMoreOptions; + + FontLineStyle getLineStyle(Button* pButton); + Color GetUnderlineColor(); + + DECL_LINK_TYPED(PBClickHdl, Button*, void); }; -}} +} #endif diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx index b776346f47b4..1694034685e3 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.cxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx @@ -16,34 +16,33 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "TextUnderlinePopup.hxx" +#include <svx/TextUnderlinePopup.hxx> #include "TextUnderlineControl.hxx" +#include <editeng/udlnitem.hxx> +#include <vcl/toolbox.hxx> -namespace svx { namespace sidebar { +using namespace svx; -TextUnderlinePopup::TextUnderlinePopup ( - vcl::Window* pParent, - const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator) - : Popup( - pParent, - rControlCreator, - OUString( "Underline")) +SFX_IMPL_TOOLBOX_CONTROL(TextUnderlinePopup, SvxTextLineItem); + +TextUnderlinePopup::TextUnderlinePopup(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) + : SfxToolBoxControl(nSlotId, nId, rTbx) { + rTbx.SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits(nId)); } TextUnderlinePopup::~TextUnderlinePopup() { } -void TextUnderlinePopup::Rearrange (FontLineStyle eLine) +VclPtr<SfxPopupWindow> TextUnderlinePopup::CreatePopupWindow() { - ProvideContainerAndControl(); + VclPtr<TextUnderlineControl> pControl = VclPtr<TextUnderlineControl>::Create(GetSlotId()); + pControl->StartPopupMode(&GetToolBox(), FloatWinPopupFlags::GrabFocus|FloatWinPopupFlags::NoAppFocusClose); + SetPopupWindow(pControl); - TextUnderlineControl* pControl = dynamic_cast<TextUnderlineControl*>(mxControl.get()); - if (pControl != nullptr) - pControl->Rearrange(eLine); + return pControl; } -} } // end of namespace svx::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/textunderlinecontrol.ui b/svx/uiconfig/ui/textunderlinecontrol.ui new file mode 100644 index 000000000000..19a8522546cf --- /dev/null +++ b/svx/uiconfig/ui/textunderlinecontrol.ui @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface> + <requires lib="gtk+" version="3.10"/> + <object class="GtkWindow" id="TextUnderlineControl"> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">4</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">True</property> + <property name="type_hint">popup-menu</property> + <property name="skip_pager_hint">True</property> + <property name="deletable">False</property> + <child> + <object class="GtkBox" id="box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">6</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkButton" id="none"> + <property name="label" translatable="yes">(Without)</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="relief">none</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="single"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Single</property> + <property name="image">image_spacing_1</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="double"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Double</property> + <property name="image">image_spacing_2</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="bold"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Bold</property> + <property name="image">image_spacing_3</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkButton" id="dot"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Dotted</property> + <property name="image">image_spacing_4</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkButton" id="dotbold"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Dotted (Bold)</property> + <property name="image">image_spacing_5</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkButton" id="dash"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Dash</property> + <property name="image">image_spacing_6</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkButton" id="dashlong"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Long Dash</property> + <property name="image">image_spacing_7</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkButton" id="dashdot"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Dot Dash</property> + <property name="image">image_spacing_8</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkButton" id="dashdotdot"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Dot Dot Dash</property> + <property name="image">image_spacing_9</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkButton" id="wave"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Wave</property> + <property name="image">image_spacing_10</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + <child> + <object class="GtkButton" id="moreoptions"> + <property name="label" translatable="yes">_More Options...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + </object> + </child> + </object> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">9999</property> + <property name="step_increment">1</property> + <property name="page_increment">1</property> + </object> + <object class="GtkImage" id="image_spacing_1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line1.png</property> + </object> + <object class="GtkImage" id="image_spacing_10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line10.png</property> + </object> + <object class="GtkImage" id="image_spacing_2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line2.png</property> + </object> + <object class="GtkImage" id="image_spacing_3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line3.png</property> + </object> + <object class="GtkImage" id="image_spacing_4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line4.png</property> + </object> + <object class="GtkImage" id="image_spacing_5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line5.png</property> + </object> + <object class="GtkImage" id="image_spacing_6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line6.png</property> + </object> + <object class="GtkImage" id="image_spacing_7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line7.png</property> + </object> + <object class="GtkImage" id="image_spacing_8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line8.png</property> + </object> + <object class="GtkImage" id="image_spacing_9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/line9.png</property> + </object> +</interface> diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 9067e61ed0f8..eae15531a905 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -26,6 +26,7 @@ #include <svtools/ehdl.hxx> #include <svx/ParaLineSpacingPopup.hxx> #include <svx/TextCharacterSpacingPopup.hxx> +#include <svx/TextUnderlinePopup.hxx> #include <svx/svdobj.hxx> #include <svx/pszctrl.hxx> #include <svx/insctrl.hxx> @@ -286,6 +287,7 @@ void SwDLL::RegisterControls() SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod ); svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod); svx::TextCharacterSpacingPopup::RegisterControl(SID_ATTR_CHAR_KERNING, pMod); + svx::TextUnderlinePopup::RegisterControl(SID_ATTR_CHAR_UNDERLINE, pMod); SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); |