Kaydet (Commit) fb8d53ee authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SvxBackgroundTabPage

Change-Id: I7b80ba0b2c85b191d5a7bec44d22293eb772d925
Reviewed-on: https://gerrit.libreoffice.org/60575Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst b943b9b9
...@@ -69,39 +69,10 @@ protected: ...@@ -69,39 +69,10 @@ protected:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
private: private:
SvxBackgroundTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet ); SvxBackgroundTabPage(TabPageParent pParent, const SfxItemSet& rCoreSet);
virtual ~SvxBackgroundTabPage() override; virtual ~SvxBackgroundTabPage() override;
virtual void dispose() override; virtual void dispose() override;
VclPtr<VclContainer> m_pAsGrid;
VclPtr<FixedText> m_pSelectTxt;
VclPtr<ListBox> m_pLbSelect;
VclPtr<FixedText> m_pTblDesc;
VclPtr<ListBox> m_pTblLBox;
VclPtr<FixedText> m_pBackGroundColorLabelFT;
VclPtr<VclFrame> m_pBackGroundColorFrame;
VclPtr<SvxColorValueSet> m_pBackgroundColorSet;
VclPtr<BackgroundPreviewImpl> m_pPreviewWin1;
VclPtr<CheckBox> m_pBtnPreview;
// Background Bitmap ----------------------------------
VclPtr<VclContainer> m_pBitmapContainer;
VclPtr<VclContainer> m_pFileFrame;
VclPtr<PushButton> m_pBtnBrowse;
VclPtr<CheckBox> m_pBtnLink;
VclPtr<FixedText> m_pFtUnlinked;
VclPtr<FixedText> m_pFtFile;
VclPtr<VclContainer> m_pTypeFrame;
VclPtr<RadioButton> m_pBtnPosition;
VclPtr<RadioButton> m_pBtnArea;
VclPtr<RadioButton> m_pBtnTile;
VclPtr<SvxRectCtl> m_pWndPosition;
VclPtr<BackgroundPreviewImpl> m_pPreviewWin2;
// DDListBox for Writer ------------------------------- // DDListBox for Writer -------------------------------
Color aBgdColor; Color aBgdColor;
...@@ -121,6 +92,41 @@ private: ...@@ -121,6 +92,41 @@ private:
std::unique_ptr<SvxBackgroundTable_Impl> pTableBck_Impl;///< Items for Sw-Table must be corrected std::unique_ptr<SvxBackgroundTable_Impl> pTableBck_Impl;///< Items for Sw-Table must be corrected
std::unique_ptr<SvxBrushItem> pHighlighting; std::unique_ptr<SvxBrushItem> pHighlighting;
std::unique_ptr<RectCtl> m_xWndPosition;
std::unique_ptr<ColorValueSet> m_xBackgroundColorSet;
std::unique_ptr<BackgroundPreviewImpl> m_xPreview1;
std::unique_ptr<BackgroundPreviewImpl> m_xPreview2;
std::unique_ptr<weld::Label> m_xFindGraphicsFt;
std::unique_ptr<weld::Widget> m_xAsGrid;
std::unique_ptr<weld::Label> m_xSelectTxt;
std::unique_ptr<weld::ComboBox> m_xLbSelect;
std::unique_ptr<weld::Label> m_xTblDesc;
std::unique_ptr<weld::ComboBox> m_xTblLBox;
std::unique_ptr<weld::Label> m_xBackGroundColorLabelFT;
std::unique_ptr<weld::Widget> m_xBackGroundColorFrame;
std::unique_ptr<weld::CheckButton> m_xBtnPreview;
// Background Bitmap ----------------------------------
std::unique_ptr<weld::Widget> m_xBitmapContainer;
std::unique_ptr<weld::Widget> m_xFileFrame;
std::unique_ptr<weld::Button> m_xBtnBrowse;
std::unique_ptr<weld::CheckButton> m_xBtnLink;
std::unique_ptr<weld::Label> m_xFtUnlinked;
std::unique_ptr<weld::Label> m_xFtFile;
std::unique_ptr<weld::Widget> m_xTypeFrame;
std::unique_ptr<weld::RadioButton> m_xBtnPosition;
std::unique_ptr<weld::RadioButton> m_xBtnArea;
std::unique_ptr<weld::RadioButton> m_xBtnTile;
std::unique_ptr<weld::CustomWeld> m_xWndPositionWin;
std::unique_ptr<weld::CustomWeld> m_xBackgroundColorSetWin;
std::unique_ptr<weld::CustomWeld> m_xPreviewWin1;
std::unique_ptr<weld::CustomWeld> m_xPreviewWin2;
void FillColorValueSets_Impl(); void FillColorValueSets_Impl();
void ShowColorUI_Impl(); void ShowColorUI_Impl();
void HideColorUI_Impl(); void HideColorUI_Impl();
...@@ -131,15 +137,15 @@ private: ...@@ -131,15 +137,15 @@ private:
void SetGraphicPosition_Impl( SvxGraphicPosition ePos ); void SetGraphicPosition_Impl( SvxGraphicPosition ePos );
SvxGraphicPosition GetGraphicPosition_Impl(); SvxGraphicPosition GetGraphicPosition_Impl();
void FillControls_Impl(const SvxBrushItem& rBgdAttr, void FillControls_Impl(const SvxBrushItem& rBgdAttr,
const OUString& rUserData); const OUString& rUserData);
DECL_LINK( LoadIdleHdl_Impl, Timer*, void ); DECL_LINK(LoadIdleHdl_Impl, Timer*, void);
DECL_LINK(SelectHdl_Impl, ListBox&, void ); DECL_LINK(SelectHdl_Impl, weld::ComboBox&, void);
DECL_LINK(BrowseHdl_Impl, Button*, void); DECL_LINK(BrowseHdl_Impl, weld::Button&, void);
DECL_LINK( RadioClickHdl_Impl, Button*, void ); DECL_LINK(RadioClickHdl_Impl, weld::ToggleButton&, void );
DECL_LINK( FileClickHdl_Impl, Button*, void ); DECL_LINK(FileClickHdl_Impl, weld::ToggleButton&, void);
DECL_LINK(BackgroundColorHdl_Impl, ValueSet*, void); DECL_LINK(BackgroundColorHdl_Impl, SvtValueSet*, void);
DECL_LINK( TblDestinationHdl_Impl, ListBox&, void ); DECL_LINK(TblDestinationHdl_Impl, weld::ComboBox&, void);
}; };
class SvxBkgTabPage : public SvxAreaTabPage class SvxBkgTabPage : public SvxAreaTabPage
......
...@@ -100,25 +100,26 @@ struct SvxBackgroundPage_Impl ...@@ -100,25 +100,26 @@ struct SvxBackgroundPage_Impl
}; };
/// Returns the fill style of the currently selected entry. /// Returns the fill style of the currently selected entry.
static drawing::FillStyle lcl_getFillStyle(ListBox const * pLbSelect) static drawing::FillStyle lcl_getFillStyle(const weld::ComboBox& rLbSelect)
{ {
return static_cast<drawing::FillStyle>(reinterpret_cast<sal_uLong>(pLbSelect->GetSelectedEntryData())); return static_cast<drawing::FillStyle>(rLbSelect.get_active_id().toUInt32());
} }
// Selects the entry matching the specified fill style. // Selects the entry matching the specified fill style.
static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle) static void lcl_setFillStyle(weld::ComboBox& rLbSelect, drawing::FillStyle eStyle)
{ {
for (int i = 0; i < pLbSelect->GetEntryCount(); ++i) OUString sStyle = OUString::number(static_cast<sal_uInt32>(eStyle));
for (int i = 0; i < rLbSelect.get_count(); ++i)
{ {
if (static_cast<drawing::FillStyle>(reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i))) == eStyle) if (rLbSelect.get_id(i) == sStyle)
{ {
pLbSelect->SelectEntryPos(i); rLbSelect.set_active(i);
return; return;
} }
} }
} }
static sal_uInt16 GetItemId_Impl( ValueSet const & rValueSet, const Color& rCol ) static sal_uInt16 GetItemId_Impl(const SvtValueSet& rValueSet, const Color& rCol)
{ {
bool bFound = false; bool bFound = false;
sal_uInt16 nCount = rValueSet.GetItemCount(); sal_uInt16 nCount = rValueSet.GetItemCount();
...@@ -138,22 +139,20 @@ static sal_uInt16 GetItemId_Impl( ValueSet const & rValueSet, const Color& rCol ...@@ -138,22 +139,20 @@ static sal_uInt16 GetItemId_Impl( ValueSet const & rValueSet, const Color& rCol
return bFound ? n : 0; return bFound ? n : 0;
} }
/** Preview window for brush or bitmap */ /** Preview window for brush or bitmap */
class BackgroundPreviewImpl : public vcl::Window class BackgroundPreviewImpl : public weld::CustomWidgetController
{ {
public: public:
explicit BackgroundPreviewImpl(vcl::Window* pParent); explicit BackgroundPreviewImpl();
void setBmp(bool bBmp); void setBmp(bool bBmp);
virtual ~BackgroundPreviewImpl() override;
virtual void dispose() override;
void NotifyChange( const Color& rColor ); void NotifyChange(const Color& rColor);
void NotifyChange( const Bitmap* pBitmap ); void NotifyChange(const Bitmap* pBitmap);
void SetFillColor(const Color& rColor) { aColor = rColor; }
protected: protected:
virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) override; virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual void Resize() override; virtual void Resize() override;
private: private:
...@@ -164,21 +163,21 @@ private: ...@@ -164,21 +163,21 @@ private:
std::unique_ptr<Bitmap> pBitmap; std::unique_ptr<Bitmap> pBitmap;
Point aDrawPos; Point aDrawPos;
Size aDrawSize; Size aDrawSize;
::tools::Rectangle aDrawRect; ::tools::Rectangle aDrawRect;
Color aColor;
}; };
BackgroundPreviewImpl::BackgroundPreviewImpl(vcl::Window* pParent) BackgroundPreviewImpl::BackgroundPreviewImpl()
: Window(pParent, WB_BORDER) : bIsBmp(false)
, bIsBmp(false) , aColor(Application::GetSettings().GetStyleSettings().GetFieldColor())
, aDrawRect(Point(0,0), GetOutputSizePixel())
{ {
SetBorderStyle(WindowBorderStyle::MONO);
Invalidate(aDrawRect);
} }
extern "C" SAL_DLLPUBLIC_EXPORT void makeBackgroundPreview(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap &) void BackgroundPreviewImpl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{ {
rRet = VclPtr<BackgroundPreviewImpl>::Create(pParent); CustomWidgetController::SetDrawingArea(pDrawingArea);
aDrawRect = tools::Rectangle(Point(0,0), GetOutputSizePixel());
Invalidate(aDrawRect);
} }
void BackgroundPreviewImpl::setBmp(bool bBmp) void BackgroundPreviewImpl::setBmp(bool bBmp)
...@@ -187,24 +186,12 @@ void BackgroundPreviewImpl::setBmp(bool bBmp) ...@@ -187,24 +186,12 @@ void BackgroundPreviewImpl::setBmp(bool bBmp)
Invalidate(); Invalidate();
} }
BackgroundPreviewImpl::~BackgroundPreviewImpl()
{
disposeOnce();
}
void BackgroundPreviewImpl::dispose()
{
pBitmap.reset();
vcl::Window::dispose();
}
void BackgroundPreviewImpl::NotifyChange( const Color& rColor ) void BackgroundPreviewImpl::NotifyChange( const Color& rColor )
{ {
if ( !bIsBmp ) if ( !bIsBmp )
{ {
const static Color aTranspCol( COL_TRANSPARENT ); const static Color aTranspCol(COL_TRANSPARENT);
SetFillColor(rColor == aTranspCol ? Application::GetSettings().GetStyleSettings().GetFieldColor() : rColor.GetRGBColor());
SetFillColor( rColor == aTranspCol ? GetSettings().GetStyleSettings().GetFieldColor() : rColor.GetRGBColor() );
Invalidate(aDrawRect); Invalidate(aDrawRect);
} }
} }
...@@ -223,7 +210,6 @@ void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap ) ...@@ -223,7 +210,6 @@ void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap )
recalcDrawPos(); recalcDrawPos();
Invalidate(aDrawRect); Invalidate(aDrawRect);
Update();
} }
} }
...@@ -269,8 +255,8 @@ void BackgroundPreviewImpl::recalcDrawPos() ...@@ -269,8 +255,8 @@ void BackgroundPreviewImpl::recalcDrawPos()
void BackgroundPreviewImpl::Resize() void BackgroundPreviewImpl::Resize()
{ {
Window::Resize(); CustomWidgetController::Resize();
aDrawRect = ::tools::Rectangle(Point(0,0), GetOutputSizePixel()); aDrawRect = tools::Rectangle(Point(0,0), GetOutputSizePixel());
recalcDrawPos(); recalcDrawPos();
} }
...@@ -281,9 +267,10 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to ...@@ -281,9 +267,10 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to
rRenderContext.SetLineColor(); rRenderContext.SetLineColor();
if (bIsBmp) if (bIsBmp)
{
rRenderContext.SetFillColor(COL_TRANSPARENT); rRenderContext.SetFillColor(COL_TRANSPARENT);
} else
rRenderContext.SetFillColor(aColor);
rRenderContext.DrawRect(aDrawRect); rRenderContext.DrawRect(aDrawRect);
if (bIsBmp) if (bIsBmp)
...@@ -299,20 +286,10 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to ...@@ -299,20 +286,10 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to
} }
} }
void BackgroundPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
Invalidate();
}
Window::DataChanged( rDCEvt );
}
#define HDL(hdl) LINK(this,SvxBackgroundTabPage,hdl) #define HDL(hdl) LINK(this,SvxBackgroundTabPage,hdl)
SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) SvxBackgroundTabPage::SvxBackgroundTabPage(TabPageParent pParent, const SfxItemSet& rCoreSet)
: SvxTabPage(pParent, "BackgroundPage", "cui/ui/backgroundpage.ui", rCoreSet) : SvxTabPage(pParent, "cui/ui/backgroundpage.ui", "BackgroundPage", rCoreSet)
, nHtmlMode(0) , nHtmlMode(0)
, bAllowShowSelector(true) , bAllowShowSelector(true)
, bIsGraphicValid(false) , bIsGraphicValid(false)
...@@ -320,35 +297,36 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe ...@@ -320,35 +297,36 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
, bCharBackColor(false) , bCharBackColor(false)
, m_bColorSelected(false) , m_bColorSelected(false)
, pPageImpl(new SvxBackgroundPage_Impl) , pPageImpl(new SvxBackgroundPage_Impl)
, m_xWndPosition(new RectCtl(this))
, m_xBackgroundColorSet(new ColorValueSet(m_xBuilder->weld_scrolled_window("backgroundcolorsetwin")))
, m_xPreview1(new BackgroundPreviewImpl)
, m_xPreview2(new BackgroundPreviewImpl)
, m_xFindGraphicsFt(m_xBuilder->weld_label("findgraphicsft"))
, m_xAsGrid(m_xBuilder->weld_widget("asgrid"))
, m_xSelectTxt(m_xBuilder->weld_label("asft"))
, m_xLbSelect(m_xBuilder->weld_combo_box("selectlb"))
, m_xTblDesc(m_xBuilder->weld_label("forft"))
, m_xTblLBox(m_xBuilder->weld_combo_box("tablelb"))
, m_xBackGroundColorLabelFT(m_xBuilder->weld_label("background_label"))
, m_xBackGroundColorFrame(m_xBuilder->weld_widget("backgroundcolorframe"))
, m_xBtnPreview(m_xBuilder->weld_check_button("showpreview"))
, m_xBitmapContainer(m_xBuilder->weld_widget("graphicgrid"))
, m_xFileFrame(m_xBuilder->weld_widget("fileframe"))
, m_xBtnBrowse(m_xBuilder->weld_button("browse"))
, m_xBtnLink(m_xBuilder->weld_check_button("link"))
, m_xFtUnlinked(m_xBuilder->weld_label("unlinkedft"))
, m_xFtFile(m_xBuilder->weld_label("fileft"))
, m_xTypeFrame(m_xBuilder->weld_widget("typeframe"))
, m_xBtnPosition(m_xBuilder->weld_radio_button("positionrb"))
, m_xBtnArea(m_xBuilder->weld_radio_button("arearb"))
, m_xBtnTile(m_xBuilder->weld_radio_button("tilerb"))
, m_xWndPositionWin(new weld::CustomWeld(*m_xBuilder, "windowpos", *m_xWndPosition))
, m_xBackgroundColorSetWin(new weld::CustomWeld(*m_xBuilder, "backgroundcolorset", *m_xBackgroundColorSet))
, m_xPreviewWin1(new weld::CustomWeld(*m_xBuilder, "preview1", *m_xPreview1))
, m_xPreviewWin2(new weld::CustomWeld(*m_xBuilder, "preview2", *m_xPreview2))
{ {
get(m_pAsGrid, "asgrid"); m_xPreview2->setBmp(true);
get(m_pSelectTxt, "asft");
get(m_pLbSelect, "selectlb");
get(m_pTblDesc, "forft");
get(m_pTblLBox, "tablelb");
get(m_pBackGroundColorLabelFT, "background_label");
get(m_pBackGroundColorFrame, "backgroundcolorframe");
get(m_pBackgroundColorSet, "backgroundcolorset");
get(m_pPreviewWin1, "preview1");
get(m_pBtnPreview, "showpreview");
get(m_pBitmapContainer, "graphicgrid");
get(m_pFileFrame, "fileframe");
get(m_pBtnBrowse, "browse");
get(m_pBtnLink, "link");
get(m_pFtUnlinked, "unlinkedft");
get(m_pFtFile, "fileft");
get(m_pTypeFrame, "typeframe");
get(m_pBtnPosition, "positionrb");
get(m_pBtnArea, "arearb");
get(m_pBtnTile, "tilerb");
get(m_pWndPosition, "windowpos");
get(m_pPreviewWin2, "preview2");
m_pPreviewWin2->setBmp(true);
// this page needs ExchangeSupport // this page needs ExchangeSupport
SetExchangeSupport(); SetExchangeSupport();
...@@ -365,9 +343,9 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe ...@@ -365,9 +343,9 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
FillColorValueSets_Impl(); FillColorValueSets_Impl();
m_pBackgroundColorSet->SetSelectHdl( HDL(BackgroundColorHdl_Impl) ); m_xBackgroundColorSet->SetSelectHdl(HDL(BackgroundColorHdl_Impl));
m_pBackgroundColorSet->SetStyle(m_pBackgroundColorSet->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD); m_xBackgroundColorSet->SetStyle(m_xBackgroundColorSet->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD);
m_pBackgroundColorSet->SetText(SvxResId(RID_SVXSTR_NOFILL)); m_xBackgroundColorSet->SetText(SvxResId(RID_SVXSTR_NOFILL));
} }
SvxBackgroundTabPage::~SvxBackgroundTabPage() SvxBackgroundTabPage::~SvxBackgroundTabPage()
...@@ -393,34 +371,22 @@ void SvxBackgroundTabPage::dispose() ...@@ -393,34 +371,22 @@ void SvxBackgroundTabPage::dispose()
pTableBck_Impl.reset(); pTableBck_Impl.reset();
} }
m_pAsGrid.clear(); m_xPreviewWin2.reset();
m_pSelectTxt.clear(); m_xPreviewWin1.reset();
m_pLbSelect.clear(); m_xBackgroundColorSetWin.reset();
m_pTblDesc.clear(); m_xWndPositionWin.reset();
m_pTblLBox.clear();
m_pBackGroundColorFrame.clear(); m_xPreview2.reset();
m_pBackgroundColorSet.clear(); m_xPreview1.reset();
m_pBackGroundColorLabelFT.clear(); m_xBackgroundColorSet.reset();
m_pPreviewWin1.clear(); m_xWndPosition.reset();
m_pBtnPreview.clear();
m_pBitmapContainer.clear();
m_pFileFrame.clear();
m_pBtnBrowse.clear();
m_pBtnLink.clear();
m_pFtUnlinked.clear();
m_pFtFile.clear();
m_pTypeFrame.clear();
m_pBtnPosition.clear();
m_pBtnArea.clear();
m_pBtnTile.clear();
m_pWndPosition.clear();
m_pPreviewWin2.clear();
SvxTabPage::dispose(); SvxTabPage::dispose();
} }
VclPtr<SfxTabPage> SvxBackgroundTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) VclPtr<SfxTabPage> SvxBackgroundTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{ {
return VclPtr<SvxBackgroundTabPage>::Create( pParent.pParent, *rAttrSet ); return VclPtr<SvxBackgroundTabPage>::Create(pParent, *rAttrSet);
} }
void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
...@@ -429,7 +395,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -429,7 +395,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
// condition of the preview button is persistent due to UserData // condition of the preview button is persistent due to UserData
OUString aUserData = GetUserData(); OUString aUserData = GetUserData();
m_pBtnPreview->Check( !aUserData.isEmpty() && '1' == aUserData[0] ); m_xBtnPreview->set_active(!aUserData.isEmpty() && '1' == aUserData[0]);
// don't be allowed to call ShowSelector() after reset anymore // don't be allowed to call ShowSelector() after reset anymore
bAllowShowSelector = false; bAllowShowSelector = false;
...@@ -445,7 +411,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -445,7 +411,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
false, &pItem ) ) false, &pItem ) )
{ {
nDestValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); nDestValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
m_pTblLBox->SelectEntryPos(nDestValue); m_xTblLBox->set_active(nDestValue);
switch ( nDestValue ) switch ( nDestValue )
{ {
...@@ -470,7 +436,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -470,7 +436,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
} }
//#111173# the destination item is missing when the parent style has been changed //#111173# the destination item is missing when the parent style has been changed
if(USHRT_MAX == nDestValue && m_pTblLBox->IsVisible()) if (USHRT_MAX == nDestValue && m_xTblLBox->get_visible())
nDestValue = 0; nDestValue = 0;
sal_uInt16 nWhich = GetWhich(nSlot); sal_uInt16 nWhich = GetWhich(nSlot);
SvxBrushItem aBgdAttr(nWhich); SvxBrushItem aBgdAttr(nWhich);
...@@ -491,7 +457,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -491,7 +457,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
bBrushItemSet = true; bBrushItemSet = true;
} }
m_pBtnTile->Check(); m_xBtnTile->set_active(true);
if (bBrushItemSet) if (bBrushItemSet)
{ {
...@@ -500,9 +466,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -500,9 +466,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
} }
else else
{ {
m_pSelectTxt->Hide(); m_xSelectTxt->hide();
m_pLbSelect->Hide(); m_xLbSelect->hide();
lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_SOLID); lcl_setFillStyle(*m_xLbSelect, drawing::FillStyle_SOLID);
ShowColorUI_Impl(); ShowColorUI_Impl();
const SfxPoolItem* pOld = GetOldItem( *rSet, SID_ATTR_BRUSH ); const SfxPoolItem* pOld = GetOldItem( *rSet, SID_ATTR_BRUSH );
...@@ -513,9 +479,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -513,9 +479,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
if ( nDestValue != USHRT_MAX ) if ( nDestValue != USHRT_MAX )
{ {
if(m_pTblLBox->IsVisible()) if (m_xTblLBox->get_visible())
{ {
sal_Int32 nValue = m_pTblLBox->GetSelectedEntryPos(); int nValue = m_xTblLBox->get_active();
if ( pTableBck_Impl ) if ( pTableBck_Impl )
{ {
...@@ -550,8 +516,8 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -550,8 +516,8 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
} }
pTableBck_Impl->nTableWhich = SID_ATTR_BRUSH_TABLE; pTableBck_Impl->nTableWhich = SID_ATTR_BRUSH_TABLE;
TblDestinationHdl_Impl(*m_pTblLBox); TblDestinationHdl_Impl(*m_xTblLBox);
m_pTblLBox->SaveValue(); m_xTblLBox->save_value();
} }
else if( bHighlighting ) else if( bHighlighting )
{ {
...@@ -586,7 +552,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) ...@@ -586,7 +552,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
*/ */
void SvxBackgroundTabPage::FillUserData() void SvxBackgroundTabPage::FillUserData()
{ {
SetUserData( m_pBtnPreview->IsChecked() ? OUString('1') : OUString('0') ); SetUserData(m_xBtnPreview->get_active() ? OUString('1') : OUString('0'));
} }
bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
...@@ -601,9 +567,9 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -601,9 +567,9 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
bool bCompareOldBrush = true; bool bCompareOldBrush = true;
sal_uInt16 nSlot = SID_ATTR_BRUSH; sal_uInt16 nSlot = SID_ATTR_BRUSH;
if ( m_pTblLBox->IsVisible() ) if (m_xTblLBox->get_visible())
{ {
switch( m_pTblLBox->GetSelectedEntryPos() ) switch (m_xTblLBox->get_active())
{ {
case TBL_DEST_CELL: case TBL_DEST_CELL:
nSlot = SID_ATTR_BRUSH; nSlot = SID_ATTR_BRUSH;
...@@ -636,14 +602,14 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -636,14 +602,14 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
const SvxBrushItem& rOldItem = static_cast<const SvxBrushItem&>(*pOld); const SvxBrushItem& rOldItem = static_cast<const SvxBrushItem&>(*pOld);
SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos();
const bool bIsBrush = ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ); const bool bIsBrush = ( drawing::FillStyle_SOLID == lcl_getFillStyle(*m_xLbSelect) );
if ( ( (GPOS_NONE == eOldPos) && bIsBrush ) if ( ( (GPOS_NONE == eOldPos) && bIsBrush )
|| ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap changed? || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap changed?
{ {
// background art hasn't been changed: // background art hasn't been changed:
if ( (GPOS_NONE == eOldPos) || !m_pLbSelect->IsVisible() ) if (GPOS_NONE == eOldPos || !m_xLbSelect->get_visible())
{ {
// Brush-treatment: // Brush-treatment:
if ( rOldItem.GetColor() != aBgdColor || if ( rOldItem.GetColor() != aBgdColor ||
...@@ -660,7 +626,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -660,7 +626,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
// Bitmap-treatment: // Bitmap-treatment:
SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
const bool bIsLink = m_pBtnLink->IsChecked(); const bool bIsLink = m_xBtnLink->get_active();
const bool bWasLink = !rOldItem.GetGraphicLink().isEmpty(); const bool bWasLink = !rOldItem.GetGraphicLink().isEmpty();
...@@ -710,7 +676,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -710,7 +676,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
else else
{ {
std::unique_ptr<SvxBrushItem> pTmpBrush; std::unique_ptr<SvxBrushItem> pTmpBrush;
if ( m_pBtnLink->IsChecked() ) if ( m_xBtnLink->get_active() )
{ {
pTmpBrush.reset(new SvxBrushItem( aBgdGraphicPath, pTmpBrush.reset(new SvxBrushItem( aBgdGraphicPath,
aBgdGraphicFilter, aBgdGraphicFilter,
...@@ -732,7 +698,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -732,7 +698,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
rCoreSet->Put(*pTmpBrush); rCoreSet->Put(*pTmpBrush);
} }
} }
bModified = ( bIsBrush || m_pBtnLink->IsChecked() || bIsGraphicValid ); bModified = ( bIsBrush || m_xBtnLink->get_active() || bIsGraphicValid );
} }
} }
else if (pOld && SID_ATTR_CHAR_BACK_COLOR == nSlot) else if (pOld && SID_ATTR_CHAR_BACK_COLOR == nSlot)
...@@ -757,7 +723,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -757,7 +723,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
bModified = true; bModified = true;
} }
if( m_pTblLBox->IsVisible() ) if (m_xTblLBox->get_visible())
{ {
// the current condition has already been put // the current condition has already been put
if( nSlot != SID_ATTR_BRUSH && pTableBck_Impl->pCellBrush) if( nSlot != SID_ATTR_BRUSH && pTableBck_Impl->pCellBrush)
...@@ -796,10 +762,10 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) ...@@ -796,10 +762,10 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
} }
} }
if( m_pTblLBox->IsValueChangedFromSaved() ) if (m_xTblLBox->get_value_changed_from_saved())
{ {
rCoreSet->Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, rCoreSet->Put(SfxUInt16Item(SID_BACKGRND_DESTINATION,
m_pTblLBox->GetSelectedEntryPos() ) ); m_xTblLBox->get_active()));
bModified = true; bModified = true;
} }
} }
...@@ -846,16 +812,16 @@ void SvxBackgroundTabPage::ShowSelector() ...@@ -846,16 +812,16 @@ void SvxBackgroundTabPage::ShowSelector()
{ {
if( bAllowShowSelector) if( bAllowShowSelector)
{ {
m_pAsGrid->Show(); m_xAsGrid->show();
m_pSelectTxt->Show(); m_xSelectTxt->show();
m_pLbSelect->Show(); m_xLbSelect->show();
m_pLbSelect->SetSelectHdl( HDL(SelectHdl_Impl) ); m_xLbSelect->connect_changed(HDL(SelectHdl_Impl));
m_pBtnLink->SetClickHdl( HDL(FileClickHdl_Impl) ); m_xBtnLink->connect_toggled(HDL(FileClickHdl_Impl));
m_pBtnPreview->SetClickHdl( HDL(FileClickHdl_Impl) ); m_xBtnPreview->connect_toggled(HDL(FileClickHdl_Impl));
m_pBtnBrowse->SetClickHdl( HDL(BrowseHdl_Impl) ); m_xBtnBrowse->connect_clicked(HDL(BrowseHdl_Impl));
m_pBtnArea->SetClickHdl( HDL(RadioClickHdl_Impl) ); m_xBtnArea->connect_toggled(HDL(RadioClickHdl_Impl));
m_pBtnTile->SetClickHdl( HDL(RadioClickHdl_Impl) ); m_xBtnTile->connect_toggled(HDL(RadioClickHdl_Impl));
m_pBtnPosition->SetClickHdl( HDL(RadioClickHdl_Impl) ); m_xBtnPosition->connect_toggled(HDL(RadioClickHdl_Impl));
// delayed loading via timer (because of UI-Update) // delayed loading via timer (because of UI-Update)
pPageImpl->pLoadIdle = new Idle("DelayedLoad"); pPageImpl->pLoadIdle = new Idle("DelayedLoad");
...@@ -865,9 +831,9 @@ void SvxBackgroundTabPage::ShowSelector() ...@@ -865,9 +831,9 @@ void SvxBackgroundTabPage::ShowSelector()
bAllowShowSelector = false; bAllowShowSelector = false;
if(nHtmlMode & HTMLMODE_ON) if (nHtmlMode & HTMLMODE_ON)
{ {
m_pBtnArea->Enable(false); m_xBtnArea->set_sensitive(false);
} }
} }
} }
...@@ -876,7 +842,7 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl() ...@@ -876,7 +842,7 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl()
{ {
SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND, SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND,
OUString(), OUString(),
GetFrameWeld(), GetDialogFrameWeld(),
RID_SVXERRCTX, RID_SVXERRCTX,
SvxResLocale() ); SvxResLocale() );
...@@ -909,13 +875,13 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() ...@@ -909,13 +875,13 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
if ( pColorTable.is() ) if ( pColorTable.is() )
{ {
m_pBackgroundColorSet->Clear(); m_xBackgroundColorSet->Clear();
m_pBackgroundColorSet->addEntriesForXColorList(*pColorTable); m_xBackgroundColorSet->addEntriesForXColorList(*pColorTable);
} }
const WinBits nBits(m_pBackgroundColorSet->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD); const WinBits nBits(m_xBackgroundColorSet->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD);
m_pBackgroundColorSet->SetStyle(nBits); m_xBackgroundColorSet->SetStyle(nBits);
m_pBackgroundColorSet->SetColCount(SvxColorValueSet::getColumnCount()); m_xBackgroundColorSet->SetColCount(SvxColorValueSet::getColumnCount());
} }
/** Hide the controls for editing the bitmap /** Hide the controls for editing the bitmap
...@@ -923,16 +889,16 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() ...@@ -923,16 +889,16 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
*/ */
void SvxBackgroundTabPage::ShowColorUI_Impl() void SvxBackgroundTabPage::ShowColorUI_Impl()
{ {
if (!m_pBackGroundColorFrame->IsVisible()) if (!m_xBackGroundColorFrame->get_visible())
{ {
HideBitmapUI_Impl(); HideBitmapUI_Impl();
m_pBackGroundColorFrame->Show(); m_xBackGroundColorFrame->show();
} }
} }
void SvxBackgroundTabPage::HideColorUI_Impl() void SvxBackgroundTabPage::HideColorUI_Impl()
{ {
m_pBackGroundColorFrame->Hide(); m_xBackGroundColorFrame->hide();
} }
/** Hide the controls for color settings /** Hide the controls for color settings
...@@ -940,31 +906,27 @@ void SvxBackgroundTabPage::HideColorUI_Impl() ...@@ -940,31 +906,27 @@ void SvxBackgroundTabPage::HideColorUI_Impl()
*/ */
void SvxBackgroundTabPage::ShowBitmapUI_Impl() void SvxBackgroundTabPage::ShowBitmapUI_Impl()
{ {
if (m_pLbSelect->IsVisible() && if (m_xLbSelect->get_visible() &&
(m_pBackGroundColorFrame->IsVisible() || !m_pFileFrame->IsVisible())) (m_xBackGroundColorFrame->get_visible() || !m_xFileFrame->get_visible()))
{ {
HideColorUI_Impl(); HideColorUI_Impl();
m_xBitmapContainer->show();
m_pBitmapContainer->Show(); m_xFileFrame->show();
m_xBtnLink->show(!(nHtmlMode & HTMLMODE_ON));
m_pFileFrame->Show(); m_xTypeFrame->show();
m_pBtnLink->Show(!(nHtmlMode & HTMLMODE_ON)); m_xPreviewWin2->show();
m_xBtnPreview->show();
m_pTypeFrame->Show();
m_pPreviewWin2->Show();
m_pBtnPreview->Show();
} }
} }
void SvxBackgroundTabPage::HideBitmapUI_Impl() void SvxBackgroundTabPage::HideBitmapUI_Impl()
{ {
m_pBitmapContainer->Hide(); m_xBitmapContainer->hide();
m_pFileFrame->Hide(); m_xFileFrame->hide();
m_pTypeFrame->Hide(); m_xTypeFrame->hide();
m_pPreviewWin2->Hide(); m_xPreviewWin2->hide();
m_pBtnPreview->Hide(); m_xBtnPreview->hide();
} }
void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos ) void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos )
...@@ -973,22 +935,22 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos ) ...@@ -973,22 +935,22 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos )
{ {
case GPOS_AREA: case GPOS_AREA:
{ {
m_pBtnArea->Check(); m_xBtnArea->set_active(true);
m_pWndPosition->Disable(); m_xWndPositionWin->set_sensitive(false);
} }
break; break;
case GPOS_TILED: case GPOS_TILED:
{ {
m_pBtnTile->Check(); m_xBtnTile->set_active(true);
m_pWndPosition->Disable(); m_xWndPositionWin->set_sensitive(false);
} }
break; break;
default: default:
{ {
m_pBtnPosition->Check(); m_xBtnPosition->set_active(true);
m_pWndPosition->Enable(); m_xWndPositionWin->set_sensitive(true);
RectPoint eNewPos = RectPoint::MM; RectPoint eNewPos = RectPoint::MM;
switch ( ePos ) switch ( ePos )
...@@ -1004,22 +966,22 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos ) ...@@ -1004,22 +966,22 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos )
case GPOS_RB: eNewPos = RectPoint::RB; break; case GPOS_RB: eNewPos = RectPoint::RB; break;
default: ;//prevent warning default: ;//prevent warning
} }
m_pWndPosition->SetActualRP( eNewPos ); m_xWndPosition->SetActualRP( eNewPos );
} }
break; break;
} }
m_pWndPosition->Invalidate(); m_xWndPosition->Invalidate();
} }
SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl() SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl()
{ {
if ( m_pBtnTile->IsChecked() ) if (m_xBtnTile->get_active())
return GPOS_TILED; return GPOS_TILED;
else if ( m_pBtnArea->IsChecked() ) else if (m_xBtnArea->get_active())
return GPOS_AREA; return GPOS_AREA;
else else
{ {
switch ( m_pWndPosition->GetActualRP() ) switch (m_xWndPosition->GetActualRP())
{ {
case RectPoint::LT: return GPOS_LT; case RectPoint::LT: return GPOS_LT;
case RectPoint::MT: return GPOS_MT; case RectPoint::MT: return GPOS_MT;
...@@ -1039,18 +1001,18 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl() ...@@ -1039,18 +1001,18 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl()
// Handler // Handler
/** Handler, called when color selection is changed */ /** Handler, called when color selection is changed */
IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, void) IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl, SvtValueSet*, void)
{ {
sal_uInt16 nItemId = m_pBackgroundColorSet->GetSelectedItemId(); sal_uInt16 nItemId = m_xBackgroundColorSet->GetSelectedItemId();
Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : COL_TRANSPARENT; Color aColor = nItemId ? ( m_xBackgroundColorSet->GetItemColor( nItemId ) ) : COL_TRANSPARENT;
aBgdColor = aColor; aBgdColor = aColor;
m_bColorSelected = true; m_bColorSelected = true;
m_pPreviewWin1->NotifyChange( aBgdColor ); m_xPreview1->NotifyChange( aBgdColor );
} }
IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl, ListBox&, void) IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl, weld::ComboBox&, void)
{ {
if ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ) if ( drawing::FillStyle_SOLID == lcl_getFillStyle(*m_xLbSelect) )
{ {
ShowColorUI_Impl(); ShowColorUI_Impl();
} }
...@@ -1060,31 +1022,31 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl, ListBox&, void) ...@@ -1060,31 +1022,31 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl, ListBox&, void)
} }
} }
IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, Button*, pBox, void ) IMPL_LINK(SvxBackgroundTabPage, FileClickHdl_Impl, weld::ToggleButton&, rBox, void)
{ {
if (m_pBtnLink == pBox) if (m_xBtnLink.get() == &rBox)
{ {
if ( m_pBtnLink->IsChecked() ) if (m_xBtnLink->get_active())
{ {
m_pFtUnlinked->Hide(); m_xFtUnlinked->hide();
INetURLObject aObj( aBgdGraphicPath ); INetURLObject aObj( aBgdGraphicPath );
OUString aFilePath; OUString aFilePath;
if ( aObj.GetProtocol() == INetProtocol::File ) if ( aObj.GetProtocol() == INetProtocol::File )
aFilePath = aObj.getFSysPath( FSysStyle::Detect ); aFilePath = aObj.getFSysPath( FSysStyle::Detect );
else else
aFilePath = aBgdGraphicPath; aFilePath = aBgdGraphicPath;
m_pFtFile->SetText( aFilePath ); m_xFtFile->set_label(aFilePath);
m_pFtFile->Show(); m_xFtFile->show();
} }
else else
{ {
m_pFtUnlinked->Show(); m_xFtUnlinked->show();
m_pFtFile->Hide(); m_xFtFile->hide();
} }
} }
else if (m_pBtnPreview == pBox) else if (m_xBtnPreview.get() == &rBox)
{ {
if ( m_pBtnPreview->IsChecked() ) if (m_xBtnPreview->get_active())
{ {
if ( !bIsGraphicValid ) if ( !bIsGraphicValid )
bIsGraphicValid = LoadLinkedGraphic_Impl(); bIsGraphicValid = LoadLinkedGraphic_Impl();
...@@ -1092,51 +1054,51 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, Button*, pBox, void ) ...@@ -1092,51 +1054,51 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, Button*, pBox, void )
if ( bIsGraphicValid ) if ( bIsGraphicValid )
{ {
Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap(); Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
m_pPreviewWin2->NotifyChange( &aBmp ); m_xPreview2->NotifyChange( &aBmp );
} }
else else
{ {
if ( !aBgdGraphicPath.isEmpty() ) // only for linked bitmap if ( !aBgdGraphicPath.isEmpty() ) // only for linked bitmap
RaiseLoadError_Impl(); RaiseLoadError_Impl();
m_pPreviewWin2->NotifyChange( nullptr ); m_xPreview2->NotifyChange( nullptr );
} }
} }
else else
m_pPreviewWin2->NotifyChange( nullptr ); m_xPreview2->NotifyChange( nullptr );
} }
} }
IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, Button*, pBtn, void ) IMPL_LINK(SvxBackgroundTabPage, RadioClickHdl_Impl, weld::ToggleButton&, rBtn, void)
{ {
if (pBtn == m_pBtnPosition) if (&rBtn == m_xBtnPosition.get())
{ {
if ( !m_pWndPosition->IsEnabled() ) if (!m_xWndPositionWin->get_sensitive())
{ {
m_pWndPosition->Enable(); m_xWndPositionWin->set_sensitive(true);
m_pWndPosition->Invalidate(); m_xWndPositionWin->queue_draw();
} }
} }
else if ( m_pWndPosition->IsEnabled() ) else if (m_xWndPositionWin->get_sensitive())
{ {
m_pWndPosition->Disable(); m_xWndPositionWin->set_sensitive(false);
m_pWndPosition->Invalidate(); m_xWndPositionWin->queue_draw();
} }
} }
/** Handler, called by pressing the browse button. /** Handler, called by pressing the browse button.
Create graphic/insert dialog, set path and start. Create graphic/insert dialog, set path and start.
*/ */
IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl, Button*, void) IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl, weld::Button&, void)
{ {
if ( pPageImpl->pLoadIdle->IsActive() ) if ( pPageImpl->pLoadIdle->IsActive() )
return; return;
bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON );
OUString aStrBrowse(get<vcl::Window>("findgraphicsft")->GetText()); OUString aStrBrowse(m_xFindGraphicsFt->get_label());
pImportDlg.reset( new SvxOpenGraphicDialog(aStrBrowse, GetFrameWeld()) ); pImportDlg.reset(new SvxOpenGraphicDialog(aStrBrowse, GetDialogFrameWeld()));
if ( bHtml ) if ( bHtml )
pImportDlg->EnableLink(false); pImportDlg->EnableLink(false);
pImportDlg->SetPath( aBgdGraphicPath, m_pBtnLink->IsChecked() ); pImportDlg->SetPath(aBgdGraphicPath, m_xBtnLink->get_active());
pPageImpl->bIsImportDlgInExecute = true; pPageImpl->bIsImportDlgInExecute = true;
ErrCode nErr = pImportDlg->Execute(); ErrCode nErr = pImportDlg->Execute();
...@@ -1144,13 +1106,13 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl, Button*, void) ...@@ -1144,13 +1106,13 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl, Button*, void)
if( !nErr ) if( !nErr )
{ {
if ( bHtml ) if (bHtml)
m_pBtnLink->Check(); m_xBtnLink->set_active(true);
// if link isn't checked and preview isn't, either, // if link isn't checked and preview isn't, either,
// activate preview, so that the user sees which // activate preview, so that the user sees which
// graphic he has chosen // graphic he has chosen
if ( !m_pBtnLink->IsChecked() && !m_pBtnPreview->IsChecked() ) if (!m_xBtnLink->get_active() && !m_xBtnPreview->get_active())
m_pBtnPreview->Check(); m_xBtnPreview->set_active(true);
// timer-delayed loading of the graphic // timer-delayed loading of the graphic
pPageImpl->pLoadIdle->Start(); pPageImpl->pLoadIdle->Start();
} }
...@@ -1178,10 +1140,10 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void ) ...@@ -1178,10 +1140,10 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void )
aBgdGraphicPath = pImportDlg->GetPath(); aBgdGraphicPath = pImportDlg->GetPath();
aBgdGraphicFilter = pImportDlg->GetDetectedFilter(); aBgdGraphicFilter = pImportDlg->GetDetectedFilter();
bool bLink = ( nHtmlMode & HTMLMODE_ON ) || pImportDlg->IsAsLink(); bool bLink = ( nHtmlMode & HTMLMODE_ON ) || pImportDlg->IsAsLink();
m_pBtnLink->Check( bLink ); m_xBtnLink->set_active(bLink);
m_pBtnLink->Enable(); m_xBtnLink->set_sensitive(true);
if ( m_pBtnPreview->IsChecked() ) if (m_xBtnPreview->get_active())
{ {
if( !pImportDlg->GetGraphic(aBgdGraphic) ) if( !pImportDlg->GetGraphic(aBgdGraphic) )
{ {
...@@ -1197,16 +1159,16 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void ) ...@@ -1197,16 +1159,16 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void )
else else
bIsGraphicValid = false; // load graphic not until preview click bIsGraphicValid = false; // load graphic not until preview click
if ( m_pBtnPreview->IsChecked() && bIsGraphicValid ) if (m_xBtnPreview->get_active() && bIsGraphicValid)
{ {
Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap(); Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
m_pPreviewWin2->NotifyChange( &aBmp ); m_xPreview2->NotifyChange( &aBmp );
} }
else else
m_pPreviewWin2->NotifyChange( nullptr ); m_xPreview2->NotifyChange( nullptr );
} }
FileClickHdl_Impl(m_pBtnLink); FileClickHdl_Impl(*m_xBtnLink);
pImportDlg.reset(); pImportDlg.reset();
} }
} }
...@@ -1214,16 +1176,16 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void ) ...@@ -1214,16 +1176,16 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void )
void SvxBackgroundTabPage::ShowTblControl() void SvxBackgroundTabPage::ShowTblControl()
{ {
m_pTblLBox->SetSelectHdl( HDL(TblDestinationHdl_Impl) ); m_xTblLBox->connect_changed(HDL(TblDestinationHdl_Impl));
m_pTblLBox->SelectEntryPos(0); m_xTblLBox->set_active(0);
m_pTblDesc->Show(); m_xTblDesc->show();
m_pTblLBox->Show(); m_xTblLBox->show();
m_pAsGrid->Show(); m_xAsGrid->show();
} }
IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void ) IMPL_LINK(SvxBackgroundTabPage, TblDestinationHdl_Impl, weld::ComboBox&, rBox, void)
{ {
sal_Int32 nSelPos = rBox.GetSelectedEntryPos(); int nSelPos = rBox.get_active();
if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos) if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos)
{ {
std::unique_ptr<SvxBrushItem> xItemHolder; std::unique_ptr<SvxBrushItem> xItemHolder;
...@@ -1253,14 +1215,14 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void ) ...@@ -1253,14 +1215,14 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void )
xItemHolder.reset(new SvxBrushItem(nWhich)); xItemHolder.reset(new SvxBrushItem(nWhich));
pActItem = xItemHolder.get(); pActItem = xItemHolder.get();
} }
if(drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect)) // brush selected if(drawing::FillStyle_SOLID == lcl_getFillStyle(*m_xLbSelect)) // brush selected
{ {
*pActItem = SvxBrushItem( aBgdColor, nWhich ); *pActItem = SvxBrushItem( aBgdColor, nWhich );
} }
else else
{ {
SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
const bool bIsLink = m_pBtnLink->IsChecked(); const bool bIsLink = m_xBtnLink->get_active();
if ( !bIsLink && !bIsGraphicValid ) if ( !bIsLink && !bIsGraphicValid )
bIsGraphicValid = LoadLinkedGraphic_Impl(); bIsGraphicValid = LoadLinkedGraphic_Impl();
...@@ -1279,7 +1241,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void ) ...@@ -1279,7 +1241,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void )
{ {
case TBL_DEST_CELL: case TBL_DEST_CELL:
pActItem = pTableBck_Impl->pCellBrush; pActItem = pTableBck_Impl->pCellBrush;
m_pLbSelect->Enable(); m_xLbSelect->set_sensitive(true);
nWhich = pTableBck_Impl->nCellWhich; nWhich = pTableBck_Impl->nCellWhich;
break; break;
case TBL_DEST_ROW: case TBL_DEST_ROW:
...@@ -1288,7 +1250,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void ) ...@@ -1288,7 +1250,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox&, rBox, void )
break; break;
case TBL_DEST_TBL: case TBL_DEST_TBL:
pActItem = pTableBck_Impl->pTableBrush; pActItem = pTableBck_Impl->pTableBrush;
m_pLbSelect->Enable(); m_xLbSelect->set_sensitive(true);
nWhich = pTableBck_Impl->nTableWhich; nWhich = pTableBck_Impl->nTableWhich;
break; break;
default: default:
...@@ -1314,37 +1276,37 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, ...@@ -1314,37 +1276,37 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
SvxGraphicPosition ePos = rBgdAttr.GetGraphicPos(); SvxGraphicPosition ePos = rBgdAttr.GetGraphicPos();
const Color& rColor = rBgdAttr.GetColor(); const Color& rColor = rBgdAttr.GetColor();
if ( GPOS_NONE == ePos || !m_pLbSelect->IsVisible() ) if (GPOS_NONE == ePos || !m_xLbSelect->get_visible())
{ {
lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_SOLID); lcl_setFillStyle(*m_xLbSelect, drawing::FillStyle_SOLID);
ShowColorUI_Impl(); ShowColorUI_Impl();
Color aTrColor( COL_TRANSPARENT ); Color aTrColor( COL_TRANSPARENT );
aBgdColor = rColor; aBgdColor = rColor;
sal_uInt16 nCol = ( aTrColor != aBgdColor ) ? sal_uInt16 nCol = ( aTrColor != aBgdColor ) ?
GetItemId_Impl(*m_pBackgroundColorSet, aBgdColor) : 0; GetItemId_Impl(*m_xBackgroundColorSet, aBgdColor) : 0;
if( aTrColor != aBgdColor && nCol == 0) if( aTrColor != aBgdColor && nCol == 0)
{ {
m_pBackgroundColorSet->SetNoSelection(); m_xBackgroundColorSet->SetNoSelection();
} }
else else
{ {
m_pBackgroundColorSet->SelectItem( nCol ); m_xBackgroundColorSet->SelectItem( nCol );
} }
m_pPreviewWin1->NotifyChange( aBgdColor ); m_xPreview1->NotifyChange( aBgdColor );
if ( m_pLbSelect->IsVisible() ) // initialize graphic part if (m_xLbSelect->get_visible()) // initialize graphic part
{ {
aBgdGraphicFilter.clear(); aBgdGraphicFilter.clear();
aBgdGraphicPath.clear(); aBgdGraphicPath.clear();
if ( rUserData.isEmpty() ) if ( rUserData.isEmpty() )
m_pBtnPreview->Check( false ); m_xBtnPreview->set_active(false);
m_pBtnLink->Check( false ); m_xBtnLink->set_active(false);
m_pBtnLink->Disable(); m_xBtnLink->set_sensitive(false);
m_pPreviewWin2->NotifyChange( nullptr ); m_xPreview2->NotifyChange(nullptr);
SetGraphicPosition_Impl( GPOS_TILED ); // tiles as default SetGraphicPosition_Impl( GPOS_TILED ); // tiles as default
} }
} }
...@@ -1353,7 +1315,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, ...@@ -1353,7 +1315,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
const OUString& aStrLink = rBgdAttr.GetGraphicLink(); const OUString& aStrLink = rBgdAttr.GetGraphicLink();
const OUString& aStrFilter = rBgdAttr.GetGraphicFilter(); const OUString& aStrFilter = rBgdAttr.GetGraphicFilter();
lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_BITMAP); lcl_setFillStyle(*m_xLbSelect, drawing::FillStyle_BITMAP);
ShowBitmapUI_Impl(); ShowBitmapUI_Impl();
if ( !aStrLink.isEmpty() ) if ( !aStrLink.isEmpty() )
...@@ -1363,36 +1325,36 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, ...@@ -1363,36 +1325,36 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" ); DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" );
#endif #endif
aBgdGraphicPath = aStrLink; aBgdGraphicPath = aStrLink;
m_pBtnLink->Check(); m_xBtnLink->set_active(true);
m_pBtnLink->Enable(); m_xBtnLink->set_sensitive(true);
} }
else else
{ {
aBgdGraphicPath.clear(); aBgdGraphicPath.clear();
m_pBtnLink->Check( false ); m_xBtnLink->set_active(false);
m_pBtnLink->Disable(); m_xBtnLink->set_sensitive(false);
} }
FileClickHdl_Impl(m_pBtnLink); FileClickHdl_Impl(*m_xBtnLink);
aBgdGraphicFilter = aStrFilter; aBgdGraphicFilter = aStrFilter;
if ( aStrLink.isEmpty() || m_pBtnPreview->IsChecked() ) if (aStrLink.isEmpty() || m_xBtnPreview->get_active())
{ {
// Graphic exists in the item and doesn't have // Graphic exists in the item and doesn't have
// to be loaded: // to be loaded:
const Graphic* pGraphic = rBgdAttr.GetGraphic(); const Graphic* pGraphic = rBgdAttr.GetGraphic();
if ( !pGraphic && m_pBtnPreview->IsChecked() ) if (!pGraphic && m_xBtnPreview->get_active())
bIsGraphicValid = LoadLinkedGraphic_Impl(); bIsGraphicValid = LoadLinkedGraphic_Impl();
else if ( pGraphic ) else if ( pGraphic )
{ {
aBgdGraphic = *pGraphic; aBgdGraphic = *pGraphic;
bIsGraphicValid = true; bIsGraphicValid = true;
if ( rUserData.isEmpty() ) if (rUserData.isEmpty())
m_pBtnPreview->Check(); m_xBtnPreview->set_active(true);
} }
else else
{ {
...@@ -1400,17 +1362,17 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, ...@@ -1400,17 +1362,17 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
bIsGraphicValid = false; bIsGraphicValid = false;
if ( rUserData.isEmpty() ) if ( rUserData.isEmpty() )
m_pBtnPreview->Check( false ); m_xBtnPreview->set_active(false);
} }
} }
if ( m_pBtnPreview->IsChecked() && bIsGraphicValid ) if (m_xBtnPreview->get_active() && bIsGraphicValid)
{ {
Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap(); Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
m_pPreviewWin2->NotifyChange( &aBmp ); m_xPreview2->NotifyChange( &aBmp );
} }
else else
m_pPreviewWin2->NotifyChange( nullptr ); m_xPreview2->NotifyChange( nullptr );
SetGraphicPosition_Impl( ePos ); SetGraphicPosition_Impl( ePos );
} }
...@@ -1432,7 +1394,7 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet) ...@@ -1432,7 +1394,7 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet)
if ((nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING) || if ((nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING) ||
(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)) (nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR))
{ {
m_pBackGroundColorLabelFT->SetText(CuiResId(RID_SVXSTR_CHARNAME_HIGHLIGHTING)); m_xBackGroundColorLabelFT->set_label(CuiResId(RID_SVXSTR_CHARNAME_HIGHLIGHTING));
bHighlighting = bool(nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING); bHighlighting = bool(nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING);
bCharBackColor = bool(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR); bCharBackColor = bool(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR);
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 --> <!-- Generated with glade 3.22.1 -->
<interface domain="cui"> <interface domain="cui">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gint1 -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes" context="backgroundpage|liststore1">Color</col>
<col id="1">1</col>
</row>
<row>
<col id="0" translatable="yes" context="backgroundpage|liststore1">Image</col>
<col id="1">4</col>
</row>
</data>
</object>
<object class="GtkGrid" id="BackgroundPage"> <object class="GtkGrid" id="BackgroundPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -52,12 +28,14 @@ ...@@ -52,12 +28,14 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="selectlb"> <object class="GtkComboBoxText" id="selectlb">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="no_show_all">True</property> <property name="no_show_all">True</property>
<property name="model">liststore1</property> <property name="active">1</property>
<property name="entry_text_column">0</property> <items>
<property name="id_column">1</property> <item id="1" translatable="yes" context="backgroundpage|liststore1">Color</item>
<item id="4" translatable="yes" context="backgroundpage|liststore1">Image</item>
</items>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -150,11 +128,28 @@ ...@@ -150,11 +128,28 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<object class="cuilo-BackgroundPreview" id="preview1"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</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="preview1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -190,13 +185,31 @@ ...@@ -190,13 +185,31 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="svxcorelo-SvxColorValueSet" id="backgroundcolorset"> <object class="GtkScrolledWindow" id="backgroundcolorsetwin">
<property name="width_request">150</property>
<property name="height_request">150</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</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="backgroundcolorset">
<property name="width_request">150</property>
<property name="height_request">150</property>
<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="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -379,14 +392,32 @@ ...@@ -379,14 +392,32 @@
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child> <child>
<object class="svxlo-SvxRectCtl" id="windowpos"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<accessibility> <property name="hscrollbar_policy">never</property>
<relation type="labelled-by" target="positionrb"/> <property name="vscrollbar_policy">never</property>
</accessibility> <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="windowpos">
<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="hexpand">True</property>
<property name="vexpand">True</property>
<accessibility>
<relation type="labelled-by" target="positionrb"/>
</accessibility>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -408,7 +439,6 @@ ...@@ -408,7 +439,6 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="active">True</property> <property name="active">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">arearb</property>
<accessibility> <accessibility>
<relation type="label-for" target="windowpos"/> <relation type="label-for" target="windowpos"/>
</accessibility> </accessibility>
...@@ -427,7 +457,7 @@ ...@@ -427,7 +457,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">tilerb</property> <property name="group">positionrb</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -490,11 +520,28 @@ ...@@ -490,11 +520,28 @@
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<child> <child>
<object class="cuilo-BackgroundPreview" id="preview2"> <object class="GtkScrolledWindow">
<property name="can_focus">True</property> <property name="visible">True</property>
<property name="no_show_all">True</property> <property name="can_focus">False</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</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="preview2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -539,4 +586,9 @@ ...@@ -539,4 +586,9 @@
</packing> </packing>
</child> </child>
</object> </object>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
</interface> </interface>
...@@ -122,6 +122,7 @@ public: ...@@ -122,6 +122,7 @@ public:
void set_margin_top(int nMargin) { m_xDrawingArea->set_margin_top(nMargin); } void set_margin_top(int nMargin) { m_xDrawingArea->set_margin_top(nMargin); }
void set_margin_bottom(int nMargin) { m_xDrawingArea->set_margin_bottom(nMargin); } void set_margin_bottom(int nMargin) { m_xDrawingArea->set_margin_bottom(nMargin); }
void set_sensitive(bool bSensitive) { m_xDrawingArea->set_sensitive(bSensitive); } void set_sensitive(bool bSensitive) { m_xDrawingArea->set_sensitive(bSensitive); }
bool get_sensitive() const { return m_xDrawingArea->get_sensitive(); }
}; };
} }
#endif #endif
......
...@@ -418,7 +418,6 @@ cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result7'] button-no-la ...@@ -418,7 +418,6 @@ cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result7'] button-no-la
cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result8'] button-no-label cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result8'] button-no-label
cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result9'] button-no-label cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result9'] button-no-label
cui/uiconfig/ui/select_persona_dialog.ui://GtkLabel[@id='progress_label'] orphan-label cui/uiconfig/ui/select_persona_dialog.ui://GtkLabel[@id='progress_label'] orphan-label
cui/uiconfig/ui/shadowtabpage.ui://svxlo-SvxRectCtl[@id='CTL_POSITION'] no-labelled-by
cui/uiconfig/ui/signsignatureline.ui://GtkTextView[@id='edit_comment'] duplicate-mnemonic cui/uiconfig/ui/signsignatureline.ui://GtkTextView[@id='edit_comment'] duplicate-mnemonic
cui/uiconfig/ui/specialcharacters.ui://GtkLabel[@id='hexulabel'] orphan-label cui/uiconfig/ui/specialcharacters.ui://GtkLabel[@id='hexulabel'] orphan-label
cui/uiconfig/ui/specialcharacters.ui://GtkDrawingArea[@id='viewchar2'] no-labelled-by cui/uiconfig/ui/specialcharacters.ui://GtkDrawingArea[@id='viewchar2'] no-labelled-by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment