summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-02 12:39:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-03 21:55:24 +0200
commit7e64aaebce8667f7ab173ea3807c62f81138b4af (patch)
tree0fe1c975221f32b742a8a09aa05ed431b55f8d9a /cui
parent55fcb23ea5caa509d8254910c581d234f7ec9199 (diff)
weld SvxTextAttrPage
with a a11y rework to be more like the insert special char a11y also, route a11y questions about a custom widgets parent to the gtk toolkits underlying default implementation, keeping only questions about ourself to be handled by the XAccessible focus rectangles in RectCtl work again, seems that got lost somewhere along the way Change-Id: I62237d45668f4438aec6031cc5a48c38de21bf98 Reviewed-on: https://gerrit.libreoffice.org/53767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/backgrnd.hxx1
-rw-r--r--cui/source/inc/cuitabarea.hxx6
-rw-r--r--cui/source/inc/cuitabline.hxx1
-rw-r--r--cui/source/inc/dstribut.hxx1
-rw-r--r--cui/source/inc/measure.hxx1
-rw-r--r--cui/source/inc/textattr.hxx45
-rw-r--r--cui/source/inc/transfrm.hxx3
-rw-r--r--cui/source/tabpages/backgrnd.cxx7
-rw-r--r--cui/source/tabpages/dstribut.cxx4
-rw-r--r--cui/source/tabpages/measure.cxx5
-rw-r--r--cui/source/tabpages/textattr.cxx363
-rw-r--r--cui/source/tabpages/tparea.cxx4
-rw-r--r--cui/source/tabpages/tpbitmap.cxx4
-rw-r--r--cui/source/tabpages/tphatch.cxx4
-rw-r--r--cui/source/tabpages/tpline.cxx4
-rw-r--r--cui/source/tabpages/tppattern.cxx13
-rw-r--r--cui/source/tabpages/tpshadow.cxx6
-rw-r--r--cui/source/tabpages/tptrans.cxx3
-rw-r--r--cui/source/tabpages/transfrm.cxx17
-rw-r--r--cui/uiconfig/ui/textattrtabpage.ui77
20 files changed, 337 insertions, 232 deletions
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 8f5a9c96ff2a..a67caba32a2a 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -57,6 +57,7 @@ public:
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void FillUserData() override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
/// Shift-ListBox activation
void ShowSelector();
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index ce7fea8d96e8..2790b5323888 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -204,6 +204,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override;
+ virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) override;
void SetPageType(PageType nInType) { nPageType = nInType; }
void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }
@@ -271,6 +272,7 @@ public:
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
void SetGradientList( XGradientListRef const & pGrdLst)
@@ -332,6 +334,7 @@ public:
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
void SetPageType( PageType nInType ) { m_nPageType = nInType; }
@@ -481,6 +484,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
void SetHatchingList( XHatchListRef const & pHtchLst)
@@ -564,6 +568,7 @@ public:
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea*, RectPoint eRP ) override;
void SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; }
void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
@@ -623,6 +628,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea*, RectPoint eRP ) override;
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
void SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; }
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index eadb4e038f69..89c5ec790bb8 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -212,6 +212,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
virtual void FillUserData() override;
diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx
index 0923746a2eca..a065fcf6c74f 100644
--- a/cui/source/inc/dstribut.hxx
+++ b/cui/source/inc/dstribut.hxx
@@ -50,6 +50,7 @@ public:
virtual bool FillItemSet(SfxItemSet*) override;
virtual void Reset(const SfxItemSet*) override;
virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override;
+ virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) override;
SvxDistributeHorizontal GetDistributeHor() const { return m_eDistributeHor; }
SvxDistributeVertical GetDistributeVer() const { return m_eDistributeVer; }
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index 721f7d4f8244..2a9fb17d2b65 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -79,6 +79,7 @@ public:
virtual void Reset( const SfxItemSet * ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void Construct();
void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx
index 5c96c71ab329..88a5f7d7113d 100644
--- a/cui/source/inc/textattr.hxx
+++ b/cui/source/inc/textattr.hxx
@@ -40,26 +40,6 @@ class SvxTextAttrPage : public SvxTabPage
private:
static const sal_uInt16 pRanges[];
- VclPtr<VclContainer> m_pDrawingText;
- VclPtr<VclContainer> m_pCustomShapeText;
-
- VclPtr<TriStateBox> m_pTsbAutoGrowWidth;
- VclPtr<TriStateBox> m_pTsbAutoGrowHeight;
- VclPtr<TriStateBox> m_pTsbFitToSize;
- VclPtr<TriStateBox> m_pTsbContour;
- VclPtr<TriStateBox> m_pTsbWordWrapText;
- VclPtr<TriStateBox> m_pTsbAutoGrowSize;
-
- VclPtr<VclFrame> m_pFlDistance;
- VclPtr<MetricField> m_pMtrFldLeft;
- VclPtr<MetricField> m_pMtrFldRight;
- VclPtr<MetricField> m_pMtrFldTop;
- VclPtr<MetricField> m_pMtrFldBottom;
-
- VclPtr<VclFrame> m_pFlPosition;
- VclPtr<SvxRectCtl> m_pCtlPosition;
- VclPtr<TriStateBox> m_pTsbFullWidth;
-
const SfxItemSet& rOutAttrs;
SdrObjKind m_eObjKind;
@@ -70,8 +50,25 @@ private:
bool bWordWrapTextEnabled;
bool bFitToSizeEnabled;
- DECL_LINK( ClickFullWidthHdl_Impl, Button*, void );
- DECL_LINK( ClickHdl_Impl, Button*, void );
+ std::unique_ptr<weld::Widget> m_xDrawingText;
+ std::unique_ptr<weld::Widget> m_xCustomShapeText;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowWidth;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowHeight;
+ std::unique_ptr<weld::CheckButton> m_xTsbFitToSize;
+ std::unique_ptr<weld::CheckButton> m_xTsbContour;
+ std::unique_ptr<weld::CheckButton> m_xTsbWordWrapText;
+ std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowSize;
+ std::unique_ptr<weld::Frame> m_xFlDistance;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLeft;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldRight;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTop;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldBottom;
+ std::unique_ptr<weld::Frame> m_xFlPosition;
+ std::unique_ptr<RectCtl> m_xCtlPosition;
+ std::unique_ptr<weld::CheckButton> m_xTsbFullWidth;
+
+ DECL_LINK(ClickFullWidthHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickHdl_Impl, weld::Button&, void);
/** Return whether the text direction is from left to right (</sal_True>) or
top to bottom (</sal_False>).
@@ -80,9 +77,8 @@ private:
public:
- SvxTextAttrPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+ SvxTextAttrPage(TabPageParent pWindow, const SfxItemSet& rInAttrs);
virtual ~SvxTextAttrPage() override;
- virtual void dispose() override;
static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pRanges; }
@@ -91,6 +87,7 @@ public:
virtual void Reset( const SfxItemSet * ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void Construct();
void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; }
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 8a24987a8842..94fa4836de51 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -150,6 +150,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void Construct();
void SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
@@ -208,6 +209,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void Construct();
void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
@@ -261,6 +263,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+ virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
void Construct();
void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 722b4a84624b..8e7243a98220 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -841,7 +841,12 @@ DeactivateRC SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet )
return DeactivateRC::LeavePage;
}
-void SvxBackgroundTabPage::PointChanged( vcl::Window* , RectPoint )
+void SvxBackgroundTabPage::PointChanged( vcl::Window*, RectPoint )
+{
+ // has to be implemented so that position control can work
+}
+
+void SvxBackgroundTabPage::PointChanged( weld::DrawingArea*, RectPoint )
{
// has to be implemented so that position control can work
}
diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx
index bd6039f39974..e132a736d25b 100644
--- a/cui/source/tabpages/dstribut.cxx
+++ b/cui/source/tabpages/dstribut.cxx
@@ -102,6 +102,10 @@ void SvxDistributePage::PointChanged(vcl::Window* /*pWindow*/, RectPoint /*eRP*/
{
}
+void SvxDistributePage::PointChanged(weld::DrawingArea*, RectPoint /*eRP*/)
+{
+}
+
/*************************************************************************
|*
|* read the delivered Item-Set
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 657cf6199b32..963544eef73f 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -619,6 +619,11 @@ void SvxMeasurePage::PointChanged( vcl::Window* pWindow, RectPoint /*eRP*/ )
ChangeAttrHdl_Impl( pWindow );
}
+void SvxMeasurePage::PointChanged( weld::DrawingArea*, RectPoint /*eRP*/ )
+{
+ ChangeAttrHdl_Impl( m_pCtlPosition );
+}
+
IMPL_LINK( SvxMeasurePage, ClickAutoPosHdl_Impl, Button*, p, void )
{
if( m_pTsbAutoPosH->GetState() == TRISTATE_TRUE )
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 1fe363be96ca..092ef3966ffa 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -53,8 +53,8 @@ const sal_uInt16 SvxTextAttrPage::pRanges[] =
|* dialog (page) for copying objects
|*
\************************************************************************/
-SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttrs)
- : SvxTabPage(pWindow,"TextAttributesPage","cui/ui/textattrtabpage.ui", rInAttrs)
+SvxTextAttrPage::SvxTextAttrPage(TabPageParent pPage, const SfxItemSet& rInAttrs)
+ : SvxTabPage(pPage, "cui/ui/textattrtabpage.ui", "TextAttributesPage", rInAttrs)
, rOutAttrs(rInAttrs)
, m_eObjKind(OBJ_NONE)
, bAutoGrowSizeEnabled(false)
@@ -63,66 +63,43 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr
, bAutoGrowHeightEnabled(false)
, bWordWrapTextEnabled(false)
, bFitToSizeEnabled(false)
+ , m_xDrawingText(m_xBuilder->weld_widget("drawingtext"))
+ , m_xCustomShapeText(m_xBuilder->weld_widget("customshapetext"))
+ , m_xTsbAutoGrowWidth(m_xBuilder->weld_check_button("TSB_AUTOGROW_WIDTH"))
+ , m_xTsbAutoGrowHeight(m_xBuilder->weld_check_button("TSB_AUTOGROW_HEIGHT"))
+ , m_xTsbFitToSize(m_xBuilder->weld_check_button("TSB_FIT_TO_SIZE"))
+ , m_xTsbContour(m_xBuilder->weld_check_button("TSB_CONTOUR"))
+ , m_xTsbWordWrapText(m_xBuilder->weld_check_button("TSB_WORDWRAP_TEXT"))
+ , m_xTsbAutoGrowSize(m_xBuilder->weld_check_button("TSB_AUTOGROW_SIZE"))
+ , m_xFlDistance(m_xBuilder->weld_frame("FL_DISTANCE"))
+ , m_xMtrFldLeft(m_xBuilder->weld_metric_spin_button("MTR_FLD_LEFT", FUNIT_CM))
+ , m_xMtrFldRight(m_xBuilder->weld_metric_spin_button("MTR_FLD_RIGHT", FUNIT_CM))
+ , m_xMtrFldTop(m_xBuilder->weld_metric_spin_button("MTR_FLD_TOP", FUNIT_CM))
+ , m_xMtrFldBottom(m_xBuilder->weld_metric_spin_button("MTR_FLD_BOTTOM", FUNIT_CM))
+ , m_xFlPosition(m_xBuilder->weld_frame("FL_POSITION"))
+ , m_xCtlPosition(new RectCtl(*m_xBuilder, "CTL_POSITION", this))
+ , m_xTsbFullWidth(m_xBuilder->weld_check_button("TSB_FULL_WIDTH"))
{
- get(m_pDrawingText, "drawingtext");
- get(m_pCustomShapeText, "customshapetext");
- get(m_pTsbAutoGrowWidth,"TSB_AUTOGROW_WIDTH");
- get(m_pTsbAutoGrowHeight,"TSB_AUTOGROW_HEIGHT");
- get(m_pTsbFitToSize,"TSB_FIT_TO_SIZE");
- get(m_pTsbContour,"TSB_CONTOUR");
- get(m_pTsbWordWrapText,"TSB_WORDWRAP_TEXT");
- get(m_pTsbAutoGrowSize,"TSB_AUTOGROW_SIZE");
- get(m_pFlDistance,"FL_DISTANCE");
- get(m_pMtrFldLeft,"MTR_FLD_LEFT");
- get(m_pMtrFldRight,"MTR_FLD_RIGHT");
- get(m_pMtrFldTop,"MTR_FLD_TOP");
- get(m_pMtrFldBottom,"MTR_FLD_BOTTOM");
- get(m_pFlPosition,"FL_POSITION");
- get(m_pCtlPosition,"CTL_POSITION");
- m_pCtlPosition->SetControlSettings(RectPoint::MM, 240, 100);
- get(m_pTsbFullWidth,"TSB_FULL_WIDTH");
-
+ m_xCtlPosition->SetControlSettings(RectPoint::MM, 240, 100);
FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs );
- SetFieldUnit( *m_pMtrFldLeft, eFUnit );
- SetFieldUnit( *m_pMtrFldRight, eFUnit );
- SetFieldUnit( *m_pMtrFldTop, eFUnit );
- SetFieldUnit( *m_pMtrFldBottom, eFUnit );
-
- Link<Button*,void> aLink( LINK( this, SvxTextAttrPage, ClickHdl_Impl ) );
- m_pTsbAutoGrowWidth->SetClickHdl( aLink );
- m_pTsbAutoGrowHeight->SetClickHdl( aLink );
- m_pTsbAutoGrowSize->SetClickHdl( aLink );
- m_pTsbFitToSize->SetClickHdl( aLink );
- m_pTsbContour->SetClickHdl( aLink );
-
- m_pTsbFullWidth->SetClickHdl(LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) );
+ SetFieldUnit( *m_xMtrFldLeft, eFUnit );
+ SetFieldUnit( *m_xMtrFldRight, eFUnit );
+ SetFieldUnit( *m_xMtrFldTop, eFUnit );
+ SetFieldUnit( *m_xMtrFldBottom, eFUnit );
+
+ Link<weld::Button&,void> aLink( LINK( this, SvxTextAttrPage, ClickHdl_Impl ) );
+ m_xTsbAutoGrowWidth->connect_clicked( aLink );
+ m_xTsbAutoGrowHeight->connect_clicked( aLink );
+ m_xTsbAutoGrowSize->connect_clicked( aLink );
+ m_xTsbFitToSize->connect_clicked( aLink );
+ m_xTsbContour->connect_clicked( aLink );
+
+ m_xTsbFullWidth->connect_clicked(LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) );
}
SvxTextAttrPage::~SvxTextAttrPage()
{
- disposeOnce();
-}
-
-void SvxTextAttrPage::dispose()
-{
- m_pDrawingText.clear();
- m_pCustomShapeText.clear();
- m_pTsbAutoGrowWidth.clear();
- m_pTsbAutoGrowHeight.clear();
- m_pTsbFitToSize.clear();
- m_pTsbContour.clear();
- m_pTsbWordWrapText.clear();
- m_pTsbAutoGrowSize.clear();
- m_pFlDistance.clear();
- m_pMtrFldLeft.clear();
- m_pMtrFldRight.clear();
- m_pMtrFldTop.clear();
- m_pMtrFldBottom.clear();
- m_pFlPosition.clear();
- m_pCtlPosition.clear();
- m_pTsbFullWidth.clear();
- SvxTabPage::dispose();
}
/*************************************************************************
@@ -144,11 +121,11 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>( pItem )->GetValue();
- SetMetricValue( *m_pMtrFldLeft, nValue, eUnit );
+ SetMetricValue( *m_xMtrFldLeft, nValue, eUnit );
}
else
- m_pMtrFldLeft->SetText( "" );
- m_pMtrFldLeft->SaveValue();
+ m_xMtrFldLeft->set_text("");
+ m_xMtrFldLeft->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_RIGHTDIST );
if( !pItem )
@@ -156,11 +133,11 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>( pItem )->GetValue();
- SetMetricValue( *m_pMtrFldRight, nValue, eUnit );
+ SetMetricValue( *m_xMtrFldRight, nValue, eUnit );
}
else
- m_pMtrFldRight->SetText( "" );
- m_pMtrFldRight->SaveValue();
+ m_xMtrFldRight->set_text("");
+ m_xMtrFldRight->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_UPPERDIST );
if( !pItem )
@@ -168,11 +145,11 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>( pItem )->GetValue();
- SetMetricValue( *m_pMtrFldTop, nValue, eUnit );
+ SetMetricValue( *m_xMtrFldTop, nValue, eUnit );
}
else
- m_pMtrFldTop->SetText( "" );
- m_pMtrFldTop->SaveValue();
+ m_xMtrFldTop->set_text("");
+ m_xMtrFldTop->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_LOWERDIST );
if( !pItem )
@@ -180,52 +157,48 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if( pItem )
{
long nValue = static_cast<const SdrMetricItem*>(pItem)->GetValue();
- SetMetricValue( *m_pMtrFldBottom, nValue, eUnit );
+ SetMetricValue( *m_xMtrFldBottom, nValue, eUnit );
}
else
- m_pMtrFldBottom->SetText( "" );
- m_pMtrFldBottom->SaveValue();
+ m_xMtrFldBottom->set_text("");
+ m_xMtrFldBottom->save_value();
// adjust to height and autogrowsize
if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE )
{
- m_pTsbAutoGrowHeight->SetState( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ).
+ m_xTsbAutoGrowHeight->set_state( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
- m_pTsbAutoGrowHeight->EnableTriState( false );
- m_pTsbAutoGrowSize->SetState( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ).
+ m_xTsbAutoGrowSize->set_state( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
- m_pTsbAutoGrowSize->EnableTriState( false );
}
else
{
- m_pTsbAutoGrowHeight->SetState( TRISTATE_INDET );
- m_pTsbAutoGrowSize->SetState( TRISTATE_INDET );
+ m_xTsbAutoGrowHeight->set_state( TRISTATE_INDET );
+ m_xTsbAutoGrowSize->set_state( TRISTATE_INDET );
}
- m_pTsbAutoGrowHeight->SaveValue();
- m_pTsbAutoGrowSize->SaveValue();
+ m_xTsbAutoGrowHeight->save_state();
+ m_xTsbAutoGrowSize->save_state();
// adjust to width
if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::DONTCARE )
{
- m_pTsbAutoGrowWidth->SetState( rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ).
+ m_xTsbAutoGrowWidth->set_state( rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
- m_pTsbAutoGrowWidth->EnableTriState( false );
}
else
- m_pTsbAutoGrowWidth->SetState( TRISTATE_INDET );
- m_pTsbAutoGrowWidth->SaveValue();
+ m_xTsbAutoGrowWidth->set_state( TRISTATE_INDET );
+ m_xTsbAutoGrowWidth->save_state();
// wordwrap text
if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::DONTCARE )
{
- m_pTsbWordWrapText->SetState( rAttrs->Get( SDRATTR_TEXT_WORDWRAP ).
+ m_xTsbWordWrapText->set_state( rAttrs->Get( SDRATTR_TEXT_WORDWRAP ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
- m_pTsbWordWrapText->EnableTriState( false );
}
else
- m_pTsbWordWrapText->SetState( TRISTATE_INDET );
- m_pTsbWordWrapText->SaveValue();
+ m_xTsbWordWrapText->set_state( TRISTATE_INDET );
+ m_xTsbWordWrapText->save_state();
// #103516# Do the setup based on states of hor/ver adjust
@@ -240,8 +213,6 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
SdrTextHorzAdjust eTHA = rAttrs->Get(SDRATTR_TEXT_HORZADJUST).GetValue();
RectPoint eRP = RectPoint::LB;
- m_pTsbFullWidth->EnableTriState( false );
-
// Translate item values into local anchor position.
switch (eTVA)
{
@@ -289,51 +260,48 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if((bLeftToRight && (SDRTEXTHORZADJUST_BLOCK == eTHA)) || (!bLeftToRight && (SDRTEXTVERTADJUST_BLOCK == eTVA)))
{
// Move anchor to valid position.
- ClickFullWidthHdl_Impl(nullptr);
- m_pTsbFullWidth->SetState(TRISTATE_TRUE);
+ ClickFullWidthHdl_Impl(*m_xTsbFullWidth);
+ m_xTsbFullWidth->set_state(TRISTATE_TRUE);
}
- m_pCtlPosition->SetActualRP( eRP );
+ m_xCtlPosition->SetActualRP( eRP );
}
else
{
// VertAdjust or HorAdjust is not unequivocal
- m_pCtlPosition->Reset();
+ m_xCtlPosition->Reset();
- m_pCtlPosition->SetState(CTL_STATE::NOVERT);
- m_pCtlPosition->DoCompletelyDisable(true);
+ m_xCtlPosition->SetState(CTL_STATE::NOVERT);
+ m_xCtlPosition->DoCompletelyDisable(true);
- m_pTsbFullWidth->SetState(TRISTATE_INDET);
- m_pFlPosition->Enable( false );
+ m_xTsbFullWidth->set_state(TRISTATE_INDET);
+ m_xFlPosition->set_sensitive( false );
}
// adjust to border
- if ( rAttrs->GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SfxItemState::DONTCARE )
+ if (rAttrs->GetItemState(SDRATTR_TEXT_FITTOSIZE) != SfxItemState::DONTCARE)
{
drawing::TextFitToSizeType const eFTS =
rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ).GetValue();
if (eFTS == drawing::TextFitToSizeType_AUTOFIT || eFTS == drawing::TextFitToSizeType_NONE)
- m_pTsbFitToSize->SetState( TRISTATE_FALSE );
+ m_xTsbFitToSize->set_state( TRISTATE_FALSE );
else
- m_pTsbFitToSize->SetState( TRISTATE_TRUE );
-
- m_pTsbFitToSize->EnableTriState( false );
+ m_xTsbFitToSize->set_state( TRISTATE_TRUE );
}
else
- m_pTsbFitToSize->SetState( TRISTATE_INDET );
- m_pTsbFitToSize->SaveValue();
+ m_xTsbFitToSize->set_state( TRISTATE_INDET );
+ m_xTsbFitToSize->save_state();
if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SfxItemState::DONTCARE )
{
bool bContour = rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue();
- m_pTsbContour->SetState( bContour ? TRISTATE_TRUE : TRISTATE_FALSE );
- m_pTsbContour->EnableTriState( false );
+ m_xTsbContour->set_state( bContour ? TRISTATE_TRUE : TRISTATE_FALSE );
}
else
- m_pTsbContour->SetState( TRISTATE_INDET );
- m_pTsbContour->SaveValue();
+ m_xTsbContour->set_state( TRISTATE_INDET );
+ m_xTsbContour->save_state();
- ClickHdl_Impl( nullptr );
+ ClickHdl_Impl(*m_xTsbContour);
}
/*************************************************************************
@@ -351,62 +319,62 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
sal_Int32 nValue;
TriState eState;
- if( m_pMtrFldLeft->IsValueChangedFromSaved() )
+ if( m_xMtrFldLeft->get_value_changed_from_saved() )
{
- nValue = GetCoreValue( *m_pMtrFldLeft, eUnit );
+ nValue = GetCoreValue( *m_xMtrFldLeft, eUnit );
rAttrs->Put( makeSdrTextLeftDistItem( nValue ) );
}
- if( m_pMtrFldRight->IsValueChangedFromSaved() )
+ if( m_xMtrFldRight->get_value_changed_from_saved() )
{
- nValue = GetCoreValue( *m_pMtrFldRight, eUnit );
+ nValue = GetCoreValue( *m_xMtrFldRight, eUnit );
rAttrs->Put( makeSdrTextRightDistItem( nValue ) );
}
- if( m_pMtrFldTop->IsValueChangedFromSaved() )
+ if( m_xMtrFldTop->get_value_changed_from_saved() )
{
- nValue = GetCoreValue( *m_pMtrFldTop, eUnit );
+ nValue = GetCoreValue( *m_xMtrFldTop, eUnit );
rAttrs->Put( makeSdrTextUpperDistItem( nValue ) );
}
- if( m_pMtrFldBottom->IsValueChangedFromSaved() )
+ if( m_xMtrFldBottom->get_value_changed_from_saved() )
{
- nValue = GetCoreValue( *m_pMtrFldBottom, eUnit );
+ nValue = GetCoreValue( *m_xMtrFldBottom, eUnit );
rAttrs->Put( makeSdrTextLowerDistItem( nValue ) );
}
- eState = m_pTsbAutoGrowHeight->GetState();
- if( m_pTsbAutoGrowHeight->IsValueChangedFromSaved() )
+ eState = m_xTsbAutoGrowHeight->get_state();
+ if( m_xTsbAutoGrowHeight->get_state_changed_from_saved() )
{
rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) );
}
- eState = m_pTsbAutoGrowWidth->GetState();
- if( m_pTsbAutoGrowWidth->IsValueChangedFromSaved() )
+ eState = m_xTsbAutoGrowWidth->get_state();
+ if( m_xTsbAutoGrowWidth->get_state_changed_from_saved() )
{
rAttrs->Put( makeSdrTextAutoGrowWidthItem( TRISTATE_TRUE == eState ) );
}
- eState = m_pTsbAutoGrowSize->GetState();
- if( m_pTsbAutoGrowSize->IsValueChangedFromSaved() )
+ eState = m_xTsbAutoGrowSize->get_state();
+ if( m_xTsbAutoGrowSize->get_state_changed_from_saved() )
{
rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) );
}
- eState = m_pTsbWordWrapText->GetState();
- if( m_pTsbWordWrapText->IsValueChangedFromSaved() )
+ eState = m_xTsbWordWrapText->get_state();
+ if( m_xTsbWordWrapText->get_state_changed_from_saved() )
{
rAttrs->Put( makeSdrTextWordWrapItem( TRISTATE_TRUE == eState ) );
}
- eState = m_pTsbContour->GetState();
- if( m_pTsbContour->IsValueChangedFromSaved() )
+ eState = m_xTsbContour->get_state();
+ if( m_xTsbContour->get_state_changed_from_saved() )
{
rAttrs->Put( makeSdrTextContourFrameItem( TRISTATE_TRUE == eState ) );
}
- eState = m_pTsbFitToSize->GetState();
- if( m_pTsbFitToSize->IsValueChangedFromSaved() )
+ eState = m_xTsbFitToSize->get_state();
+ if( m_xTsbFitToSize->get_state_changed_from_saved() )
{
drawing::TextFitToSizeType eFTS;
switch( eState )
@@ -421,7 +389,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
}
// centered
- RectPoint eRP = m_pCtlPosition->GetActualRP();
+ RectPoint eRP = m_xCtlPosition->GetActualRP();
SdrTextVertAdjust eTVA, eOldTVA;
SdrTextHorzAdjust eTHA, eOldTHA;
@@ -449,11 +417,11 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
}
// #103516# Do not change values if adjust controls were disabled.
- bool bIsDisabled(m_pCtlPosition->IsCompletelyDisabled());
+ bool bIsDisabled(m_xCtlPosition->IsCompletelyDisabled());
if(!bIsDisabled)
{
- if( m_pTsbFullWidth->GetState() == TRISTATE_TRUE )
+ if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE )
{
if (IsTextDirectionLeftToRight())
eTHA = SDRTEXTHORZADJUST_BLOCK;
@@ -491,8 +459,8 @@ void SvxTextAttrPage::Construct()
// indeterminate, show them all
bFitToSizeEnabled = bContourEnabled = bWordWrapTextEnabled =
bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true;
- m_pCustomShapeText->Show();
- m_pDrawingText->Show();
+ m_xCustomShapeText->show();
+ m_xDrawingText->show();
break;
case OBJ_TEXT:
case OBJ_TITLETEXT:
@@ -503,42 +471,76 @@ void SvxTextAttrPage::Construct()
// adjusting width and height is ONLY possible for pure text objects
bFitToSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true;
- m_pCustomShapeText->Hide();
- m_pDrawingText->Show();
+ m_xCustomShapeText->hide();
+ m_xDrawingText->show();
break;
case OBJ_CUSTOMSHAPE:
bFitToSizeEnabled = bContourEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false;
bWordWrapTextEnabled = bAutoGrowSizeEnabled = true;
- m_pDrawingText->Hide();
- m_pCustomShapeText->Show();
+ m_xDrawingText->hide();
+ m_xCustomShapeText->show();
break;
default:
bFitToSizeEnabled = bContourEnabled = true;
bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false;
- m_pCustomShapeText->Hide();
- m_pDrawingText->Show();
+ m_xCustomShapeText->hide();
+ m_xDrawingText->show();
break;
}
- m_pTsbAutoGrowHeight->Show( bAutoGrowHeightEnabled );
- m_pTsbAutoGrowWidth->Show( bAutoGrowWidthEnabled );
- m_pTsbFitToSize->Show( bFitToSizeEnabled );
- m_pTsbContour->Show( bContourEnabled );
- m_pTsbAutoGrowSize->Show( bAutoGrowSizeEnabled );
- m_pTsbWordWrapText->Show( bWordWrapTextEnabled );
+ m_xTsbAutoGrowHeight->show( bAutoGrowHeightEnabled );
+ m_xTsbAutoGrowWidth->show( bAutoGrowWidthEnabled );
+ m_xTsbFitToSize->show( bFitToSizeEnabled );
+ m_xTsbContour->show( bContourEnabled );
+ m_xTsbAutoGrowSize->show( bAutoGrowSizeEnabled );
+ m_xTsbWordWrapText->show( bWordWrapTextEnabled );
}
-VclPtr<SfxTabPage> SvxTextAttrPage::Create( TabPageParent pWindow,
- const SfxItemSet* rAttrs )
+VclPtr<SfxTabPage> SvxTextAttrPage::Create(TabPageParent pWindow, const SfxItemSet* rAttrs)
{
- return VclPtr<SvxTextAttrPage>::Create( pWindow.pParent, *rAttrs );
+ return VclPtr<SvxTextAttrPage>::Create(pWindow, *rAttrs);
}
/** Check whether we have to uncheck the "Full width" check box.
*/
void SvxTextAttrPage::PointChanged( vcl::Window*, RectPoint eRP )
{
- if (m_pTsbFullWidth->GetState() == TRISTATE_TRUE)
+ if (m_xTsbFullWidth->get_state() == TRISTATE_TRUE)
+ {
+ // Depending on write direction and currently checked anchor we have
+ // to uncheck the "full width" button.
+ if (IsTextDirectionLeftToRight())
+ switch( eRP )
+ {
+ case RectPoint::LT:
+ case RectPoint::LM:
+ case RectPoint::LB:
+ case RectPoint::RT:
+ case RectPoint::RM:
+ case RectPoint::RB:
+ m_xTsbFullWidth->set_state( TRISTATE_FALSE );
+ break;
+ default: ;//prevent warning
+ }
+ else
+ switch (eRP)
+ {
+ case RectPoint::LT:
+ case RectPoint::MT:
+ case RectPoint::RT:
+ case RectPoint::LB:
+ case RectPoint::MB:
+ case RectPoint::RB:
+ m_xTsbFullWidth->set_state( TRISTATE_FALSE );
+ break;
+ default: ;//prevent warning
+ }
+ }
+}
+
+void SvxTextAttrPage::PointChanged(weld::DrawingArea*, RectPoint eRP)
+{
+ if (m_xTsbFullWidth->get_state() == TRISTATE_TRUE)
{
// Depending on write direction and currently checked anchor we have
// to uncheck the "full width" button.
@@ -551,7 +553,7 @@ void SvxTextAttrPage::PointChanged( vcl::Window*, RectPoint eRP )
case RectPoint::RT:
case RectPoint::RM:
case RectPoint::RB:
- m_pTsbFullWidth->SetState( TRISTATE_FALSE );
+ m_xTsbFullWidth->set_state( TRISTATE_FALSE );
break;
default: ;//prevent warning
}
@@ -564,13 +566,14 @@ void SvxTextAttrPage::PointChanged( vcl::Window*, RectPoint eRP )
case RectPoint::LB:
case RectPoint::MB:
case RectPoint::RB:
- m_pTsbFullWidth->SetState( TRISTATE_FALSE );
+ m_xTsbFullWidth->set_state( TRISTATE_FALSE );
break;
default: ;//prevent warning
}
}
}
+
/*************************************************************************
|*
|* possibly changes the position of the position-control
@@ -581,28 +584,28 @@ void SvxTextAttrPage::PointChanged( vcl::Window*, RectPoint eRP )
to be moved to a valid and adjacent position. This position depends on
the current anchor position and the text writing direction.
*/
-IMPL_LINK_NOARG(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(SvxTextAttrPage, ClickFullWidthHdl_Impl, weld::Button&, void)
{
- if( m_pTsbFullWidth->GetState() == TRISTATE_TRUE )
+ if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE )
{
if (IsTextDirectionLeftToRight())
{
// Move text anchor to horizontal middle axis.
- switch( m_pCtlPosition->GetActualRP() )
+ switch( m_xCtlPosition->GetActualRP() )
{
case RectPoint::LT:
case RectPoint::RT:
- m_pCtlPosition->SetActualRP( RectPoint::MT );
+ m_xCtlPosition->SetActualRP( RectPoint::MT );
break;
case RectPoint::LM:
case RectPoint::RM:
- m_pCtlPosition->SetActualRP( RectPoint::MM );
+ m_xCtlPosition->SetActualRP( RectPoint::MM );
break;
case RectPoint::LB:
case RectPoint::RB:
- m_pCtlPosition->SetActualRP( RectPoint::MB );
+ m_xCtlPosition->SetActualRP( RectPoint::MB );
break;
default: ;//prevent warning
}
@@ -610,21 +613,21 @@ IMPL_LINK_NOARG(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void)
else
{
// Move text anchor to vertical middle axis.
- switch( m_pCtlPosition->GetActualRP() )
+ switch( m_xCtlPosition->GetActualRP() )
{
case RectPoint::LT:
case RectPoint::LB:
- m_pCtlPosition->SetActualRP( RectPoint::LM );
+ m_xCtlPosition->SetActualRP( RectPoint::LM );
break;
case RectPoint::MT:
case RectPoint::MB:
- m_pCtlPosition->SetActualRP( RectPoint::MM );
+ m_xCtlPosition->SetActualRP( RectPoint::MM );
break;
case RectPoint::RT:
case RectPoint::RB:
- m_pCtlPosition->SetActualRP( RectPoint::RM );
+ m_xCtlPosition->SetActualRP( RectPoint::RM );
break;
default: ;//prevent warning
}
@@ -638,50 +641,50 @@ IMPL_LINK_NOARG(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void)
|*
\************************************************************************/
-IMPL_LINK(SvxTextAttrPage, ClickHdl_Impl, Button*, pButton, void)
+IMPL_LINK(SvxTextAttrPage, ClickHdl_Impl, weld::Button&, rButton, void)
{
- if (pButton == m_pTsbAutoGrowSize)
+ if (&rButton == m_xTsbAutoGrowSize.get())
{
- m_pTsbAutoGrowHeight->SetState(m_pTsbAutoGrowSize->GetState());
- if (m_pTsbAutoGrowSize->GetState() == TRISTATE_TRUE)
+ m_xTsbAutoGrowHeight->set_state(m_xTsbAutoGrowSize->get_state());
+ if (m_xTsbAutoGrowSize->get_state() == TRISTATE_TRUE)
{
- m_pTsbFitToSize->SetState(TRISTATE_FALSE);
- m_pTsbContour->SetState(TRISTATE_FALSE);
+ m_xTsbFitToSize->set_state(TRISTATE_FALSE);
+ m_xTsbContour->set_state(TRISTATE_FALSE);
}
}
- else if (pButton == m_pTsbAutoGrowHeight)
- m_pTsbAutoGrowSize->SetState(m_pTsbAutoGrowHeight->GetState());
+ else if (&rButton == m_xTsbAutoGrowHeight.get())
+ m_xTsbAutoGrowSize->set_state(m_xTsbAutoGrowHeight->get_state());
- bool bAutoGrowWidth = m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE;
- bool bAutoGrowHeight = m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE;
- bool bFitToSize = m_pTsbFitToSize->GetState() == TRISTATE_TRUE;
- bool bContour = m_pTsbContour->GetState() == TRISTATE_TRUE;
+ bool bAutoGrowWidth = m_xTsbAutoGrowWidth->get_state() == TRISTATE_TRUE;
+ bool bAutoGrowHeight = m_xTsbAutoGrowHeight->get_state() == TRISTATE_TRUE;
+ bool bFitToSize = m_xTsbFitToSize->get_state() == TRISTATE_TRUE;
+ bool bContour = m_xTsbContour->get_state() == TRISTATE_TRUE;
- m_pTsbContour->Enable( !bFitToSize &&
+ m_xTsbContour->set_sensitive( !bFitToSize &&
!( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) &&
bContourEnabled );
- m_pTsbAutoGrowWidth->Enable( !bFitToSize &&
+ m_xTsbAutoGrowWidth->set_sensitive( !bFitToSize &&
!( bContour && bContourEnabled ) &&
bAutoGrowWidthEnabled );
- m_pTsbAutoGrowHeight->Enable( !bFitToSize &&
+ m_xTsbAutoGrowHeight->set_sensitive( !bFitToSize &&
!( bContour && bContourEnabled ) &&
bAutoGrowHeightEnabled );
- m_pTsbFitToSize->Enable( !( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) &&
+ m_xTsbFitToSize->set_sensitive( !( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) &&
!( bContour && bContourEnabled ) &&
bFitToSizeEnabled );
// #101901# enable/disable metric fields and decorations dependent of contour
- m_pFlDistance->Enable(!bContour);
+ m_xFlDistance->set_sensitive(!bContour);
if( bContour && bContourEnabled )
{
- m_pMtrFldLeft->SetValue( 0 );
- m_pMtrFldRight->SetValue( 0 );
- m_pMtrFldTop->SetValue( 0 );
- m_pMtrFldBottom->SetValue( 0 );
+ m_xMtrFldLeft->set_value(0, FUNIT_NONE);
+ m_xMtrFldRight->set_value(0, FUNIT_NONE);
+ m_xMtrFldTop->set_value(0, FUNIT_NONE);
+ m_xMtrFldBottom->set_value(0, FUNIT_NONE);
}
// #103516# Do the setup based on states of hor/ver adjust
@@ -690,7 +693,7 @@ IMPL_LINK(SvxTextAttrPage, ClickHdl_Impl, Button*, pButton, void)
bool bHorAndVer(SfxItemState::DONTCARE == eVState || SfxItemState::DONTCARE == eHState);
// #83698# enable/disable text anchoring dependent of contour
- m_pFlPosition->Enable(!bContour && !bHorAndVer);
+ m_xFlPosition->set_sensitive(!bContour && !bHorAndVer);
}
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 57492037a1e6..dbceed157716 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -397,6 +397,10 @@ void SvxAreaTabPage::PointChanged( vcl::Window* , RectPoint )
{
}
+void SvxAreaTabPage::PointChanged( weld::DrawingArea*, RectPoint )
+{
+}
+
void SvxAreaTabPage::CreatePage( sal_Int32 nId, SfxTabPage* pTab )
{
if(nId == SOLID )
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index b6b2d007294f..75ddd68ce72f 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -835,4 +835,8 @@ void SvxBitmapTabPage::PointChanged( vcl::Window* , RectPoint )
{
}
+void SvxBitmapTabPage::PointChanged( weld::DrawingArea*, RectPoint )
+{
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 304a7868ea1b..78c70ba84923 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -594,6 +594,10 @@ void SvxHatchTabPage::PointChanged( vcl::Window*, RectPoint )
{
}
+void SvxHatchTabPage::PointChanged( weld::DrawingArea*, RectPoint )
+{
+}
+
void SvxHatchTabPage::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) )
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index b19981a03ee1..e29acf095eac 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1665,11 +1665,13 @@ IMPL_LINK_NOARG(SvxLineTabPage, ChangeTransparentHdl_Impl, Edit&, void)
m_pCtlPreview->Invalidate();
}
-
void SvxLineTabPage::PointChanged( vcl::Window*, RectPoint )
{
}
+void SvxLineTabPage::PointChanged( weld::DrawingArea*, RectPoint )
+{
+}
void SvxLineTabPage::FillUserData()
{
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index b312b33c3a1a..b073d844bde0 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -549,7 +549,6 @@ void SvxPatternTabPage::ChangeColor_Impl()
m_pCtlPreview->Invalidate();
}
-
void SvxPatternTabPage::PointChanged( vcl::Window* pWindow, RectPoint )
{
if( pWindow == m_pCtlPixel )
@@ -565,6 +564,18 @@ void SvxPatternTabPage::PointChanged( vcl::Window* pWindow, RectPoint )
m_pPatternLB->SetNoSelection();
}
+void SvxPatternTabPage::PointChanged( weld::DrawingArea*, RectPoint )
+{
+ m_pBitmapCtl->SetBmpArray( m_pCtlPixel->GetBitmapPixelPtr() );
+
+ // get bitmap and display it
+ m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx())));
+ m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
+ m_pCtlPreview->Invalidate();
+
+ m_pPatternLB->SetNoSelection();
+}
+
sal_Int32 SvxPatternTabPage::SearchPatternList(const OUString& rPatternName)
{
long nCount = m_pPatternList->Count();
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index e603ce9f4c1a..d03a37a7d98f 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -496,6 +496,12 @@ void SvxShadowTabPage::PointChanged( vcl::Window*, RectPoint )
ModifyShadowHdl_Impl( *m_pMtrTransparent );
}
+void SvxShadowTabPage::PointChanged( weld::DrawingArea*, RectPoint )
+{
+ // repaint shadow
+ ModifyShadowHdl_Impl( *m_pMtrTransparent );
+}
+
void SvxShadowTabPage::PageCreated(const SfxAllItemSet& aSet)
{
const SvxColorListItem* pColorListItem = aSet.GetItem<SvxColorListItem>(SID_COLOR_TABLE, false);
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index c8d99d39c35c..1f6fc20da7dd 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -487,6 +487,9 @@ void SvxTransparenceTabPage::PointChanged(vcl::Window* , RectPoint )
{
}
+void SvxTransparenceTabPage::PointChanged(weld::DrawingArea*, RectPoint)
+{
+}
// Preview-Methods
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index b455872dd343..570635d1737a 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -348,7 +348,6 @@ DeactivateRC SvxAngleTabPage::DeactivatePage( SfxItemSet* _pSet )
return DeactivateRC::LeavePage;
}
-
void SvxAngleTabPage::PointChanged(vcl::Window* pWindow, RectPoint eRP)
{
if(pWindow == m_pCtlRect)
@@ -413,6 +412,11 @@ void SvxAngleTabPage::PointChanged(vcl::Window* pWindow, RectPoint eRP)
}
}
+void SvxAngleTabPage::PointChanged(weld::DrawingArea* /*pWindow*/, RectPoint /*eRP*/)
+{
+ assert(false);
+}
+
/*************************************************************************
|*
|* dialog for changing slant and corner radius
@@ -787,7 +791,11 @@ DeactivateRC SvxSlantTabPage::DeactivatePage( SfxItemSet* _pSet )
}
-void SvxSlantTabPage::PointChanged( vcl::Window* , RectPoint )
+void SvxSlantTabPage::PointChanged( vcl::Window*, RectPoint )
+{
+}
+
+void SvxSlantTabPage::PointChanged( weld::DrawingArea*, RectPoint )
{
}
@@ -1539,7 +1547,6 @@ void SvxPositionSizeTabPage::GetTopLeftPosition(double& rfX, double& rfY, const
}
}
-
void SvxPositionSizeTabPage::PointChanged( vcl::Window* pWindow, RectPoint eRP )
{
if( pWindow == m_pCtlPos )
@@ -1610,6 +1617,10 @@ void SvxPositionSizeTabPage::PointChanged( vcl::Window* pWindow, RectPoint eRP )
}
}
+void SvxPositionSizeTabPage::PointChanged(weld::DrawingArea* /*pWindow*/, RectPoint /*eRP*/)
+{
+ assert(false);
+}
void SvxPositionSizeTabPage::DisableResize()
{
diff --git a/cui/uiconfig/ui/textattrtabpage.ui b/cui/uiconfig/ui/textattrtabpage.ui
index 7373946102a9..f5ee8ec34ed1 100644
--- a/cui/uiconfig/ui/textattrtabpage.ui
+++ b/cui/uiconfig/ui/textattrtabpage.ui
@@ -1,14 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.20.4 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">-100</property>
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">-100</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="lower">-100</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment4">
+ <property name="lower">-100</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkBox" id="TextAttributesPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -173,12 +190,6 @@
<property name="top_attach">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
</object>
@@ -236,7 +247,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="textattrtabpage|label4">_Left:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">MTR_FLD_LEFT:0.00cm</property>
+ <property name="mnemonic_widget">MTR_FLD_LEFT</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -250,7 +261,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="textattrtabpage|label5">_Right:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">MTR_FLD_RIGHT:0.00cm</property>
+ <property name="mnemonic_widget">MTR_FLD_RIGHT</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -264,7 +275,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="textattrtabpage|label6">_Top:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">MTR_FLD_TOP:0.00cm</property>
+ <property name="mnemonic_widget">MTR_FLD_TOP</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -278,7 +289,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="textattrtabpage|label7">_Bottom:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">MTR_FLD_BOTTOM:0.00cm</property>
+ <property name="mnemonic_widget">MTR_FLD_BOTTOM</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -287,9 +298,10 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="MTR_FLD_LEFT:0.00cm">
+ <object class="GtkSpinButton" id="MTR_FLD_LEFT">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="activates_default">True</property>
<property name="adjustment">adjustment1</property>
<property name="digits">2</property>
</object>
@@ -299,10 +311,11 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="MTR_FLD_RIGHT:0.00cm">
+ <object class="GtkSpinButton" id="MTR_FLD_RIGHT">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="adjustment">adjustment1</property>
+ <property name="activates_default">True</property>
+ <property name="adjustment">adjustment2</property>
<property name="digits">2</property>
</object>
<packing>
@@ -311,10 +324,11 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="MTR_FLD_TOP:0.00cm">
+ <object class="GtkSpinButton" id="MTR_FLD_TOP">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="adjustment">adjustment1</property>
+ <property name="activates_default">True</property>
+ <property name="adjustment">adjustment3</property>
<property name="digits">2</property>
</object>
<packing>
@@ -323,10 +337,11 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="MTR_FLD_BOTTOM:0.00cm">
+ <object class="GtkSpinButton" id="MTR_FLD_BOTTOM">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="adjustment">adjustment1</property>
+ <property name="activates_default">True</property>
+ <property name="adjustment">adjustment4</property>
<property name="digits">2</property>
</object>
<packing>
@@ -359,7 +374,7 @@
<child>
<object class="GtkFrame" id="FL_POSITION">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -377,11 +392,29 @@
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="svxlo-SvxRectCtl" id="CTL_POSITION">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkDrawingArea" id="CTL_POSITION">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">True</property>