Resolves: fdo#83010 remove svx::WrapField
in favour of a wrap property on NumericField Change-Id: I62c6bdb69a16f37ae6018a2fe41070fb18dbe4a0
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
#include <svl/itemset.hxx>
|
||||
#include "TextDirectionListBox.hxx"
|
||||
#include <svx/dialcontrol.hxx>
|
||||
#include <svx/wrapfield.hxx>
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
|
||||
class SvNumberFormatter;
|
||||
@@ -64,7 +63,7 @@ private:
|
||||
VclHBox* m_pBxOrientation;
|
||||
svx::DialControl* m_pDC_Dial;
|
||||
FixedText* m_pFT_Dial;
|
||||
svx::WrapField* m_pNF_Degrees;
|
||||
NumericField* m_pNF_Degrees;
|
||||
|
||||
VclHBox* m_pBxTextDirection;
|
||||
TextDirectionListBox* m_pLB_TextDirection;
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <vcl/button.hxx>
|
||||
#include <vcl/fixed.hxx>
|
||||
#include <svx/dialcontrol.hxx>
|
||||
#include <svx/wrapfield.hxx>
|
||||
#include <svx/orienthelper.hxx>
|
||||
#include "TextDirectionListBox.hxx"
|
||||
|
||||
@@ -51,7 +50,7 @@ private:
|
||||
FixedText* m_pFlOrient;
|
||||
svx::DialControl* m_pCtrlDial;
|
||||
FixedText* m_pFtRotate;
|
||||
svx::WrapField* m_pNfRotate;
|
||||
NumericField* m_pNfRotate;
|
||||
TriStateBox* m_pCbStacked;
|
||||
svx::OrientationHelper* m_pOrientHlp;
|
||||
|
||||
|
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
#include <svx/dialcontrol.hxx>
|
||||
#include <svx/wrapfield.hxx>
|
||||
#include <svx/orienthelper.hxx>
|
||||
#include <vcl/fixed.hxx>
|
||||
#include "TextDirectionListBox.hxx"
|
||||
@@ -34,7 +33,7 @@ class SchAlignmentTabPage : public SfxTabPage
|
||||
private:
|
||||
svx::DialControl* m_pCtrlDial;
|
||||
FixedText* m_pFtRotate;
|
||||
svx::WrapField* m_pNfRotate;
|
||||
NumericField* m_pNfRotate;
|
||||
TriStateBox* m_pCbStacked;
|
||||
svx::OrientationHelper* m_pOrientHlp;
|
||||
FixedText* m_pFtTextDirection;
|
||||
|
@@ -1,12 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<!-- interface-requires LibreOffice 1.0 -->
|
||||
<object class="GtkAdjustment" id="adjustmentDEGREE">
|
||||
<property name="upper">359</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststorePLACEMENT">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name guint1 -->
|
||||
<column type="guint"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Best fit</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Center</col>
|
||||
<col id="1">1</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Above</col>
|
||||
<col id="1">2</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Top left</col>
|
||||
<col id="1">3</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Left</col>
|
||||
<col id="1">4</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Bottom left</col>
|
||||
<col id="1">5</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Below</col>
|
||||
<col id="1">6</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Bottom right</col>
|
||||
<col id="1">7</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Right</col>
|
||||
<col id="1">8</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Top right</col>
|
||||
<col id="1">9</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Inside</col>
|
||||
<col id="1">10</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Outside</col>
|
||||
<col id="1">11</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Near origin</col>
|
||||
<col id="1">12</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststoreSEPARATOR">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name guint1 -->
|
||||
<column type="guint"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Space</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Comma</col>
|
||||
<col id="1">1</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Semicolon</col>
|
||||
<col id="1">2</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">New line</col>
|
||||
<col id="1">3</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkDialog" id="dlg_DataLabels">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
@@ -366,13 +455,13 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-WrapField" id="NF_LABEL_DEGREES">
|
||||
<object class="GtkSpinButton" id="NF_LABEL_DEGREES">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="adjustment">adjustmentDEGREE</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -474,94 +563,6 @@
|
||||
<action-widget response="0">help</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststorePLACEMENT">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name guint1 -->
|
||||
<column type="guint"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Best fit</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Center</col>
|
||||
<col id="1">1</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Above</col>
|
||||
<col id="1">2</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Top left</col>
|
||||
<col id="1">3</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Left</col>
|
||||
<col id="1">4</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Bottom left</col>
|
||||
<col id="1">5</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Below</col>
|
||||
<col id="1">6</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Bottom right</col>
|
||||
<col id="1">7</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Right</col>
|
||||
<col id="1">8</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Top right</col>
|
||||
<col id="1">9</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Inside</col>
|
||||
<col id="1">10</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Outside</col>
|
||||
<col id="1">11</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Near origin</col>
|
||||
<col id="1">12</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststoreSEPARATOR">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name guint1 -->
|
||||
<column type="guint"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Space</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Comma</col>
|
||||
<col id="1">1</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Semicolon</col>
|
||||
<col id="1">2</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">New line</col>
|
||||
<col id="1">3</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="sizegroup1">
|
||||
<widgets>
|
||||
<widget name="FT_TEXT_SEPARATOR"/>
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="svxlo-WrapField" id="OrientDegree">
|
||||
<object class="GtkSpinButton" id="OrientDegree">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_top">40</property>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<!-- interface-requires LibreOffice 1.0 -->
|
||||
<object class="GtkAdjustment" id="adjustmentDEGREE">
|
||||
<property name="upper">359</property>
|
||||
@@ -387,12 +388,13 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-WrapField" id="NF_LABEL_DEGREES">
|
||||
<object class="GtkSpinButton" id="NF_LABEL_DEGREES">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="adjustment">adjustmentDEGREE</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<!-- interface-requires LibreOffice 1.0 -->
|
||||
<object class="GtkAdjustment" id="adjustmentDEGREE">
|
||||
<property name="upper">359</property>
|
||||
@@ -85,13 +86,13 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-WrapField" id="NF_STARTING_ANGLE">
|
||||
<object class="GtkSpinButton" id="NF_STARTING_ANGLE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="adjustment">adjustmentDEGREE</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<!-- interface-requires LibreOffice 1.0 -->
|
||||
<object class="GtkAdjustment" id="adjustmentSpinDegrees">
|
||||
<property name="upper">359</property>
|
||||
@@ -255,12 +256,11 @@
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="svxlo-WrapField" id="OrientDegree">
|
||||
<object class="GtkSpinButton" id="OrientDegree">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_top">40</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="progress_pulse_step">1</property>
|
||||
<property name="adjustment">adjustmentSpinDegrees</property>
|
||||
<property name="wrap">True</property>
|
||||
|
@@ -45,7 +45,6 @@
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
#include <svtools/valueset.hxx>
|
||||
#include <svx/dialcontrol.hxx>
|
||||
#include <svx/wrapfield.hxx>
|
||||
#include <svx/frmdirlbox.hxx>
|
||||
|
||||
namespace svx {
|
||||
@@ -86,7 +85,7 @@ private:
|
||||
|
||||
DialControl* m_pCtrlDial;
|
||||
FixedText* m_pFtRotate;
|
||||
WrapField* m_pNfRotate;
|
||||
NumericField* m_pNfRotate;
|
||||
FixedText* m_pFtRefEdge;
|
||||
ValueSet* m_pVsRefEdge;
|
||||
TriStateBox* m_pCbStacked;
|
||||
|
@@ -79,7 +79,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-WrapField" id="spinDegrees">
|
||||
<object class="GtkSpinButton" id="spinDegrees">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
|
@@ -591,9 +591,6 @@
|
||||
<glade-widget-class title="Sidebar Dial Control" name="svxlo-SidebarDialControl"
|
||||
generic-name="Sidebar Dial Control" parent="GtkSpinner"
|
||||
icon-name="widget-gtk-spinner"/>
|
||||
<glade-widget-class title="Wrap Field" name="svxlo-WrapField"
|
||||
generic-name="Wrap Field" parent="GtkSpinButton"
|
||||
icon-name="widget-gtk-spinbutton"/>
|
||||
<glade-widget-class title="Relative Numeric Field" name="svxlo-SvxRelativeField"
|
||||
generic-name="Relative Numeric Field" parent="GtkSpinButton"
|
||||
icon-name="widget-gtk-spinbutton"/>
|
||||
|
@@ -1,50 +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_WRAPFIELD_HXX
|
||||
#define INCLUDED_SVX_WRAPFIELD_HXX
|
||||
|
||||
#include <vcl/field.hxx>
|
||||
#include <svx/svxdllapi.h>
|
||||
|
||||
namespace svx {
|
||||
|
||||
|
||||
|
||||
/** A numeric spin field that wraps around the value on limits.
|
||||
@descr Note: Use type "NumericField" in resources. */
|
||||
class SVX_DLLPUBLIC WrapField : public NumericField
|
||||
{
|
||||
public:
|
||||
explicit WrapField( vcl::Window* pParent, WinBits nBits );
|
||||
|
||||
protected:
|
||||
/** Up event with wrap-around functionality. */
|
||||
virtual void Up() SAL_OVERRIDE;
|
||||
/** Down event with wrap-around functionality. */
|
||||
virtual void Down() SAL_OVERRIDE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace svx
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -150,7 +150,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
|
||||
svx/source/dialog/swframeposstrings \
|
||||
svx/source/dialog/txencbox \
|
||||
svx/source/dialog/txenctab \
|
||||
svx/source/dialog/wrapfield \
|
||||
svx/source/engine3d/float3d \
|
||||
svx/source/items/algitem \
|
||||
svx/source/items/hlnkitem \
|
||||
|
@@ -1,51 +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 "svx/wrapfield.hxx"
|
||||
#include <vcl/builder.hxx>
|
||||
|
||||
namespace svx {
|
||||
|
||||
WrapField::WrapField( vcl::Window* pParent, WinBits nBits ) :
|
||||
NumericField( pParent, nBits )
|
||||
{
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeWrapField(vcl::Window *pParent, VclBuilder::stringmap &)
|
||||
{
|
||||
return new WrapField(pParent, WB_SPIN|WB_REPEAT|WB_BORDER|WB_TABSTOP);
|
||||
}
|
||||
|
||||
void WrapField::Up()
|
||||
{
|
||||
SetValue( ((GetValue() + GetSpinSize() - GetMin()) % (GetMax() + 1)) + GetMin() );
|
||||
GetUpHdl().Call( this );
|
||||
}
|
||||
|
||||
void WrapField::Down()
|
||||
{
|
||||
SetValue( ((GetValue() - GetSpinSize() + GetMax() + 1 - GetMin()) % (GetMax() + 1)) + GetMin() );
|
||||
GetDownHdl().Call( this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace svx
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
Reference in New Issue
Block a user