convert load template dialog to .ui

and merge the expander and the "show preview" checkbox
to be the same thing, i.e. expanded is showing, and
not expanded is not showing

Change-Id: I10e43bc36a0e2e5d1286a4dbad793ee3a700c97c
This commit is contained in:
Caolán McNamara
2014-03-11 10:27:41 +00:00
parent 89a838c193
commit f3609ac092
9 changed files with 470 additions and 509 deletions

View File

@@ -245,6 +245,9 @@
<glade-widget-class title="Token Window" name="swuilo-SwTokenWindow" <glade-widget-class title="Token Window" name="swuilo-SwTokenWindow"
generic-name="Token Window" parent="GtkDrawingArea" generic-name="Token Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Template Preview Window" name="sfxlo-SfxPreviewWin"
generic-name="Template Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Mark Preview" name="swuilo-SwMarkPreview" <glade-widget-class title="Mark Preview" name="swuilo-SwMarkPreview"
generic-name="Mark Preview Window" parent="GtkDrawingArea" generic-name="Mark Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>

View File

@@ -52,7 +52,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/versdlg.src \ sfx2/source/dialog/versdlg.src \
sfx2/source/doc/doc.src \ sfx2/source/doc/doc.src \
sfx2/source/doc/doctempl.src \ sfx2/source/doc/doctempl.src \
sfx2/source/doc/new.src \
sfx2/source/doc/templatelocnames.src \ sfx2/source/doc/templatelocnames.src \
sfx2/source/menu/menu.src \ sfx2/source/menu/menu.src \
sfx2/source/sidebar/Sidebar.src \ sfx2/source/sidebar/Sidebar.src \

View File

@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/helpsearchpage \ sfx2/uiconfig/ui/helpsearchpage \
sfx2/uiconfig/ui/inputdialog \ sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \ sfx2/uiconfig/ui/licensedialog \
sfx2/uiconfig/ui/loadtemplatedialog \
sfx2/uiconfig/ui/managestylepage \ sfx2/uiconfig/ui/managestylepage \
sfx2/uiconfig/ui/newstyle \ sfx2/uiconfig/ui/newstyle \
sfx2/uiconfig/ui/optprintpage \ sfx2/uiconfig/ui/optprintpage \

View File

@@ -36,7 +36,6 @@
#define STR_DELETE_TEMPLATE (RID_SFX_DOC_START+15) #define STR_DELETE_TEMPLATE (RID_SFX_DOC_START+15)
#define MSG_REGION_NOTEMPTY (RID_SFX_DOC_START+17) #define MSG_REGION_NOTEMPTY (RID_SFX_DOC_START+17)
#define DLG_NEW_FILE (RID_SFX_DOC_START+1)
#define DLG_DOC_TEMPLATE (RID_SFX_DOC_START+2) #define DLG_DOC_TEMPLATE (RID_SFX_DOC_START+2)
#define DLG_TEMPLATE_MANAGER (RID_SFX_DOC_START+4) #define DLG_TEMPLATE_MANAGER (RID_SFX_DOC_START+4)

View File

