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