[Libreoffice-commits] core.git: 2 commits - helpcontent2 sc/AllLangResTarget_sc.mk sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk
Caolán McNamara
caolanm at redhat.com
Mon Dec 30 09:09:57 PST 2013
helpcontent2 | 2
sc/AllLangResTarget_sc.mk | 1
sc/UIConfig_scalc.mk | 1
sc/inc/sc.hrc | 1
sc/source/ui/inc/simpref.hrc | 30 ------
sc/source/ui/inc/simpref.hxx | 11 +-
sc/source/ui/miscdlgs/simpref.cxx | 68 +++++++--------
sc/source/ui/src/simpref.src | 73 ----------------
sc/uiconfig/scalc/ui/simplerefdialog.ui | 139 ++++++++++++++++++++++++++++++++
9 files changed, 177 insertions(+), 149 deletions(-)
New commits:
commit bce780ded4459ed3b20fceda7fd8f1b0523b5227
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 30 16:53:35 2013 +0000
convert simple reference dialog to .ui
Change-Id: I4e58c86aa85b2e1639a047b07156b62c9900153c
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 96be8cb..cfc913c 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -42,7 +42,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/sc.src \
sc/source/ui/src/hdrcont.src \
sc/source/ui/src/scerrors.src \
- sc/source/ui/src/simpref.src \
sc/source/ui/src/miscdlgs.src \
sc/source/ui/src/scstring.src \
sc/source/ui/src/filter.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index e5dff59..7ab5ca2 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -136,6 +136,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/sidebaralignment \
sc/uiconfig/scalc/ui/sidebarnumberformat \
sc/uiconfig/scalc/ui/sidebarcellappearance \
+ sc/uiconfig/scalc/ui/simplerefdialog \
sc/uiconfig/scalc/ui/solverdlg \
sc/uiconfig/scalc/ui/solveroptionsdialog \
sc/uiconfig/scalc/ui/solverprogressdialog \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index b592b51..1f38832 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1078,7 +1078,6 @@
#define RID_SCDLG_HIGHLIGHT_CHANGES (SC_DIALOGS_START + 123)
#define RID_SCPAGE_OPREDLINE (SC_DIALOGS_START + 124)
-#define RID_SCDLG_SIMPLEREF (SC_DIALOGS_START + 125)
#define WID_SIMPLE_REF (SC_DIALOGS_START + 126)
#define RID_POPUP_CHANGES (SC_DIALOGS_START + 127)
diff --git a/sc/source/ui/inc/simpref.hrc b/sc/source/ui/inc/simpref.hrc
deleted file mode 100644
index 28262a7..0000000
--- a/sc/source/ui/inc/simpref.hrc
+++ /dev/null
@@ -1,30 +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 "sc.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 2
-#define BTN_ADD 3
-#define BTN_HELP 4
-#define FT_ASSIGN 10
-#define ED_ASSIGN 11
-#define RB_ASSIGN 12
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index f8a113f..71ff5bc 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -45,13 +45,12 @@ private:
Link aAbortedHdl;
Link aChangeHdl;
- FixedText aFtAssign;
- formula::RefEdit aEdAssign;
- formula::RefButton aRbAssign;
+ FixedText* m_pFtAssign;
+ formula::RefEdit* m_pEdAssign;
+ formula::RefButton* m_pRbAssign;
- OKButton aBtnOk;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
+ OKButton* m_pBtnOk;
+ CancelButton* m_pBtnCancel;
ScDocument* pDoc;
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 502b37d..69ba3a3 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -24,7 +24,6 @@
#include "document.hxx"
#include "scresid.hxx"
#include "globstr.hrc"
-#include "simpref.hrc"
#include "rangenam.hxx"
#include "simpref.hxx"
#include "scmod.hxx"
@@ -37,33 +36,28 @@
| SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE
#define ABS_DREF3D ABS_DREF | SCA_TAB_3D
-//============================================================================
-// class ScSimpleRefDlg
-
-//----------------------------------------------------------------------------
-ScSimpleRefDlg::ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
- ScViewData* ptrViewData )
-
- : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_SIMPLEREF ),
- //
- aFtAssign ( this, ScResId( FT_ASSIGN ) ),
- aEdAssign ( this, this, &aFtAssign, ScResId( ED_ASSIGN ) ),
- aRbAssign ( this, ScResId( RB_ASSIGN ), &aEdAssign, this ),
+ScSimpleRefDlg::ScSimpleRefDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData)
+ : ScAnyRefDlg(pB, pCW, pParent, "SimpleRefDialog", "modules/scalc/ui/simplerefdialog.ui")
+,
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
-
- //
pDoc ( ptrViewData->GetDocument() ),
bAutoReOpen ( sal_True ),
bCloseOnButtonUp( false ),
bSingleCell ( false ),
bMultiSelection ( false )
{
+ get(m_pFtAssign, "area");
+ get(m_pEdAssign, "assign");
+ m_pEdAssign->SetReferences(this, m_pFtAssign);
+ get(m_pRbAssign, "assignref");
+ m_pRbAssign->SetReferences(this, m_pEdAssign);
+
+ get(m_pBtnOk, "ok");
+ get(m_pBtnCancel, "cancel");
+
// damit die Strings in der Resource bei den FixedTexten bleiben koennen:
Init();
- FreeResource();
SetDispatcherLock( sal_True ); // Modal-Modus einschalten
}
@@ -83,14 +77,14 @@ void ScSimpleRefDlg::FillInfo(SfxChildWinInfo& rWinInfo) const
//----------------------------------------------------------------------------
void ScSimpleRefDlg::SetRefString(const OUString &rStr)
{
- aEdAssign.SetText(rStr);
+ m_pEdAssign->SetText(rStr);
}
//----------------------------------------------------------------------------
void ScSimpleRefDlg::Init()
{
- aBtnOk.SetClickHdl ( LINK( this, ScSimpleRefDlg, OkBtnHdl ) );
- aBtnCancel.SetClickHdl ( LINK( this, ScSimpleRefDlg, CancelBtnHdl ) );
+ m_pBtnOk->SetClickHdl ( LINK( this, ScSimpleRefDlg, OkBtnHdl ) );
+ m_pBtnCancel->SetClickHdl ( LINK( this, ScSimpleRefDlg, CancelBtnHdl ) );
bCloseFlag=false;
}
@@ -99,10 +93,10 @@ void ScSimpleRefDlg::Init()
// neue Selektion im Referenz-Fenster angezeigt wird.
void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
{
- if ( aEdAssign.IsEnabled() )
+ if ( m_pEdAssign->IsEnabled() )
{
if ( rRef.aStart != rRef.aEnd )
- RefInputStart( &aEdAssign );
+ RefInputStart(m_pEdAssign);
theCurArea = rRef;
OUString aRefStr;
@@ -116,16 +110,16 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
if ( bMultiSelection )
{
- OUString aVal = aEdAssign.GetText();
- Selection aSel = aEdAssign.GetSelection();
+ OUString aVal = m_pEdAssign->GetText();
+ Selection aSel = m_pEdAssign->GetSelection();
aSel.Justify();
aVal = aVal.replaceAt( aSel.Min(), aSel.Len(), aRefStr );
Selection aNewSel( aSel.Min(), aSel.Min()+aRefStr.getLength() );
- aEdAssign.SetRefString( aVal );
- aEdAssign.SetSelection( aNewSel );
+ m_pEdAssign->SetRefString( aVal );
+ m_pEdAssign->SetSelection( aNewSel );
}
else
- aEdAssign.SetRefString( aRefStr );
+ m_pEdAssign->SetRefString( aRefStr );
aChangeHdl.Call( &aRefStr );
}
@@ -135,14 +129,14 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
sal_Bool ScSimpleRefDlg::Close()
{
- CancelBtnHdl(&aBtnCancel);
+ CancelBtnHdl(m_pBtnCancel);
return sal_True;
}
//------------------------------------------------------------------------
void ScSimpleRefDlg::SetActive()
{
- aEdAssign.GrabFocus();
+ m_pEdAssign->GrabFocus();
// kein NameModifyHdl, weil sonst Bereiche nicht geaendert werden koennen
// (nach dem Aufziehen der Referenz wuerde der alte Inhalt wieder angezeigt)
@@ -158,7 +152,7 @@ sal_Bool ScSimpleRefDlg::IsRefInputMode() const
OUString ScSimpleRefDlg::GetRefString() const
{
- return aEdAssign.GetText();
+ return m_pEdAssign->GetText();
}
void ScSimpleRefDlg::SetCloseHdl( const Link& rLink )
@@ -186,10 +180,10 @@ void ScSimpleRefDlg::StartRefInput()
if ( bMultiSelection )
{
// initially select the whole string, so it gets replaced by default
- aEdAssign.SetSelection( Selection( 0, aEdAssign.GetText().getLength() ) );
+ m_pEdAssign->SetSelection( Selection( 0, m_pEdAssign->GetText().getLength() ) );
}
- aRbAssign.DoRef();
+ m_pRbAssign->DoRef();
bCloseFlag=sal_True;
}
@@ -197,7 +191,7 @@ void ScSimpleRefDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
if ( (bForced || bCloseOnButtonUp) && bCloseFlag )
- OkBtnHdl(&aBtnOk);
+ OkBtnHdl(m_pBtnOk);
}
//------------------------------------------------------------------------
// Handler:
@@ -205,7 +199,7 @@ void ScSimpleRefDlg::RefInputDone( sal_Bool bForced)
IMPL_LINK_NOARG(ScSimpleRefDlg, OkBtnHdl)
{
bAutoReOpen=false;
- OUString aResult=aEdAssign.GetText();
+ OUString aResult=m_pEdAssign->GetText();
aCloseHdl.Call(&aResult);
Link aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
@@ -217,7 +211,7 @@ IMPL_LINK_NOARG(ScSimpleRefDlg, OkBtnHdl)
IMPL_LINK_NOARG(ScSimpleRefDlg, CancelBtnHdl)
{
bAutoReOpen=false;
- OUString aResult=aEdAssign.GetText();
+ OUString aResult=m_pEdAssign->GetText();
aCloseHdl.Call(NULL);
Link aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
diff --git a/sc/source/ui/src/simpref.src b/sc/source/ui/src/simpref.src
deleted file mode 100644
index a760959..0000000
--- a/sc/source/ui/src/simpref.src
+++ /dev/null
@@ -1,73 +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 "simpref.hrc"
-
-ModelessDialog RID_SCDLG_SIMPLEREF
-{
- OutputSize = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 222 , 60 ) ;
- Text = "Bereich festlegen" ;
- Moveable = TRUE ;
- FixedText FT_ASSIGN
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- Text [ en-US ] = "Area" ;
- };
- Edit ED_ASSIGN
- {
- HelpID = "sc:Edit:RID_SCDLG_SIMPLEREF:ED_ASSIGN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 48 , 6 ) ;
- Size = MAP_APPFONT ( 90 , 12 ) ;
- TabStop = TRUE ;
- // Text = "<Tabellenbereich>" ;
- };
- ImageButton RB_ASSIGN
- {
- HelpID = "sc:ImageButton:RID_SCDLG_SIMPLEREF:RB_ASSIGN";
- Pos = MAP_APPFONT ( 142 , 5 ) ;
- Size = MAP_APPFONT ( 13 , 15 ) ;
- TabStop = FALSE ;
- QuickHelpText [ en-US ] = "Shrink" ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 166 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 166 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 166 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/simplerefdialog.ui b/sc/uiconfig/scalc/ui/simplerefdialog.ui
new file mode 100644
index 0000000..1657c37
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/simplerefdialog.ui
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="SimpleRefDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Set range</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>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="row_homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="area">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Area</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">assign</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="foruilo-RefEdit" id="assign">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">â</property>
+ <property name="width_chars">50</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="foruilo-RefButton" id="assignref">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</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-widgets>
+ </object>
+</interface>
commit 1a433bf3aea45b740d1844581375bdcf1776a3cb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 30 17:09:26 2013 +0000
Updated core
Project: help aa41fc224274b62fd03c2a0581435cc001e30f16
diff --git a/helpcontent2 b/helpcontent2
index 79adf10..aa41fc2 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 79adf10df7c9382177253ade928081b3c6de699c
+Subproject commit aa41fc224274b62fd03c2a0581435cc001e30f16
More information about the Libreoffice-commits
mailing list