diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index 978c41583588..f177ed124108 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/animobjs.src \ sd/source/ui/dlg/brkdlg.src \ sd/source/ui/dlg/dlgass.src \ - sd/source/ui/dlg/dlg_char.src \ sd/source/ui/dlg/dlgfield.src \ sd/source/ui/dlg/dlgolbul.src \ sd/source/ui/dlg/inspagob.src \ diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index 292955f750a6..8446921b073c 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/dlgsnap \ sd/uiconfig/sdraw/ui/copydlg \ + sd/uiconfig/sdraw/ui/drawchardialog \ sd/uiconfig/sdraw/ui/drawparadialog \ sd/uiconfig/sdraw/ui/drawpagedialog \ sd/uiconfig/sdraw/ui/insertlayer \ diff --git a/sd/source/ui/dlg/dlg_char.src b/sd/source/ui/dlg/dlg_char.src deleted file mode 100644 index 37be74a50ca8..000000000000 --- a/sd/source/ui/dlg/dlg_char.src +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include -#include "dlg_char.hrc" -TabDialog TAB_CHAR -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 289 , 176 ) ; - Text [ en-US ] = "Character" ; - Moveable = TRUE ; - // Closeable = TRUE; // Dieser Dialog enthaelt OK und/oder Cancel Button (KH) - TabControl 1 - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 260 , 135 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_CHAR_NAME ; - Text [ en-US ] = "Font" ; - PageResID = RID_SVXPAGE_CHAR_NAME ; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_EFFECTS ; - Text [ en-US ] = "Font Effects" ; - PageResID = RID_SVXPAGE_CHAR_EFFECTS ; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_POSITION ; - PageResID = RID_SVXPAGE_CHAR_POSITION ; - Text [ en-US ] = "Position"; - }; - }; - }; - OKButton 1 - { - Pos = MAP_APPFONT ( 6 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - CancelButton 1 - { - Pos = MAP_APPFONT ( 60 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton 1 - { - Pos = MAP_APPFONT ( 114 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton 1 - { - Pos = MAP_APPFONT ( 169 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "Return" ; - TabStop = TRUE ; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx index 93821a3c9eb4..05f76fc49d3e 100644 --- a/sd/source/ui/dlg/dlgchar.cxx +++ b/sd/source/ui/dlg/dlgchar.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include "sdresid.hxx" #include "dlg_char.hxx" @@ -32,14 +33,19 @@ */ SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell ) : - SfxTabDialog ( pParent, SdResId( TAB_CHAR ), pAttr ), + SfxTabDialog ( pParent + ,"DrawCharDialog" + ,"modules/sdraw/ui/drawchardialog.ui" + , pAttr ), rDocShell ( *pDocShell ) { - FreeResource(); - AddTabPage( RID_SVXPAGE_CHAR_NAME ); - AddTabPage( RID_SVXPAGE_CHAR_EFFECTS ); - AddTabPage( RID_SVXPAGE_CHAR_POSITION ); + SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); + OSL_ENSURE(pFact, "Dialogdiet fail!"); + + mnCharName = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 ); + mnCharEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 ); + mnCharPosition = AddTabPage( "RID_SVXPAGE_CHAR_POSITION", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 ); } // ----------------------------------------------------------------------- @@ -47,25 +53,17 @@ SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr, void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - switch( nId ) + if (nId == mnCharName) { - case RID_SVXPAGE_CHAR_NAME: - { - SvxFontListItem aItem(*( (const SvxFontListItem*) - ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) ); + SvxFontListItem aItem(*( (const SvxFontListItem*) ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) ); - aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); - rPage.PageCreated(aSet); - } - break; - - case RID_SVXPAGE_CHAR_EFFECTS: - aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); - rPage.PageCreated(aSet); - break; - - default: - break; + aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); + rPage.PageCreated(aSet); + } + else if (nId == mnCharEffects) + { + aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); + rPage.PageCreated(aSet); } } diff --git a/sd/source/ui/inc/dlg_char.hrc b/sd/source/ui/inc/dlg_char.hrc deleted file mode 100644 index fe7d01557a74..000000000000 --- a/sd/source/ui/inc/dlg_char.hrc +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define TAB_CHAR 20600 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/dlg_char.hxx b/sd/source/ui/inc/dlg_char.hxx index 45e93e0b66f1..962d973f71ed 100644 --- a/sd/source/ui/inc/dlg_char.hxx +++ b/sd/source/ui/inc/dlg_char.hxx @@ -23,8 +23,6 @@ #include -#include "dlg_char.hrc" - class SfxItemSet; class SfxObjectShell; @@ -35,6 +33,10 @@ class SfxObjectShell; class SdCharDlg : public SfxTabDialog { private: + sal_uInt16 mnCharName; + sal_uInt16 mnCharEffects; + sal_uInt16 mnCharPosition; + const SfxObjectShell& rDocShell; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); diff --git a/sd/uiconfig/sdraw/ui/drawchardialog.ui b/sd/uiconfig/sdraw/ui/drawchardialog.ui new file mode 100644 index 000000000000..b036a18a27fc --- /dev/null +++ b/sd/uiconfig/sdraw/ui/drawchardialog.ui @@ -0,0 +1,147 @@ + + + + + False + 6 + Character + dialog + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + gtk-revert-to-saved + True + True + True + True + + + False + True + 3 + + + + + False + True + end + 0 + + + + + True + False + True + True + + + + + + True + False + Fonts + + + False + + + + + + + + True + False + Font Effects + + + 1 + False + + + + + + + + True + False + Position + + + 2 + False + + + + + False + True + 1 + + + + + + ok + cancel + help + reset + + + diff --git a/sd/uiconfig/sdraw/ui/drawpagedialog.ui b/sd/uiconfig/sdraw/ui/drawpagedialog.ui index df9e19eac1f1..908f0fba7c95 100644 --- a/sd/uiconfig/sdraw/ui/drawpagedialog.ui +++ b/sd/uiconfig/sdraw/ui/drawpagedialog.ui @@ -4,6 +4,7 @@ False 6 + Page Setup dialog