diff options
-rw-r--r-- | sd/AllLangResTarget_sd.mk | 1 | ||||
-rw-r--r-- | sd/UIConfig_sdraw.mk | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlg_char.src | 84 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgchar.cxx | 42 | ||||
-rw-r--r-- | sd/source/ui/inc/dlg_char.hrc | 21 | ||||
-rw-r--r-- | sd/source/ui/inc/dlg_char.hxx | 6 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/drawchardialog.ui | 147 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/drawpagedialog.ui | 1 |
8 files changed, 173 insertions, 130 deletions
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 <svx/dialogs.hrc> -#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 <editeng/flstitem.hxx> #include <svx/flagsdef.hxx> #include <sfx2/objsh.hxx> +#include <svx/svxdlg.hxx> #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) ) ) ); - - 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; + SvxFontListItem aItem(*( (const SvxFontListItem*) ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) ); - 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 <sfx2/tabdlg.hxx> -#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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="DrawCharDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Character</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="reset"> + <property name="label">gtk-revert-to-saved</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkNotebook" id="tabcontrol"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="RID_SVXPAGE_CHAR_NAME"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Fonts</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="RID_SVXPAGE_CHAR_EFFECTS"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Font Effects</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="RID_SVXPAGE_CHAR_POSITION"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Position</property> + </object> + <packing> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + <action-widget response="0">reset</action-widget> + </action-widgets> + </object> +</interface> 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 @@ <object class="GtkDialog" id="DrawPageDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> + <property name="title" translatable="yes">Page Setup</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> |