Redesign of Hatch tab
1. New Hatch Listbox for presets. 2. Context menu for rename and delete. 3. Rearrangement of controls. 4. Remove Save and Load Buttons. Change-Id: Iad2479bc418f7a257a410df7f11c23ed8dd7734c Reviewed-on: https://gerrit.libreoffice.org/26869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
This commit is contained in:
committed by
Katarina Behrens
parent
f3ca52306a
commit
50ba4a079e
@@ -30,6 +30,7 @@
|
|||||||
#include <svx/tabarea.hxx>
|
#include <svx/tabarea.hxx>
|
||||||
#include <svx/hexcolorcontrol.hxx>
|
#include <svx/hexcolorcontrol.hxx>
|
||||||
#include <svx/SvxColorValueSet.hxx>
|
#include <svx/SvxColorValueSet.hxx>
|
||||||
|
#include <svx/SvxPresetListBox.hxx>
|
||||||
|
|
||||||
class SdrModel;
|
class SdrModel;
|
||||||
class SdrView;
|
class SdrView;
|
||||||
@@ -478,13 +479,10 @@ private:
|
|||||||
VclPtr<ListBox> m_pLbLineType;
|
VclPtr<ListBox> m_pLbLineType;
|
||||||
VclPtr<ColorLB> m_pLbLineColor;
|
VclPtr<ColorLB> m_pLbLineColor;
|
||||||
VclPtr<ColorLB> m_pLbBackgroundColor;
|
VclPtr<ColorLB> m_pLbBackgroundColor;
|
||||||
VclPtr<HatchingLB> m_pLbHatchings;
|
VclPtr<SvxPresetListBox> m_pHatchLB;
|
||||||
VclPtr<SvxXRectPreview> m_pCtlPreview;
|
VclPtr<SvxXRectPreview> m_pCtlPreview;
|
||||||
VclPtr<PushButton> m_pBtnAdd;
|
VclPtr<PushButton> m_pBtnAdd;
|
||||||
VclPtr<PushButton> m_pBtnModify;
|
VclPtr<PushButton> m_pBtnModify;
|
||||||
VclPtr<PushButton> m_pBtnDelete;
|
|
||||||
VclPtr<PushButton> m_pBtnLoad;
|
|
||||||
VclPtr<PushButton> m_pBtnSave;
|
|
||||||
|
|
||||||
const SfxItemSet& m_rOutAttrs;
|
const SfxItemSet& m_rOutAttrs;
|
||||||
|
|
||||||
@@ -505,7 +503,8 @@ private:
|
|||||||
|
|
||||||
SfxMapUnit m_ePoolUnit;
|
SfxMapUnit m_ePoolUnit;
|
||||||
|
|
||||||
DECL_LINK_TYPED( ChangeHatchHdl_Impl, ListBox&, void );
|
DECL_LINK_TYPED( ChangeHatchHdl, ValueSet*, void );
|
||||||
|
void ChangeHatchHdl_Impl();
|
||||||
DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
|
DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
|
||||||
DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
|
DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
|
||||||
DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
|
DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
|
||||||
@@ -513,9 +512,8 @@ private:
|
|||||||
void ModifiedHdl_Impl(void*);
|
void ModifiedHdl_Impl(void*);
|
||||||
DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
|
DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
|
||||||
DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
|
DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
|
||||||
DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
|
DECL_LINK_TYPED( ClickRenameHdl_Impl, SvxPresetListBox*, void );
|
||||||
DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
|
DECL_LINK_TYPED( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
|
||||||
DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
|
|
||||||
|
|
||||||
long CheckChanges_Impl();
|
long CheckChanges_Impl();
|
||||||
sal_Int32 SearchHatchList(const OUString& rHatchName);
|
sal_Int32 SearchHatchList(const OUString& rHatchName);
|
||||||
|
@@ -43,6 +43,7 @@
|
|||||||
#include "paragrph.hrc"
|
#include "paragrph.hrc"
|
||||||
#include <svx/dialogs.hrc>
|
#include <svx/dialogs.hrc>
|
||||||
|
|
||||||
|
|
||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
|
|
||||||
SvxHatchTabPage::SvxHatchTabPage
|
SvxHatchTabPage::SvxHatchTabPage
|
||||||
@@ -73,19 +74,14 @@ SvxHatchTabPage::SvxHatchTabPage
|
|||||||
get(m_pLbLineType, "linetypelb");
|
get(m_pLbLineType, "linetypelb");
|
||||||
get(m_pLbLineColor, "linecolorlb");
|
get(m_pLbLineColor, "linecolorlb");
|
||||||
get(m_pLbBackgroundColor, "backgroundcolorlb");
|
get(m_pLbBackgroundColor, "backgroundcolorlb");
|
||||||
get(m_pLbHatchings, "hatchingslb");
|
get(m_pHatchLB , "hatchpresetlist");
|
||||||
Size aSize = getDrawListBoxOptimalSize(this);
|
Size aSize = getDrawListBoxOptimalSize(this);
|
||||||
m_pLbHatchings->set_width_request(aSize.Width());
|
|
||||||
m_pLbHatchings->set_height_request(aSize.Height());
|
|
||||||
get(m_pCtlPreview, "previewctl");
|
get(m_pCtlPreview, "previewctl");
|
||||||
aSize = getDrawPreviewOptimalSize(this);
|
aSize = getDrawPreviewOptimalSize(this);
|
||||||
m_pCtlPreview->set_width_request(aSize.Width());
|
m_pCtlPreview->set_width_request(aSize.Width());
|
||||||
m_pCtlPreview->set_height_request(aSize.Height());
|
m_pCtlPreview->set_height_request(aSize.Height());
|
||||||
get(m_pBtnAdd, "add");
|
get(m_pBtnAdd, "add");
|
||||||
get(m_pBtnModify, "modify");
|
get(m_pBtnModify, "modify");
|
||||||
get(m_pBtnDelete, "delete");
|
|
||||||
get(m_pBtnLoad, "load");
|
|
||||||
get(m_pBtnSave, "save");
|
|
||||||
|
|
||||||
// this page needs ExchangeSupport
|
// this page needs ExchangeSupport
|
||||||
SetExchangeSupport();
|
SetExchangeSupport();
|
||||||
@@ -108,15 +104,13 @@ SvxHatchTabPage::SvxHatchTabPage
|
|||||||
assert( pPool && "Where is the pool?" );
|
assert( pPool && "Where is the pool?" );
|
||||||
m_ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
|
m_ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
|
||||||
|
|
||||||
// setting the slider range
|
|
||||||
m_pSliderAngle->SetRange(Range(0,359));
|
|
||||||
|
|
||||||
// setting the output device
|
// setting the output device
|
||||||
m_rXFSet.Put( m_aXFStyleItem );
|
m_rXFSet.Put( m_aXFStyleItem );
|
||||||
m_rXFSet.Put( m_aXHatchItem );
|
m_rXFSet.Put( m_aXHatchItem );
|
||||||
m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
|
||||||
|
m_pHatchLB->SetSelectHdl( LINK( this, SvxHatchTabPage, ChangeHatchHdl ) );
|
||||||
m_pLbHatchings->SetSelectHdl( LINK( this, SvxHatchTabPage, ChangeHatchHdl_Impl ) );
|
m_pHatchLB->SetRenameHdl( LINK( this, SvxHatchTabPage, ClickRenameHdl_Impl ) );
|
||||||
|
m_pHatchLB->SetDeleteHdl( LINK( this, SvxHatchTabPage, ClickDeleteHdl_Impl ) );
|
||||||
|
|
||||||
Link<Edit&,void> aLink = LINK( this, SvxHatchTabPage, ModifiedEditHdl_Impl );
|
Link<Edit&,void> aLink = LINK( this, SvxHatchTabPage, ModifiedEditHdl_Impl );
|
||||||
Link<ListBox&,void> aLink2 = LINK( this, SvxHatchTabPage, ModifiedListBoxHdl_Impl );
|
Link<ListBox&,void> aLink2 = LINK( this, SvxHatchTabPage, ModifiedListBoxHdl_Impl );
|
||||||
@@ -128,16 +122,10 @@ SvxHatchTabPage::SvxHatchTabPage
|
|||||||
m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxHatchTabPage, ModifiedBackgroundHdl_Impl ) );
|
m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxHatchTabPage, ModifiedBackgroundHdl_Impl ) );
|
||||||
|
|
||||||
m_pBtnAdd->SetClickHdl( LINK( this, SvxHatchTabPage, ClickAddHdl_Impl ) );
|
m_pBtnAdd->SetClickHdl( LINK( this, SvxHatchTabPage, ClickAddHdl_Impl ) );
|
||||||
m_pBtnModify->SetClickHdl(
|
m_pBtnModify->SetClickHdl( LINK( this, SvxHatchTabPage, ClickModifyHdl_Impl ) );
|
||||||
LINK( this, SvxHatchTabPage, ClickModifyHdl_Impl ) );
|
|
||||||
m_pBtnDelete->SetClickHdl(
|
|
||||||
LINK( this, SvxHatchTabPage, ClickDeleteHdl_Impl ) );
|
|
||||||
m_pBtnLoad->SetClickHdl( LINK( this, SvxHatchTabPage, ClickLoadHdl_Impl ) );
|
|
||||||
m_pBtnSave->SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) );
|
|
||||||
|
|
||||||
m_pCtlPreview->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
|
m_pCtlPreview->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
|
||||||
|
|
||||||
setPreviewsToSamePlace(pParent, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SvxHatchTabPage::~SvxHatchTabPage()
|
SvxHatchTabPage::~SvxHatchTabPage()
|
||||||
@@ -153,13 +141,10 @@ void SvxHatchTabPage::dispose()
|
|||||||
m_pLbLineType.clear();
|
m_pLbLineType.clear();
|
||||||
m_pLbLineColor.clear();
|
m_pLbLineColor.clear();
|
||||||
m_pLbBackgroundColor.clear();
|
m_pLbBackgroundColor.clear();
|
||||||
m_pLbHatchings.clear();
|
m_pHatchLB.clear();
|
||||||
m_pCtlPreview.clear();
|
m_pCtlPreview.clear();
|
||||||
m_pBtnAdd.clear();
|
m_pBtnAdd.clear();
|
||||||
m_pBtnModify.clear();
|
m_pBtnModify.clear();
|
||||||
m_pBtnDelete.clear();
|
|
||||||
m_pBtnLoad.clear();
|
|
||||||
m_pBtnSave.clear();
|
|
||||||
SvxTabPage::dispose();
|
SvxTabPage::dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,7 +153,7 @@ void SvxHatchTabPage::Construct()
|
|||||||
{
|
{
|
||||||
m_pLbLineColor->Fill( m_pColorList );
|
m_pLbLineColor->Fill( m_pColorList );
|
||||||
m_pLbBackgroundColor->Fill( m_pColorList );
|
m_pLbBackgroundColor->Fill( m_pColorList );
|
||||||
m_pLbHatchings->Fill( m_pHatchingList );
|
m_pHatchLB->FillPresetListBox(*m_pHatchingList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -224,10 +209,10 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
|
|
||||||
if( *m_pPageType == PT_HATCH && *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
if( *m_pPageType == PT_HATCH && *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||||
{
|
{
|
||||||
m_pLbHatchings->SelectEntryPos( *m_pPos );
|
m_pHatchLB->SelectItem( *m_pPos );
|
||||||
}
|
}
|
||||||
// colors could have been deleted
|
// colors could have been deleted
|
||||||
ChangeHatchHdl_Impl( *m_pLbHatchings );
|
ChangeHatchHdl_Impl();
|
||||||
|
|
||||||
*m_pPageType = PT_HATCH;
|
*m_pPageType = PT_HATCH;
|
||||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||||
@@ -272,7 +257,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
|
|||||||
m_pMtrAngle->IsValueChangedFromSaved() ||
|
m_pMtrAngle->IsValueChangedFromSaved() ||
|
||||||
m_pLbLineType->IsValueChangedFromSaved() ||
|
m_pLbLineType->IsValueChangedFromSaved() ||
|
||||||
m_pLbLineColor->IsValueChangedFromSaved() ||
|
m_pLbLineColor->IsValueChangedFromSaved() ||
|
||||||
m_pLbHatchings->IsValueChangedFromSaved() )
|
m_pHatchLB->IsValueChangedFromSaved() )
|
||||||
{
|
{
|
||||||
ResMgr& rMgr = CUI_MGR();
|
ResMgr& rMgr = CUI_MGR();
|
||||||
Image aWarningBoxImage = WarningBox::GetStandardImage();
|
Image aWarningBoxImage = WarningBox::GetStandardImage();
|
||||||
@@ -307,9 +292,9 @@ long SvxHatchTabPage::CheckChanges_Impl()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
|
sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
|
||||||
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if( nPos != 0 )
|
||||||
*m_pPos = nPos;
|
*m_pPos = nPos - 1;
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,11 +325,11 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
|
|||||||
|
|
||||||
std::unique_ptr<XHatch> pXHatch;
|
std::unique_ptr<XHatch> pXHatch;
|
||||||
OUString aString;
|
OUString aString;
|
||||||
sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
|
sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
|
||||||
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if( nPos != 0 )
|
||||||
{
|
{
|
||||||
pXHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos )->GetHatch() ));
|
pXHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos - 1 )->GetHatch() ));
|
||||||
aString = m_pLbHatchings->GetSelectEntry();
|
aString = m_pHatchLB->GetItemText( m_pHatchLB->GetSelectItemId() );
|
||||||
}
|
}
|
||||||
// gradient has been (unidentifiedly) passed
|
// gradient has been (unidentifiedly) passed
|
||||||
else
|
else
|
||||||
@@ -379,21 +364,7 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
|
|||||||
|
|
||||||
void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
|
void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
|
||||||
{
|
{
|
||||||
ChangeHatchHdl_Impl( *m_pLbHatchings );
|
ChangeHatchHdl_Impl();
|
||||||
|
|
||||||
// determine button state
|
|
||||||
if( m_pHatchingList->Count() )
|
|
||||||
{
|
|
||||||
m_pBtnModify->Enable();
|
|
||||||
m_pBtnDelete->Enable();
|
|
||||||
m_pBtnSave->Enable();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_pBtnModify->Disable();
|
|
||||||
m_pBtnDelete->Disable();
|
|
||||||
m_pBtnSave->Disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_rXFSet.Put( static_cast<const XFillColorItem&>( rSet->Get(XATTR_FILLCOLOR)) );
|
m_rXFSet.Put( static_cast<const XFillColorItem&>( rSet->Get(XATTR_FILLCOLOR)) );
|
||||||
m_rXFSet.Put( static_cast<const XFillBackgroundItem&>(rSet->Get(XATTR_FILLBACKGROUND)) );
|
m_rXFSet.Put( static_cast<const XFillBackgroundItem&>(rSet->Get(XATTR_FILLBACKGROUND)) );
|
||||||
@@ -450,13 +421,18 @@ void SvxHatchTabPage::ModifiedHdl_Impl( void* p )
|
|||||||
m_pCtlPreview->Invalidate();
|
m_pCtlPreview->Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ChangeHatchHdl_Impl, ListBox&, void)
|
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ChangeHatchHdl, ValueSet*, void)
|
||||||
|
{
|
||||||
|
ChangeHatchHdl_Impl();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SvxHatchTabPage::ChangeHatchHdl_Impl()
|
||||||
{
|
{
|
||||||
std::unique_ptr<XHatch> pHatch;
|
std::unique_ptr<XHatch> pHatch;
|
||||||
int nPos = m_pLbHatchings->GetSelectEntryPos();
|
int nPos = m_pHatchLB->GetSelectItemId();
|
||||||
|
|
||||||
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if( nPos != 0 )
|
||||||
pHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos )->GetHatch() ));
|
pHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos - 1 )->GetHatch() ));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const SfxPoolItem* pPoolItem = nullptr;
|
const SfxPoolItem* pPoolItem = nullptr;
|
||||||
@@ -470,10 +446,10 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ChangeHatchHdl_Impl, ListBox&, void)
|
|||||||
}
|
}
|
||||||
if( !pHatch )
|
if( !pHatch )
|
||||||
{
|
{
|
||||||
m_pLbHatchings->SelectEntryPos( 0 );
|
m_pHatchLB->SelectItem( 1 );
|
||||||
nPos = m_pLbHatchings->GetSelectEntryPos();
|
nPos = m_pHatchLB->GetSelectItemId();
|
||||||
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if( nPos != 0 )
|
||||||
pHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos )->GetHatch() ));
|
pHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos - 1 )->GetHatch() ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( pHatch )
|
if( pHatch )
|
||||||
@@ -506,7 +482,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ChangeHatchHdl_Impl, ListBox&, void)
|
|||||||
m_pLbLineType->SaveValue();
|
m_pLbLineType->SaveValue();
|
||||||
m_pLbLineColor->SaveValue();
|
m_pLbLineColor->SaveValue();
|
||||||
m_pLbBackgroundColor->SaveValue();
|
m_pLbBackgroundColor->SaveValue();
|
||||||
m_pLbHatchings->SaveValue();
|
m_pHatchLB->SaveValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void)
|
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void)
|
||||||
@@ -566,42 +542,79 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void)
|
|||||||
|
|
||||||
m_pHatchingList->Insert( pEntry, nCount );
|
m_pHatchingList->Insert( pEntry, nCount );
|
||||||
|
|
||||||
m_pLbHatchings->Append( *pEntry, m_pHatchingList->GetUiBitmap( nCount ) );
|
m_pHatchLB->Clear();
|
||||||
|
m_pHatchLB->FillPresetListBox( *m_pHatchingList );
|
||||||
m_pLbHatchings->SelectEntryPos( m_pLbHatchings->GetEntryCount() - 1 );
|
m_pHatchLB->SelectItem( nCount + 1 );
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
// hack: #31355# W.P.
|
|
||||||
Rectangle aRect( m_pLbHatchings->GetPosPixel(), m_pLbHatchings->GetSizePixel() );
|
|
||||||
if( sal_True ) { // ??? overlapped with pDlg
|
|
||||||
// and srolling
|
|
||||||
Invalidate( aRect );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
||||||
|
|
||||||
ChangeHatchHdl_Impl( *m_pLbHatchings );
|
ChangeHatchHdl_Impl();
|
||||||
}
|
|
||||||
|
|
||||||
// determine button state
|
|
||||||
if( m_pHatchingList->Count() )
|
|
||||||
{
|
|
||||||
m_pBtnModify->Enable();
|
|
||||||
m_pBtnDelete->Enable();
|
|
||||||
m_pBtnSave->Enable();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
|
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
|
||||||
{
|
{
|
||||||
sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
|
sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
|
||||||
|
|
||||||
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if( nPos != 0 )
|
||||||
|
{
|
||||||
|
OUString aName( m_pHatchingList->GetHatch( nPos - 1 )->GetName() );
|
||||||
|
|
||||||
|
XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
|
||||||
|
(css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
|
||||||
|
GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
|
||||||
|
static_cast<long>(m_pMtrAngle->GetValue() * 10) );
|
||||||
|
|
||||||
|
XHatchEntry* pEntry = new XHatchEntry( aXHatch, aName );
|
||||||
|
|
||||||
|
delete m_pHatchingList->Replace( pEntry, nPos - 1 );
|
||||||
|
|
||||||
|
m_pHatchLB->Clear();
|
||||||
|
m_pHatchLB->FillPresetListBox( *m_pHatchingList );
|
||||||
|
m_pHatchLB->SelectItem( nPos );
|
||||||
|
|
||||||
|
// save values for changes recognition (-> method)
|
||||||
|
m_pMtrDistance->SaveValue();
|
||||||
|
m_pMtrAngle->SaveValue();
|
||||||
|
m_pLbLineType->SaveValue();
|
||||||
|
m_pLbLineColor->SaveValue();
|
||||||
|
m_pLbBackgroundColor->SaveValue();
|
||||||
|
|
||||||
|
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickDeleteHdl_Impl, SvxPresetListBox*, void)
|
||||||
|
{
|
||||||
|
sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
|
||||||
|
|
||||||
|
if( nPos != 0 )
|
||||||
|
{
|
||||||
|
ScopedVclPtrInstance< MessageDialog > aQueryBox( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui");
|
||||||
|
|
||||||
|
if( aQueryBox->Execute() == RET_YES )
|
||||||
|
{
|
||||||
|
m_pHatchingList->Remove( nPos - 1 );
|
||||||
|
m_pHatchLB->RemoveItem( nPos );
|
||||||
|
m_pHatchLB->SelectItem( 1 );
|
||||||
|
|
||||||
|
m_pCtlPreview->Invalidate();
|
||||||
|
|
||||||
|
ChangeHatchHdl_Impl();
|
||||||
|
|
||||||
|
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void )
|
||||||
|
{
|
||||||
|
sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
|
||||||
|
|
||||||
|
if( nPos != 0 )
|
||||||
{
|
{
|
||||||
OUString aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) );
|
OUString aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) );
|
||||||
OUString aName( m_pHatchingList->GetHatch( nPos )->GetName() );
|
OUString aName( m_pHatchingList->GetHatch( nPos - 1 )->GetName() );
|
||||||
|
|
||||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||||
assert(pFact && "Dialog creation failed!");
|
assert(pFact && "Dialog creation failed!");
|
||||||
@@ -613,31 +626,18 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
|
|||||||
{
|
{
|
||||||
pDlg->GetName( aName );
|
pDlg->GetName( aName );
|
||||||
sal_Int32 nHatchPos = SearchHatchList( aName );
|
sal_Int32 nHatchPos = SearchHatchList( aName );
|
||||||
bool bValidHatchName = (nHatchPos == nPos) || (nHatchPos == LISTBOX_ENTRY_NOTFOUND);
|
bool bValidHatchName = (nHatchPos == nPos - 1) || (nHatchPos == LISTBOX_ENTRY_NOTFOUND);
|
||||||
|
|
||||||
if( bValidHatchName )
|
if(bValidHatchName)
|
||||||
{
|
{
|
||||||
bLoop = false;
|
bLoop = false;
|
||||||
XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
|
XHatchEntry* pEntry = m_pHatchingList->GetHatch( nPos - 1 );
|
||||||
(css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
|
pEntry->SetName( aName );
|
||||||
GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
|
|
||||||
static_cast<long>(m_pMtrAngle->GetValue() * 10) );
|
|
||||||
|
|
||||||
XHatchEntry* pEntry = new XHatchEntry( aXHatch, aName );
|
delete m_pHatchingList->Replace( pEntry, nPos - 1 );
|
||||||
|
m_pHatchLB->Clear();
|
||||||
delete m_pHatchingList->Replace( pEntry, nPos );
|
m_pHatchLB->FillPresetListBox(*m_pHatchingList);
|
||||||
|
m_pHatchLB->SelectItem( nPos );
|
||||||
m_pLbHatchings->Modify( *pEntry, nPos, m_pHatchingList->GetUiBitmap( nPos ) );
|
|
||||||
|
|
||||||
m_pLbHatchings->SelectEntryPos( nPos );
|
|
||||||
|
|
||||||
// save values for changes recognition (-> method)
|
|
||||||
m_pMtrDistance->SaveValue();
|
|
||||||
m_pMtrAngle->SaveValue();
|
|
||||||
m_pLbLineType->SaveValue();
|
|
||||||
m_pLbLineColor->SaveValue();
|
|
||||||
m_pLbBackgroundColor->SaveValue();
|
|
||||||
m_pLbHatchings->SaveValue();
|
|
||||||
|
|
||||||
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
||||||
}
|
}
|
||||||
@@ -650,197 +650,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickDeleteHdl_Impl, Button*, void)
|
|
||||||
{
|
|
||||||
sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
|
|
||||||
|
|
||||||
if( nPos != LISTBOX_ENTRY_NOTFOUND )
|
|
||||||
{
|
|
||||||
ScopedVclPtrInstance< MessageDialog > aQueryBox( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui");
|
|
||||||
|
|
||||||
if( aQueryBox->Execute() == RET_YES )
|
|
||||||
{
|
|
||||||
delete m_pHatchingList->Remove( nPos );
|
|
||||||
m_pLbHatchings->RemoveEntry( nPos );
|
|
||||||
m_pLbHatchings->SelectEntryPos( 0 );
|
|
||||||
|
|
||||||
m_pCtlPreview->Invalidate();
|
|
||||||
|
|
||||||
ChangeHatchHdl_Impl( *m_pLbHatchings );
|
|
||||||
|
|
||||||
*m_pnHatchingListState |= ChangeType::MODIFIED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// determine button state
|
|
||||||
if( !m_pHatchingList->Count() )
|
|
||||||
{
|
|
||||||
m_pBtnModify->Disable();
|
|
||||||
m_pBtnDelete->Disable();
|
|
||||||
m_pBtnSave->Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickLoadHdl_Impl, Button*, void)
|
|
||||||
{
|
|
||||||
ResMgr& rMgr = CUI_MGR();
|
|
||||||
sal_uInt16 nReturn = RET_YES;
|
|
||||||
|
|
||||||
if ( *m_pnHatchingListState & ChangeType::MODIFIED )
|
|
||||||
{
|
|
||||||
nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
|
|
||||||
,"AskSaveList"
|
|
||||||
,"cui/ui/querysavelistdialog.ui")->Execute();
|
|
||||||
|
|
||||||
if ( nReturn == RET_YES )
|
|
||||||
m_pHatchingList->Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( nReturn != RET_CANCEL )
|
|
||||||
{
|
|
||||||
::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
|
|
||||||
OUString aStrFilterType( "*.soh" );
|
|
||||||
aDlg.AddFilter( aStrFilterType, aStrFilterType );
|
|
||||||
OUString aPalettePath(SvtPathOptions().GetPalettePath());
|
|
||||||
OUString aLastDir;
|
|
||||||
sal_Int32 nIndex = 0;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
aLastDir = aPalettePath.getToken(0, ';', nIndex);
|
|
||||||
}
|
|
||||||
while (nIndex >= 0);
|
|
||||||
|
|
||||||
INetURLObject aFile(aLastDir);
|
|
||||||
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
|
|
||||||
|
|
||||||
if( aDlg.Execute() == ERRCODE_NONE )
|
|
||||||
{
|
|
||||||
INetURLObject aURL( aDlg.GetPath() );
|
|
||||||
INetURLObject aPathURL( aURL );
|
|
||||||
|
|
||||||
aPathURL.removeSegment();
|
|
||||||
aPathURL.removeFinalSlash();
|
|
||||||
|
|
||||||
XHatchListRef pHatchList = XPropertyList::AsHatchList(
|
|
||||||
XPropertyList::CreatePropertyList(
|
|
||||||
XHATCH_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" ));
|
|
||||||
pHatchList->SetName( aURL.getName() );
|
|
||||||
if( pHatchList->Load() )
|
|
||||||
{
|
|
||||||
m_pHatchingList = pHatchList;
|
|
||||||
static_cast<SvxAreaTabDialog*>( GetParentDialog() )->SetNewHatchingList( m_pHatchingList );
|
|
||||||
|
|
||||||
m_pLbHatchings->Clear();
|
|
||||||
m_pLbHatchings->Fill( m_pHatchingList );
|
|
||||||
Reset( &m_rOutAttrs );
|
|
||||||
|
|
||||||
m_pHatchingList->SetName( aURL.getName() );
|
|
||||||
|
|
||||||
// determining (and possibly cutting) the name
|
|
||||||
// and displaying it in the GroupBox
|
|
||||||
OUString aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
|
|
||||||
aString += ": ";
|
|
||||||
|
|
||||||
if ( aURL.getBase().getLength() > 18 )
|
|
||||||
{
|
|
||||||
aString += aURL.getBase().copy( 0, 15 );
|
|
||||||
aString += "...";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
aString += aURL.getBase();
|
|
||||||
|
|
||||||
*m_pnHatchingListState |= ChangeType::CHANGED;
|
|
||||||
*m_pnHatchingListState &= ~ChangeType::MODIFIED;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
|
|
||||||
,"NoLoadedFileDialog"
|
|
||||||
,"cui/ui/querynoloadedfiledialog.ui")->Execute();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// determine button state
|
|
||||||
if ( m_pHatchingList->Count() )
|
|
||||||
{
|
|
||||||
m_pBtnModify->Enable();
|
|
||||||
m_pBtnDelete->Enable();
|
|
||||||
m_pBtnSave->Enable();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_pBtnModify->Disable();
|
|
||||||
m_pBtnDelete->Disable();
|
|
||||||
m_pBtnSave->Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickSaveHdl_Impl, Button*, void)
|
|
||||||
{
|
|
||||||
::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
|
|
||||||
OUString aStrFilterType( "*.soh" );
|
|
||||||
aDlg.AddFilter( aStrFilterType, aStrFilterType );
|
|
||||||
|
|
||||||
OUString aPalettePath(SvtPathOptions().GetPalettePath());
|
|
||||||
OUString aLastDir;
|
|
||||||
sal_Int32 nIndex = 0;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
aLastDir = aPalettePath.getToken(0, ';', nIndex);
|
|
||||||
}
|
|
||||||
while (nIndex >= 0);
|
|
||||||
|
|
||||||
INetURLObject aFile(aLastDir);
|
|
||||||
SAL_WARN_IF( aFile.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
|
||||||
|
|
||||||
if( !m_pHatchingList->GetName().isEmpty() )
|
|
||||||
{
|
|
||||||
aFile.Append( m_pHatchingList->GetName() );
|
|
||||||
|
|
||||||
if( aFile.getExtension().isEmpty() )
|
|
||||||
aFile.SetExtension( "soh" );
|
|
||||||
}
|
|
||||||
|
|
||||||
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
|
|
||||||
if ( aDlg.Execute() == ERRCODE_NONE )
|
|
||||||
{
|
|
||||||
INetURLObject aURL( aDlg.GetPath() );
|
|
||||||
INetURLObject aPathURL( aURL );
|
|
||||||
|
|
||||||
aPathURL.removeSegment();
|
|
||||||
aPathURL.removeFinalSlash();
|
|
||||||
|
|
||||||
m_pHatchingList->SetName( aURL.getName() );
|
|
||||||
m_pHatchingList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
|
|
||||||
|
|
||||||
if( m_pHatchingList->Save() )
|
|
||||||
{
|
|
||||||
// determining (and possibly cutting) the name
|
|
||||||
// and displaying it in the GroupBox
|
|
||||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
|
||||||
aString += ": ";
|
|
||||||
|
|
||||||
if ( aURL.getBase().getLength() > 18 )
|
|
||||||
{
|
|
||||||
aString += aURL.getBase().copy( 0, 15 );
|
|
||||||
aString += "...";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
aString += aURL.getBase();
|
|
||||||
|
|
||||||
*m_pnHatchingListState |= ChangeType::SAVED;
|
|
||||||
*m_pnHatchingListState &= ~ChangeType::MODIFIED;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
|
|
||||||
,"NoSaveFileDialog"
|
|
||||||
,"cui/ui/querynosavefiledialog.ui")->Execute();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SvxHatchTabPage::PointChanged( vcl::Window*, RECT_POINT )
|
void SvxHatchTabPage::PointChanged( vcl::Window*, RECT_POINT )
|
||||||
|
@@ -13,27 +13,111 @@
|
|||||||
<property name="step_increment">1</property>
|
<property name="step_increment">1</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkAdjustment" id="distanceadjustment">
|
<object class="GtkAdjustment" id="distanceadjustment">
|
||||||
<property name="lower">0.3</property>
|
<property name="lower">0.29999999999999999</property>
|
||||||
<property name="upper">99</property>
|
<property name="upper">99</property>
|
||||||
<property name="step_increment">100</property>
|
<property name="step_increment">100</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkImage" id="image1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="pixbuf">res/sc05501.png</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkImage" id="image2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="pixbuf">res/sc05502.png</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkBox" id="HatchPage">
|
<object class="GtkBox" id="HatchPage">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</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="border_width">6</property>
|
<property name="border_width">6</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="frame3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="shadow_type">none</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment" id="alignment3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="top_padding">6</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box5">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="svxcorelo-SvxPresetListBox" id="hatchpresetlist">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButtonBox" id="buttonbox1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="spacing">6</property>
|
||||||
|
<property name="layout_style">start</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="add">
|
||||||
|
<property name="label">gtk-add</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="modify">
|
||||||
|
<property name="label" translatable="yes">_Modify</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel" id="label2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Hatch</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="frame1">
|
<object class="GtkFrame" id="frame1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -57,13 +141,6 @@
|
|||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
<property name="spacing">12</property>
|
<property name="spacing">12</property>
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="maingrid">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="vexpand">True</property>
|
|
||||||
<property name="row_spacing">6</property>
|
|
||||||
<property name="column_spacing">12</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box3">
|
<object class="GtkBox" id="box3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -97,20 +174,6 @@
|
|||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="box6">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="angleft">
|
<object class="GtkLabel" id="angleft">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -122,7 +185,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -162,23 +225,9 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="box7">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="linetypeft">
|
<object class="GtkLabel" id="linetypeft">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -190,7 +239,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">4</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -206,23 +255,9 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="box8">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="linecolorft">
|
<object class="GtkLabel" id="linecolorft">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -234,7 +269,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -245,23 +280,9 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="box9">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="backgroundcolorft">
|
<object class="GtkLabel" id="backgroundcolorft">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -272,7 +293,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">8</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -283,47 +304,60 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">9</property>
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
</object>
|
||||||
<object class="GtkGrid" id="grid1">
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel" id="propfl">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">center</property>
|
<property name="label" translatable="yes">Options</property>
|
||||||
<property name="valign">start</property>
|
<attributes>
|
||||||
<property name="hexpand">True</property>
|
<attribute name="weight" value="bold"/>
|
||||||
<property name="row_spacing">6</property>
|
</attributes>
|
||||||
<property name="column_spacing">6</property>
|
</object>
|
||||||
<child>
|
</child>
|
||||||
<object class="svxlo-HatchingLB" id="hatchingslb:border">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="entry_text_column">0</property>
|
|
||||||
<property name="id_column">1</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="expand">False</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="fill">True</property>
|
||||||
<property name="width">1</property>
|
<property name="position">1</property>
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="frame2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="shadow_type">none</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment" id="alignment2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="top_padding">6</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="svxlo-SvxXRectPreview" id="previewctl">
|
<object class="svxlo-SvxXRectPreview" id="previewctl">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -336,126 +370,10 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButtonBox" id="buttonbox1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<property name="layout_style">start</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="add">
|
|
||||||
<property name="label">gtk-add</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="modify">
|
|
||||||
<property name="label" translatable="yes">_Modify</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="delete">
|
|
||||||
<property name="label">gtk-delete</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="grid4">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="row_spacing">6</property>
|
|
||||||
<property name="column_spacing">6</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="load">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="has_tooltip">True</property>
|
|
||||||
<property name="tooltip_markup" translatable="yes">Load Hatching List</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">Load Hatching List</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="image">image1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="save">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="has_tooltip">True</property>
|
|
||||||
<property name="tooltip_markup" translatable="yes">Save Hatching List</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">Save Hatching List</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="image">image2</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">5</property>
|
|
||||||
<property name="secondary">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
<property name="position">2</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -463,10 +381,10 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="label">
|
<child type="label">
|
||||||
<object class="GtkLabel" id="propfl">
|
<object class="GtkLabel" id="label1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Properties</property>
|
<property name="label" translatable="yes">Preview</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
@@ -476,7 +394,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@@ -350,6 +350,7 @@ public:
|
|||||||
}
|
}
|
||||||
void SaveValue() { mnSavedItemId = GetSelectItemId(); }
|
void SaveValue() { mnSavedItemId = GetSelectItemId(); }
|
||||||
sal_Int32 GetSavedValue() const { return mnSavedItemId; }
|
sal_Int32 GetSavedValue() const { return mnSavedItemId; }
|
||||||
|
bool IsValueChangedFromSaved() { return mnSavedItemId != GetSelectItemId(); }
|
||||||
bool IsItemSelected( sal_uInt16 nItemId ) const
|
bool IsItemSelected( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
return !mbNoSelection && (nItemId == mnSelItemId);
|
return !mbNoSelection && (nItemId == mnSelItemId);
|
||||||
|
Reference in New Issue
Block a user