2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 13:42:27 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:42:27 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:42:27 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:42:27 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:42:27 -05:00
|
|
|
* OpenOffice.org 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 version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:42:27 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 12:38:18 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
|
|
|
|
2004-08-23 02:15:49 -05:00
|
|
|
#ifdef SD_DLLIMPLEMENTATION
|
|
|
|
#undef SD_DLLIMPLEMENTATION
|
|
|
|
#endif
|
|
|
|
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/intitem.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#ifndef _SVX_DIALOGS_HRC
|
|
|
|
#include <svx/dialogs.hrc>
|
|
|
|
#endif
|
|
|
|
#include <svx/tabarea.hxx>
|
|
|
|
#include <svx/drawitem.hxx>
|
|
|
|
|
|
|
|
#ifndef _SD_SDRESID_HXX
|
|
|
|
#include "sdresid.hxx"
|
|
|
|
#endif
|
|
|
|
#include "dlgpage.hxx"
|
|
|
|
|
2004-01-20 03:43:36 -06:00
|
|
|
#include "DrawDocShell.hxx"
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/aeitem.hxx>
|
2006-12-12 10:04:01 -06:00
|
|
|
#include <svx/flagsdef.hxx>
|
2010-01-08 11:32:51 -06:00
|
|
|
#include <editeng/svxenum.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, BOOL bAreaPage ) :
|
|
|
|
SfxTabDialog ( pParent, SdResId( TAB_PAGE ), pAttr ),
|
2006-12-12 10:04:01 -06:00
|
|
|
mrOutAttrs ( *pAttr ),
|
|
|
|
mpDocShell ( pDocSh )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
SvxColorTableItem aColorTableItem(*( (const SvxColorTableItem*)
|
2006-12-12 10:04:01 -06:00
|
|
|
( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ) );
|
2000-09-18 11:07:07 -05:00
|
|
|
SvxGradientListItem aGradientListItem(*( (const SvxGradientListItem*)
|
2006-12-12 10:04:01 -06:00
|
|
|
( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) ) );
|
2000-09-18 11:07:07 -05:00
|
|
|
SvxBitmapListItem aBitmapListItem(*( (const SvxBitmapListItem*)
|
2006-12-12 10:04:01 -06:00
|
|
|
( mpDocShell->GetItem( SID_BITMAP_LIST ) ) ) );
|
2000-09-18 11:07:07 -05:00
|
|
|
SvxHatchListItem aHatchListItem(*( (const SvxHatchListItem*)
|
2006-12-12 10:04:01 -06:00
|
|
|
( mpDocShell->GetItem( SID_HATCH_LIST ) ) ) );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-12 10:04:01 -06:00
|
|
|
mpColorTab = aColorTableItem.GetColorTable();
|
|
|
|
mpGradientList = aGradientListItem.GetGradientList();
|
|
|
|
mpHatchingList = aHatchListItem.GetHatchList();
|
|
|
|
mpBitmapList = aBitmapListItem.GetBitmapList();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
FreeResource();
|
|
|
|
|
2006-12-12 10:04:01 -06:00
|
|
|
AddTabPage( RID_SVXPAGE_PAGE);
|
|
|
|
AddTabPage( RID_SVXPAGE_AREA);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2001-06-06 09:13:55 -05:00
|
|
|
if(!bAreaPage) // I have to add the page before I remove it !
|
2000-09-18 11:07:07 -05:00
|
|
|
RemoveTabPage( RID_SVXPAGE_AREA );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Seite wird erzeugt
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void SdPageDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
|
|
|
|
{
|
2004-05-10 09:43:46 -05:00
|
|
|
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
|
2000-09-18 11:07:07 -05:00
|
|
|
switch(nId)
|
|
|
|
{
|
|
|
|
case RID_SVXPAGE_PAGE:
|
2006-12-12 10:04:01 -06:00
|
|
|
aSet.Put (SfxAllEnumItem((const USHORT)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION));
|
2009-06-12 04:36:34 -05:00
|
|
|
aSet.Put (SfxAllEnumItem((const USHORT)SID_PAPER_START, PAPER_A0));
|
|
|
|
aSet.Put (SfxAllEnumItem((const USHORT)SID_PAPER_END, PAPER_E));
|
2006-12-12 10:04:01 -06:00
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
break;
|
|
|
|
case RID_SVXPAGE_AREA:
|
2006-12-12 10:04:01 -06:00
|
|
|
aSet.Put (SvxColorTableItem(mpColorTab,SID_COLOR_TABLE));
|
|
|
|
aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
|
|
|
|
aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
|
|
|
|
aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
|
2004-02-03 13:13:35 -06:00
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|