@@ -19,8 +19,9 @@
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <sfx2/new.hxx> #include <sfx2/new.hxx>
#include <vcl/builder.hxx>
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <vcl/morebtn.hxx>
#include <svtools/svmedit.hxx> #include <svtools/svmedit.hxx>
#include <svl/itemset.hxx> #include <svl/itemset.hxx>
#include <svl/eitem.hxx> #include <svl/eitem.hxx>
@@ -29,7 +30,6 @@
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
#include <unotools/localfilehelper.hxx> #include <unotools/localfilehelper.hxx>
#include "new.hrc"
#include "doc.hrc" #include "doc.hrc"
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
#include <sfx2/objsh.hxx> #include <sfx2/objsh.hxx>
@@ -39,12 +39,6 @@
#include <sfx2/printer.hxx> #include <sfx2/printer.hxx>
#include <vcl/waitobj.hxx> #include <vcl/waitobj.hxx>
#define MORE_BTN(x) pMoreBt->x
void SfxPreviewBase_Impl::SetObjectShell( SfxObjectShell* pObj ) void SfxPreviewBase_Impl::SetObjectShell( SfxObjectShell* pObj )
{ {
::boost::shared_ptr<GDIMetaFile> pFile = pObj ::boost::shared_ptr<GDIMetaFile> pFile = pObj
@@ -55,12 +49,9 @@ void SfxPreviewBase_Impl::SetObjectShell( SfxObjectShell* pObj )
} }
SfxPreviewBase_Impl::SfxPreviewBase_Impl( SfxPreviewBase_Impl::SfxPreviewBase_Impl(
Window* pParent, const ResId& rResId ) Window* pParent, WinBits nStyle)
: Window(pParent, rResId), pMetaFile() : Window(pParent, nStyle)
{ , pMetaFile()
}
SfxPreviewBase_Impl::~SfxPreviewBase_Impl()
{ {
} }
@@ -69,6 +60,11 @@ void SfxPreviewBase_Impl::Resize()
Invalidate(); Invalidate();
} }
Size SfxPreviewBase_Impl::GetOptimalSize() const
{
return LogicToPixel(Size(127, 129), MAP_APPFONT);
}
void SfxPreviewWin_Impl::ImpPaint( void SfxPreviewWin_Impl::ImpPaint(
const Rectangle&, GDIMetaFile* pFile, Window* pWindow ) const Rectangle&, GDIMetaFile* pFile, Window* pWindow )
{ {
@@ -119,37 +115,26 @@ void SfxPreviewWin_Impl::Paint( const Rectangle& rRect )
ImpPaint( rRect, pMetaFile.get(), this ); ImpPaint( rRect, pMetaFile.get(), this );
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxPreviewWin(Window *pParent, VclBuilder::stringmap &)
{
return new SfxPreviewWin_Impl(pParent, 0);
}
class SfxNewFileDialog_Impl class SfxNewFileDialog_Impl
{ {
FixedText aRegionFt; ListBox* m_pRegionLb;
ListBox aRegionLb; ListBox* m_pTemplateLb;
FixedText aTemplateFt;
ListBox aTemplateLb;
CheckBox aPreviewBtn; SfxPreviewWin_Impl* m_pPreviewWin;
SfxPreviewWin_Impl aPreviewWin;
FixedText aTitleFt; CheckBox* m_pTextStyleCB;
Edit aTitleEd; CheckBox* m_pFrameStyleCB;
FixedText aThemaFt; CheckBox* m_pPageStyleCB;
Edit aThemaEd; CheckBox* m_pNumStyleCB;
FixedText aKeywordsFt; CheckBox* m_pMergeStyleCB;
Edit aKeywordsEd; PushButton* m_pLoadFilePB;
FixedText aDescFt;
MultiLineEdit aDescEd;
FixedLine aDocinfoGb;
CheckBox aTextStyleCB; VclExpander* m_pMoreBt;
CheckBox aFrameStyleCB;
CheckBox aPageStyleCB;
CheckBox aNumStyleCB;
CheckBox aMergeStyleCB;
PushButton aLoadFilePB;
OKButton aOkBt;
CancelButton aCancelBt;
HelpButton aHelpBt;
MoreButton* pMoreBt;
Timer aPrevTimer; Timer aPrevTimer;
OUString aNone; OUString aNone;
OUString sLoadTemplate; OUString sLoadTemplate;
@@ -167,7 +152,6 @@ class SfxNewFileDialog_Impl
DECL_LINK( DoubleClick, ListBox * ); DECL_LINK( DoubleClick, ListBox * );
void TogglePreview(CheckBox *); void TogglePreview(CheckBox *);
DECL_LINK( Expand, void * ); DECL_LINK( Expand, void * );
DECL_LINK( PreviewClick, CheckBox * );
DECL_LINK(LoadFile, void *); DECL_LINK(LoadFile, void *);
sal_uInt16 GetSelectedTemplatePos() const; sal_uInt16 GetSelectedTemplatePos() const;
@@ -186,20 +170,11 @@ public:
void SetTemplateFlags(sal_uInt16 nSet); void SetTemplateFlags(sal_uInt16 nSet);
}; };
void SfxNewFileDialog_Impl::ClearInfo() void SfxNewFileDialog_Impl::ClearInfo()
{ {
const OUString aNo; const OUString aNo;
aTitleEd.SetText(aNo);
aThemaEd.SetText(aNo);
aKeywordsEd.SetText(aNo);
aDescEd.SetText(aNo);
} }
IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update) IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update)
{ {
if ( xDocShell.Is() ) if ( xDocShell.Is() )
@@ -213,15 +188,15 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update)
if(!nEntry) if(!nEntry)
{ {
ClearInfo(); ClearInfo();
aPreviewWin.Invalidate(); m_pPreviewWin->Invalidate();
aPreviewWin.SetObjectShell( 0); m_pPreviewWin->SetObjectShell( 0);
return 0; return 0;
} }
if ( aPreviewBtn.IsChecked() && (nFlags & SFXWB_PREVIEW) == SFXWB_PREVIEW) if ( m_pMoreBt->get_expanded() && (nFlags & SFXWB_PREVIEW) == SFXWB_PREVIEW)
{ {
OUString aFileName = aTemplates.GetPath( aRegionLb.GetSelectEntryPos(), nEntry-1); OUString aFileName = aTemplates.GetPath( m_pRegionLb->GetSelectEntryPos(), nEntry-1);
INetURLObject aTestObj( aFileName ); INetURLObject aTestObj( aFileName );
if( aTestObj.GetProtocol() == INET_PROT_NOT_VALID ) if( aTestObj.GetProtocol() == INET_PROT_NOT_VALID )
{ {
@@ -263,12 +238,12 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update)
Application::SetDefDialogParent( pParent ); Application::SetDefDialogParent( pParent );
if ( !xDocShell.Is() ) if ( !xDocShell.Is() )
{ {
aPreviewWin.SetObjectShell( 0 ); m_pPreviewWin->SetObjectShell( 0 );
return sal_False; return sal_False;
} }
} }
aPreviewWin.SetObjectShell( xDocShell ); m_pPreviewWin->SetObjectShell( xDocShell );
} }
return sal_True; return sal_True;
} }
@@ -282,64 +257,39 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox )
const sal_uInt16 nRegion = pBox->GetSelectEntryPos(); const sal_uInt16 nRegion = pBox->GetSelectEntryPos();
const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0; const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
aTemplateLb.SetUpdateMode(false); m_pTemplateLb->SetUpdateMode(false);
aTemplateLb.Clear(); m_pTemplateLb->Clear();
OUString aSel = aRegionLb.GetSelectEntry(); OUString aSel = m_pRegionLb->GetSelectEntry();
sal_Int32 nc = aSel.indexOf('('); sal_Int32 nc = aSel.indexOf('(');
if (nc != -1 && nc != 0) if (nc != -1 && nc != 0)
aSel = aSel.replaceAt(nc-1, 1, ""); aSel = aSel.replaceAt(nc-1, 1, "");
if ( aSel.compareToIgnoreAsciiCase( SfxResId(STR_STANDARD).toString() ) == 0 ) if ( aSel.compareToIgnoreAsciiCase( SfxResId(STR_STANDARD).toString() ) == 0 )
aTemplateLb.InsertEntry(aNone); m_pTemplateLb->InsertEntry(aNone);
for (sal_uInt16 i = 0; i < nCount; ++i) for (sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i)); m_pTemplateLb->InsertEntry(aTemplates.GetName(nRegion, i));
aTemplateLb.SelectEntryPos(0); m_pTemplateLb->SelectEntryPos(0);
aTemplateLb.SetUpdateMode(true); m_pTemplateLb->SetUpdateMode(true);
aTemplateLb.Invalidate(); m_pTemplateLb->Invalidate();
aTemplateLb.Update(); m_pTemplateLb->Update();
TemplateSelect(&aTemplateLb); TemplateSelect(m_pTemplateLb);
return 0; return 0;
} }
IMPL_LINK_NOARG_INLINE_START(SfxNewFileDialog_Impl, Expand) IMPL_LINK_NOARG_INLINE_START(SfxNewFileDialog_Impl, Expand)
{ {
TemplateSelect(&aTemplateLb); TemplateSelect(m_pTemplateLb);
return 0; return 0;
} }
IMPL_LINK_NOARG_INLINE_END(SfxNewFileDialog_Impl, Expand) IMPL_LINK_NOARG_INLINE_END(SfxNewFileDialog_Impl, Expand)
IMPL_LINK( SfxNewFileDialog_Impl, PreviewClick, CheckBox *, pBox )
{
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
sal_uInt16 nEntry = GetSelectedTemplatePos();
if ( nEntry && pBox->IsChecked() )
{
if(!Update(0))
aPreviewWin.Invalidate();
}
else
{
if (xDocShell.Is())
xDocShell.Clear();
aPreviewWin.SetObjectShell( 0 );
}
return 0;
}
IMPL_LINK_NOARG(SfxNewFileDialog_Impl, TemplateSelect) IMPL_LINK_NOARG(SfxNewFileDialog_Impl, TemplateSelect)
{ {
// Still loading // Still loading
if ( xDocShell && xDocShell->GetProgress() ) if ( xDocShell && xDocShell->GetProgress() )
return 0; return 0;
if ( !MORE_BTN(GetState()) ) if (!m_pMoreBt->get_expanded())
// Dialog is not opened // Dialog is not opened
return 0; return 0;
@@ -347,8 +297,6 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, TemplateSelect)
return 0; return 0;
} }
IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox ) IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox )
{ {
(void)pListBox; (void)pListBox;
@@ -371,14 +319,14 @@ IMPL_LINK_NOARG_INLINE_END(SfxNewFileDialog_Impl, LoadFile)
sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
{ {
sal_uInt16 nEntry = aTemplateLb.GetSelectEntryPos(); sal_uInt16 nEntry = m_pTemplateLb->GetSelectEntryPos();
OUString aSel = aRegionLb.GetSelectEntry(); OUString aSel = m_pRegionLb->GetSelectEntry();
sal_Int32 nc = aSel.indexOf('('); sal_Int32 nc = aSel.indexOf('(');
if (nc != -1 && nc != 0) if (nc != -1 && nc != 0)
aSel = aSel.replaceAt(nc-1, 1, ""); aSel = aSel.replaceAt(nc-1, 1, "");
if ( aSel.compareToIgnoreAsciiCase(SfxResId(STR_STANDARD).toString()) != 0 ) if ( aSel.compareToIgnoreAsciiCase(SfxResId(STR_STANDARD).toString()) != 0 )
nEntry++; nEntry++;
if (!aTemplateLb.GetSelectEntryCount()) if (!m_pTemplateLb->GetSelectEntryCount())
nEntry = 0; nEntry = 0;
return nEntry; return nEntry;
} }
@@ -391,147 +339,91 @@ sal_Bool SfxNewFileDialog_Impl::IsTemplate() const
} }
OUString SfxNewFileDialog_Impl::GetTemplateFileName() const OUString SfxNewFileDialog_Impl::GetTemplateFileName() const
{ {
if(!IsTemplate() || !aTemplates.GetRegionCount()) if(!IsTemplate() || !aTemplates.GetRegionCount())
return OUString(); return OUString();
return aTemplates.GetPath(aRegionLb.GetSelectEntryPos(), return aTemplates.GetPath(m_pRegionLb->GetSelectEntryPos(),
GetSelectedTemplatePos()-1); GetSelectedTemplatePos()-1);
} }
void AdjustPosSize_Impl(Window *pWin, short nMoveOffset, short nSizeOffset)
{
Point aPos(pWin->GetPosPixel());
Size aSize(pWin->GetSizePixel());
aPos.X() -= nMoveOffset;
aSize.Width() += nSizeOffset;
pWin->SetPosSizePixel(aPos, aSize);
}
sal_uInt16 SfxNewFileDialog_Impl::GetTemplateFlags()const sal_uInt16 SfxNewFileDialog_Impl::GetTemplateFlags()const
{ {
sal_uInt16 nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0; sal_uInt16 nRet = m_pTextStyleCB->IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
if(aFrameStyleCB.IsChecked()) if(m_pFrameStyleCB->IsChecked())
nRet |= SFX_LOAD_FRAME_STYLES; nRet |= SFX_LOAD_FRAME_STYLES;
if(aPageStyleCB.IsChecked()) if(m_pPageStyleCB->IsChecked())
nRet |= SFX_LOAD_PAGE_STYLES; nRet |= SFX_LOAD_PAGE_STYLES;
if(aNumStyleCB.IsChecked()) if(m_pNumStyleCB->IsChecked())
nRet |= SFX_LOAD_NUM_STYLES; nRet |= SFX_LOAD_NUM_STYLES;
if(aMergeStyleCB.IsChecked()) if(m_pMergeStyleCB->IsChecked())
nRet |= SFX_MERGE_STYLES; nRet |= SFX_MERGE_STYLES;
return nRet; return nRet;
} }
void SfxNewFileDialog_Impl::SetTemplateFlags(sal_uInt16 nSet) void SfxNewFileDialog_Impl::SetTemplateFlags(sal_uInt16 nSet)
{ {
aTextStyleCB.Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES )); m_pTextStyleCB->Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES ));
aFrameStyleCB.Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES)); m_pFrameStyleCB->Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES));
aPageStyleCB.Check( 0 != (nSet&SFX_LOAD_PAGE_STYLES )); m_pPageStyleCB->Check( 0 != (nSet&SFX_LOAD_PAGE_STYLES ));
aNumStyleCB.Check( 0 != (nSet&SFX_LOAD_NUM_STYLES )); m_pNumStyleCB->Check( 0 != (nSet&SFX_LOAD_NUM_STYLES ));
aMergeStyleCB.Check( 0 != (nSet&SFX_MERGE_STYLES )); m_pMergeStyleCB->Check( 0 != (nSet&SFX_MERGE_STYLES ));
} }
SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
SfxNewFileDialog* pAntiImplP, sal_uInt16 nFl) SfxNewFileDialog* pAntiImplP, sal_uInt16 nFl)
: aRegionFt( pAntiImplP, SfxResId( FT_REGION ) ), : aNone(SfxResId(STR_NONE).toString())
aRegionLb( pAntiImplP, SfxResId( LB_REGION ) ), , nFlags(nFl)
aTemplateFt( pAntiImplP, SfxResId( FT_TEMPLATE ) ), , pAntiImpl(pAntiImplP)
aTemplateLb( pAntiImplP, SfxResId( LB_TEMPLATE ) ),
aPreviewBtn( pAntiImplP, SfxResId( BTN_PREVIEW ) ),
aPreviewWin( pAntiImplP, SfxResId( WIN_PREVIEW ) ),
aTitleFt( pAntiImplP, SfxResId( FT_TITLE ) ),
aTitleEd( pAntiImplP, SfxResId( ED_TITLE ) ),
aThemaFt( pAntiImplP, SfxResId( FT_THEMA ) ),
aThemaEd( pAntiImplP, SfxResId( ED_THEMA ) ),
aKeywordsFt( pAntiImplP, SfxResId( FT_KEYWORDS ) ),
aKeywordsEd( pAntiImplP, SfxResId( ED_KEYWORDS ) ),
aDescFt( pAntiImplP, SfxResId( FT_DESC ) ),
aDescEd( pAntiImplP, SfxResId( ED_DESC ) ),
aDocinfoGb( pAntiImplP, SfxResId( GB_DOCINFO ) ),
aTextStyleCB( pAntiImplP, SfxResId( CB_TEXT_STYLE )),
aFrameStyleCB( pAntiImplP, SfxResId( CB_FRAME_STYLE )),
aPageStyleCB( pAntiImplP, SfxResId( CB_PAGE_STYLE )),
aNumStyleCB( pAntiImplP, SfxResId( CB_NUM_STYLE )),
aMergeStyleCB( pAntiImplP, SfxResId( CB_MERGE_STYLE )),
aLoadFilePB( pAntiImplP, SfxResId( PB_LOAD_FILE )),
aOkBt( pAntiImplP, SfxResId( BT_OK ) ),
aCancelBt( pAntiImplP, SfxResId( BT_CANCEL ) ),
aHelpBt( pAntiImplP, SfxResId( BT_HELP ) ),
pMoreBt( new MoreButton( pAntiImplP, SfxResId( BT_MORE ) ) ),
aNone(SfxResId(STR_NONE).toString()),
sLoadTemplate(SfxResId(STR_LOAD_TEMPLATE).toString()),
nFlags(nFl),
pAntiImpl( pAntiImplP )
{ {
short nMoveOffset = *(short *)pAntiImplP->GetClassRes(); pAntiImplP->get(m_pRegionLb, "categories");
pAntiImplP->IncrementRes(sizeof(short)); pAntiImplP->get(m_pTemplateLb, "templates");
short nExpandSize= *(short *)pAntiImplP->GetClassRes();
pAntiImplP->IncrementRes(sizeof(short)); Size aSize(m_pRegionLb->LogicToPixel(Size(127, 72), MAP_APPFONT));
pAntiImplP->FreeResource(); m_pRegionLb->set_width_request(aSize.Width());
m_pRegionLb->set_height_request(aSize.Height());
m_pTemplateLb->set_width_request(aSize.Width());
m_pTemplateLb->set_height_request(aSize.Height());
pAntiImplP->get(m_pTextStyleCB, "text");
pAntiImplP->get(m_pFrameStyleCB, "frame");
pAntiImplP->get(m_pPageStyleCB, "pages");
pAntiImplP->get(m_pNumStyleCB, "numbering");
pAntiImplP->get(m_pMergeStyleCB, "overwrite");
pAntiImplP->get(m_pMoreBt, "expander");
pAntiImplP->get(m_pPreviewWin, "image");
pAntiImplP->get(m_pLoadFilePB, "fromfile");
sLoadTemplate = pAntiImplP->get<FixedText>("alttitle")->GetText();
if (!nFlags) if (!nFlags)
MORE_BTN(Hide()); m_pMoreBt->Hide();
else if(SFXWB_LOAD_TEMPLATE == nFlags) else if(SFXWB_LOAD_TEMPLATE == nFlags)
{ {
aLoadFilePB.SetClickHdl(LINK(this, SfxNewFileDialog_Impl, LoadFile)); m_pLoadFilePB->SetClickHdl(LINK(this, SfxNewFileDialog_Impl, LoadFile));
aLoadFilePB.Show(); m_pLoadFilePB->Show();
aTextStyleCB.Show(); m_pTextStyleCB->Show();
aFrameStyleCB.Show(); m_pFrameStyleCB->Show();
aPageStyleCB.Show(); m_pPageStyleCB->Show();
aNumStyleCB.Show(); m_pNumStyleCB->Show();
aMergeStyleCB.Show(); m_pMergeStyleCB->Show();
Size aSize(pAntiImplP->GetOutputSizePixel()); m_pMoreBt->Hide();
Size aTmp(pAntiImplP->LogicToPixel(Size(16, 16), MAP_APPFONT)); m_pTextStyleCB->Check();
aSize.Height() += aTmp.Height();
pAntiImplP->SetOutputSizePixel(aSize);
pMoreBt->Hide();
aTextStyleCB.Check();
pAntiImplP->SetText(sLoadTemplate); pAntiImplP->SetText(sLoadTemplate);
} }
else else
{ {
MORE_BTN(SetClickHdl(LINK(this, SfxNewFileDialog_Impl, Expand))); m_pMoreBt->SetExpandedHdl(LINK(this, SfxNewFileDialog_Impl, Expand));
if((nFlags & SFXWB_PREVIEW) == SFXWB_PREVIEW) m_pPreviewWin->Show();
{
MORE_BTN(AddWindow(&aPreviewBtn));
MORE_BTN(AddWindow(&aPreviewWin));
aPreviewBtn.SetClickHdl(LINK(this, SfxNewFileDialog_Impl, PreviewClick));
}
else
{
aPreviewBtn.Hide();
aPreviewWin.Hide();
nMoveOffset = (short)pAntiImplP->LogicToPixel(
Size(nMoveOffset, nMoveOffset), MAP_APPFONT).Width();
nExpandSize = (short)pAntiImplP->LogicToPixel(
Size(nExpandSize, nExpandSize), MAP_APPFONT).Width();
AdjustPosSize_Impl(&aTitleFt, nMoveOffset, 0);
AdjustPosSize_Impl(&aTitleEd, nMoveOffset, nExpandSize);
AdjustPosSize_Impl(&aThemaFt, nMoveOffset, 0);
AdjustPosSize_Impl(&aThemaEd, nMoveOffset, nExpandSize);
AdjustPosSize_Impl(&aKeywordsFt, nMoveOffset, 0);
AdjustPosSize_Impl(&aKeywordsEd, nMoveOffset, nExpandSize);
AdjustPosSize_Impl(&aDescFt , nMoveOffset, 0);
AdjustPosSize_Impl(&aDescEd , nMoveOffset, nExpandSize);
AdjustPosSize_Impl(&aDocinfoGb, nMoveOffset, nExpandSize);
}
} }
OUString &rExtra = pAntiImplP->GetExtraData(); OUString &rExtra = pAntiImplP->GetExtraData();
sal_Int32 nTokCount = comphelper::string::getTokenCount(rExtra, '|'); bool bExpand = !rExtra.isEmpty() && rExtra[0] == 'Y';
if( nTokCount > 0 && nFlags ) m_pMoreBt->set_expanded(bExpand && nFlags);
MORE_BTN(SetState(comphelper::string::equals(rExtra.getToken( 0, '|'), 'Y')));
if( nTokCount > 1 && nFlags )
aPreviewBtn.Check(comphelper::string::equals(rExtra.getToken( 1 ,'|'), 'Y'));
aTemplateLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, TemplateSelect)); m_pTemplateLb->SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, TemplateSelect));
aTemplateLb.SetDoubleClickHdl(LINK(this, SfxNewFileDialog_Impl, DoubleClick)); m_pTemplateLb->SetDoubleClickHdl(LINK(this, SfxNewFileDialog_Impl, DoubleClick));
// update the template configuration if necessary // update the template configuration if necessary
{ {
@@ -543,33 +435,28 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
if (nCount) if (nCount)
{ {
for(sal_uInt16 i = 0; i < nCount; ++i) for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(aTemplates.GetFullRegionName(i)); m_pRegionLb->InsertEntry(aTemplates.GetFullRegionName(i));
aRegionLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect)); m_pRegionLb->SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect));
} }
aPrevTimer.SetTimeout( 500 ); aPrevTimer.SetTimeout( 500 );
aPrevTimer.SetTimeoutHdl( LINK( this, SfxNewFileDialog_Impl, Update)); aPrevTimer.SetTimeoutHdl( LINK( this, SfxNewFileDialog_Impl, Update));
aRegionLb.SelectEntryPos(0); m_pRegionLb->SelectEntryPos(0);
RegionSelect(&aRegionLb); RegionSelect(m_pRegionLb);
} }
SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl() SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
{ {
OUString &rExtra = pAntiImpl->GetExtraData(); OUString &rExtra = pAntiImpl->GetExtraData();
rExtra = MORE_BTN(GetState()) ? OUString("Y") : OUString("N"); rExtra = m_pMoreBt->get_expanded() ? OUString("Y") : OUString("N");
rExtra += "|";
rExtra += aPreviewBtn.IsChecked() ? OUString("Y") : OUString("N");
delete pMoreBt;
} }
SfxNewFileDialog::SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags) SfxNewFileDialog::SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags)
: SfxModalDialog( pParent, SfxResId( DLG_NEW_FILE ) ) : SfxModalDialog(pParent, "LoadTemplateDialog",
"sfx/ui/loadtemplatedialog.ui")
{ {
pImpl = new SfxNewFileDialog_Impl( this, nFlags ); pImpl = new SfxNewFileDialog_Impl(this, nFlags);
} }
SfxNewFileDialog::~SfxNewFileDialog() SfxNewFileDialog::~SfxNewFileDialog()

