2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 13:56:16 -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:56:16 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:56:16 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 13:56:16 -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:56:16 -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:56:16 -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:43:31 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
|
|
|
|
2004-08-23 02:19:19 -05:00
|
|
|
#ifdef SD_DLLIMPLEMENTATION
|
|
|
|
#undef SD_DLLIMPLEMENTATION
|
|
|
|
#endif
|
|
|
|
|
2010-01-08 11:32:51 -06:00
|
|
|
#include <editeng/flstitem.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-12 10:10:17 -06:00
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
|
|
|
|
#include <svx/drawitem.hxx>
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/intitem.hxx>
|
2006-12-12 10:10:17 -06:00
|
|
|
#include <svx/ofaitem.hxx>
|
|
|
|
#include <svx/svxgrahicitem.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <svx/svdmodel.hxx>
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/cjkoptions.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
#include <svx/dialogs.hrc>
|
|
|
|
|
2004-02-03 13:14:09 -06:00
|
|
|
#include <svx/svxdlg.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <svx/tabline.hxx>
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/style.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <svx/xtable.hxx>
|
|
|
|
|
2004-01-20 03:51:22 -06:00
|
|
|
#include "DrawDocShell.hxx"
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "tabtempl.hxx"
|
|
|
|
#include "tabtempl.hrc"
|
|
|
|
#include "sdresid.hxx"
|
|
|
|
#include "dlg_char.hxx"
|
|
|
|
#include "paragr.hxx"
|
2006-12-12 10:10:17 -06:00
|
|
|
#include <svx/flagsdef.hxx>
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
SdTabTemplateDlg::SdTabTemplateDlg( Window* pParent,
|
|
|
|
const SfxObjectShell* pDocShell,
|
|
|
|
SfxStyleSheetBase& rStyleBase,
|
|
|
|
SdrModel* pModel,
|
|
|
|
SdrView* pView ) :
|
|
|
|
SfxStyleDialog ( pParent, SdResId( TAB_TEMPLATE ), rStyleBase, FALSE ),
|
2006-12-12 10:10:17 -06:00
|
|
|
rDocShell ( *pDocShell ),
|
|
|
|
pSdrView ( pView ),
|
2000-09-18 11:07:07 -05:00
|
|
|
pColorTab ( pModel->GetColorTable() ),
|
|
|
|
pGradientList ( pModel->GetGradientList() ),
|
|
|
|
pHatchingList ( pModel->GetHatchList() ),
|
|
|
|
pBitmapList ( pModel->GetBitmapList() ),
|
2006-12-12 10:10:17 -06:00
|
|
|
pDashList ( pModel->GetDashList() ),
|
|
|
|
pLineEndList ( pModel->GetLineEndList() )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
FreeResource();
|
|
|
|
|
|
|
|
// Listbox fuellen und Select-Handler ueberladen
|
|
|
|
|
2006-12-12 10:10:17 -06:00
|
|
|
AddTabPage( RID_SVXPAGE_LINE);
|
|
|
|
AddTabPage( RID_SVXPAGE_AREA);
|
|
|
|
AddTabPage( RID_SVXPAGE_SHADOW);
|
|
|
|
AddTabPage( RID_SVXPAGE_TRANSPARENCE);
|
|
|
|
AddTabPage( RID_SVXPAGE_CHAR_NAME );
|
|
|
|
AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
|
|
|
|
AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
|
|
|
|
AddTabPage( RID_SVXPAGE_TEXTATTR );
|
2004-02-03 13:14:09 -06:00
|
|
|
AddTabPage( RID_SVXPAGE_TEXTANIMATION );
|
2006-12-12 10:10:17 -06:00
|
|
|
AddTabPage( RID_SVXPAGE_MEASURE);
|
|
|
|
AddTabPage( RID_SVXPAGE_CONNECTION);
|
|
|
|
AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
|
|
|
|
AddTabPage( RID_SVXPAGE_TABULATOR );
|
2004-04-07 05:11:14 -05:00
|
|
|
SvtCJKOptions aCJKOptions;
|
|
|
|
if( aCJKOptions.IsAsianTypographyEnabled() )
|
2004-05-12 09:13:50 -05:00
|
|
|
AddTabPage( RID_SVXPAGE_PARA_ASIAN );
|
2004-04-07 05:11:14 -05:00
|
|
|
else
|
|
|
|
RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
nDlgType = 1;
|
|
|
|
nPageType = 0;
|
|
|
|
nPos = 0;
|
|
|
|
|
|
|
|
nColorTableState = CT_NONE;
|
|
|
|
nBitmapListState = CT_NONE;
|
|
|
|
nGradientListState = CT_NONE;
|
|
|
|
nHatchingListState = CT_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
SdTabTemplateDlg::~SdTabTemplateDlg()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-05-16 02:10:24 -05:00
|
|
|
void SdTabTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2004-11-03 09:44:47 -06:00
|
|
|
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
|
2000-09-18 11:07:07 -05:00
|
|
|
switch( nId )
|
|
|
|
{
|
|
|
|
case RID_SVXPAGE_LINE:
|
2004-02-03 13:14:09 -06:00
|
|
|
aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
|
|
|
|
aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST));
|
|
|
|
aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
rPage.PageCreated(aSet);
|
|
|
|
break;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
case RID_SVXPAGE_AREA:
|
2004-02-03 13:14:09 -06:00
|
|
|
aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
|
|
|
|
aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST));
|
|
|
|
aSet.Put (SvxHatchListItem(pHatchingList,SID_HATCH_LIST));
|
|
|
|
aSet.Put (SvxBitmapListItem(pBitmapList,SID_BITMAP_LIST));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,nPos));
|
|
|
|
rPage.PageCreated(aSet);
|
|
|
|
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_SHADOW:
|
2004-02-03 13:14:09 -06:00
|
|
|
aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE)); //add CHINA001
|
|
|
|
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
rPage.PageCreated(aSet);
|
|
|
|
break;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
case RID_SVXPAGE_TRANSPARENCE:
|
2004-02-03 13:14:09 -06:00
|
|
|
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
break;
|
|
|
|
|
2000-11-27 01:15:56 -06:00
|
|
|
case RID_SVXPAGE_CHAR_NAME:
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
SvxFontListItem aItem(*( (const SvxFontListItem*)
|
|
|
|
( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
|
|
|
|
|
2004-05-10 10:04:16 -05:00
|
|
|
aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
|
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-05-16 02:10:24 -05:00
|
|
|
case RID_SVXPAGE_CHAR_EFFECTS:
|
2006-12-12 10:10:17 -06:00
|
|
|
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
|
2004-05-10 10:04:16 -05:00
|
|
|
rPage.PageCreated(aSet);
|
2001-05-16 02:10:24 -05:00
|
|
|
break;
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
case RID_SVXPAGE_STD_PARAGRAPH:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_TEXTATTR:
|
|
|
|
{
|
2006-12-12 10:10:17 -06:00
|
|
|
aSet.Put(OfaPtrItem(SID_SVXTEXTATTRPAGE_VIEW,pSdrView));
|
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_TEXTANIMATION:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_MEASURE:
|
2006-12-12 10:10:17 -06:00
|
|
|
aSet.Put (OfaPtrItem(SID_OBJECT_LIST,pSdrView));
|
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_CONNECTION:
|
|
|
|
{
|
2006-12-12 10:10:17 -06:00
|
|
|
aSet.Put (OfaPtrItem(SID_OBJECT_LIST,pSdrView));
|
|
|
|
rPage.PageCreated(aSet);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2001-05-16 02:10:24 -05:00
|
|
|
const SfxItemSet* SdTabTemplateDlg::GetRefreshedSet()
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2002-08-07 06:43:36 -05:00
|
|
|
SfxItemSet* pRet = GetInputSetImpl();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2002-08-07 06:43:36 -05:00
|
|
|
if( pRet )
|
|
|
|
{
|
|
|
|
pRet->ClearItem();
|
|
|
|
pRet->SetParent( GetStyleSheet().GetItemSet().GetParent() );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
pRet = new SfxItemSet( GetStyleSheet().GetItemSet() );
|
|
|
|
|
|
|
|
return pRet;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|