Index: sc/source/core/data/stlpool.cxx =================================================================== --- sc/source/core/data/stlpool.cxx (revision 1651613) +++ sc/source/core/data/stlpool.cxx (working copy) @@ -40,8 +40,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -228,6 +230,7 @@ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE1), SFX_STYLE_FAMILY_PARA ); CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PAGE ); CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SFX_STYLE_FAMILY_PAGE ); + CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_LANDSCAPE), SFX_STYLE_FAMILY_PAGE ); } //------------------------------------------------------------------------ @@ -496,6 +499,48 @@ pSet->Put( *pFooterItem ); DELETEZ( pTxtObj ); + // Landscape + pSheet = (ScStyleSheet*) &Make( SCSTR( STR_STYLENAME_LANDSCAPE ), + SFX_STYLE_FAMILY_PAGE, + SCSTYLEBIT_STANDARD ); + pSet = &pSheet->GetItemSet(); + pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_LANDSCAPE ); + + SvxPageItem aPageItem( (const SvxPageItem&)pSet->Get( ATTR_PAGE ) ); + aPageItem.SetLandscape( sal_True ); + pSet->Put( aPageItem ); + Size aSize( SvxPaperInfo::GetDefaultPaperSize() ); + LandscapeSwap( aSize ); + pSet->Put( SvxSizeItem( ATTR_PAGE_SIZE, aSize ) ); + + //---------------------------------------- + // Header: + // [empty][\TableName\][empty] + //---------------------------------------- + pEdEngine->SetText(EMPTY_STRING); + pEdEngine->QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection() ); + pTxtObj = pEdEngine->CreateTextObject(); + pHeaderItem->SetLeftArea ( *pEmptyTxtObj ); + pHeaderItem->SetCenterArea( *pTxtObj ); + pHeaderItem->SetRightArea ( *pEmptyTxtObj ); + pSet->Put( *pHeaderItem ); + DELETEZ( pTxtObj ); + + //---------------------------------------- + // Footer: + // [empty][Page \PageNumber\][empty] + //---------------------------------------- + aStr = SCSTR( STR_PAGE ); aStr += ' '; + pEdEngine->SetText( aStr ); + nStrLen = aStr.Len(); + pEdEngine->QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) ); + pTxtObj = pEdEngine->CreateTextObject(); + pFooterItem->SetLeftArea ( *pEmptyTxtObj ); + pFooterItem->SetCenterArea( *pTxtObj ); + pFooterItem->SetRightArea ( *pEmptyTxtObj ); + pSet->Put( *pFooterItem ); + DELETEZ( pTxtObj ); + //---------------------------------------------------- DELETEZ( pEmptyTxtObj ); DELETEZ( pHeaderItem ); Index: sc/source/ui/src/globstr.src =================================================================== --- sc/source/ui/src/globstr.src (revision 1651613) +++ sc/source/ui/src/globstr.src (working copy) @@ -1083,6 +1083,10 @@ { Text [ en-US ] = "Report1" ; }; + String STR_STYLENAME_LANDSCAPE + { + Text [ en-US ] = "Landscape" ; + }; String STR_IMPORT_EXCEL_WARNING { Text [ en-US ] = "is not available for spellchecking\nPlease check your installation and install \nthe desired language if necessary" ; Index: sc/inc/globstr.hrc =================================================================== --- sc/inc/globstr.hrc (revision 1651613) +++ sc/inc/globstr.hrc (working copy) @@ -581,7 +581,9 @@ #define STR_DPFIELD_GROUP_BY_QUARTERS 445 #define STR_DPFIELD_GROUP_BY_YEARS 446 -#define STR_COUNT 447 +#define STR_STYLENAME_LANDSCAPE 447 +#define STR_COUNT 448 + #endif Index: sc/source/ui/unoobj/styleuno.cxx =================================================================== --- sc/source/ui/unoobj/styleuno.cxx (revision 1651613) +++ sc/source/ui/unoobj/styleuno.cxx (working copy) @@ -407,6 +407,7 @@ #define SC_STYLE_PROG_HEADLINE "Heading" #define SC_STYLE_PROG_HEADLINE1 "Heading1" #define SC_STYLE_PROG_REPORT "Report" +#define SC_STYLE_PROG_LANDSCAPE "Landscape" struct ScDisplayNameMap { @@ -446,7 +447,7 @@ else if ( nType == SFX_STYLE_FAMILY_PAGE ) { static sal_Bool bPageMapFilled = sal_False; - static ScDisplayNameMap aPageMap[3]; + static ScDisplayNameMap aPageMap[4]; if ( !bPageMapFilled ) { aPageMap[0].aDispName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD ); @@ -455,6 +456,9 @@ aPageMap[1].aDispName = ScGlobal::GetRscString( STR_STYLENAME_REPORT ); aPageMap[1].aProgName = String::CreateFromAscii( SC_STYLE_PROG_REPORT ); + aPageMap[2].aDispName = ScGlobal::GetRscString( STR_STYLENAME_LANDSCAPE ); + aPageMap[2].aProgName = String::CreateFromAscii( SC_STYLE_PROG_LANDSCAPE ); + // last entry remains empty bPageMapFilled = sal_True; Index: sc/inc/sc.hrc =================================================================== --- sc/inc/sc.hrc (revision 1651613) +++ sc/inc/sc.hrc (working copy) @@ -76,6 +76,7 @@ #define HID_SC_SHEET_CELL_UEB1 (HID_SC_SHEET_START +4 ) #define HID_SC_SHEET_PAGE_STD (HID_SC_SHEET_START +10 ) #define HID_SC_SHEET_PAGE_REP (HID_SC_SHEET_START +11 ) +#define HID_SC_SHEET_PAGE_LANDSCAPE (HID_SC_SHEET_START +12 ) // Hilfe IDs fuer Shells (Helferlein) (max.20) ------------------------------- #define HID_SCSHELL_APP (HID_SC_SHELL_START +0 )