View File

@@ -1,48 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#define BTN_PREVIEW 51
#define WIN_PREVIEW 50
#define GB_DESC 10
#define FT_DESC 11
#define FT_STYLESHEETS 19
#define FT_REGION 20
#define ED_TITLE 56
#define ED_KEYWORDS 61
#define FT_KEYWORDS 60
#define FT_TITLE 55
#define ED_DESC 71
#define LB_REGION 21
#define BT_OK 30
#define BT_CANCEL 31
#define BT_HELP 32
#define GB_DOCINFO 70
#define ED_THEMA 55
#define FT_THEMA 54
#define FT_TEMPLATE 53
#define LB_TEMPLATE 52
#define BT_MORE 32
#define CB_TEXT_STYLE 33
#define CB_FRAME_STYLE 34
#define CB_PAGE_STYLE 35
#define CB_NUM_STYLE 36
#define CB_MERGE_STYLE 37
#define PB_LOAD_FILE 38
#define STR_LOAD_TEMPLATE 39
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -1,236 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sfx2/sfx.hrc>
#include "doc.hrc"
#include "new.hrc"
#include <sfx2/sfxcommands.h>
// DLG_NEW_FILE ----------------------------------------------------------
ModalDialog DLG_NEW_FILE
{
HelpId = CMD_SID_NEWDOC ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 336 , 96 ) ;
Text [ en-US ] = "New" ;
Moveable = TRUE ;
OKButton BT_OK
{
Pos = MAP_APPFONT ( 274 , 6 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BT_CANCEL
{
Pos = MAP_APPFONT ( 274 , 23 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
};
HelpButton BT_HELP
{
Pos = MAP_APPFONT ( 274 , 43 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
};
ListBox LB_REGION
{
HelpID = "sfx2:ListBox:DLG_NEW_FILE:LB_REGION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 18 ) ;
Size = MAP_APPFONT ( 127 , 72 ) ;
CurPos = 0 ;
};
FixedText FT_REGION
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "~Categories" ;
Left = TRUE ;
};
FixedText FT_TEMPLATE
{
Pos = MAP_APPFONT ( 139 , 6 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "T~emplates" ;
Left = TRUE ;
};
ListBox LB_TEMPLATE
{
HelpID = "sfx2:ListBox:DLG_NEW_FILE:LB_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 139 , 18 ) ;
Size = MAP_APPFONT ( 127 , 72 ) ;
CurPos = 0 ;
};
MoreButton BT_MORE
{
HelpID = "sfx2:MoreButton:DLG_NEW_FILE:BT_MORE";
Pos = MAP_APPFONT ( 274 , 70 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~More" ;
Delta = 148 ;
MapUnit = MAP_APPFONT ;
};
Window WIN_PREVIEW
{
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 110 ) ;
Size = MAP_APPFONT ( 127 , 129 ) ;
Hide = TRUE ;
SVLook = FALSE ;
};
CheckBox BTN_PREVIEW
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:BTN_PREVIEW";
Pos = MAP_APPFONT ( 6 , 96 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "Pre~view" ;
Hide = TRUE ;
};
FixedLine GB_DOCINFO
{
Pos = MAP_APPFONT ( 139 , 97 ) ;
Size = MAP_APPFONT ( 186 , 8 ) ;
Hide = TRUE ;
Text [ en-US ] = "Description" ;
};
CheckBox CB_TEXT_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_TEXT_STYLE";
Pos = MAP_APPFONT ( 6 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "Te~xt" ;
};
CheckBox CB_FRAME_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_FRAME_STYLE";
Pos = MAP_APPFONT ( 60 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "~Frame" ;
};
CheckBox CB_PAGE_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_PAGE_STYLE";
Pos = MAP_APPFONT ( 114 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "~Pages" ;
};
CheckBox CB_NUM_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_NUM_STYLE";
Pos = MAP_APPFONT ( 168 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "N~umbering" ;
};
CheckBox CB_MERGE_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_MERGE_STYLE";
Pos = MAP_APPFONT ( 222 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "~Overwrite" ;
};
PushButton PB_LOAD_FILE
{
HelpID = "sfx2:PushButton:DLG_NEW_FILE:PB_LOAD_FILE";
Pos = MAP_APPFONT ( 274 , 92 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
Hide = TRUE;
Text [ en-US ] = "From File...";
};
String STR_LOAD_TEMPLATE
{
Text [ en-US ] = "Load Styles" ;
};
FixedText FT_TITLE
{
Pos = MAP_APPFONT ( 145 , 108 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "~Title" ;
Hide = TRUE ;
};
Edit ED_TITLE
{
HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 121 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
FixedText FT_THEMA
{
Pos = MAP_APPFONT ( 145 , 135 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "Subject" ;
Hide = TRUE ;
};
Edit ED_THEMA
{
HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_THEMA";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 148 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
FixedText FT_KEYWORDS
{
Pos = MAP_APPFONT ( 145 , 162 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "~Key words" ;
Hide = TRUE ;
};
Edit ED_KEYWORDS
{
HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_KEYWORDS";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 175 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
FixedText FT_DESC
{
Pos = MAP_APPFONT ( 145 , 189 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "~Description" ;
Hide = TRUE ;
};
MultiLineEdit ED_DESC
{
HelpID = "sfx2:MultiLineEdit:DLG_NEW_FILE:ED_DESC";
Border = TRUE ;
Pos = MAP_APPFONT ( 144 , 202 ) ;
Size = MAP_APPFONT ( 175 , 32 ) ;
IgnoreTab = TRUE ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
ExtraData =
{
103;
44;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -31,23 +31,21 @@ class SfxPreviewBase_Impl : public Window
protected: protected:
::boost::shared_ptr<GDIMetaFile> pMetaFile; ::boost::shared_ptr<GDIMetaFile> pMetaFile;
public: public:
SfxPreviewBase_Impl( Window* pParent, SfxPreviewBase_Impl(Window* pParent, WinBits nStyle);
const ResId& rResId );
~SfxPreviewBase_Impl( );
void SetObjectShell( SfxObjectShell* pObj ); void SetObjectShell( SfxObjectShell* pObj );
virtual void Resize(); virtual void Resize();
virtual Size GetOptimalSize() const;
}; };
class SfxPreviewWin_Impl: public SfxPreviewBase_Impl class SfxPreviewWin_Impl: public SfxPreviewBase_Impl
{ {
protected: protected:
virtual void Paint( const Rectangle& rRect ); virtual void Paint( const Rectangle& rRect );
public: public:
SfxPreviewWin_Impl( Window* pParent, SfxPreviewWin_Impl(Window* pParent, WinBits nStyle)
const ResId& rResId ) : SfxPreviewBase_Impl(pParent, nStyle)
: SfxPreviewBase_Impl( pParent, rResId ){}; {
}
static void ImpPaint( static void ImpPaint(
const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow ); const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow );
}; };

View File

@@ -0,0 +1,358 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="LoadTemplateDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">New</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">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="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">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">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">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">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="fromfile">
<property name="label" translatable="yes">From File...</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="secondary">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<property name="column_homogeneous">True</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkTreeView" id="categories:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Categories</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</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="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</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="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkTreeView" id="templates:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection3"/>
</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">Templates</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</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>
<child>
<object class="GtkGrid" id="optionsgrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<property name="column_homogeneous">True</property>
<child>
<object class="GtkCheckButton" id="text">
<property name="label" translatable="yes">Te_xt</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</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="GtkCheckButton" id="frame">
<property name="label" translatable="yes">_Frame</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</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>
<child>
<object class="GtkCheckButton" id="pages">
<property name="label" translatable="yes">_Pages</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="numbering">
<property name="label" translatable="yes">N_umbering</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</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="GtkCheckButton" id="overwrite">
<property name="label" translatable="yes">_Overwrite</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="alttitle">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Load Styles</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="previewgrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">6</property>
<child>
<object class="sfxlo-SfxPreviewWin" id="image">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">start</property>
<property name="valign">start</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>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Pre_view</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">2</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>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
</interface>