summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/inc/cuitabline.hxx5
-rw-r--r--cui/source/tabpages/tabline.cxx119
-rw-r--r--cui/source/tabpages/tabline.hrc29
-rw-r--r--cui/source/tabpages/tabline.src72
-rw-r--r--cui/source/tabpages/tpline.cxx1
-rw-r--r--cui/source/tabpages/tplnedef.cxx1
-rw-r--r--cui/source/tabpages/tplneend.cxx1
-rw-r--r--cui/uiconfig/ui/linedialog.ui161
10 files changed, 226 insertions, 165 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 45818b963d36..b8ee0c003df8 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -77,7 +77,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/paragrph.src \
cui/source/tabpages/strings.src \
cui/source/tabpages/swpossizetabpage.src \
- cui/source/tabpages/tabline.src \
cui/source/tabpages/textanim.src \
cui/source/tabpages/textattr.src \
cui/source/tabpages/transfrm.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index b36425ee58be..2c79f77a8f35 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/insertoleobject \
cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/insertrowcolumn \
+ cui/uiconfig/ui/linedialog \
cui/uiconfig/ui/linetabpage \
cui/uiconfig/ui/lineendstabpage \
cui/uiconfig/ui/linestyletabpage \
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 0a03598ba3d9..19f47b395e27 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -25,6 +25,11 @@
class SvxLineTabDialog : public SfxTabDialog
{
+ sal_uInt16 m_nLineTabPage;
+ sal_uInt16 m_nShadowTabPage;
+ sal_uInt16 m_nStyleTabPage;
+ sal_uInt16 m_nEndTabPage;
+
private:
SdrModel* pDrawModel;
const SdrObject* pObj;
diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx
index f213077d6296..fdc2cbe47ce9 100644
--- a/cui/source/tabpages/tabline.cxx
+++ b/cui/source/tabpages/tabline.cxx
@@ -25,7 +25,6 @@
#include <svx/dialogs.hrc>
#include <cuires.hrc>
-#include "tabline.hrc"
#include "cuitabarea.hxx"
#include "cuitabline.hxx"
@@ -44,7 +43,14 @@ SvxLineTabDialog::SvxLineTabDialog
sal_Bool bHasObj
) :
- SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_LINE ), pAttr ),
+ SfxTabDialog ( pParent
+ , "LineDialog"
+ , "cui/ui/linedialog.ui"
+ , pAttr ),
+ m_nLineTabPage(0),
+ m_nShadowTabPage(0),
+ m_nStyleTabPage(0),
+ m_nEndTabPage(0),
pDrawModel ( pModel ),
pObj ( pSdrObj ),
rOutAttrs ( *pAttr ),
@@ -64,8 +70,6 @@ SvxLineTabDialog::SvxLineTabDialog
nPosLineEndLb( 0 ),
mbAreaTP( sal_False )
{
- FreeResource();
-
bool bLineOnly = false;
if( pObj && pObj->GetObjInventor() == SdrInventor )
{
@@ -85,16 +89,16 @@ SvxLineTabDialog::SvxLineTabDialog
}
- AddTabPage( RID_SVXPAGE_LINE, SvxLineTabPage::Create, 0);
+ m_nLineTabPage = AddTabPage( "RID_SVXPAGE_LINE", SvxLineTabPage::Create, 0);
if( bLineOnly )
- AddTabPage( RID_SVXPAGE_SHADOW, SvxShadowTabPage::Create, 0 );
+ m_nShadowTabPage = AddTabPage( "RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, 0 );
else
- RemoveTabPage( RID_SVXPAGE_SHADOW );
+ RemoveTabPage( "RID_SVXPAGE_SHADOW" );
- AddTabPage( RID_SVXPAGE_LINE_DEF, SvxLineDefTabPage::Create, 0);
- AddTabPage( RID_SVXPAGE_LINEEND_DEF, SvxLineEndDefTabPage::Create, 0);
+ m_nStyleTabPage = AddTabPage( "RID_SVXPAGE_LINE_DEF", SvxLineDefTabPage::Create, 0);
+ m_nEndTabPage = AddTabPage( "RID_SVXPAGE_LINEEND_DEF", SvxLineEndDefTabPage::Create, 0);
- SetCurPageId( RID_SVXPAGE_LINE );
+ SetCurPageId( "RID_SVXPAGE_LINE" );
CancelButton& rBtnCancel = GetCancelButton();
rBtnCancel.SetClickHdl( LINK( this, SvxLineTabDialog, CancelHdlImpl ) );
@@ -194,58 +198,53 @@ IMPL_LINK_NOARG_INLINE_END(SvxLineTabDialog, CancelHdlImpl)
void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
- switch( nId )
+ if( nId == m_nLineTabPage)
{
- case RID_SVXPAGE_LINE:
- ( (SvxLineTabPage&) rPage ).SetColorList( pColorList );
- ( (SvxLineTabPage&) rPage ).SetDashList( pDashList );
- ( (SvxLineTabPage&) rPage ).SetLineEndList( pLineEndList );
- ( (SvxLineTabPage&) rPage ).SetDlgType( nDlgType );
- ( (SvxLineTabPage&) rPage ).SetPageType( nPageType );
- ( (SvxLineTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
- ( (SvxLineTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb );
- ( (SvxLineTabPage&) rPage ).SetDashChgd( &nDashListState );
- ( (SvxLineTabPage&) rPage ).SetLineEndChgd( &nLineEndListState );
- ( (SvxLineTabPage&) rPage ).SetObjSelected( bObjSelected );
- ( (SvxLineTabPage&) rPage ).Construct();
- ( (SvxLineTabPage&) rPage ).SetColorChgd( &mnColorListState );
- // ActivatePage() is not called the first time
- ( (SvxLineTabPage&) rPage ).ActivatePage( rOutAttrs );
- break;
-
- case RID_SVXPAGE_LINE_DEF:
- ( (SvxLineDefTabPage&) rPage ).SetDashList( pDashList );
- ( (SvxLineDefTabPage&) rPage ).SetDlgType( &nDlgType );
- ( (SvxLineDefTabPage&) rPage ).SetPageType( &nPageType );
- ( (SvxLineDefTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
- ( (SvxLineDefTabPage&) rPage ).SetDashChgd( &nDashListState );
- ( (SvxLineDefTabPage&) rPage ).SetObjSelected( bObjSelected );
- ( (SvxLineDefTabPage&) rPage ).Construct();
- break;
-
- case RID_SVXPAGE_LINEEND_DEF:
- ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( pLineEndList );
- ( (SvxLineEndDefTabPage&) rPage ).SetPolyObj( pObj );
- ( (SvxLineEndDefTabPage&) rPage ).SetDlgType( &nDlgType );
- ( (SvxLineEndDefTabPage&) rPage ).SetPageType( &nPageType );
- ( (SvxLineEndDefTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb );
- ( (SvxLineEndDefTabPage&) rPage ).SetLineEndChgd( &nLineEndListState );
- ( (SvxLineEndDefTabPage&) rPage ).SetObjSelected( bObjSelected );
- ( (SvxLineEndDefTabPage&) rPage ).Construct();
- break;
-
- case RID_SVXPAGE_SHADOW:
- {
- ( (SvxShadowTabPage&) rPage ).SetColorList( pColorList );
- ( (SvxShadowTabPage&) rPage ).SetPageType( nPageType );
- ( (SvxShadowTabPage&) rPage ).SetDlgType( nDlgType );
- ( (SvxShadowTabPage&) rPage ).SetAreaTP( &mbAreaTP );
- ( (SvxShadowTabPage&) rPage ).SetColorChgd( &mnColorListState );
- ( (SvxShadowTabPage&) rPage ).Construct();
- }
- break;
+ ( (SvxLineTabPage&) rPage ).SetColorList( pColorList );
+ ( (SvxLineTabPage&) rPage ).SetDashList( pDashList );
+ ( (SvxLineTabPage&) rPage ).SetLineEndList( pLineEndList );
+ ( (SvxLineTabPage&) rPage ).SetDlgType( nDlgType );
+ ( (SvxLineTabPage&) rPage ).SetPageType( nPageType );
+ ( (SvxLineTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
+ ( (SvxLineTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb );
+ ( (SvxLineTabPage&) rPage ).SetDashChgd( &nDashListState );
+ ( (SvxLineTabPage&) rPage ).SetLineEndChgd( &nLineEndListState );
+ ( (SvxLineTabPage&) rPage ).SetObjSelected( bObjSelected );
+ ( (SvxLineTabPage&) rPage ).Construct();
+ ( (SvxLineTabPage&) rPage ).SetColorChgd( &mnColorListState );
+ // ActivatePage() is not called the first time
+ ( (SvxLineTabPage&) rPage ).ActivatePage( rOutAttrs );
+ }
+ else if(nId == m_nStyleTabPage)
+ {
+ ( (SvxLineDefTabPage&) rPage ).SetDashList( pDashList );
+ ( (SvxLineDefTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxLineDefTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxLineDefTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
+ ( (SvxLineDefTabPage&) rPage ).SetDashChgd( &nDashListState );
+ ( (SvxLineDefTabPage&) rPage ).SetObjSelected( bObjSelected );
+ ( (SvxLineDefTabPage&) rPage ).Construct();
+ }
+ else if(nId == m_nEndTabPage)
+ {
+ ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( pLineEndList );
+ ( (SvxLineEndDefTabPage&) rPage ).SetPolyObj( pObj );
+ ( (SvxLineEndDefTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxLineEndDefTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxLineEndDefTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb );
+ ( (SvxLineEndDefTabPage&) rPage ).SetLineEndChgd( &nLineEndListState );
+ ( (SvxLineEndDefTabPage&) rPage ).SetObjSelected( bObjSelected );
+ ( (SvxLineEndDefTabPage&) rPage ).Construct();
+ }
+ else if (nId == m_nShadowTabPage)
+ {
+ ( (SvxShadowTabPage&) rPage ).SetColorList( pColorList );
+ ( (SvxShadowTabPage&) rPage ).SetPageType( nPageType );
+ ( (SvxShadowTabPage&) rPage ).SetDlgType( nDlgType );
+ ( (SvxShadowTabPage&) rPage ).SetAreaTP( &mbAreaTP );
+ ( (SvxShadowTabPage&) rPage ).SetColorChgd( &mnColorListState );
+ ( (SvxShadowTabPage&) rPage ).Construct();
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tabline.hrc b/cui/source/tabpages/tabline.hrc
deleted file mode 100644
index b4b2ee9ee112..000000000000
--- a/cui/source/tabpages/tabline.hrc
+++ /dev/null
@@ -1,29 +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_CONTROL 1
-#define STR_START_TYPE 36
-#define STR_END_TYPE 37
-#define STR_START_NUM 38
-#define STR_END_NUM 39
-#define STR_START_LENGTH 40
-#define STR_END_LENGTH 41
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tabline.src b/cui/source/tabpages/tabline.src
deleted file mode 100644
index 3f6ffd8e3fc9..000000000000
--- a/cui/source/tabpages/tabline.src
+++ /dev/null
@@ -1,72 +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 <cuires.hrc>
-#include "helpid.hrc"
-#include "tabline.hrc"
-#include <svx/dialogs.hrc>
-
-// Selecting LineStyle / Color / Width --------------------
-
-#define MASKCOLOR MaskColor = Color{ Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
-
- // RID_SVXDLG_LINE ----------------------------------------------------------
-TabDialog RID_SVXDLG_LINE
-{
- OutputSize = TRUE ;
- SvLook = TRUE ;
- Size = MAP_APPFONT ( 289 , 176 ) ;
- Text [ en-US ] = "Line" ;
- Moveable = TRUE ;
- TabControl TAB_CONTROL
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 3 , 3 ) ;
- Size = MAP_APPFONT ( 260 , 135 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = RID_SVXPAGE_LINE ;
- Text [ en-US ] = "Line" ;
- PageResID = RID_SVXPAGE_LINE ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_SHADOW ;
- PageResID = RID_SVXPAGE_SHADOW ;
- Text [ en-US ] = "Shadow" ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_LINE_DEF ;
- Text [ en-US ] = "Line Styles" ;
- PageResID = RID_SVXPAGE_LINE_DEF ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_LINEEND_DEF ;
- Text [ en-US ] = "Arrow Styles" ;
- PageResID = RID_SVXPAGE_LINEEND_DEF ;
- };
- };
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 4aa9f57ba6fa..458b6b920d93 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -24,7 +24,6 @@
#include <sfx2/module.hxx>
#include <cuires.hrc>
-#include "tabline.hrc"
#include "svx/xattr.hxx"
#include <svx/xpool.hxx>
#include <svx/xtable.hxx>
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 399994ca9fcc..5adb24710999 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -27,7 +27,6 @@
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <cuires.hrc>
-#include "tabline.hrc"
#include "helpid.hrc"
#include "svx/xattr.hxx"
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 5ac75388000f..9623f38f65d9 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -26,7 +26,6 @@
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <cuires.hrc>
-#include "tabline.hrc"
#include "helpid.hrc"
#include <svx/dialmgr.hxx>
#include <svx/svdobj.hxx>
diff --git a/cui/uiconfig/ui/linedialog.ui b/cui/uiconfig/ui/linedialog.ui
new file mode 100644
index 000000000000..48fa94b393a1
--- /dev/null
+++ b/cui/uiconfig/ui/linedialog.ui
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="LineDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Line</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_LINE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Line</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="RID_SVXPAGE_SHADOW">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Shadow</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_LINE_DEF">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Line Styles</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="RID_SVXPAGE_LINEEND_DEF">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Arrow Styles</property>
+ </object>
+ <packing>
+ <property name="position">3</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>