diff options
24 files changed, 442 insertions, 35 deletions
diff --git a/sc/prj/d.lst b/sc/prj/d.lst index 63b2d7b8e978..b1e0dfde7a3d 100644 --- a/sc/prj/d.lst +++ b/sc/prj/d.lst @@ -39,3 +39,5 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar ..\uiconfig\scalc\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\accelerator\es\*.xml ..\uiconfig\scalc\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\accelerator\fr\*.xml ..\uiconfig\scalc\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar\*.xml + +..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index 9e2e1278e7a1..9fd600409211 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -56,6 +56,11 @@ #include <svx/flagsdef.hxx> //CHINA001 #include <svx/flstitem.hxx> //CHINA001 #include <sfx2/app.hxx> //CHINA001 + +#if !LAYOUT_SFX_TABDIALOG_BROKEN +#include <layout/layout-pre.hxx> +#endif + //================================================================== ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP, @@ -72,7 +77,12 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP, DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");//CHINA001 +#if LAYOUT_SFX_TABDIALOG_BROKEN AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 ); //CHINA001 AddTabPage( TP_NUMBER, SvxNumberFormatTabPage::Create, 0 ); +#else + String number = rtl::OUString::createFromAscii ("Numbers"); + AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, FALSE, TAB_APPEND); +#endif DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");//CHINA001 AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 ); //CHINA001 AddTabPage( TP_FONT, SvxCharNamePage::Create, 0 ); DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");//CHINA001 diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 86901418d37c..eb0271fefef6 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -31,6 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" +#if ! ENABLE_LAYOUT_EXPERIMENTAL +#undef ENABLE_LAYOUT
+#endif + #undef SC_DLLIMPLEMENTATION #include "scdlgfact.hxx" @@ -79,6 +83,7 @@ // ause #include "editutil.hxx" +#include <sfx2/layout.hxx> IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl); //add for ScColOrRowDlg IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl);//CHINA001 add for ScImportAsciiDlg @@ -112,6 +117,40 @@ IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl); //add for ScStringInputDlg IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl); //add for ScImportOptionsDlg IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg +// AbstractTabDialog_Impl begin +void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +{ + pDlg->SetCurPageId( nId ); +} + +const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const +{ + return pDlg->GetOutputItemSet(); +} +//add by CHINA001 +const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +{ + return pDlg->GetInputRanges( pItem ); +} +//add by CHINA001 +void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) +{ + pDlg->SetInputSet( pInSet ); +} +//From class Window. +void AbstractTabDialog_Impl::SetText( const XubString& rStr ) +{ + pDlg->SetText( rStr ); +} +String AbstractTabDialog_Impl::GetText() const +{ + return pDlg->GetText(); +} + +#if ENABLE_LAYOUT +namespace layout +{ +IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg // AbstractTabDialog_Impl begin void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) @@ -142,6 +181,8 @@ String AbstractTabDialog_Impl::GetText() const { return pDlg->GetText(); } +} +#endif /* ENABLE_LAYOUT */ //add for AbstractTabDialog_Impl end // AbstractScImportAsciiDlg_Impl begin @@ -1227,6 +1268,10 @@ AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptions } //add for ScImportOptionsDlg end +#if ENABLE_LAYOUT && !LAYOUT_SFX_TABDIALOG_BROKEN +#define SfxTabDialog layout::SfxTabDialog +#define AbstractTabDialog_Impl layout::AbstractTabDialog_Impl +#endif /* ENABLE_LAYOUT */ //add for ScAttrDlg begin SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg( SfxViewFrame* pFrame, Window* pParent, @@ -1249,6 +1294,8 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg( SfxViewFra } //add for ScAttrDlg end +#undef SfxTabDialog +#undef AbstractTabDialog_Impl //add for ScHFEditDlg begin SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame* pFrame, @@ -1378,6 +1425,10 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg( Wind } //add for ScValidationDlg end +#if ENABLE_LAYOUT && !LAYOUT_SFX_TABDIALOG_BROKEN +#define SfxTabDialog layout::SfxTabDialog +#define AbstractTabDialog_Impl layout::AbstractTabDialog_Impl +#endif /* ENABLE_LAYOUT */ //add for ScSortDlg begin SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* pParent, const SfxItemSet* pArgSet,int nId ) @@ -1396,6 +1447,9 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* return new AbstractTabDialog_Impl( pDlg ); return 0; } +#undef SfxTabDialog +#undef AbstractTabDialog_Impl + //add for ScSortDlg end //------------------ Factories for TabPages-------------------- CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index fbfcd81636b8..2bec64c31e13 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -354,6 +354,23 @@ class AbstractTabDialog_Impl : public SfxAbstractTabDialog virtual void SetText( const XubString& rStr ); //add by CHINA001 virtual String GetText() const; //add by CHINA001 }; +#if ENABLE_LAYOUT +namespace layout +{ +//add for ScAttrDlg , ScHFEditDlg, ScStyleDlg, ScSubTotalDlg, ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg +class AbstractTabDialog_Impl : public SfxAbstractTabDialog +{ + DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog ) + virtual void SetCurPageId( USHORT nId ); + virtual const SfxItemSet* GetOutputItemSet() const; + virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 + virtual void SetInputSet( const SfxItemSet* pInSet ); //add by CHINA001 + //From class Window. + virtual void SetText( const XubString& rStr ); //add by CHINA001 + virtual String GetText() const; //add by CHINA001 +}; +} // end namespace layout +#endif /* ENABLE_LAYOUT */ //------------------------------------------------------------------------ //AbstractDialogFactory_Impl implementations class ScAbstractDialogFactory_Impl : public ScAbstractDialogFactory diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index 26c3811864c5..00931de58924 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -40,8 +40,9 @@ #include "scresid.hxx" #include "sortdlg.hrc" - -//================================================================== +#if !LAYOUT_SFX_TABDIALOG_BROKEN +#include <layout/layout-pre.hxx> +#endif ScSortDlg::ScSortDlg( Window* pParent, const SfxItemSet* pArgSet ) : @@ -52,8 +53,15 @@ ScSortDlg::ScSortDlg( Window* pParent, bIsByRows ( FALSE ) { +#if LAYOUT_SFX_TABDIALOG_BROKEN AddTabPage( TP_FIELDS, ScTabPageSortFields::Create, 0 ); AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 ); +#else + String fields = rtl::OUString::createFromAscii ("fields"); + AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND); + String options = rtl::OUString::createFromAscii ("options"); + AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND); +#endif FreeResource(); } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index a5b42fc9f364..1e6c2b3f8fa7 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -544,6 +544,18 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb ) // Sortieroptionen-Tabpage: //======================================================================== +#if ENABLE_LAYOUT_EXPERIMENTAL +#include <layout/layout-pre.hxx> + +#if ENABLE_LAYOUT +#undef ScResId +#define ScResId(x) #x +#undef SfxTabPage +#define SfxTabPage( parent, id, args ) SfxTabPage( parent, "sort-options.xml", id, &args ) +#endif /* ENABLE_LAYOUT */ + +#endif /* ENABLE_LAYOUT_EXPERIMENTAL */ + ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, const SfxItemSet& rArgSet ) @@ -569,6 +581,11 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, aFtAreaLabel ( this, ScResId( FT_AREA_LABEL ) ), // aFtArea ( this, ScResId( FT_AREA ) ), // +#if ENABLE_LAYOUT_EXPERIMENTAL +#undef this +#undef ScResId +#define ScResId(x) this, #x +#endif /* ENABLE_LAYOUT_EXPERIMENTAL */ aStrRowLabel ( ScResId( STR_ROW_LABEL ) ), aStrColLabel ( ScResId( STR_COL_LABEL ) ), aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), @@ -579,7 +596,7 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, rArgSet.Get( nWhichSort )).GetSortData() ), pViewData ( NULL ), pDoc ( NULL ), - pDlg ( (ScSortDlg*)(GetParent()->GetParent()) ), + pDlg ( (ScSortDlg*)(GetParent() ? GetParent()->GetParent() : 0 ) ), pColRes ( NULL ), pColWrap ( NULL ) { @@ -708,6 +725,9 @@ USHORT* __EXPORT ScTabPageSortOptions::GetRanges() // ----------------------------------------------------------------------- +#if ENABLE_LAYOUT_EXPERIMENTAL +#undef SfxTabPage +#endif /* ENABLE_LAYOUT_EXPERIMENTAL */ SfxTabPage* __EXPORT ScTabPageSortOptions::Create( Window* pParent, const SfxItemSet& rArgSet ) @@ -884,9 +904,11 @@ int __EXPORT ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) if ( !bPosInputOk ) { +#if !ENABLE_LAYOUT_EXPERIMENTAL ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ), ScGlobal::GetRscString( STR_INVALID_TABREF ) ).Execute(); +#endif /* ENABLE_LAYOUT_EXPERIMENTAL */ aEdOutPos.GrabFocus(); aEdOutPos.SetSelection( Selection( 0, SELECTION_MAX ) ); theOutPos.Set(0,0,0); diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx index 45af08f59b07..fe881f988813 100644 --- a/sc/source/ui/inc/attrdlg.hxx +++ b/sc/source/ui/inc/attrdlg.hxx @@ -37,6 +37,15 @@ class Window; class SfxViewFrame; class SfxItemSet; +#ifndef LAYOUT_SFX_TABDIALOG_BROKEN +#define LAYOUT_SFX_TABDIALOG_BROKEN 1 +#endif /* !LAYOUT_SFX_TABDIALOG_BROKEN */ + +#if !LAYOUT_SFX_TABDIALOG_BROKEN +#include <sfx2/layout.hxx> +#include <layout/layout-pre.hxx> +#endif + //================================================================== class ScAttrDlg : public SfxTabDialog @@ -54,6 +63,9 @@ private: DECL_LINK( OkHandler, void* ); // fuer DoppelClick-Beenden in TabPages }; +#if !LAYOUT_SFX_TABDIALOG_BROKEN +#include <layout/layout-post.hxx> +#endif #endif // SC_ATTRDLG_HXX diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index a8edb19538e0..419a3beb2cfc 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -56,6 +56,9 @@ #include <vcl/field.hxx> #include "expftext.hxx" +#include <layout/layout.hxx> +#include <layout/layout-pre.hxx> + class ScViewData; class ScDocument; class ScDocShell; @@ -130,5 +133,7 @@ private: #endif }; +#include <layout/layout-post.hxx> + #endif // SC_INSTBDLG_HXX diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index 2ea9c060bc4d..b48fa7fdffa2 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -38,6 +38,9 @@ #include <vcl/lstbox.hxx> #include <vcl/fixed.hxx> +#include <layout/layout.hxx> +#include <layout/layout-pre.hxx> + //------------------------------------------------------------------------ class ScMoveTableDlg : public ModalDialog @@ -72,6 +75,7 @@ private: DECL_LINK( SelHdl, ListBox * ); }; +#include <layout/layout-post.hxx> #endif // SC_MVTABDLG_HXX diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx index c5cf9c28d0cc..3dcb3a08191d 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -33,10 +33,14 @@ #include <sfx2/tabdlg.hxx> -#ifndef _SFX_HXX -#endif +#ifndef LAYOUT_SFX_TABDIALOG_BROKEN +#define LAYOUT_SFX_TABDIALOG_BROKEN 1 +#endif /* !LAYOUT_SFX_TABDIALOG_BROKEN */ -//================================================================== +#if !LAYOUT_SFX_TABDIALOG_BROKEN +#include <sfx2/layout.hxx> +#include <layout/layout-pre.hxx> +#endif class ScSortDlg : public SfxTabDialog { @@ -61,7 +65,8 @@ inline void ScSortDlg::SetByRows ( BOOL bByRows ) { bIsByRows = bByRows; } inline BOOL ScSortDlg::GetHeaders() const { return bIsHeaders; } inline BOOL ScSortDlg::GetByRows () const { return bIsByRows; } +#if !LAYOUT_SFX_TABDIALOG_BROKEN +#include <layout/layout-post.hxx> +#endif #endif // SC_SORTDLG_HXX - - diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx index bb82123ab20d..3c812cc7b5c2 100644 --- a/sc/source/ui/inc/strindlg.hxx +++ b/sc/source/ui/inc/strindlg.hxx @@ -37,6 +37,9 @@ #include <vcl/imagebtn.hxx> #include <vcl/edit.hxx> +#include <layout/layout.hxx> +#include <layout/layout-pre.hxx> + //------------------------------------------------------------------------ class ScStringInputDlg : public ModalDialog @@ -59,6 +62,7 @@ private: HelpButton aBtnHelp; }; +#include <layout/layout-post.hxx> #endif // SC_STRINDLG_HXX diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index a3cbffb4c39e..dfa8c9cb8cf3 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -132,6 +132,13 @@ class ScRangeData; class CollatorRessource; class CollatorWrapper; +#if ENABLE_LAYOUT_EXPERIMENTAL +#include <sfx2/layout.hxx> +#include <layout/layout-pre.hxx> +#else /* !ENABLE_LAYOUT_EXPERIMENTAL */ +#define LocalizedString String +#endif /* !ENABLE_LAYOUT_EXPERIMENTAL */ + class ScTabPageSortOptions : public SfxTabPage { public: @@ -139,6 +146,8 @@ public: const SfxItemSet& rArgSet ); ~ScTabPageSortOptions(); +#undef SfxTabPage +#define SfxTabPage ::SfxTabPage static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); static USHORT* GetRanges (); @@ -177,9 +186,9 @@ private: FixedText aFtAreaLabel; // FixedInfo aFtArea; - String aStrRowLabel; - String aStrColLabel; - String aStrUndefined; + LocalizedString aStrRowLabel; + LocalizedString aStrColLabel; + LocalizedString aStrUndefined; String aStrNoName; String aStrAreaLabel; @@ -208,7 +217,9 @@ private: #endif }; - +#if ENABLE_LAYOUT_EXPERIMENTAL +#include <layout/layout-post.hxx> +#endif /* ENABLE_LAYOUT_EXPERIMENTAL */ #endif // SC_TPSORT_HXX diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 621e066976c4..72ebb9f08cbb 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -55,6 +55,17 @@ #define SC_INSTBDLG_CXX #include "instbdlg.hxx" +#include <layout/layout-pre.hxx> + +#if ENABLE_LAYOUT +#undef ScResId +#define ScResId(x) #x +#undef ModalDialog +#define ModalDialog( parent, id ) Dialog( parent, "insert-sheet.xml", id ) +#undef ErrorBox +#define ErrorBox( this, bits, message ) ErrorBox (LAYOUT_THIS_WINDOW (this), bits, message) +#endif /* ENABLE_LAYOUT */ + //================================================================== ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nTabCount, bool bFromFile ) @@ -86,6 +97,10 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT nSelTabIndex ( 0 ), nTableCount (nTabCount) { +#if ENABLE_LAYOUT + SetHelpId (SID_INSERT_TABLE); + aFtPath.SetText (EMPTY_STRING); +#endif /* ENABLE_LAYOUT */ Init_Impl( bFromFile ); FreeResource(); } @@ -152,11 +167,16 @@ void ScInsertTableDlg::Init_Impl( bool bFromFile ) //------------------------------------------------------------------------ +#if ENABLE_LAYOUT +#undef ModalDialog +#define ModalDialog Dialog +#endif /* ENABLE_LAYOUT */ + short __EXPORT ScInsertTableDlg::Execute() { // set Parent of DocumentInserter and Doc-Manager Window* pOldDefParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( this ); + Application::SetDefDialogParent( LAYOUT_THIS_WINDOW (this) ); if ( aBtnFromFile.IsChecked() ) aBrowseTimer.Start(); diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 2a560d2ba0a8..822ff23d9994 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -47,6 +47,15 @@ #include "scresid.hxx" #include "globstr.hrc" +#include <layout/layout-pre.hxx> + +#if ENABLE_LAYOUT +#undef ScResId +#define ScResId(x) #x +#undef ModalDialog +#define ModalDialog( parent, id ) Dialog( parent, "move-copy-sheet.xml", id ) +#endif /* ENABLE_LAYOUT */ + //================================================================== ScMoveTableDlg::ScMoveTableDlg( Window* pParent ) @@ -66,6 +75,10 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent ) nTable ( 0 ), bCopyTable ( FALSE ) { +#if ENABLE_LAYOUT +#undef ScResId + SetHelpId (FID_TAB_MOVE); +#endif /* ENABLE_LAYOUT */ Init(); FreeResource(); } diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx index 65212f7d7313..92630493d32f 100644 --- a/sc/source/ui/miscdlgs/strindlg.cxx +++ b/sc/source/ui/miscdlgs/strindlg.cxx @@ -43,6 +43,14 @@ #include "scresid.hxx" #include "miscdlgs.hrc" +#include <layout/layout-pre.hxx> + +#if ENABLE_LAYOUT +#undef ScResId +#define ScResId(x) #x +#undef ModalDialog +#define ModalDialog( parent, id ) Dialog( parent, "string-input.xml", id ) +#endif /* ENABLE_LAYOUT */ //================================================================== diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 9b3779a4abd6..dbd39f1c6802 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -61,8 +61,8 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) : DropTargetHelper( this ), DragSourceHelper( this ), pViewData( pData ), - nMouseClickPageId( TAB_PAGE_NOTFOUND ), - nSelPageIdByMouse( TAB_PAGE_NOTFOUND ), + nMouseClickPageId( TABBAR_PAGE_NOTFOUND ), + nSelPageIdByMouse( TABBAR_PAGE_NOTFOUND ), bErrorShown( FALSE ) { ScDocument* pDoc = pViewData->GetDocument(); @@ -159,7 +159,7 @@ void ScTabControl::MouseButtonDown( const MouseEvent& rMEvt ) if( rMEvt.IsLeft() && (rMEvt.GetModifier() == 0) ) nMouseClickPageId = GetPageId( rMEvt.GetPosPixel() ); else - nMouseClickPageId = TAB_PAGE_NOTFOUND; + nMouseClickPageId = TABBAR_PAGE_NOTFOUND; TabBar::MouseButtonDown( rMEvt ); } @@ -170,7 +170,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt ) // mouse button down and up on same page? if( nMouseClickPageId != GetPageId( aPos ) ) - nMouseClickPageId = TAB_PAGE_NOTFOUND; + nMouseClickPageId = TABBAR_PAGE_NOTFOUND; else if ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ) { SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher(); @@ -183,7 +183,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt ) SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher(); pDispatcher->Execute( FID_INS_TABLE, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD ); // forget page ID, to be really sure that the dialog is not called twice - nMouseClickPageId = TAB_PAGE_NOTFOUND; + nMouseClickPageId = TABBAR_PAGE_NOTFOUND; } TabBar::MouseButtonUp( rMEvt ); @@ -195,7 +195,7 @@ void ScTabControl::Select() nSelPageIdByMouse = nMouseClickPageId; /* Reset nMouseClickPageId, so that next Select() call may invalidate nSelPageIdByMouse (i.e. if called from keyboard). */ - nMouseClickPageId = TAB_PAGE_NOTFOUND; + nMouseClickPageId = TABBAR_PAGE_NOTFOUND; ScModule* pScMod = SC_MOD(); ScDocument* pDoc = pViewData->GetDocument(); @@ -368,7 +368,7 @@ void ScTabControl::ActivateView(BOOL bActivate) void ScTabControl::SetSheetLayoutRTL( BOOL bSheetRTL ) { SetEffectiveRTL( bSheetRTL ); - nSelPageIdByMouse = TAB_PAGE_NOTFOUND; + nSelPageIdByMouse = TABBAR_PAGE_NOTFOUND; } @@ -550,9 +550,9 @@ sal_Int8 ScTabControl::AcceptDrop( const AcceptDropEvent& rEvt ) long ScTabControl::StartRenaming() { if ( pViewData->GetDocument()->IsDocEditable() ) - return TAB_RENAMING_YES; + return TABBAR_RENAMING_YES; else - return TAB_RENAMING_NO; + return TABBAR_RENAMING_NO; } long ScTabControl::AllowRenaming() @@ -560,7 +560,7 @@ long ScTabControl::AllowRenaming() ScTabViewShell* pViewSh = pViewData->GetViewShell(); DBG_ASSERT( pViewSh, "pViewData->GetViewShell()" ); - long nRet = TAB_RENAMING_CANCEL; + long nRet = TABBAR_RENAMING_CANCEL; USHORT nId = GetEditPageId(); if ( nId ) { @@ -568,27 +568,27 @@ long ScTabControl::AllowRenaming() String aNewName = GetEditText(); BOOL bDone = pViewSh->RenameTable( aNewName, nTab ); if ( bDone ) - nRet = TAB_RENAMING_YES; + nRet = TABBAR_RENAMING_YES; else if ( bErrorShown ) { // if the error message from this TabControl is currently visible, // don't end edit mode now, to avoid problems when returning to // the other call (showing the error) - this should not happen DBG_ERROR("ScTabControl::AllowRenaming: nested calls"); - nRet = TAB_RENAMING_NO; + nRet = TABBAR_RENAMING_NO; } else if ( Application::IsInModalMode() ) { // #73472# don't show error message above any modal dialog // instead cancel renaming without error message - nRet = TAB_RENAMING_CANCEL; + nRet = TABBAR_RENAMING_CANCEL; } else { bErrorShown = TRUE; pViewSh->ErrorMessage( STR_INVALIDTABNAME ); bErrorShown = FALSE; - nRet = TAB_RENAMING_NO; + nRet = TABBAR_RENAMING_NO; } } return nRet; @@ -603,12 +603,12 @@ void ScTabControl::EndRenaming() void ScTabControl::Mirror() { TabBar::Mirror(); - if( nSelPageIdByMouse != TAB_PAGE_NOTFOUND ) + if( nSelPageIdByMouse != TABBAR_PAGE_NOTFOUND ) { Rectangle aRect( GetPageRect( GetCurPageId() ) ); if( !aRect.IsEmpty() ) SetPointerPosPixel( aRect.Center() ); - nSelPageIdByMouse = TAB_PAGE_NOTFOUND; // only once after a Select() + nSelPageIdByMouse = TABBAR_PAGE_NOTFOUND; // only once after a Select() } } diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 8c20d7f13a90..744481c4441c 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -38,6 +38,7 @@ #include "scitems.hxx" #include <sfx2/request.hxx> #include <basic/sbstar.hxx> +#include <layout/layout.hxx> #include <svtools/languageoptions.hxx> #include <svtools/stritem.hxx> #include <svtools/whiter.hxx> @@ -55,7 +56,6 @@ //CHINA001 #include "mvtabdlg.hxx" #include "docfunc.hxx" - #include "scabstdlg.hxx" //CHINA001 #define IS_AVAILABLE(WhichId,ppItem) \ @@ -621,11 +621,17 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // wenn's nicht von Basic kommt, nochmal nachfragen: - bDoIt = ( RET_YES == - QueryBox( GetDialogParent(), - WinBits( WB_YES_NO | WB_DEF_YES ), - ScGlobal::GetRscString(STR_QUERY_DELTAB) - ).Execute() ); +#if ENABLE_LAYOUT +// Using layout::QueryBox without client code modification is +// deprecated, rather add HIG-complient buttons with verbs. +#define QueryBox( parent, winbits, question ) layout::QueryBox (parent, question, ScGlobal::GetRscString (STR_UNDO_DELETE_TAB)) +#endif /* ENABLE_LAYOUT */ + + bDoIt = ( RET_YES == + QueryBox( GetDialogParent(), + WinBits( WB_YES_NO | WB_DEF_YES ), + ScGlobal::GetRscString(STR_QUERY_DELTAB) + ).Execute() ); } if( bDoIt ) { diff --git a/sc/uiconfig/layout/delzip b/sc/uiconfig/layout/delzip new file mode 100644 index 000000000000..7b4d68d70fca --- /dev/null +++ b/sc/uiconfig/layout/delzip @@ -0,0 +1 @@ +empty
\ No newline at end of file diff --git a/sc/uiconfig/layout/insert-sheet.xml b/sc/uiconfig/layout/insert-sheet.xml new file mode 100644 index 000000000000..2350da9aec77 --- /dev/null +++ b/sc/uiconfig/layout/insert-sheet.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This is a template. i18n translation is not performed in-place; + i18n translated XML files are generated from this template by + transex3/layout/tralay. !--> + +<modaldialog sizeable="true" closeable="true" moveable="true" output-size="true" id="RID_SCDLG_INSERT_TABLE" sv-look="true" _title="Insert Sheet" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container"> + <vbox spacing="5" border="5"> + <fixedline id="FL_POSITION" _text="Position"/> + <hbox> + <vbox cnt:padding="13" spacing="5"> + <radiobutton radiogroup="insert-sheet-position" id="RB_BEFORE" tabstop="true" _label="B~efore current sheet"/> + <radiobutton radiogroup="insert-sheet-position" id="RB_BEHIND" tabstop="true" _label="~After current sheet"/> + </vbox> + </hbox> + <fixedline id="FL_TABLE" _text="Sheet"/> + <hbox> + <vbox cnt:padding="13" spacing="5"> + <radiobutton radiogroup="insert-sheet-source" id="RB_NEW" _label="~New sheet"/> + <hbox> + <vbox cnt:padding="13" spacing="5" cnt:fill="false" cnt:expand="false"> + <fixedtext id="FT_COUNT" _label="N~o. of sheets"/> + <fixedtext id="FT_NAME" _label="Na~me"/> + </vbox> + <vbox> + <hbox> + <numericfield has_border="true" maximum="256" minimum="1" repeat="true" id="NF_COUNT" spin="true" spin-size="1" tabstop="true" value="1" cnt:fill="true" cnt:expand="false"/> + </hbox> + <edit has_border="true" id="ED_TABNAME" cnt:fill="true" cnt:expand="true"/> + </vbox> + </hbox> + </vbox> + </hbox> + <hbox> + <vbox cnt:padding="13" spacing="5"> + <radiobutton radiogroup="insert-sheet-source" id="RB_FROMFILE" _label="~From file"/> + <hbox> + <vbox cnt:padding="13" spacing="5"> + <hbox> + <multilistbox auto-hscroll="true" has_border="true" id="LB_TABLES" simple-mode="true" string-item-list=" : : : : " cnt:fill="true" cnt:expand="true"/> + <vbox cnt:fill="false" cnt:expand="false" spacing="5"> + <pushbutton id="BTN_BROWSE" _label="~Browse..." cnt:expand="false"/> + <checkbox id="CB_LINK" _label="Lin~k" cnt:expand="false"/> + <flow/> + </vbox> + </hbox> + <fixedtext id="FT_PATH" label="FT-PATH"/> + </vbox> + </hbox> + </vbox> + </hbox> + <dialogbuttonhbox border="5" spacing="5"> + <okbutton defbutton="true" id="BTN_OK"/> + <cancelbutton id="BTN_CANCEL"/> + <helpbutton id="BTN_HELP"/> + </dialogbuttonhbox> + </vbox> +</modaldialog> diff --git a/sc/uiconfig/layout/makefile.mk b/sc/uiconfig/layout/makefile.mk new file mode 100644 index 000000000000..f8cf8bdffce5 --- /dev/null +++ b/sc/uiconfig/layout/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile$ +# +# $Revision$ +# +# last change: $Author$ $Date$ +# +# The Contents of this file are made available subject to +# the terms of GNU Lesser General Public License Version 2.1. +# +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2005 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, +# MA 02110-1301 USA +# +#************************************************************************* + +PRJ=../.. +PRJNAME=sc +TARGET=layout + +.INCLUDE : settings.mk + +.IF "$(ENABLE_LAYOUT)" == "TRUE" + +all: ALLTAR + +XML_FILES=\ + insert-sheet.xml\ + move-copy-sheet.xml\ + sort-options.xml\ + string-input.xml\ + +# + +.INCLUDE : layout.mk + +.ELSE # ENABLE_LAYOUT != TRUE +all .PHONY: +.ENDIF # ENABLE_LAYOUT != TRUE + +.INCLUDE : target.mk + +localize.sdf: $(PRJ)/source/ui/miscdlgs/localize.sdf $(PRJ)/source/ui/src/localize.sdf + grep instbdlg.src $(PRJ)/source/ui/miscdlgs/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\insert-sheet.xml", $$3, "layout", $$5 $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\tRID_SCDLG_INSERT_TABLE/\t/' -e 's/\t_label/\tRID_SCDLG_INSERT_TABLE_title/' > insert-sheet-$@ + grep -E 'miscdlgs.src.*(FT_DEST|FT_INSERT|STR_NEWDOC|RID_SCDLG_MOVETAB|BTN_COPY)' $(PRJ)/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\move-copy-sheet.xml", $$3, "layout", $$5 $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\tRID_SCDLG_MOVETAB/\t/' -e 's/\t_label/\tRID_SCDLG_MOVETAB_title/'> move-copy-sheet-$@ + grep sortdlg.src $(PRJ)/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\sort-options.xml", $$3, "layout", $$5 $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\tRID_SCDLG_SORT/\t/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' -e 's/\tRID_SCPAGE_SORT_OPTIONS/\t/' -e 's/\tRID_SCPAGE_SORT_FIELDS/\t/' > sort-options-$@ + echo '#empty' | cat - insert-sheet-$@ move-copy-sheet-$@ sort-options-$@ > $@ + rm -f *-$@ diff --git a/sc/uiconfig/layout/move-copy-sheet.xml b/sc/uiconfig/layout/move-copy-sheet.xml new file mode 100644 index 000000000000..3d26db1aa73d --- /dev/null +++ b/sc/uiconfig/layout/move-copy-sheet.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This is a template. i18n translation is not performed in-place; + i18n translated XML files are generated from this template by + transex3/layout/tralay. !--> + +<modaldialog sizeable="true" closeable="true" help-id="FID_TAB_MOVE" moveable="true" output-size="true" id="RID_SCDLG_MOVETAB" sv-look="true" _title="Move/Copy Sheet" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container"> + <vbox spacing="5" border="5"> + <string id="STR_NEWDOC" _text="- new document -"/> + <fixedtext id="FT_DEST" _label="To ~document"/> + <listbox has_border="true" dropdown="true" id="LB_DEST" tabstop="true"/> + <fixedtext id="FT_INSERT" _label="~Insert before"/> + <listbox has_border="true" id="LB_INSERT" tabstop="true" string-item-list=" : : : : " /> + <checkbox id="BTN_COPY" tabstop="true" _label="~Copy"/> + <dialogbuttonhbox border="5" spacing="5"> + <flow/> + <cancelbutton id="BTN_CANCEL" tabstop="true"/> + <helpbutton id="BTN_HELP" tabstop="true"/> + <okbutton defbutton="true" id="BTN_OK" tabstop="true"/> + </dialogbuttonhbox> + </vbox> +</modaldialog> diff --git a/sc/uiconfig/layout/sort-options.xml b/sc/uiconfig/layout/sort-options.xml new file mode 100644 index 000000000000..a409ac2d530a --- /dev/null +++ b/sc/uiconfig/layout/sort-options.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This is a template. i18n translation is not performed in-place; + i18n translated XML files are generated from this template by + transex3/layout/tralay. !--> + +<tabpage help-id="HID_SCPAGE_SORT_OPTIONS" + id="RID_SCPAGE_SORT_OPTIONS" + sv-look="true" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container" + optimumsize="true" + sizeable="true" moveable="true"> + <vbox spacing="4" border="5"> + <string id="STR_COL_LABEL" _text="Range contains column la~bels"/> + <string id="STR_ROW_LABEL" _text="Range contains ~row labels"/> + <string id="SCSTR_UNDEFINED" _text="- undefined -"/> + <vbox spacing="4" border="5"> + <checkbox id="BTN_CASESENSITIVE" tabstop="true" _label="Case ~sensitive"/> + <checkbox id="BTN_LABEL" tabstop="true"/> + <checkbox id="BTN_FORMATS" tabstop="true" _label="Include ~formats"/> + <checkbox id="BTN_NATURALSORT" tabstop="true" _label="Enable ~natural sort"/> + <checkbox id="BTN_COPYRESULT" tabstop="true" _label="~Copy sort results to:"/> + <hbox> + <listbox has_border="true" dropdown="true" id="LB_OUTAREA" tabstop="true"/> + <edit has_border="true" disable="true" id="ED_OUTAREA" tabstop="true"/> + </hbox> + <checkbox id="BTN_SORT_USER" tabstop="true" _label="Custom sort ~order"/> + <listbox has_border="true" disable="true" dropdown="true" id="LB_SORT_USER" tabstop="true"/> + <hbox> + <fixedtext id="FT_LANGUAGE" _label="~Language"/> + <fixedtext id="FT_ALGORITHM" _label="O~ptions"/> + </hbox> + <hbox> + <svxlanguagebox has_border="true" dropdown="true" id="LB_LANGUAGE" sort="true" tabstop="true" _string-item-list="Default"/> + <listbox has_border="true" dropdown="true" id="LB_ALGORITHM" tabstop="true"/> + </hbox> + <fixedline id="FL_DIRECTION" _text="Direction"/> + <radiobutton id="BTN_TOP_DOWN" radiogroup="sort-options" tabstop="true" _label="~Top to bottom (sort rows)"/> + <radiobutton id="BTN_LEFT_RIGHT" radiogroup="sort-options" tabstop="true" _label="L~eft to right (sort columns)"/> + </vbox> + </vbox> +</tabpage> diff --git a/sc/uiconfig/layout/string-input.xml b/sc/uiconfig/layout/string-input.xml new file mode 100644 index 000000000000..b1aed5197c17 --- /dev/null +++ b/sc/uiconfig/layout/string-input.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This is a template. i18n translation is not performed in-place; + i18n translated XML files are generated from this template by + transex3/layout/tralay. !--> + +<modaldialog sizeable="true" closeable="false" moveable="true" output-size="true" id="RID_SCDLG_STRINPUT" sv-look="true" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container" title="Insert String"> + <vbox spacing="5" border="5"> + <fixedtext id="FT_LABEL" label="FT-LABEL"/> + <edit has_border="true" id="ED_INPUT" tabstop="true"/> + <dialogbuttonhbox border="5" spacing="5"> + <okbutton defbutton="true" id="BTN_OK" tabstop="true"/> + <cancelbutton id="BTN_CANCEL" tabstop="true"/> + <helpbutton id="BTN_HELP" tabstop="true"/> + </dialogbuttonhbox> + </vbox> +</modaldialog> diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk index 63251c7d8f35..8791941314f1 100644 --- a/sc/util/makefile.mk +++ b/sc/util/makefile.mk @@ -232,6 +232,10 @@ SHL8STDLIBS= \ $(CPPULIB) \ $(SALLIB) +.IF "$(ENABLE_LAYOUT)" == "TRUE" +SHL8STDLIBS+=$(TKLIB) +.ENDIF # ENABLE_LAYOUT == TRUE + SHL8LIBS= $(SLB)$/scui.lib LIB8TARGET = $(SLB)$/scui.lib |