Kaydet (Commit) be4035d0 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert callout tabdialog to .ui

Change-Id: If16ddb848eb0a46d0d5d91cb6366a6e268cd1b7a
üst 79283929
......@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/border.src \
cui/source/tabpages/dstribut.src \
cui/source/tabpages/frmdirlbox.src \
cui/source/tabpages/labdlg.src \
cui/source/tabpages/macroass.src \
cui/source/tabpages/page.src \
cui/source/tabpages/paragrph.src \
......
......@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/borderbackgrounddialog \
cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/breaknumberoption \
cui/uiconfig/ui/calloutdialog \
cui/uiconfig/ui/calloutpage \
cui/uiconfig/ui/cellalignment \
cui/uiconfig/ui/charnamepage \
......
......@@ -40,8 +40,6 @@
// RID_CUI_GALLERY_END (RID_SVX_START + 410)
// used in "tabpages"
#define RID_SVXDLG_LINE (RID_SVX_START + 50)
#define RID_SVXDLG_CAPTION (RID_SVX_START + 151)
#define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142)
#define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143)
#define RID_SVXSTR_TABLE_PRESET_NONE (RID_SVX_START + 969)
......
......@@ -93,22 +93,22 @@ public:
class SvxCaptionTabDialog : public SfxTabDialog
{
private:
const SdrView* pView;
sal_uInt16 nAnchorCtrls;
const SdrView* pView;
sal_uInt16 nAnchorCtrls;
sal_uInt16 m_nSwPosSizePageId;
sal_uInt16 m_nPositionSizePageId;
sal_uInt16 m_nCaptionPageId;
Link aValidateLink;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
sal_uInt16 nAnchorTypes = 0);
SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
sal_uInt16 nAnchorTypes = 0 );
~SvxCaptionTabDialog();
/// link for the Writer to validate positions
void SetValidateFramePosLink( const Link& rLink );
/// link for the Writer to validate positions
void SetValidateFramePosLink( const Link& rLink );
};
......
......@@ -34,7 +34,6 @@
#include <svx/sxctitm.hxx>
#include "svx/dlgutil.hxx"
#include "labdlg.hrc"
#include "labdlg.hxx"
#include "transfrm.hxx"
......@@ -508,65 +507,56 @@ void SvxCaptionTabPage::FillValueSet()
//========================================================================
SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, sal_uInt16 nAnchorTypes)
: SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_CAPTION ) ),
pView ( pSdrView ),
nAnchorCtrls(nAnchorTypes)
SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView,
sal_uInt16 nAnchorTypes)
: SfxTabDialog( pParent, "CalloutDialog", "cui/ui/calloutdialog.ui")
, pView(pSdrView)
, nAnchorCtrls(nAnchorTypes)
, m_nSwPosSizePageId(0)
, m_nPositionSizePageId(0)
, m_nCaptionPageId(0)
{
FreeResource();
DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
assert(pView); //Keine gueltige View Uebergeben!
//different positioning page in Writer
if(nAnchorCtrls & 0x00ff )
if (nAnchorCtrls & 0x00ff)
{
AddTabPage( RID_SVXPAGE_SWPOSSIZE, SvxSwPosSizeTabPage::Create,
SvxSwPosSizeTabPage::GetRanges );
RemoveTabPage( RID_SVXPAGE_POSITION_SIZE);
m_nSwPosSizePageId = AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create,
SvxSwPosSizeTabPage::GetRanges );
RemoveTabPage("RID_SVXPAGE_POSITION_SIZE");
}
else
{
AddTabPage( RID_SVXPAGE_POSITION_SIZE, SvxPositionSizeTabPage::Create,
SvxPositionSizeTabPage::GetRanges );
RemoveTabPage( RID_SVXPAGE_SWPOSSIZE );
m_nPositionSizePageId = AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create,
SvxPositionSizeTabPage::GetRanges );
RemoveTabPage("RID_SVXPAGE_SWPOSSIZE");
}
AddTabPage( RID_SVXPAGE_CAPTION, SvxCaptionTabPage::Create,
SvxCaptionTabPage::GetRanges );
m_nCaptionPageId = AddTabPage("RID_SVXPAGE_CAPTION", SvxCaptionTabPage::Create,
SvxCaptionTabPage::GetRanges );
}
// -----------------------------------------------------------------------
SvxCaptionTabDialog::~SvxCaptionTabDialog()
{
}
// -----------------------------------------------------------------------
void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
switch( nId )
if (nId == m_nPositionSizePageId)
{
case RID_SVXPAGE_POSITION_SIZE:
( (SvxPositionSizeTabPage&) rPage ).SetView( pView );
( (SvxPositionSizeTabPage&) rPage ).Construct();
if( nAnchorCtrls & SVX_OBJ_NORESIZE )
( (SvxPositionSizeTabPage&) rPage ).DisableResize();
if( nAnchorCtrls & SVX_OBJ_NOPROTECT )
( (SvxPositionSizeTabPage&) rPage ).DisableProtect();
break;
case RID_SVXPAGE_SWPOSSIZE :
{
SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage);
rSwPage.EnableAnchorTypes(nAnchorCtrls);
rSwPage.SetValidateFramePosLink( aValidateLink );
}
break;
( (SvxPositionSizeTabPage&) rPage ).SetView( pView );
( (SvxPositionSizeTabPage&) rPage ).Construct();
if( nAnchorCtrls & SVX_OBJ_NORESIZE )
( (SvxPositionSizeTabPage&) rPage ).DisableResize();
case RID_SVXPAGE_CAPTION:
( (SvxCaptionTabPage&) rPage ).SetView( pView );
( (SvxCaptionTabPage&) rPage ).Construct();
break;
if( nAnchorCtrls & SVX_OBJ_NOPROTECT )
( (SvxPositionSizeTabPage&) rPage ).DisableProtect();
}
else if (nId == m_nSwPosSizePageId)
{
SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage);
rSwPage.EnableAnchorTypes(nAnchorCtrls);
rSwPage.SetValidateFramePosLink( aValidateLink );
}
else if (nId == m_nCaptionPageId)
{
( (SvxCaptionTabPage&) rPage ).SetView( pView );
( (SvxCaptionTabPage&) rPage ).Construct();
}
}
......
/* -*- 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>
#define TAB_CONTROL 1
#define BTN_OK 1
#define BTN_CANCEL 1
#define BTN_HELP 1
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 "helpid.hrc"
#include "labdlg.hrc"
#include <svx/dialogs.hrc>
#define _POS_SIZE_TEXT \
Text [ en-US ] = "Position and Size" ; \
TabDialog RID_SVXDLG_CAPTION
{
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 237 , 161 ) ;
Text [ en-US ] = "Callouts" ;\
Moveable = TRUE ;
TabControl TAB_CONTROL\
{
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( 189 , 97 ) ;
PageList =
{
PageItem\
{
Identifier = RID_SVXPAGE_POSITION_SIZE ;
PageResID = RID_SVXPAGE_POSITION_SIZE ;
_POS_SIZE_TEXT
};
PageItem
{
Identifier = RID_SVXPAGE_SWPOSSIZE;
PageResID = RID_SVXPAGE_SWPOSSIZE;
_POS_SIZE_TEXT
};
PageItem
{
Identifier = RID_SVXPAGE_CAPTION ;
PageResID = RID_SVXPAGE_CAPTION ;
Text [ en-US ] = "Callout" ;
};
};
};
};
// ********************************************************************** EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Sun Jan 5 22:45:32 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="CalloutDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Position and size</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_POSITION_SIZE">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Position and Size</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_SWPOSSIZE">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Position and Size</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_CAPTION">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Callout</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>
......@@ -82,8 +82,6 @@
#define RID_SVXPAGE_PICK_BULLET (RID_SVX_START + 216)
#define RID_SVXPAGE_PICK_NUM (RID_SVX_START + 217)
#define RID_SVXPAGE_PICK_BMP (RID_SVX_START + 218)
#define RID_SVXPAGE_CAPTION (RID_SVX_START + 150)
#define RID_SVXPAGE_SWPOSSIZE (RID_SVX_START + 288)
#define RID_SVXPAGE_POSITION_SIZE (RID_SVX_START + 87)
#define RID_SVXPAGE_EVENTASSIGN (RID_SVX_START + 303)
#define RID_SVXPAGE_HATCH (RID_SVX_START + 57)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment