[Libreoffice-commits] core.git: 3 commits - include/svx include/vcl sc/qa sc/source svx/inc svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk vcl/inc vcl/source
Damjan Jovanovic
damjan at apache.org
Tue Apr 5 19:25:18 UTC 2016
include/svx/dialogs.hrc | 8
include/svx/sidebar/LinePropertyPanelBase.hxx | 9
include/svx/sidebar/LineWidthPopup.hxx | 38 +-
include/vcl/edit.hxx | 1
include/vcl/lstbox.hxx | 1
include/vcl/window.hxx | 1
sc/qa/unit/ucalc.cxx | 4
sc/source/core/tool/stringutil.cxx | 12
sc/source/ui/cctrl/checklistmenu.cxx | 5
sc/source/ui/inc/checklistmenu.hxx | 1
sc/source/ui/view/gridwin.cxx | 8
svx/Library_svx.mk | 1
svx/UIConfig_svx.mk | 1
svx/inc/helpid.hrc | 2
svx/source/dialog/sdstring.src | 10
svx/source/sidebar/line/LinePropertyPanel.cxx | 1
svx/source/sidebar/line/LinePropertyPanel.hrc | 11
svx/source/sidebar/line/LinePropertyPanel.hxx | 1
svx/source/sidebar/line/LinePropertyPanel.src | 71 ----
svx/source/sidebar/line/LinePropertyPanelBase.cxx | 18 -
svx/source/sidebar/line/LineWidthControl.cxx | 323 ----------------------
svx/source/sidebar/line/LineWidthControl.hxx | 82 -----
svx/source/sidebar/line/LineWidthPopup.cxx | 229 +++++++++++++--
svx/source/sidebar/line/LineWidthValueSet.cxx | 23 +
svx/source/sidebar/line/LineWidthValueSet.hxx | 4
svx/source/tbxctrls/lboxctrl.cxx | 8
svx/source/tbxctrls/tbcontrl.cxx | 25 -
svx/uiconfig/ui/floatinglineproperty.ui | 85 +++++
vcl/inc/listbox.hxx | 1
vcl/source/control/edit.cxx | 8
vcl/source/control/imp_listbox.cxx | 5
vcl/source/control/listbox.cxx | 13
vcl/source/window/dockmgr.cxx | 11
vcl/source/window/floatwin.cxx | 2
vcl/source/window/mouse.cxx | 4
vcl/source/window/window.cxx | 7
vcl/source/window/winproc.cxx | 5
37 files changed, 380 insertions(+), 659 deletions(-)
New commits:
commit 00cf864e5d317016d7224c199aa982d07bd70113
Author: Damjan Jovanovic <damjan at apache.org>
Date: Mon Apr 4 04:11:07 2016 +0000
Resolves: #i126901# CSV import: values with + or - followed by...
thousand separator and 3 digits (eg. +,123) are imported as a number
Do not allow numbers parsed from CVS files when "Detect special numbers" is
off, to contain thousand separators before digits, even if after a +/- sign
(eg. -,123 or +,789). Treat these as strings instead.
Also added unit tests for this.
Patch by: me
(cherry picked from commit 10458a24f4e6cc311e65fb80ce576fed39937be2)
Change-Id: Ic946fc6a11326861f238157ddb651bc5a5b28edd
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index fb78981..f46cd76 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -1815,7 +1815,9 @@ void Test::testCSV()
{ "1.0 ", European, false, 0.0 },
{ "1.000", European, true, 1000.0 },
{ "1137.999", English, true, 1137.999 },
- { "1.000.00", European, false, 0.0 }
+ { "1.000.00", European, false, 0.0 },
+ { "+,123", English, false, 0.0 },
+ { "-,123", English, false, 0.0 }
};
for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(aTests); i++) {
OUString aStr(aTests[i].pStr, strlen (aTests[i].pStr), RTL_TEXTENCODING_UTF8);
diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx
index 70313ff..606c079 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -69,6 +69,7 @@ bool ScStringUtil::parseSimpleNumber(
const sal_Unicode* pLast = p + (n-1);
sal_Int32 nPosDSep = -1, nPosGSep = -1;
sal_uInt32 nDigitCount = 0;
+ bool haveSeenDigit = false;
sal_Int32 nPosExponent = -1;
// Skip preceding spaces.
@@ -106,6 +107,7 @@ bool ScStringUtil::parseSimpleNumber(
{
// this is a digit.
aBuf.append(c);
+ haveSeenDigit = true;
++nDigitCount;
}
else if (c == dsep)
@@ -130,8 +132,8 @@ bool ScStringUtil::parseSimpleNumber(
{
// this is a group (thousand) separator.
- if (i == 0)
- // not allowed as the first character.
+ if (!haveSeenDigit)
+ // not allowed before digits.
return false;
if (nPosDSep >= 0)
@@ -216,6 +218,7 @@ bool ScStringUtil::parseSimpleNumber(
const char* pLast = p + (n-1);
sal_Int32 nPosDSep = -1, nPosGSep = -1;
sal_uInt32 nDigitCount = 0;
+ bool haveSeenDigit = false;
sal_Int32 nPosExponent = -1;
// Skip preceding spaces.
@@ -250,6 +253,7 @@ bool ScStringUtil::parseSimpleNumber(
{
// this is a digit.
aBuf.append(c);
+ haveSeenDigit = true;
++nDigitCount;
}
else if (c == dsep)
@@ -274,8 +278,8 @@ bool ScStringUtil::parseSimpleNumber(
{
// this is a group (thousand) separator.
- if (i == 0)
- // not allowed as the first character.
+ if (!haveSeenDigit)
+ // not allowed before digits.
return false;
if (nPosDSep >= 0)
commit dd46727b99d4bb5135451aa7e5e1bdb197373843
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 5 15:27:38 2016 +0100
Resolves; tdf#87120 no keyboard navigation inside floating windows
lets try and treat these the same as we do normal toplevels
like dialogs if they popup with GrabFocus.
This way focus can be set on widgets inside the floating windows, and
so keyboard traversal of widgets etc all works.
Change-Id: If447429756cf5d136b9c2e2f62fafb37c167b1ce
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 57a8e07..ce686d4 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -186,7 +186,6 @@ public:
virtual void Command( const CommandEvent& rCEvt ) override;
virtual void StateChanged( StateChangedType nType ) override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
virtual void Modify();
virtual void UpdateData();
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 09067d2..3276e3e 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -134,7 +134,6 @@ public:
virtual void DoubleClick();
virtual void GetFocus() override;
virtual void LoseFocus() override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
virtual const Wallpaper& GetDisplayBackground() const override;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 5b0fd16..1f0cddd 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -824,7 +824,6 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual bool PreNotify( NotifyEvent& rNEvt );
virtual bool Notify( NotifyEvent& rNEvt );
- virtual vcl::Window* GetPreferredKeyInputWindow();
// These methods call the relevant virtual method when not in/post dispose
void CompatGetFocus();
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index be5f356..fa943fc 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1327,11 +1327,6 @@ void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const Rect
rRenderContext.DrawRect(Rectangle(aPos,aSize));
}
-vcl::Window* ScCheckListMenuWindow::GetPreferredKeyInputWindow()
-{
- return maTabStops.GetCurrentControl();
-}
-
Reference<XAccessible> ScCheckListMenuWindow::CreateAccessible()
{
if (!mxAccessible.is())
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index fa104ed..8824acb 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -299,7 +299,6 @@ public:
virtual void MouseMove(const MouseEvent& rMEvt) override;
virtual bool Notify(NotifyEvent& rNEvt) override;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
void setMemberSize(size_t n);
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 33de00a..1a8ed51 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -347,8 +347,6 @@ public:
ScFilterFloatingWindow( vcl::Window* pParent, WinBits nStyle = WB_STDFLOATWIN );
virtual ~ScFilterFloatingWindow();
virtual void dispose() override;
- // required for System FloatingWindows that will not process KeyInput by themselves
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
};
ScFilterFloatingWindow::ScFilterFloatingWindow( vcl::Window* pParent, WinBits nStyle ) :
@@ -366,12 +364,6 @@ void ScFilterFloatingWindow::dispose()
FloatingWindow::dispose();
}
-vcl::Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow()
-{
- // redirect keyinput in the child window
- return GetWindow(GetWindowType::FirstChild) ? GetWindow(GetWindowType::FirstChild)->GetPreferredKeyInputWindow() : nullptr; // will be the FilterBox
-}
-
static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
{
// If it is a editable range and if there is a Matrix cell at the bottom right with an
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index e5e83d6..e5141f1 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -73,7 +73,6 @@ public:
bool IsUserSelected() const { return bUserSel; }
void SetUserSelected( bool bVal ) { bUserSel = bVal; }
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
};
SvxPopupWindowListBox::SvxPopupWindowListBox(sal_uInt16 nSlotId, const OUString& rCommandURL, sal_uInt16 nId, ToolBox& rTbx)
@@ -128,13 +127,6 @@ void SvxPopupWindowListBox::StateChanged(
SfxPopupWindow::StateChanged( nSID, eState, pState );
}
-vcl::Window* SvxPopupWindowListBox::GetPreferredKeyInputWindow()
-{
- // allows forwarding key events in the correct window
- // without setting the focus
- return m_pListBox->GetPreferredKeyInputWindow();
-}
-
SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
:SfxToolBoxControl( nSlotId, nId, rTbx ),
pPopupWin ( nullptr )
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 6637626..dc70581 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -259,7 +259,6 @@ private:
protected:
virtual void Resize() override;
virtual bool Close() override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
virtual void GetFocus() override;
public:
@@ -285,9 +284,7 @@ private:
protected:
virtual void Resize() override;
virtual bool Close() override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
virtual void GetFocus() override;
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
public:
SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow );
virtual ~SvxLineWindow_Impl() { disposeOnce(); }
@@ -1659,11 +1656,6 @@ void SvxFrameWindow_Impl::dispose()
SfxPopupWindow::dispose();
}
-vcl::Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
-{
- return aFrameSet.get();
-}
-
void SvxFrameWindow_Impl::GetFocus()
{
if (aFrameSet)
@@ -2043,28 +2035,11 @@ bool SvxLineWindow_Impl::Close()
return SfxPopupWindow::Close();
}
-vcl::Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
-{
- return m_aLineStyleLb.get();
-}
-
void SvxLineWindow_Impl::GetFocus()
{
m_aLineStyleLb->GrabFocus();
}
-void SvxLineWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
-{
- SfxPopupWindow::DataChanged( rDCEvt );
-#if 0
- if( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) )
- {
- CreateBitmaps();
- Invalidate();
- }
-#endif
-}
-
SfxStyleControllerItem_Impl::SfxStyleControllerItem_Impl(
const Reference< XDispatchProvider >& rDispatchProvider,
sal_uInt16 nSlotId, // Family-ID
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 863bef6..3cd6944 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -406,7 +406,6 @@ public:
virtual void Resize() override;
virtual const Wallpaper& GetDisplayBackground() const override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr );
sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr, const Image& rImage );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 9dab058..231422d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1945,14 +1945,6 @@ void Edit::GetFocus()
Control::GetFocus();
}
-vcl::Window* Edit::GetPreferredKeyInputWindow()
-{
- if ( mpSubEdit )
- return mpSubEdit->GetPreferredKeyInputWindow();
- else
- return this;
-}
-
void Edit::LoseFocus()
{
if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() )
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 61b9373..2d3424f 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2224,11 +2224,6 @@ void ImplListBox::GetFocus()
Control::GetFocus();
}
-vcl::Window* ImplListBox::GetPreferredKeyInputWindow()
-{
- return maLBWindow.get();
-}
-
void ImplListBox::Resize()
{
Control::Resize();
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index 3602232..1cbcc4d 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -496,19 +496,6 @@ void ListBox::GetFocus()
Control::GetFocus();
}
-vcl::Window* ListBox::GetPreferredKeyInputWindow()
-{
- if ( mpImplLB )
- {
- if( IsDropDownBox() )
- return mpImplWin->GetPreferredKeyInputWindow();
- else
- return mpImplLB->GetPreferredKeyInputWindow();
- }
-
- return Control::GetPreferredKeyInputWindow();
-}
-
void ListBox::LoseFocus()
{
if( IsDropDownBox() )
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 653b663..7e9172f 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -488,7 +488,6 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual void Tracking( const TrackingEvent& rTEvt ) override;
virtual void Resize() override;
- virtual vcl::Window* GetPreferredKeyInputWindow() override;
Rectangle GetDragRect() const;
Point GetToolboxPosition() const;
@@ -536,14 +535,6 @@ css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::Create
return css::uno::Reference< css::accessibility::XAccessible >();
}
-vcl::Window* ImplPopupFloatWin::GetPreferredKeyInputWindow()
-{
- if( mpWindowImpl->mpClientWindow )
- return mpWindowImpl->mpClientWindow;
- else
- return FloatingWindow::GetPreferredKeyInputWindow();
-}
-
void ImplPopupFloatWin::ImplSetBorder()
{
// although we have no border in the sense of a borderwindow
@@ -1152,7 +1143,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
{
// send HOME key to subtoolbar in order to select first item
KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) );
- mpFloatWin->GetPreferredKeyInputWindow()->KeyInput( aEvent );
+ mpFloatWin->KeyInput(aEvent);
}
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 6553f94..9492e9c 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -715,6 +715,8 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags
{
// force key input even without focus (useful for menus)
mbGrabFocus = true;
+ mpWindowImpl->mpFrameData->mbHasFocus = true;
+ GrabFocus();
}
Show( true, ShowFlags::NoActivate );
}
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 892d419..4782c15 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -273,9 +273,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
vcl::Window *pParent = this;
while( pParent )
{
- // #102158#, ignore grabfocus only if the floating parent grabs keyboard focus by itself (GrabsFocus())
- // otherwise we cannot set the focus in a floating toolbox
- if( ( (pParent->mpWindowImpl->mbFloatWin && static_cast<FloatingWindow*>(pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) )
+ if ((pParent->GetStyle() & WB_SYSTEMFLOATWIN) && !(pParent->GetStyle() & WB_MOVEABLE))
{
bMustNotGrabFocus = true;
break;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 1092c4e..5d630fa 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3443,13 +3443,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
SetLineColor( oldLineCol );
}
-// controls should return the window that gets the
-// focus by default, so keyevents can be sent to that window directly
-vcl::Window* Window::GetPreferredKeyInputWindow()
-{
- return this;
-}
-
bool Window::IsScrollable() const
{
// check for scrollbars
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index b2de412..062136e 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -821,10 +821,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
if( !pChild || ( pChild->ImplGetWindowImpl()->mbFloatWin && !static_cast<FloatingWindow *>(pChild)->GrabsFocus() ) )
pChild = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
else
- {
- // allow floaters to forward keyinput to some member
- pChild = pChild->GetPreferredKeyInputWindow();
- }
+ pChild = pChild->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
// no child - than no input
if ( !pChild )
commit 92d43df81e282d20c129b105b2c7300a312091eb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 4 16:19:06 2016 +0100
convert src line width popup to .ui format
Change-Id: I39e8bfd89538c36c97afb3e4e86c3ba9156274e0
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index afa3889..4ff3dc5 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -201,7 +201,6 @@
#define RID_POPUPPANEL_AREAPAGE_TRGR (RID_SVX_START + 320)
#define RID_SIDEBAR_LINE_PANEL (RID_SVX_START + 321)
-#define RID_POPUPPANEL_LINEPAGE_WIDTH (RID_SVX_START + 324)
#define RID_SIDEBAR_POSSIZE_PANEL (RID_SVX_START + 325)
#define RID_SIDEBAR_GRAPHIC_PANEL (RID_SVX_START + 326)
@@ -1089,8 +1088,13 @@
#define RID_SVXSTR_ZOOM_PAGE_WIDTH (RID_SVX_START + 1389)
#define RID_SVXSTR_ZOOM_OPTIMAL_VIEW (RID_SVX_START + 1390)
+#define RID_SVXSTR_WIDTH_LAST_CUSTOM (RID_SVX_START + 1391)
+#define RID_SVXSTR_PT (RID_SVX_START + 1392)
+#define RID_SVXIMG_WIDTH_CUSTOM (RID_SVX_START + 1393)
+#define RID_SVXIMG_WIDTH_CUSTOM_GRAY (RID_SVX_START + 1394)
+
// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
-#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1391)
+#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1395)
// if we have _a_lot_ time, we should group the resource ids by type, instead
// of grouping them by semantics. The reason is that resource ids have to be
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx
index ac354de..93398f8 100644
--- a/include/svx/sidebar/LinePropertyPanelBase.hxx
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -65,9 +65,6 @@ namespace svx
namespace sidebar
{
-class PopupContainer;
-class LineWidthControl;
-
class SVX_DLLPUBLIC LinePropertyPanelBase : public PanelLayout
{
public:
@@ -81,8 +78,6 @@ public:
void SetWidthIcon(int n);
void SetWidthIcon();
- void EndLineWidthPopupMode();
-
// constructor/destuctor
LinePropertyPanelBase(
vcl::Window* pParent,
@@ -152,7 +147,7 @@ private:
std::unique_ptr<XLineEndItem> mpEndItem;
//popup windows
- LineWidthPopup maLineWidthPopup;
+ VclPtr<LineWidthPopup> mxLineWidthPopup;
// images from resource
Image maIMGNone;
@@ -173,8 +168,6 @@ private:
DECL_LINK_TYPED(ChangeEndHdl, ListBox&, void);
DECL_LINK_TYPED(ChangeEdgeStyleHdl, ListBox&, void);
DECL_LINK_TYPED(ChangeCapStyleHdl, ListBox&, void);
-
- VclPtr<PopupControl> CreateLineWidthPopupControl (PopupContainer* pParent);
};
} } // end of namespace svx::sidebar
diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx
index d507e9c..79952c1 100644
--- a/include/svx/sidebar/LineWidthPopup.hxx
+++ b/include/svx/sidebar/LineWidthPopup.hxx
@@ -19,28 +19,46 @@
#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX
#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX
-#include "svx/sidebar/Popup.hxx"
-
#include <svl/poolitem.hxx>
+#include <vcl/floatwin.hxx>
+#include <vcl/layout.hxx>
-#include <functional>
-
+class Edit;
+class MetricField;
+class ValueSet;
namespace svx { namespace sidebar {
-class LineWidthPopup
- : public Popup
+class LinePropertyPanelBase;
+class LineWidthValueSet;
+
+class LineWidthPopup : public FloatingWindow
{
public:
- LineWidthPopup (
- vcl::Window* pParent,
- const ::std::function<PopupControl*(PopupContainer*)>& rControlCreator);
+ LineWidthPopup(LinePropertyPanelBase& rParent);
+ virtual void dispose() override;
virtual ~LineWidthPopup();
void SetWidthSelect (long lValue, bool bValuable, SfxMapUnit eMapUnit);
private:
- void PopupModeEndCallback();
+ LinePropertyPanelBase& m_rParent;
+ OUString* m_pStr;
+ OUString m_sPt;
+ SfxMapUnit m_eMapUnit;
+ bool m_bVSFocus;
+ bool m_bCustom;
+ bool m_bCloseByEdit;
+ long m_nCustomWidth;
+ long m_nTmpCustomWidth;
+ VclPtr<MetricField> m_xMFWidth;
+ VclPtr<VclContainer> m_xBox;
+ VclPtr<LineWidthValueSet> m_xVSWidth;
+ Image m_aIMGCus;
+ Image m_aIMGCusGray;
+
+ DECL_LINK_TYPED(VSSelectHdl, ValueSet*, void);
+ DECL_LINK_TYPED(MFModifyHdl, Edit&, void);
};
} } // end of namespace svx::sidebar
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 8869014..b22dfa2 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -194,7 +194,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/graphic/GraphicPropertyPanel \
svx/source/sidebar/line/LinePropertyPanel \
svx/source/sidebar/line/LinePropertyPanelBase \
- svx/source/sidebar/line/LineWidthControl \
svx/source/sidebar/line/LineWidthValueSet \
svx/source/sidebar/line/LineWidthPopup \
svx/source/sidebar/possize/PosSizePropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 39df1db..c7853f87 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/extrustiondepthdialog \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/floatingcontour \
+ svx/uiconfig/ui/floatinglineproperty \
svx/uiconfig/ui/floatingundoredo \
svx/uiconfig/ui/fontworkgallerydialog \
svx/uiconfig/ui/fontworkspacingdialog \
diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index 82269b1..66b0193 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -89,8 +89,6 @@
#define HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND "SVX_HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND"
#define HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST "SVX_HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST"
#define HID_PPROPERTYPANEL_TEXT_UNDERLINE_VS "SVX_HID_PPROPERTYPANEL_TEXT_UNDERLINE_VS"
-#define HID_PPROPERTYPANEL_LINE_VS_WIDTH "SVX_HID_PPROPERTYPANEL_LINE_VS_WIDTH"
-#define HID_PPROPERTYPANEL_LINE_MTR_WIDTH "SVX_HID_PPROPERTYPANEL_LINE_MTR_WIDTH"
#define HID_PPROPERTYPANEL_TEXT_SPACING_VS "SVX_HID_PPROPERTYPANEL_TEXT_SPACING_VS"
#define HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES "SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES"
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index ce7ed3c..e4726d8 100644
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -2362,4 +2362,14 @@ String RID_SVXSTR_RECOVERYONLY_FINISH
Text[ en-US ] = "~Finish";
};
+String RID_SVXSTR_WIDTH_LAST_CUSTOM
+{
+ Text[ en-US ] = "Last Custom Value";
+};
+
+String RID_SVXSTR_PT
+{
+ Text[ en-US ] = "pt";
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 135bd21..925cd20 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -48,7 +48,6 @@
#include <svx/xlinjoit.hxx>
#include "svx/sidebar/PopupContainer.hxx"
#include "svx/sidebar/PopupControl.hxx"
-#include "LineWidthControl.hxx"
using namespace css;
using namespace css::uno;
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hrc b/svx/source/sidebar/line/LinePropertyPanel.hrc
index 764ebfd..dc46dd8 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hrc
+++ b/svx/source/sidebar/line/LinePropertyPanel.hrc
@@ -25,15 +25,4 @@
//style popup page
#define PB_OPTIONS 2
-//width popup page
-#define VS_WIDTH 1
-#define MF_WIDTH 2
-#define FT_CUSTOME 3
-#define FT_LINE_WIDTH 4
-#define IMG_WIDTH_CUSTOM 5
-#define IMG_WIDTH_CUSTOM_GRAY 6
-#define CT_BORDER 7
-#define STR_WIDTH_LAST_CUSTOM 8
-#define STR_PT 9
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 594109b..595cc45 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -56,7 +56,6 @@ namespace sidebar
{
class PopupContainer;
-class LineWidthControl;
class LinePropertyPanel : public LinePropertyPanelBase,
public sfx2::sidebar::IContextChangeReceiver,
diff --git a/svx/source/sidebar/line/LinePropertyPanel.src b/svx/source/sidebar/line/LinePropertyPanel.src
index 28ccd5d..41dbb97 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.src
+++ b/svx/source/sidebar/line/LinePropertyPanel.src
@@ -58,72 +58,13 @@ Image IMG_WIDTH8_ICON
{
ImageBitmap = Bitmap{File = "symphony/width8.png";};
};
-
-Control RID_POPUPPANEL_LINEPAGE_WIDTH
+Image RID_SVXIMG_WIDTH_CUSTOM
{
- OutputSize = TRUE;
- DialogControl = TRUE;
- Border = FALSE;
-
- Size = MAP_APPFONT( POPUPPANEL_MARGIN_SMALL * 2 + POPUP_BORDER_WIDTH + 80, POPUPPANEL_MARGIN_SMALL + POPUPPANEL_MARGIN_LARGE + POPUP_BORDER_WIDTH + 12 * 9 + POPUPPANEL_MARGIN_SMALL * 2 + TEXT_HEIGHT + (POPUPPANEL_MARGIN_LARGE * 2 + TEXT_HEIGHT + 12 + TEXT_CONTROL_SPACING_VERTICAL));
-
- Control VS_WIDTH
- {
- HelpId = HID_PPROPERTYPANEL_LINE_VS_WIDTH ;
- Hide = TRUE ;
- Pos = MAP_APPFONT( POPUPPANEL_MARGIN_SMALL + OFFSET_X , POPUPPANEL_MARGIN_SMALL + OFFSET_Y );
- Size = MAP_APPFONT ( 80 , 12 * 9);
- TabStop = TRUE ;
- Text = "Width";
- };
- FixedText FT_CUSTOME
- {
- Pos = MAP_APPFONT ( POPUPPANEL_MARGIN_LARGE + OFFSET_X, POPUPPANEL_MARGIN_SMALL + OFFSET_Y + 12 * 9 + POPUPPANEL_MARGIN_SMALL ) ;
- Size = MAP_APPFONT ( 80 , TEXT_HEIGHT ) ;
- Text [ en-US ] = "Custom:" ;
- };
- FixedText FT_LINE_WIDTH
- {
- Pos = MAP_APPFONT ( CUSTOM_X + POPUPPANEL_MARGIN_LARGE, CUSTOM_Y + POPUPPANEL_MARGIN_LARGE) ;
- Size = MAP_APPFONT ( 74 - POPUPPANEL_MARGIN_LARGE * 2 , TEXT_HEIGHT ) ;
- Text [ en-US ] = "Line ~width:" ;
- };
- MetricField MF_WIDTH
- {
- Border = TRUE ;
- HelpID = HID_PPROPERTYPANEL_LINE_MTR_WIDTH ;
- Pos = MAP_APPFONT ( CUSTOM_X + POPUPPANEL_MARGIN_LARGE , CUSTOM_Y + POPUPPANEL_MARGIN_LARGE + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- Right = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 5000 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Value = 1 ;
- Unit = FUNIT_MM ;
- Last = 5000 ;
- SpinSize = 10 ;
- QuickHelpText [ en-US ] = "Specify the width of the line.";
- };
-
- Image IMG_WIDTH_CUSTOM
- {
- ImageBitmap = Bitmap{File = "symphony/last_custom_common.png";};
- };
- Image IMG_WIDTH_CUSTOM_GRAY
- {
- ImageBitmap = Bitmap{File = "symphony/last_custom_common_grey.png";};
- };
- String STR_WIDTH_LAST_CUSTOM
- {
- Text [ en-US ] = "Last Custom Value";
- };
- String STR_PT
- {
- Text [ en-US ] = "pt";
- };
+ ImageBitmap = Bitmap{File = "symphony/last_custom_common.png";};
+};
+Image RID_SVXIMG_WIDTH_CUSTOM_GRAY
+{
+ ImageBitmap = Bitmap{File = "symphony/last_custom_common_grey.png";};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 2c99eb9..2efc6d6 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -48,7 +48,6 @@
#include <svx/xlinjoit.hxx>
#include "svx/sidebar/PopupContainer.hxx"
#include "svx/sidebar/PopupControl.hxx"
-#include "LineWidthControl.hxx"
using namespace css;
using namespace css::uno;
@@ -174,7 +173,7 @@ LinePropertyPanelBase::LinePropertyPanelBase(
mnWidthCoreValue(0),
mpStartItem(),
mpEndItem(),
- maLineWidthPopup(this, [this] (PopupContainer *const pContainer) { return this->CreateLineWidthPopupControl(pContainer); }),
+ mxLineWidthPopup(VclPtr<LineWidthPopup>::Create(*this)),
maIMGNone(SVX_RES(IMG_NONE_ICON)),
mpIMGWidthIcon(),
mbWidthValuable(true),
@@ -205,6 +204,7 @@ LinePropertyPanelBase::~LinePropertyPanelBase()
void LinePropertyPanelBase::dispose()
{
+ mxLineWidthPopup.disposeAndClear();
mpFTWidth.clear();
mpTBWidth.clear();
mpTBColor.clear();
@@ -683,8 +683,8 @@ IMPL_LINK_TYPED(LinePropertyPanelBase, ToolboxWidthSelectHdl,ToolBox*, pToolBox,
{
if (pToolBox->GetItemCommand(pToolBox->GetCurItemId()) == UNO_SELECTWIDTH)
{
- maLineWidthPopup.SetWidthSelect(mnWidthCoreValue, mbWidthValuable, meMapUnit);
- maLineWidthPopup.Show(*pToolBox);
+ mxLineWidthPopup->SetWidthSelect(mnWidthCoreValue, mbWidthValuable, meMapUnit);
+ mxLineWidthPopup->StartPopupMode(pToolBox, FloatWinPopupFlags::GrabFocus);
}
}
@@ -696,16 +696,6 @@ IMPL_LINK_NOARG_TYPED( LinePropertyPanelBase, ChangeTransparentHdl, Edit&, void
setLineTransparency(aItem);
}
-VclPtr<PopupControl> LinePropertyPanelBase::CreateLineWidthPopupControl (PopupContainer* pParent)
-{
- return VclPtrInstance<LineWidthControl>(pParent, *this);
-}
-
-void LinePropertyPanelBase::EndLineWidthPopupMode()
-{
- maLineWidthPopup.Hide();
-}
-
void LinePropertyPanelBase::SetWidthIcon(int n)
{
const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH);
diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
deleted file mode 100644
index c938102..0000000
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ /dev/null
@@ -1,323 +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 "LineWidthControl.hxx"
-#include "LinePropertyPanel.hrc"
-#include <svx/sidebar/LinePropertyPanelBase.hxx>
-
-#include <svx/dialogs.hrc>
-#include <svx/dialmgr.hxx>
-#include <sfx2/sidebar/ResourceDefinitions.hrc>
-#include <comphelper/processfactory.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-#include <unotools/viewoptions.hxx>
-#include <svx/xlnwtit.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include "svx/sidebar/PopupContainer.hxx"
-
-namespace svx { namespace sidebar {
-
-LineWidthControl::LineWidthControl (
- vcl::Window* pParent,
- LinePropertyPanelBase& rPanel)
- : svx::sidebar::PopupControl(pParent,SVX_RES(RID_POPUPPANEL_LINEPAGE_WIDTH)),
- mrLinePropertyPanel(rPanel),
- maVSWidth(VclPtr<LineWidthValueSet>::Create(this, SVX_RES(VS_WIDTH))),
- maFTCus( VclPtr<FixedText>::Create(this, SVX_RES(FT_CUSTOME))),
- maFTWidth( VclPtr<FixedText>::Create(this, SVX_RES(FT_LINE_WIDTH))),
- maMFWidth( VclPtr<MetricField>::Create(this, SVX_RES(MF_WIDTH))),
- meMapUnit(SFX_MAPUNIT_TWIP),
- rStr(nullptr),
- mstrPT(SVX_RESSTR(STR_PT)),
- mnCustomWidth(0),
- mbCustom(false),
- mbCloseByEdit(false),
- mnTmpCustomWidth(0),
- mbVSFocus(true),
- maIMGCus(SVX_RES(IMG_WIDTH_CUSTOM)),
- maIMGCusGray(SVX_RES(IMG_WIDTH_CUSTOM_GRAY))
-{
- Initialize();
- FreeResource();
-}
-
-LineWidthControl::~LineWidthControl()
-{
- disposeOnce();
-}
-
-void LineWidthControl::dispose()
-{
- delete[] rStr;
- maVSWidth.disposeAndClear();
- maFTCus.disposeAndClear();
- maFTWidth.disposeAndClear();
- maMFWidth.disposeAndClear();
- svx::sidebar::PopupControl::dispose();
-}
-
-void LineWidthControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect)
-{
- svx::sidebar::PopupControl::Paint(rRenderContext, rect);
-
- rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
-
- Point aPos(rRenderContext.LogicToPixel(Point(CUSTOM_X, CUSTOM_Y), MAP_APPFONT));
- Size aSize(rRenderContext.LogicToPixel(Size(CUSTOM_W, CUSTOM_H), MAP_APPFONT));
- Rectangle aRect(aPos, aSize);
- aRect.Left() -= 1;
- aRect.Top() -= 1;
- aRect.Right() += 1;
- aRect.Bottom() += 1;
-
- Color aLineColor(189, 201, 219);
- if (!GetSettings().GetStyleSettings().GetHighContrastMode())
- rRenderContext.SetLineColor(aLineColor);
- else
- rRenderContext.SetLineColor(GetSettings().GetStyleSettings().GetShadowColor());
- rRenderContext.SetFillColor(COL_TRANSPARENT);
- rRenderContext.DrawRect(aRect);
-
- rRenderContext.Pop();
-}
-
-void LineWidthControl::Initialize()
-{
- maVSWidth->SetStyle( maVSWidth->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
- //for high contrast wj
- if(GetSettings().GetStyleSettings().GetHighContrastMode())
- {
- maVSWidth->SetColor(GetSettings().GetStyleSettings().GetMenuColor());
- // maBorder.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
- maFTWidth->SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
- }
- else
- {
- maVSWidth->SetColor(COL_WHITE);
- // maBorder.SetBackground(Wallpaper(COL_WHITE));
- maFTWidth->SetBackground(Wallpaper(COL_WHITE));
- }
-
- sal_Int64 nFirst= maMFWidth->Denormalize( maMFWidth->GetFirst( FUNIT_TWIP ) );
- sal_Int64 nLast = maMFWidth->Denormalize( maMFWidth->GetLast( FUNIT_TWIP ) );
- sal_Int64 nMin = maMFWidth->Denormalize( maMFWidth->GetMin( FUNIT_TWIP ) );
- sal_Int64 nMax = maMFWidth->Denormalize( maMFWidth->GetMax( FUNIT_TWIP ) );
- maMFWidth->SetSpinSize( 10 );
- maMFWidth->SetUnit( FUNIT_POINT );
- if( maMFWidth->GetDecimalDigits() > 1 )
- maMFWidth->SetDecimalDigits( 1 );
- maMFWidth->SetFirst( maMFWidth->Normalize( nFirst ), FUNIT_TWIP );
- maMFWidth->SetLast( maMFWidth->Normalize( nLast ), FUNIT_TWIP );
- maMFWidth->SetMin( maMFWidth->Normalize( nMin ), FUNIT_TWIP );
- maMFWidth->SetMax( maMFWidth->Normalize( nMax ), FUNIT_TWIP );
-
- rStr = new OUString[9];
- //modify,
- rStr[0] = "0.5";
- rStr[1] = "0.8";
- rStr[2] = "1.0";
- rStr[3] = "1.5";
- rStr[4] = "2.3";
- rStr[5] = "3.0";
- rStr[6] = "4.5";
- rStr[7] = "6.0";
- rStr[8] = SVX_RESSTR(STR_WIDTH_LAST_CUSTOM);
-
- const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
- const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
-
- for(int i = 0; i <= 7 ; i++)
- {
- rStr[i] = rStr[i].replace('.', cSep);//Modify
- rStr[i] += " ";
- rStr[i] += mstrPT;
- }
- //end
-
- for(sal_uInt16 i = 1 ; i <= 9 ; i++)
- {
- maVSWidth->InsertItem(i);
- maVSWidth->SetItemText(i, rStr[i-1]);
- }
- maVSWidth->SetUnit(rStr);
- maVSWidth->SetItemData(1, reinterpret_cast<void*>(5));
- maVSWidth->SetItemData(2, reinterpret_cast<void*>(8));
- maVSWidth->SetItemData(3, reinterpret_cast<void*>(10));
- maVSWidth->SetItemData(4, reinterpret_cast<void*>(15));
- maVSWidth->SetItemData(5, reinterpret_cast<void*>(23));
- maVSWidth->SetItemData(6, reinterpret_cast<void*>(30));
- maVSWidth->SetItemData(7, reinterpret_cast<void*>(45));
- maVSWidth->SetItemData(8, reinterpret_cast<void*>(60));
- maVSWidth->SetImage(maIMGCusGray);
-
- maVSWidth->SetSelItem(0);
-
- maVSWidth->SetSelectHdl(LINK( this, LineWidthControl, VSSelectHdl ));
- maMFWidth->SetModifyHdl(LINK(this, LineWidthControl, MFModifyHdl));
-
- maVSWidth->StartSelection();
- maVSWidth->Show();
-}
-
-void LineWidthControl::GetFocus()
-{
- if (!mbVSFocus && maMFWidth)
- maMFWidth->GrabFocus();
- else if (maVSWidth)
- maVSWidth->GrabFocus();
-}
-
-void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit eMapUnit)
-{
- mbVSFocus = true;
- maVSWidth->SetSelItem(0);
- mbCloseByEdit = false;
- meMapUnit = eMapUnit;
- SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE );
- if (aWinOpt.Exists())
- {
- css::uno::Sequence <css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
- OUString aTmp;
- if ( aSeq.getLength())
- aSeq[0].Value >>= aTmp;
-
- OUString aWinData( aTmp );
- mnCustomWidth = aWinData.toInt32();
- mbCustom = true;
- maVSWidth->SetImage(maIMGCus);
- maVSWidth->SetCusEnable(true);
-
- OUString aStrTip( OUString::number( (double)mnCustomWidth / 10));
- aStrTip += mstrPT;
- maVSWidth->SetItemText(9, aStrTip);
- }
- else
- {
- mbCustom = false;
- maVSWidth->SetImage(maIMGCusGray);
- maVSWidth->SetCusEnable(false);
- //modify
- //String aStrTip(String(SVX_RES(STR_WIDTH_LAST_CUSTOM)));
- //maVSWidth->SetItemText(9, aStrTip);
- maVSWidth->SetItemText(9, rStr[8]);
- }
-
- if (bValuable)
- {
- sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, (MapUnit) eMapUnit, MAP_100TH_MM );
- nVal = maMFWidth->Normalize(nVal);
- maMFWidth->SetValue( nVal, FUNIT_100TH_MM );
- }
- else
- {
- maMFWidth->SetText( "" );
- }
-
- OUString strCurrValue = maMFWidth->GetText();
- sal_uInt16 i = 0;
- for(; i < 8; i++)
- {
- if(strCurrValue == rStr[i])
- {
- maVSWidth->SetSelItem(i+1);
- break;
- }
- }
-
- if (i>=8)
- {
- mbVSFocus = false;
- maVSWidth->SetSelItem(0);
- }
- maVSWidth->SetFormat();
- maVSWidth->Invalidate();
- maVSWidth->StartSelection();
-}
-
-IMPL_LINK_TYPED(LineWidthControl, VSSelectHdl, ValueSet*, pControl, void)
-{
- if (pControl == maVSWidth.get())
- {
- sal_uInt16 iPos = maVSWidth->GetSelectItemId();
- if (iPos >= 1 && iPos <= 8)
- {
- sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth->GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
- nVal = maMFWidth->Denormalize(nVal);
- XLineWidthItem aWidthItem( nVal );
- mrLinePropertyPanel.setLineWidth(aWidthItem);
- mrLinePropertyPanel.SetWidthIcon(iPos);
- mrLinePropertyPanel.SetWidth(nVal);
- mbCloseByEdit = false;
- mnTmpCustomWidth = 0;
- }
- else if (iPos == 9)
- {//last custom
- //modified
- if (mbCustom)
- {
- long nVal = LogicToLogic(mnCustomWidth , MAP_POINT, (MapUnit)meMapUnit);
- nVal = maMFWidth->Denormalize(nVal);
- XLineWidthItem aWidthItem( nVal );
- mrLinePropertyPanel.setLineWidth(aWidthItem);
- mrLinePropertyPanel.SetWidth(nVal);
- mbCloseByEdit = false;
- mnTmpCustomWidth = 0;
- }
- else
- {
- maVSWidth->SetNoSelection(); //add , set no selection and keep the last select item
- maVSWidth->SetFormat();
- maVSWidth->Invalidate();
- Invalidate();
- maVSWidth->StartSelection();
- }
- //modify end
- }
- if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && mbCustom)) //add
- mrLinePropertyPanel.EndLineWidthPopupMode();
- }
-}
-
-IMPL_LINK_TYPED(LineWidthControl, MFModifyHdl, Edit&, rControl, void)
-{
- if (&rControl == maMFWidth.get())
- {
- if(maVSWidth->GetSelItem())
- {
- maVSWidth->SetSelItem(0);
- maVSWidth->SetFormat();
- maVSWidth->Invalidate();
- Invalidate();
- maVSWidth->StartSelection();
- }
- long nTmp = static_cast<long>(maMFWidth->GetValue());
- long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)meMapUnit );
- sal_Int32 nNewWidth = (short)maMFWidth->Denormalize( nVal );
- XLineWidthItem aWidthItem(nNewWidth);
- mrLinePropertyPanel.setLineWidth(aWidthItem);
-
- mbCloseByEdit = true;
- mnTmpCustomWidth = nTmp;
- }
-}
-
-} } // end of namespace svx::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LineWidthControl.hxx b/svx/source/sidebar/line/LineWidthControl.hxx
deleted file mode 100644
index faad9d7..0000000
--- a/svx/source/sidebar/line/LineWidthControl.hxx
+++ /dev/null
@@ -1,82 +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 .
- */
-
-#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHCONTROL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHCONTROL_HXX
-
-#include "svx/sidebar/PopupControl.hxx"
-#include "LineWidthValueSet.hxx"
-#include <svl/poolitem.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-
-class SfxBindings;
-
-namespace svx { namespace sidebar {
-
-class LinePropertyPanelBase;
-
-class LineWidthControl : public svx::sidebar::PopupControl
-{
-public:
- LineWidthControl (vcl::Window* pParent, LinePropertyPanelBase& rPanel);
- virtual ~LineWidthControl();
- virtual void dispose() override;
-
- virtual void GetFocus() override;
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& aRect) override;
-
- void SetWidthSelect( long lValue, bool bValuable, SfxMapUnit eMapUnit);
- bool IsCloseByEdit()
- {
- return mbCloseByEdit;
- }
- long GetTmpCustomWidth()
- {
- return mnTmpCustomWidth;
- }
-
-private:
- LinePropertyPanelBase& mrLinePropertyPanel;
- VclPtr<LineWidthValueSet> maVSWidth;
- VclPtr<FixedText> maFTCus;
- VclPtr<FixedText> maFTWidth;
- VclPtr<MetricField> maMFWidth;
- SfxMapUnit meMapUnit;
- OUString* rStr;
- OUString mstrPT;
- long mnCustomWidth;
- bool mbCustom;
- bool mbCloseByEdit;
- long mnTmpCustomWidth;
- bool mbVSFocus;
-
- Image maIMGCus;
- Image maIMGCusGray;
-
- void Initialize();
- DECL_LINK_TYPED(VSSelectHdl, ValueSet*, void);
- DECL_LINK_TYPED(MFModifyHdl, Edit&, void);
-};
-
-} } // end of namespace svx::sidebar
-
-#endif // INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHCONTROL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx
index 02cc902..9112eb8 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -17,52 +17,231 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svx/sidebar/LineWidthPopup.hxx>
-#include "LineWidthControl.hxx"
-
#include <svx/sidebar/LinePropertyPanelBase.hxx>
-
+#include <svx/dialmgr.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/xlnwtit.hxx>
#include <unotools/viewoptions.hxx>
-
+#include <vcl/svapp.hxx>
+#include "LineWidthValueSet.hxx"
namespace svx { namespace sidebar {
-LineWidthPopup::LineWidthPopup (
- vcl::Window* pParent,
- const ::std::function<PopupControl*(PopupContainer*)>& rControlCreator)
- : Popup(
- pParent,
- rControlCreator,
- OUString( "Width"))
+LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent)
+ : FloatingWindow(&rParent, "FloatingLineProperty", "svx/ui/floatinglineproperty.ui")
+ , m_rParent(rParent)
+ , m_pStr(nullptr)
+ , m_sPt(SVX_RESSTR(RID_SVXSTR_PT))
+ , m_eMapUnit(SFX_MAPUNIT_TWIP)
+ , m_bVSFocus(true)
+ , m_bCustom(false)
+ , m_bCloseByEdit(false)
+ , m_nCustomWidth(0)
+ , m_nTmpCustomWidth(0)
+ , m_aIMGCus(SVX_RES(RID_SVXIMG_WIDTH_CUSTOM))
+ , m_aIMGCusGray(SVX_RES(RID_SVXIMG_WIDTH_CUSTOM_GRAY))
{
- SetPopupModeEndHandler([this] () { return this->PopupModeEndCallback(); });
+ get(m_xMFWidth, "spin");
+
+ get(m_xBox, "box");
+
+ m_xVSWidth = VclPtr<LineWidthValueSet>::Create(m_xBox);
+
+ m_xVSWidth->SetStyle(m_xVSWidth->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT);
+
+ m_pStr = new OUString[9];
+
+ m_pStr[0] = "0.5";
+ m_pStr[1] = "0.8";
+ m_pStr[2] = "1.0";
+ m_pStr[3] = "1.5";
+ m_pStr[4] = "2.3";
+ m_pStr[5] = "3.0";
+ m_pStr[6] = "4.5";
+ m_pStr[7] = "6.0";
+ m_pStr[8] = SVX_RESSTR(RID_SVXSTR_WIDTH_LAST_CUSTOM);
+
+ const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+ const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
+
+ for(int i = 0; i <= 7 ; i++)
+ {
+ m_pStr[i] = m_pStr[i].replace('.', cSep);//Modify
+ m_pStr[i] += " ";
+ m_pStr[i] += m_sPt;
+ }
+
+ for (sal_uInt16 i = 1 ; i <= 9; ++i)
+ {
+ m_xVSWidth->InsertItem(i);
+ m_xVSWidth->SetItemText(i, m_pStr[i-1]);
+ }
+
+ m_xVSWidth->SetUnit(m_pStr);
+ m_xVSWidth->SetItemData(1, reinterpret_cast<void*>(5));
+ m_xVSWidth->SetItemData(2, reinterpret_cast<void*>(8));
+ m_xVSWidth->SetItemData(3, reinterpret_cast<void*>(10));
+ m_xVSWidth->SetItemData(4, reinterpret_cast<void*>(15));
+ m_xVSWidth->SetItemData(5, reinterpret_cast<void*>(23));
+ m_xVSWidth->SetItemData(6, reinterpret_cast<void*>(30));
+ m_xVSWidth->SetItemData(7, reinterpret_cast<void*>(45));
+ m_xVSWidth->SetItemData(8, reinterpret_cast<void*>(60));
+ m_xVSWidth->SetImage(m_aIMGCusGray);
+
+ m_xVSWidth->SetSelItem(0);
+
+ m_xVSWidth->SetSelectHdl(LINK(this, LineWidthPopup, VSSelectHdl));
+ m_xMFWidth->SetModifyHdl(LINK(this, LineWidthPopup, MFModifyHdl));
+
+ m_xVSWidth->StartSelection();
+ m_xVSWidth->Show();
+}
+
+void LineWidthPopup::dispose()
+{
+ delete[] m_pStr;
+ m_xVSWidth.disposeAndClear();
+ m_xBox.clear();
+ m_xMFWidth.clear();
+ FloatingWindow::dispose();
}
LineWidthPopup::~LineWidthPopup()
{
+ disposeOnce();
}
-void LineWidthPopup::SetWidthSelect (long lValue, bool bValuable, SfxMapUnit eMapUnit)
+IMPL_LINK_TYPED(LineWidthPopup, VSSelectHdl, ValueSet*, /*pControl*/, void)
{
- ProvideContainerAndControl();
+ sal_uInt16 iPos = m_xVSWidth->GetSelectItemId();
+ if (iPos >= 1 && iPos <= 8)
+ {
+ sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData( iPos )), MAP_POINT, (MapUnit)m_eMapUnit);
+ nVal = m_xMFWidth->Denormalize(nVal);
+ XLineWidthItem aWidthItem( nVal );
+ m_rParent.setLineWidth(aWidthItem);
+ m_rParent.SetWidthIcon(iPos);
+ m_rParent.SetWidth(nVal);
+ m_bCloseByEdit = false;
+ m_nTmpCustomWidth = 0;
+ }
+ else if (iPos == 9)
+ {//last custom
+ //modified
+ if (m_bCustom)
+ {
+ long nVal = LogicToLogic(m_nCustomWidth , MAP_POINT, (MapUnit)m_eMapUnit);
+ nVal = m_xMFWidth->Denormalize(nVal);
+ XLineWidthItem aWidthItem( nVal );
+ m_rParent.setLineWidth(aWidthItem);
+ m_rParent.SetWidth(nVal);
+ m_bCloseByEdit = false;
+ m_nTmpCustomWidth = 0;
+ }
+ else
+ {
+ m_xVSWidth->SetNoSelection(); //add , set no selection and keep the last select item
+ m_xVSWidth->SetFormat();
+ m_xVSWidth->Invalidate();
+ Invalidate();
+ m_xVSWidth->StartSelection();
+ }
+ //modify end
+ }
+ if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && m_bCustom)) //add
+ {
+ EndPopupMode();
+ }
+}
- LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mxControl.get());
- if (pControl != nullptr)
- pControl->SetWidthSelect(lValue, bValuable, eMapUnit);
+IMPL_LINK_TYPED(LineWidthPopup, MFModifyHdl, Edit&, /*rControl*/, void)
+{
+ if (m_xVSWidth->GetSelItem())
+ {
+ m_xVSWidth->SetSelItem(0);
+ m_xVSWidth->SetFormat();
+ m_xVSWidth->Invalidate();
+ Invalidate();
+ m_xVSWidth->StartSelection();
+ }
+ long nTmp = static_cast<long>(m_xMFWidth->GetValue());
+ long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)m_eMapUnit );
+ sal_Int32 nNewWidth = (short)m_xMFWidth->Denormalize( nVal );
+ XLineWidthItem aWidthItem(nNewWidth);
+ m_rParent.setLineWidth(aWidthItem);
+
+ m_bCloseByEdit = true;
+ m_nTmpCustomWidth = nTmp;
}
-void LineWidthPopup::PopupModeEndCallback()
+void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, SfxMapUnit eMapUnit)
{
- LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mxControl.get());
- if (pControl != nullptr)
+ m_bVSFocus = true;
+ m_xVSWidth->SetSelItem(0);
+ m_bCloseByEdit = false;
+ m_eMapUnit = eMapUnit;
+ SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE );
+ if (aWinOpt.Exists())
+ {
+ css::uno::Sequence <css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
+ OUString aTmp;
+ if ( aSeq.getLength())
+ aSeq[0].Value >>= aTmp;
+
+ OUString aWinData( aTmp );
+ m_nCustomWidth = aWinData.toInt32();
+ m_bCustom = true;
+ m_xVSWidth->SetImage(m_aIMGCus);
+ m_xVSWidth->SetCusEnable(true);
+
+ OUString aStrTip( OUString::number( (double)m_nCustomWidth / 10));
+ aStrTip += m_sPt;
+ m_xVSWidth->SetItemText(9, aStrTip);
+ }
+ else
{
- if (pControl->IsCloseByEdit())
+ m_bCustom = false;
+ m_xVSWidth->SetImage(m_aIMGCusGray);
+ m_xVSWidth->SetCusEnable(false);
+ m_xVSWidth->SetItemText(9, m_pStr[8]);
+ }
+
+ if (bValuable)
+ {
+ sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, (MapUnit) eMapUnit, MAP_100TH_MM );
+ nVal = m_xMFWidth->Normalize(nVal);
+ m_xMFWidth->SetValue( nVal, FUNIT_100TH_MM );
+ }
+ else
+ {
+ m_xMFWidth->SetText( "" );
+ }
+
+ OUString strCurrValue = m_xMFWidth->GetText();
+ sal_uInt16 i = 0;
+ for(; i < 8; i++)
+ {
+ if (strCurrValue == m_pStr[i])
{
- SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE );
- css::uno::Sequence < css::beans::NamedValue > aSeq
- { { "LineWidth", css::uno::makeAny(OUString::number(pControl->GetTmpCustomWidth())) } };
- aWinOpt.SetUserData( aSeq );
+ m_xVSWidth->SetSelItem(i+1);
+ break;
}
}
+
+ if (i>=8)
+ {
+ m_bVSFocus = false;
+ m_xVSWidth->SetSelItem(0);
+ }
+
+ m_xVSWidth->SetFormat();
+ m_xVSWidth->Invalidate();
+ m_xVSWidth->StartSelection();
+
+ if (m_bVSFocus)
+ m_xVSWidth->GrabFocus();
+ else
+ m_xMFWidth->GrabFocus();
}
} } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index a260709..d4172d4 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -23,16 +23,20 @@
namespace svx { namespace sidebar {
-LineWidthValueSet::LineWidthValueSet (
- vcl::Window* pParent, const ResId& rResId)
- : ValueSet( pParent, rResId ),
- pVDev(nullptr),
- nSelItem(0),
- bCusEnable(false)
+LineWidthValueSet::LineWidthValueSet(vcl::Window* pParent)
+ : ValueSet(pParent, WB_TABSTOP)
+ , pVDev(nullptr)
+ , nSelItem(0)
+ , bCusEnable(false)
{
strUnit = new OUString[9];
+}
+
+void LineWidthValueSet::Resize()
+{
SetColCount();
- SetLineCount( 9);
+ SetLineCount(9);
+ ValueSet::Resize();
}
LineWidthValueSet::~LineWidthValueSet()
@@ -167,6 +171,11 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt )
pDev->SetFont(aOldFont);
}
+Size LineWidthValueSet::GetOptimalSize() const
+{
+ return LogicToPixel(Size(80, 12 * 9), MAP_APPFONT);
+}
+
} } // end of namespace svx::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx
index b99e0db..36a17ad 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.hxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.hxx
@@ -28,7 +28,7 @@ class LineWidthValueSet
: public ValueSet
{
public:
- LineWidthValueSet (vcl::Window* pParent, const ResId& rResId);
+ LineWidthValueSet(vcl::Window* pParent);
virtual ~LineWidthValueSet();
virtual void dispose() override;
@@ -39,6 +39,8 @@ public:
void SetCusEnable(bool bEnable);
virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
+ virtual void Resize() override;
+ virtual Size GetOptimalSize() const override;
protected:
VclPtr<VirtualDevice> pVDev;
diff --git a/svx/uiconfig/ui/floatinglineproperty.ui b/svx/uiconfig/ui/floatinglineproperty.ui
new file mode 100644
index 0000000..17daafe
--- /dev/null
+++ b/svx/uiconfig/ui/floatinglineproperty.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">500</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkWindow" id="FloatingLineProperty:border">
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</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="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Custom Line Width:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">spin:0.0pt</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spin:0.0pt">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="climb_rate">10</property>
+ <property name="digits">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list