1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #include "precompiled_reportdesign.hxx" 24 25 26 #include <svx/dialogs.hrc> 27 #include <svx/tabarea.hxx> 28 #include <svx/flagsdef.hxx> 29 #include <svx/svxdlg.hxx> 30 #include <editeng/svxenum.hxx> 31 #include "dlgpage.hxx" 32 #include "ModuleHelper.hxx" 33 #include "RptResId.hrc" 34 #include <svl/intitem.hxx> //add CHINA001 35 #include <svl/cjkoptions.hxx> 36 #include <svl/aeitem.hxx> 37 38 namespace rptui 39 { 40 /************************************************************************* 41 |* 42 |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu 43 |* 44 \************************************************************************/ 45 46 ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,sal_uInt16 _nPageId) : 47 SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ), 48 rOutAttrs ( *pAttr ) 49 { 50 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); 51 DBG_ASSERT(pFact, "Dialogdiet fail!"); 52 switch( _nPageId ) 53 { 54 case RID_PAGEDIALOG_BACKGROUND: 55 AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1))); 56 break; 57 case RID_PAGEDIALOG_PAGE: 58 //AddTabPage( RID_SVXPAGE_PAGE,String(ModuleRes(1))); 59 // AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1))); 60 AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 ); 61 AddTabPage(RID_SVXPAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 ); 62 break; 63 case RID_PAGEDIALOG_CHAR: 64 AddTabPage(RID_PAGE_CHAR, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 ); 65 AddTabPage(RID_PAGE_EFFECTS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 ); 66 AddTabPage(RID_PAGE_POSITION, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 ); 67 AddTabPage(RID_PAGE_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 ); 68 AddTabPage(RID_PAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 ); 69 AddTabPage(RID_PAGE_ALIGNMENT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), 0 ); 70 71 break; 72 case RID_PAGEDIALOG_LINE: 73 AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 ); 74 //AddTabPage( RID_SVXPAGE_LINE_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE_DEF ), 0 ); 75 //AddTabPage( RID_SVXPAGE_LINEEND_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINEEND_DEF ), 0 ); 76 break; 77 default: 78 OSL_ENSURE(0,"Unknown page id"); 79 } 80 81 SvtCJKOptions aCJKOptions; 82 if ( !aCJKOptions.IsDoubleLinesEnabled() ) 83 RemoveTabPage(RID_PAGE_TWOLN); 84 85 FreeResource(); 86 } 87 // ============================================================================= 88 } // namespace rptui 89 // ============================================================================= 90