[Libreoffice-commits] .: 6 commits - cui/source cui/uiconfig cui/UI_cui.mk editeng/inc editeng/source officecfg/registry starmath/inc starmath/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 12 08:36:10 PDT 2012
cui/UI_cui.mk | 1
cui/source/dialogs/insdlg.cxx | 57 --
cui/source/dialogs/svuidlg.hrc | 7
cui/source/dialogs/svuidlg.src | 80 ---
cui/source/inc/insdlg.hxx | 49 -
cui/uiconfig/ui/insertoleobject.ui | 266 ++++++++++
cui/uiconfig/ui/insertplugin.ui | 1
editeng/inc/editeng/outlobj.hxx | 9
editeng/inc/editeng/svxfont.hxx | 2
editeng/source/items/svxfont.cxx | 24
editeng/source/outliner/outlobj.cxx | 9
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 2
starmath/inc/dialog.hxx | 28 -
starmath/inc/symbol.hxx | 56 --
starmath/source/cfgitem.cxx | 2
starmath/source/dialog.cxx | 90 +--
starmath/source/node.cxx | 2
starmath/source/symbol.cxx | 40 -
18 files changed, 441 insertions(+), 284 deletions(-)
New commits:
commit 7e8696296fb46837eab159280533da948d93746d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 12 16:27:59 2012 +0100
grr I wanted can+has *default* not *focus*
Change-Id: I070ae5f7081cf9081e8f36658e8adf7de143b207
diff --git a/cui/uiconfig/ui/insertoleobject.ui b/cui/uiconfig/ui/insertoleobject.ui
index 7e3f151..db75639 100644
--- a/cui/uiconfig/ui/insertoleobject.ui
+++ b/cui/uiconfig/ui/insertoleobject.ui
@@ -203,7 +203,8 @@
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
diff --git a/cui/uiconfig/ui/insertplugin.ui b/cui/uiconfig/ui/insertplugin.ui
index 8ebae26..58a87b2 100644
--- a/cui/uiconfig/ui/insertplugin.ui
+++ b/cui/uiconfig/ui/insertplugin.ui
@@ -146,6 +146,7 @@
<property name="use_action_appearance">False</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_action_appearance">False</property>
commit 919aeeba43f1d72c152602db97531142d69e38ae
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 12 16:10:20 2012 +0100
be consistent between insert chart and insert formula re ellipsis
Change-Id: I62d6c7e041247c1d2c6ccc4bc51e401e1469a95e
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index d27c4f8..e151b61 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -445,7 +445,7 @@
</node>
<node oor:name=".uno:InsertObjectStarMath" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Formula</value>
+ <value xml:lang="en-US">~Formula...</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
commit d152dca0ef47fdb6f87fb0d7cc0fe0c3242f6c50
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 12 16:05:04 2012 +0100
add SetAccessibleRelationMemberOf back again FWIW
Change-Id: Ic99c6b20d4622323d3d5ddea24338fbcbd4d0b8c
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index b3a10cb..df66ebc 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -209,6 +209,7 @@ SvInsertOleDlg::SvInsertOleDlg
m_pRbObjectFromfile->SetClickHdl( aLink );
m_pRbNewObject->Check( sal_True );
RadioHdl( NULL );
+ m_pBtnFilepath->SetAccessibleRelationMemberOf(m_pFileFrame->get_label_widget());
}
short SvInsertOleDlg::Execute()
commit e48cb3667db5ffbd75ed74d18da64ee1c204b372
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 12 16:04:42 2012 +0100
set has-default for insert ole object dialog
Change-Id: Ic1c3f8784bc41c6b8adbeb4798e51eeb0300b2d0
diff --git a/cui/uiconfig/ui/insertoleobject.ui b/cui/uiconfig/ui/insertoleobject.ui
index 167b958..7e3f151 100644
--- a/cui/uiconfig/ui/insertoleobject.ui
+++ b/cui/uiconfig/ui/insertoleobject.ui
@@ -203,6 +203,7 @@
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="has_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
@@ -261,22 +262,4 @@
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="lower">1</property>
- <property name="upper">9999</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkListStore" id="liststore1">
- <columns>
- <!-- column-name gchararray1 -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">[None]</col>
- </row>
- </data>
- </object>
</interface>
commit 5cb6877206c459530caa104b34e494badab5a4d1
Author: Jack Leigh <leighman at gmx.se>
Date: Thu Oct 11 23:47:56 2012 +0100
migrate 'Insert OLE Object' dialog to use .ui file
Change-Id: If2a241e34f88a39bacee5344f89893e3ccfdc57d
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 4a282f9..c1b2a3e 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/effectspage \
cui/uiconfig/ui/hyphenate \
+ cui/uiconfig/ui/insertoleobject \
cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/positionpage \
cui/uiconfig/ui/specialcharacters \
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 43786ca..b3a10cb 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -42,6 +42,7 @@
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/group.hxx>
+#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
@@ -151,7 +152,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl)
{
Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
INetURLObject aObj( aPathSeq[0] );
- aEdFilepath.SetText( aObj.PathToFileName() );
+ m_pEdFilepath->SetText( aObj.PathToFileName() );
}
}
}
@@ -163,22 +164,15 @@ IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl)
IMPL_LINK_NOARG(SvInsertOleDlg, RadioHdl)
{
- if ( aRbNewObject.IsChecked() )
+ if ( m_pRbNewObject->IsChecked() )
{
- aLbObjecttype.Show();
- aEdFilepath.Hide();
- aBtnFilepath.Hide();
- aCbFilelink.Hide();
- aGbObject.SetText( _aOldStr );
+ m_pObjectTypeFrame->Show();
+ m_pFileFrame->Hide();
}
else
{
- aCbFilelink.Show();
- aLbObjecttype.Hide();
- aEdFilepath.Show();
- aBtnFilepath.Show();
- aCbFilelink.Show();
- aGbObject.SetText( aStrFile );
+ m_pFileFrame->Show();
+ m_pObjectTypeFrame->Hide();
}
return 0;
}
@@ -187,7 +181,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, RadioHdl)
void SvInsertOleDlg::SelectDefault()
{
- aLbObjecttype.SelectEntryPos( 0 );
+ m_pLbObjecttype->SelectEntryPos(0);
}
// -----------------------------------------------------------------------
@@ -197,30 +191,24 @@ SvInsertOleDlg::SvInsertOleDlg
const Reference < embed::XStorage >& xStorage,
const SvObjectServerList* pServers
)
- : InsertObjectDialog_Impl( pParent, CUI_RES( MD_INSERT_OLEOBJECT ), xStorage ),
- aRbNewObject( this, CUI_RES( RB_NEW_OBJECT ) ),
- aRbObjectFromfile( this, CUI_RES( RB_OBJECT_FROMFILE ) ),
- aGbObject( this, CUI_RES( GB_OBJECT ) ),
- aLbObjecttype( this, CUI_RES( LB_OBJECTTYPE ) ),
- aEdFilepath( this, CUI_RES( ED_FILEPATH ) ),
- aBtnFilepath( this, CUI_RES( BTN_FILEPATH ) ),
- aCbFilelink( this, CUI_RES( CB_FILELINK ) ),
- aOKButton1( this, CUI_RES( 1 ) ),
- aCancelButton1( this, CUI_RES( 1 ) ),
- aHelpButton1( this, CUI_RES( 1 ) ),
- aStrFile( CUI_RES( STR_FILE ) ),
+ : InsertObjectDialog_Impl( pParent, "InsertOLEObjectDialog", "cui/ui/insertoleobject.ui", xStorage ),
m_pServers( pServers )
{
- FreeResource();
- _aOldStr = aGbObject.GetText();
- aLbObjecttype.SetDoubleClickHdl( LINK( this, SvInsertOleDlg, DoubleClickHdl ) );
- aBtnFilepath.SetClickHdl( LINK( this, SvInsertOleDlg, BrowseHdl ) );
+ get(m_pRbNewObject, "createnew");
+ get(m_pRbObjectFromfile, "createfromfile");
+ get(m_pObjectTypeFrame, "objecttypeframe");
+ get(m_pLbObjecttype, "types");
+ get(m_pFileFrame, "fileframe");
+ get(m_pEdFilepath, "urled");
+ get(m_pBtnFilepath, "urlbtn");
+ get(m_pCbFilelink, "linktofile");
+ m_pLbObjecttype->SetDoubleClickHdl( LINK( this, SvInsertOleDlg, DoubleClickHdl ) );
+ m_pBtnFilepath->SetClickHdl( LINK( this, SvInsertOleDlg, BrowseHdl ) );
Link aLink( LINK( this, SvInsertOleDlg, RadioHdl ) );
- aRbNewObject.SetClickHdl( aLink );
- aRbObjectFromfile.SetClickHdl( aLink );
- aRbNewObject.Check( sal_True );
+ m_pRbNewObject->SetClickHdl( aLink );
+ m_pRbObjectFromfile->SetClickHdl( aLink );
+ m_pRbNewObject->Check( sal_True );
RadioHdl( NULL );
- aBtnFilepath.SetAccessibleRelationMemberOf(&aGbObject);
}
short SvInsertOleDlg::Execute()
diff --git a/cui/source/dialogs/svuidlg.hrc b/cui/source/dialogs/svuidlg.hrc
index 17e3ad4..e2d69f4 100644
--- a/cui/source/dialogs/svuidlg.hrc
+++ b/cui/source/dialogs/svuidlg.hrc
@@ -83,13 +83,6 @@
#define ED_APPLET_OPTIONS 20
#define GB_APPLET_OPTIONS 21
-#define MD_INSERT_OLEOBJECT 32010
-#define RB_NEW_OBJECT 10
-#define RB_OBJECT_FROMFILE 11
-#define LB_OBJECTTYPE 12
-#define GB_OBJECT 13
-#define STR_FILE 14
-
#define MD_INSERT_OBJECT_IFRAME 32011
#define FT_FRAMENAME 3
#define ED_FRAMENAME 4
diff --git a/cui/source/dialogs/svuidlg.src b/cui/source/dialogs/svuidlg.src
index af30d3a..7c5bce2 100644
--- a/cui/source/dialogs/svuidlg.src
+++ b/cui/source/dialogs/svuidlg.src
@@ -305,86 +305,6 @@ ModalDialog MD_LINKEDIT
Text [ en-US ] = "Edit" ;
};
};
-ModalDialog MD_INSERT_OLEOBJECT
-{
- HelpID = "cui:ModalDialog:MD_INSERT_OLEOBJECT";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 284 , 105 ) ;
- Moveable = TRUE ;
- RadioButton RB_NEW_OBJECT
- {
- HelpID = "cui:RadioButton:MD_INSERT_OLEOBJECT:RB_NEW_OBJECT";
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 81 , 10 ) ;
- Text [ en-US ] = "~Create new" ;
- };
- RadioButton RB_OBJECT_FROMFILE
- {
- HelpID = "cui:RadioButton:MD_INSERT_OLEOBJECT:RB_OBJECT_FROMFILE";
- Pos = MAP_APPFONT ( 90 , 6 ) ;
- Size = MAP_APPFONT ( 81 , 10 ) ;
- Text [ en-US ] = "Create from ~file" ;
- };
- ListBox LB_OBJECTTYPE
- {
- HelpID = "cui:ListBox:MD_INSERT_OLEOBJECT:LB_OBJECTTYPE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 33 ) ;
- Size = MAP_APPFONT ( 204 , 60 ) ;
- };
- Edit ED_FILEPATH
- {
- HelpID = "cui:Edit:MD_INSERT_OLEOBJECT:ED_FILEPATH";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 33 ) ;
- Size = MAP_APPFONT ( 204 , 12 ) ;
- };
- PushButton BTN_FILEPATH
- {
- HelpID = "cui:PushButton:MD_INSERT_OLEOBJECT:BTN_FILEPATH";
- Pos = MAP_APPFONT ( 166 , 48 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Search..." ;
- };
- CheckBox CB_FILELINK
- {
- HelpID = "cui:CheckBox:MD_INSERT_OLEOBJECT:CB_FILELINK";
- Pos = MAP_APPFONT ( 12 , 48 ) ;
- Size = MAP_APPFONT ( 138 , 10 ) ;
- Text [ en-US ] = "~Link to file" ;
- };
- FixedLine GB_OBJECT
- {
- Pos = MAP_APPFONT ( 6 , 22 ) ;
- Size = MAP_APPFONT ( 216 , 8 ) ;
- Text [ en-US ] = "Object type" ;
- };
- OKButton 1
- {
- Pos = MAP_APPFONT ( 228 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
- TabStop = TRUE ;
- };
- CancelButton 1
- {
- Pos = MAP_APPFONT ( 228 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton 1
- {
- Pos = MAP_APPFONT ( 228 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- String STR_FILE
- {
- Text [ en-US ] = "File" ;
- };
- Text [ en-US ] = "Insert OLE Object" ;
-};
ModalDialog MD_INSERT_OBJECT_APPLET
{
HelpID = "cui:ModalDialog:MD_INSERT_OBJECT_APPLET";
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index 27ebff9..c4486c9 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -33,6 +33,8 @@
#include <svtools/svmedit.hxx> // MultiLineEdit
#include <comphelper/embeddedobjectcontainer.hxx>
+class VclFrame;
+
class INetURLObject;
class InsertObjectDialog_Impl : public ModalDialog
@@ -55,38 +57,37 @@ public:
class SvInsertOleDlg : public InsertObjectDialog_Impl
{
- RadioButton aRbNewObject;
- RadioButton aRbObjectFromfile;
- FixedLine aGbObject;
- ListBox aLbObjecttype;
- Edit aEdFilepath;
- PushButton aBtnFilepath;
- CheckBox aCbFilelink;
- OKButton aOKButton1;
- CancelButton aCancelButton1;
- HelpButton aHelpButton1;
- String aStrFile;
- String _aOldStr;
+ RadioButton* m_pRbNewObject;
+ RadioButton* m_pRbObjectFromfile;
+ VclFrame* m_pObjectTypeFrame;
+ ListBox* m_pLbObjecttype;
+ VclFrame* m_pFileFrame;
+ Edit* m_pEdFilepath;
+ PushButton* m_pBtnFilepath;
+ CheckBox* m_pCbFilelink;
const SvObjectServerList* m_pServers;
::com::sun::star::uno::Sequence< sal_Int8 > m_aIconMetaFile;
- ::rtl::OUString m_aIconMediaType;
+ OUString m_aIconMediaType;
- DECL_LINK( DoubleClickHdl, void* );
+ DECL_LINK(DoubleClickHdl, void*);
DECL_LINK(BrowseHdl, void *);
DECL_LINK(RadioHdl, void *);
- void SelectDefault();
- ListBox& GetObjectTypes()
- { return aLbObjecttype; }
- String GetFilePath() const { return aEdFilepath.GetText(); }
- sal_Bool IsLinked() const { return aCbFilelink.IsChecked(); }
- sal_Bool IsCreateNew() const { return aRbNewObject.IsChecked(); }
+ void SelectDefault();
+ ListBox& GetObjectTypes()
+ { return *m_pLbObjecttype; }
+ OUString GetFilePath() const
+ { return m_pEdFilepath->GetText(); }
+ sal_Bool IsLinked() const
+ { return m_pCbFilelink->IsChecked(); }
+ sal_Bool IsCreateNew() const
+ { return m_pRbNewObject->IsChecked(); }
public:
- SvInsertOleDlg( Window* pParent,
- const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage,
- const SvObjectServerList* pServers = NULL );
- virtual short Execute();
+ SvInsertOleDlg( Window* pParent,
+ const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage,
+ const SvObjectServerList* pServers = NULL );
+ virtual short Execute();
/// get replacement for the iconified embedded object and the mediatype of the replacement
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType );
diff --git a/cui/uiconfig/ui/insertoleobject.ui b/cui/uiconfig/ui/insertoleobject.ui
new file mode 100644
index 0000000..167b958
--- /dev/null
+++ b/cui/uiconfig/ui/insertoleobject.ui
@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="InsertOLEObjectDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Insert OLE Object</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="spacing">2</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="width_request">400</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkRadioButton" id="createnew">
+ <property name="label" translatable="yes">Create new</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">createfromfile</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="createfromfile">
+ <property name="label" translatable="yes">Create from file</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="objecttypeframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTreeView" id="types">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Object type</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="fileframe">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkEntry" id="urled">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">â¢</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="urlbtn">
+ <property name="label" translatable="yes">Search ...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">end</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="linktofile">
+ <property name="label" translatable="yes">Link to file</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">File</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </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="padding">6</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="orientation">vertical</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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">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-widgets>
+ </object>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">1</property>
+ <property name="upper">9999</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">[None]</col>
+ </row>
+ </data>
+ </object>
+</interface>
commit 53acdd29e32707eb4ad6e922b47e1c1216f9d7d6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 12 14:48:34 2012 +0100
XubString->OUString
Change-Id: Ib5f39e099d238b739e0d6b3d92d3f04ee50022fb
diff --git a/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx
index ff2f1f7..73eb9b5 100644
--- a/editeng/inc/editeng/outlobj.hxx
+++ b/editeng/inc/editeng/outlobj.hxx
@@ -78,9 +78,12 @@ public:
void ClearPortionInfo();
// StyleSheet support
- bool ChangeStyleSheets(const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily);
- void ChangeStyleSheetName(SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName);
- void SetStyleSheets(sal_uInt16 nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily);
+ bool ChangeStyleSheets(const OUString& rOldName, SfxStyleFamily eOldFamily,
+ const OUString& rNewName, SfxStyleFamily eNewFamily);
+ void ChangeStyleSheetName(SfxStyleFamily eFamily, const OUString& rOldName,
+ const OUString& rNewName);
+ void SetStyleSheets(sal_uInt16 nLevel, const OUString rNewName,
+ const SfxStyleFamily& rNewFamily);
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx
index 20db647..96729e9 100644
--- a/editeng/inc/editeng/svxfont.hxx
+++ b/editeng/inc/editeng/svxfont.hxx
@@ -82,7 +82,7 @@ public:
inline sal_Bool IsEsc() const { return 0 != nEsc; }
// Consider Upper case, Lower case letters etc.
- String CalcCaseMap( const String &rTxt ) const;
+ OUString CalcCaseMap(const OUString &rTxt) const;
// The following section is not needed by anyone, so it can be excluded.
#ifndef REDUCEDSVXFONT
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index ae8c99d..5f8745d 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -110,10 +110,11 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
}
-XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
+OUString SvxFont::CalcCaseMap(const OUString &rTxt) const
{
- if( !IsCaseMap() || !rTxt.Len() ) return rTxt;
- XubString aTxt( rTxt );
+ if (!IsCaseMap() || rTxt.isEmpty())
+ return rTxt;
+ OUString aTxt(rTxt);
// I still have to get the language
const LanguageType eLng = LANGUAGE_DONTKNOW == eLang
? LANGUAGE_SYSTEM : eLang;
@@ -139,21 +140,20 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
// Every beginning of a word is capitalized, the rest of the word
// is taken over as is.
// Bug: if the attribute starts in the middle of the word.
- sal_Bool bBlank = sal_True;
+ bool bBlank = true;
- for( sal_uInt16 i = 0; i < aTxt.Len(); ++i )
+ for (sal_Int32 i = 0; i < aTxt.getLength(); ++i)
{
- if( sal_Unicode(' ') == aTxt.GetChar(i) || sal_Unicode('\t') == aTxt.GetChar(i) )
- bBlank = sal_True;
+ if( aTxt[i] == ' ' || aTxt[i] == '\t')
+ bBlank = true;
else
{
- if( bBlank )
+ if (bBlank)
{
- rtl::OUString aTemp(aTxt.GetChar(i));
- aTemp = aCharClass.uppercase( aTemp );
- aTxt.Replace( i, 1, aTemp );
+ OUString sTitle(aCharClass.uppercase(OUString(aTxt[i])));
+ aTxt = aTxt.replaceAt(i, 1, sTitle);
}
- bBlank = sal_False;
+ bBlank = false;
}
}
break;
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 6edfcf4..447f7a5 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -240,19 +240,22 @@ void OutlinerParaObject::ClearPortionInfo()
mpImplOutlinerParaObject->mpEditTextObject->ClearPortionInfo();
}
-bool OutlinerParaObject::ChangeStyleSheets(const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily)
+bool OutlinerParaObject::ChangeStyleSheets(const OUString& rOldName,
+ SfxStyleFamily eOldFamily, const OUString& rNewName, SfxStyleFamily eNewFamily)
{
ImplMakeUnique();
return mpImplOutlinerParaObject->mpEditTextObject->ChangeStyleSheets(rOldName, eOldFamily, rNewName, eNewFamily);
}
-void OutlinerParaObject::ChangeStyleSheetName(SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName)
+void OutlinerParaObject::ChangeStyleSheetName(SfxStyleFamily eFamily,
+ const OUString& rOldName, const OUString& rNewName)
{
ImplMakeUnique();
mpImplOutlinerParaObject->mpEditTextObject->ChangeStyleSheetName(eFamily, rOldName, rNewName);
}
-void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily)
+void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const OUString rNewName,
+ const SfxStyleFamily& rNewFamily)
{
const sal_uInt32 nCount(mpImplOutlinerParaObject->maParagraphDataVector.size());
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 571c4c0..6636ad0 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -44,7 +44,7 @@ class SubsetMap;
/**************************************************************************/
-void SetFontStyle(const XubString &rStyleName, Font &rFont);
+void SetFontStyle(const OUString &rStyleName, Font &rFont);
/**************************************************************************/
@@ -382,7 +382,7 @@ public:
SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, bool bFreeRes = true);
virtual ~SmSymbolDialog();
- bool SelectSymbolSet(const XubString &rSymbolSetName);
+ bool SelectSymbolSet(const OUString &rSymbolSetName);
void SelectSymbol(sal_uInt16 nSymbolPos);
sal_uInt16 GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); }
};
@@ -462,16 +462,16 @@ class SmSymDefineDialog : public ModalDialog
void FillStyles(bool bDeleteText = true);
void SetSymbolSetManager(const SmSymbolManager &rMgr);
- void SetFont(const XubString &rFontName, const XubString &rStyleName);
- void SetOrigSymbol(const SmSym *pSymbol, const XubString &rSymbolSetName);
+ void SetFont(const OUString &rFontName, const OUString &rStyleName);
+ void SetOrigSymbol(const SmSym *pSymbol, const OUString &rSymbolSetName);
void UpdateButtons();
- bool SelectSymbolSet(ComboBox &rComboBox, const XubString &rSymbolSetName,
+ bool SelectSymbolSet(ComboBox &rComboBox, const OUString &rSymbolSetName,
bool bDeleteText);
- bool SelectSymbol(ComboBox &rComboBox, const XubString &rSymbolName,
+ bool SelectSymbol(ComboBox &rComboBox, const OUString &rSymbolName,
bool bDeleteText);
- bool SelectFont(const XubString &rFontName, bool bApplyFont);
- bool SelectStyle(const XubString &rStyleName, bool bApplyFont);
+ bool SelectFont(const OUString &rFontName, bool bApplyFont);
+ bool SelectStyle(const OUString &rStyleName, bool bApplyFont);
SmSym * GetSymbol(const ComboBox &rComboBox);
const SmSym * GetSymbol(const ComboBox &rComboBox) const
@@ -492,28 +492,28 @@ public:
// Dialog
virtual short Execute();
- bool SelectOldSymbolSet(const XubString &rSymbolSetName)
+ bool SelectOldSymbolSet(const OUString &rSymbolSetName)
{
return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, false);
}
- bool SelectOldSymbol(const XubString &rSymbolName)
+ bool SelectOldSymbol(const OUString &rSymbolName)
{
return SelectSymbol(aOldSymbols, rSymbolName, false);
}
- bool SelectSymbolSet(const XubString &rSymbolSetName)
+ bool SelectSymbolSet(const OUString &rSymbolSetName)
{
return SelectSymbolSet(aSymbolSets, rSymbolSetName, false);
}
- bool SelectSymbol(const XubString &rSymbolName)
+ bool SelectSymbol(const OUString &rSymbolName)
{
return SelectSymbol(aSymbols, rSymbolName, false);
}
- bool SelectFont(const XubString &rFontName) { return SelectFont(rFontName, true); }
- bool SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, true); };
+ bool SelectFont(const OUString &rFontName) { return SelectFont(rFontName, true); }
+ bool SelectStyle(const OUString &rStyleName) { return SelectStyle(rStyleName, true); };
void SelectChar(xub_Unicode cChar);
};
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index b6d0224..615f752 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -40,24 +40,24 @@
////////////////////////////////////////////////////////////////////////////////
-inline const String GetExportSymbolName( const String &rUiSymbolName )
+inline const OUString GetExportSymbolName( const OUString &rUiSymbolName )
{
return SM_MOD()->GetLocSymbolData().GetExportSymbolName( rUiSymbolName );
}
-inline const String GetUiSymbolName( const String &rExportSymbolName )
+inline const OUString GetUiSymbolName( const OUString &rExportSymbolName )
{
return SM_MOD()->GetLocSymbolData().GetUiSymbolName( rExportSymbolName );
}
-inline const String GetExportSymbolSetName( const String &rUiSymbolSetName )
+inline const OUString GetExportSymbolSetName( const OUString &rUiSymbolSetName )
{
return SM_MOD()->GetLocSymbolData().GetExportSymbolSetName( rUiSymbolSetName );
}
-inline const String GetUiSymbolSetName( const String &rExportSymbolSetName )
+inline const OUString GetUiSymbolSetName( const OUString &rExportSymbolSetName )
{
return SM_MOD()->GetLocSymbolData().GetUiSymbolSetName( rExportSymbolSetName );
}
@@ -68,37 +68,33 @@ class SmSym
{
private:
SmFace m_aFace;
- String m_aName;
- String m_aExportName;
- String m_aSetName;
+ OUString m_aName;
+ OUString m_aExportName;
+ OUString m_aSetName;
sal_UCS4 m_cChar;
bool m_bPredefined;
bool m_bDocSymbol;
public:
SmSym();
- SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
- const String& rSet, bool bIsPredefined = false);
+ SmSym(const OUString& rName, const Font& rFont, sal_UCS4 cChar,
+ const OUString& rSet, bool bIsPredefined = false);
SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
const Font& GetFace() const { return m_aFace; }
sal_UCS4 GetCharacter() const { return m_cChar; }
- const String& GetName() const { return m_aName; }
+ const OUString& GetName() const { return m_aName; }
void SetFace( const Font& rFont ) { m_aFace = rFont; }
void SetCharacter( sal_UCS4 cChar ) { m_cChar = cChar; }
-//! since the symbol name is also used as key in the map it should not be possible to change the name
-//! because ten the key would not be the same as its supposed copy here
-// void SetName( const String &rTxt ) { m_aName = rTxt; }
-
bool IsPredefined() const { return m_bPredefined; }
- const String & GetSymbolSetName() const { return m_aSetName; }
- void SetSymbolSetName( const String &rName ) { m_aSetName = rName; }
- const String & GetExportName() const { return m_aExportName; }
- void SetExportName( const String &rName ) { m_aExportName = rName; }
+ const OUString& GetSymbolSetName() const { return m_aSetName; }
+ void SetSymbolSetName( const OUString &rName ) { m_aSetName = rName; }
+ const OUString& GetExportName() const { return m_aExportName; }
+ void SetExportName( const OUString &rName ) { m_aExportName = rName; }
bool IsDocSymbol() const { return m_bDocSymbol; }
void SetDocSymbol( bool bVal ) { m_bDocSymbol = bVal; }
@@ -107,20 +103,8 @@ public:
bool IsEqualInUI( const SmSym& rSymbol ) const;
};
-/**************************************************************************/
-
-struct lt_String
-{
- bool operator()( const String &r1, const String &r2 ) const
- {
- // r1 < r2 ?
- return r1.CompareTo( r2 ) == COMPARE_LESS;
- }
-};
-
-
// type of the actual container to hold the symbols
-typedef std::map< String, SmSym, lt_String > SymbolMap_t;
+typedef std::map< OUString, SmSym > SymbolMap_t;
// vector of pointers to the actual symbols in the above container
typedef std::vector< const SmSym * > SymbolPtrVec_t;
@@ -151,16 +135,16 @@ public:
SmSymbolManager & operator = (const SmSymbolManager& rSymbolSetManager);
// symbol sets are for UI purpose only, thus we assemble them here
- std::set< String > GetSymbolSetNames() const;
- const SymbolPtrVec_t GetSymbolSet( const String& rSymbolSetName );
+ std::set< OUString > GetSymbolSetNames() const;
+ const SymbolPtrVec_t GetSymbolSet( const OUString& rSymbolSetName );
sal_uInt16 GetSymbolCount() const { return static_cast< sal_uInt16 >(m_aSymbols.size()); }
const SymbolPtrVec_t GetSymbols() const;
bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false );
- void RemoveSymbol( const String & rSymbolName );
+ void RemoveSymbol( const OUString & rSymbolName );
- SmSym * GetSymbolByName(const String& rSymbolName);
- const SmSym * GetSymbolByName(const String& rSymbolName) const
+ SmSym * GetSymbolByName(const OUString& rSymbolName);
+ const SmSym * GetSymbolByName(const OUString& rSymbolName) const
{
return ((SmSymbolManager *) this)->GetSymbolByName(rSymbolName);
}
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 1d36316..939dd2c 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -809,7 +809,7 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
SmFontFormatList aUsedList;
for (i = 0; i < rSymbols.size(); ++i)
{
- OSL_ENSURE( rSymbols[i].GetName().Len() > 0, "non named symbol" );
+ OSL_ENSURE( rSymbols[i].GetName().getLength() > 0, "non named symbol" );
aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , true );
}
const SmFormat & rStdFmt = GetStandardFormat();
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index a94a4b9..82a0e72 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -59,18 +59,18 @@ using ::rtl::OUString;
class SmFontStyles
{
- String aNormal;
- String aBold;
- String aItalic;
- String aBoldItalic;
- String aEmpty;
+ OUString aNormal;
+ OUString aBold;
+ OUString aItalic;
+ OUString aBoldItalic;
+ OUString aEmpty;
public:
SmFontStyles();
sal_uInt16 GetCount() const { return 4; }
- const String & GetStyleName( const Font &rFont ) const;
- const String & GetStyleName( sal_uInt16 nIdx ) const;
+ const OUString& GetStyleName( const Font &rFont ) const;
+ const OUString& GetStyleName( sal_uInt16 nIdx ) const;
};
@@ -81,12 +81,12 @@ SmFontStyles::SmFontStyles() :
{
aBoldItalic = aBold;
- aBoldItalic.AppendAscii( ", " );
+ aBoldItalic += ", ";
aBoldItalic += aItalic;
}
-const String & SmFontStyles::GetStyleName( const Font &rFont ) const
+const OUString& SmFontStyles::GetStyleName( const Font &rFont ) const
{
//! compare also SmSpecialNode::Prepare
bool bBold = IsBold( rFont ),
@@ -98,12 +98,11 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
return aItalic;
else if (bBold)
return aBold;
- else
- return aNormal;
+ return aNormal;
}
-const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
+const OUString& SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
{
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
@@ -130,17 +129,17 @@ const SmFontStyles & GetFontStyles()
/////////////////////////////////////////////////////////////////
-void SetFontStyle(const XubString &rStyleName, Font &rFont)
+void SetFontStyle(const OUString &rStyleName, Font &rFont)
{
// Find index related to StyleName. For an empty StyleName it's assumed to be
// 0 (neither bold nor italic).
sal_uInt16 nIndex = 0;
- if (rStyleName.Len())
+ if (!rStyleName.isEmpty())
{
sal_uInt16 i;
const SmFontStyles &rStyles = GetFontStyles();
- for (i = 0; i < rStyles.GetCount(); i++)
- if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == COMPARE_EQUAL)
+ for (i = 0; i < rStyles.GetCount(); ++i)
+ if (rStyleName == rStyles.GetStyleName(i))
break;
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(i < rStyles.GetCount(), "style-name unknown");
@@ -242,7 +241,7 @@ void SmShowFont::Paint(const Rectangle& rRect )
{
Control::Paint( rRect );
- XubString Text (GetFont().GetName());
+ OUString Text (GetFont().GetName());
Size TextSize(GetTextWidth(Text), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - TextSize.Width()) / 2,
@@ -801,10 +800,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpI
// HelpIDs which are explicitly set in this way have to be defined in the
// util directory in the file "hidother.src" with the help of "hidspecial"!
- const XubString aEmptyText;
-#if OSL_DEBUG_LEVEL > 1
- OSL_ENSURE(aEmptyText.Len() == 0, "Sm: Ooops...");
-#endif
+ const OUString aEmptyText;
rField.SetHelpId(sHelpId);
rField.SetHelpText(aEmptyText);
@@ -1360,7 +1356,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect)
{
Control::Paint( rRect );
- const XubString &rText = GetText();
+ const OUString &rText = GetText();
Size aTextSize(GetTextWidth(rText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
@@ -1407,8 +1403,8 @@ void SmSymbolDialog::FillSymbolSets(bool bDeleteText)
if (bDeleteText)
aSymbolSets.SetNoSelection();
- std::set< String > aSybolSetNames( rSymbolMgr.GetSymbolSetNames() );
- std::set< String >::const_iterator aIt( aSybolSetNames.begin() );
+ std::set< OUString > aSybolSetNames( rSymbolMgr.GetSymbolSetNames() );
+ std::set< OUString >::const_iterator aIt( aSybolSetNames.begin() );
for ( ; aIt != aSybolSetNames.end(); ++aIt)
aSymbolSets.InsertEntry( *aIt );
}
@@ -1447,7 +1443,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymbolMgr);
// set current symbol and SymbolSet for the new dialog
- const XubString aSymSetName (aSymbolSets.GetSelectEntry()),
+ const OUString aSymSetName (aSymbolSets.GetSelectEntry()),
aSymName (aSymbolName.GetText());
pDialog->SelectOldSymbolSet(aSymSetName);
pDialog->SelectOldSymbol(aSymName);
@@ -1455,7 +1451,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
pDialog->SelectSymbol(aSymName);
// remember old SymbolSet
- XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
+ OUString aOldSymbolSet (aSymbolSets.GetSelectEntry());
sal_uInt16 nSymPos = GetSelectedSymbol();
@@ -1625,7 +1621,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
}
-bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
+bool SmSymbolDialog::SelectSymbolSet(const OUString &rSymbolSetName)
{
bool bRet = false;
sal_uInt16 nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
@@ -1663,7 +1659,7 @@ void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
aSymbolSetDisplay.SelectSymbol(nSymbolNo);
aSymbolDisplay.SetSymbol(pSym);
- aSymbolName.SetText(pSym ? pSym->GetName() : XubString());
+ aSymbolName.SetText(pSym ? pSym->GetName() : OUString());
}
@@ -1751,8 +1747,8 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, bool bDeleteText)
if (bDeleteText)
rComboBox.SetText(rtl::OUString());
- const std::set< String > aSymbolSetNames( aSymbolMgrCopy.GetSymbolSetNames() );
- std::set< String >::const_iterator aIt( aSymbolSetNames.begin() );
+ const std::set< OUString > aSymbolSetNames( aSymbolMgrCopy.GetSymbolSetNames() );
+ std::set< OUString >::const_iterator aIt( aSymbolSetNames.begin() );
for ( ; aIt != aSymbolSetNames.end(); ++aIt)
rComboBox.InsertEntry( *aIt );
}
@@ -1782,8 +1778,8 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
if (bDeleteText)
aStyles.SetText(rtl::OUString());
- XubString aText (aFonts.GetSelectEntry());
- if (aText.Len() != 0)
+ OUString aText (aFonts.GetSelectEntry());
+ if (!aText.isEmpty())
{
// use own StyleNames
const SmFontStyles &rStyles = GetFontStyles();
@@ -2040,16 +2036,16 @@ void SmSymDefineDialog::UpdateButtons()
bool bAdd = false,
bChange = false,
bDelete = false;
- XubString aTmpSymbolName (aSymbols.GetText()),
+ OUString aTmpSymbolName (aSymbols.GetText()),
aTmpSymbolSetName (aSymbolSets.GetText());
- if (aTmpSymbolName.Len() > 0 && aTmpSymbolSetName.Len() > 0)
+ if (aTmpSymbolName.getLength() > 0 && aTmpSymbolSetName.getLength() > 0)
{
// are all settings equal?
//! (Font-, Style- und SymbolSet name comparison is not case sensitive)
bool bEqual = pOrigSymbol
- && aTmpSymbolSetName.EqualsIgnoreCaseAscii(aOldSymbolSetName.GetText())
- && aTmpSymbolName.Equals(pOrigSymbol->GetName())
+ && aTmpSymbolSetName.equalsIgnoreAsciiCase(aOldSymbolSetName.GetText())
+ && aTmpSymbolName.equals(pOrigSymbol->GetName())
&& aFonts.GetSelectEntry().EqualsIgnoreCaseAscii(
pOrigSymbol->GetFace().GetName())
&& aStyles.GetText().EqualsIgnoreCaseAscii(
@@ -2245,7 +2241,7 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
- const XubString &rSymbolSetName, bool bDeleteText)
+ const OUString &rSymbolSetName, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
@@ -2253,7 +2249,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
#endif
// trim SymbolName (no leading and trailing blanks)
- XubString aNormName (rSymbolSetName);
+ OUString aNormName (rSymbolSetName);
aNormName = comphelper::string::stripStart(aNormName, ' ');
aNormName = comphelper::string::stripEnd(aNormName, ' ');
// and remove possible deviations within the input
@@ -2283,7 +2279,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// display a valid respectively no symbol when changing the SymbolSets
if (bIsOld)
{
- XubString aTmpOldSymbolName;
+ OUString aTmpOldSymbolName;
if (aOldSymbols.GetEntryCount() > 0)
aTmpOldSymbolName = aOldSymbols.GetEntry(0);
SelectSymbol(aOldSymbols, aTmpOldSymbolName, true);
@@ -2296,13 +2292,13 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
- const XubString &rSymbolSetName)
+ const OUString &rSymbolSetName)
{
// clear old symbol
delete pOrigSymbol;
pOrigSymbol = 0;
- XubString aSymName,
+ OUString aSymName,
aSymSetName;
if (pSymbol)
{
@@ -2324,7 +2320,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
- const XubString &rSymbolName, bool bDeleteText)
+ const OUString &rSymbolName, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
@@ -2332,7 +2328,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
#endif
// trim SymbolName (no blanks)
- XubString aNormName(comphelper::string::remove(rSymbolName, ' '));
+ OUString aNormName(comphelper::string::remove(rSymbolName, ' '));
// and remove possible deviations within the input
rComboBox.SetText(aNormName);
@@ -2379,7 +2375,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
{
// if there's a change of the old symbol, show only the available ones, otherwise show none
const SmSym *pOldSymbol = NULL;
- XubString aTmpOldSymbolSetName;
+ OUString aTmpOldSymbolSetName;
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
pOldSymbol = aSymbolMgrCopy.GetSymbolByName(aNormName);
@@ -2396,7 +2392,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
}
-void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rStyleName)
+void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyleName)
{
// get Font (FontInfo) matching name and style
FontInfo aFI;
@@ -2432,7 +2428,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
}
-bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
+bool SmSymDefineDialog::SelectFont(const OUString &rFontName, bool bApplyFont)
{
bool bRet = false;
sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
@@ -2460,7 +2456,7 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
}
-bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont)
+bool SmSymDefineDialog::SelectStyle(const OUString &rStyleName, bool bApplyFont)
{
bool bRet = false;
sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index d7bd76f..972f725 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2869,7 +2869,7 @@ static bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
{
String aName( rTokenText.Copy(1) );
SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName );
- if (pSymbol && GetExportSymbolSetName( pSymbol->GetSymbolSetName() ).EqualsAscii( "Greek" ) )
+ if (pSymbol && GetExportSymbolSetName(pSymbol->GetSymbolSetName()) == "Greek")
bRes = true;
}
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 0cb52c9..7ab9f02 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -47,8 +47,8 @@ using namespace ::rtl;
/**************************************************************************/
SmSym::SmSym() :
- m_aName(rtl::OUString("unknown")),
- m_aSetName(rtl::OUString("unknown")),
+ m_aName(OUString("unknown")),
+ m_aSetName(OUString("unknown")),
m_cChar('\0'),
m_bPredefined(false),
m_bDocSymbol(false)
@@ -65,8 +65,8 @@ SmSym::SmSym(const SmSym& rSymbol)
}
-SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
- const String& rSet, bool bIsPredefined)
+SmSym::SmSym(const OUString& rName, const Font& rFont, sal_UCS4 cChar,
+ const OUString& rSet, bool bIsPredefined)
{
m_aName = m_aExportName = rName;
@@ -141,7 +141,7 @@ SmSymbolManager& SmSymbolManager::operator = (const SmSymbolManager& rSymbolSetM
}
-SmSym *SmSymbolManager::GetSymbolByName(const String& rSymbolName)
+SmSym *SmSymbolManager::GetSymbolByName(const OUString& rSymbolName)
{
SmSym *pRes = NULL;
SymbolMap_t::iterator aIt( m_aSymbols.find( rSymbolName ) );
@@ -166,8 +166,8 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
{
bool bAdded = false;
- const String aSymbolName( rSymbol.GetName() );
- if (aSymbolName.Len() > 0 && rSymbol.GetSymbolSetName().Len() > 0)
+ const OUString aSymbolName( rSymbol.GetName() );
+ if (aSymbolName.getLength() > 0 && rSymbol.GetSymbolSetName().getLength() > 0)
{
const SmSym *pFound = GetSymbolByName( aSymbolName );
const bool bSymbolConflict = pFound && !pFound->IsEqualInUI( rSymbol );
@@ -198,9 +198,9 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
}
-void SmSymbolManager::RemoveSymbol( const String & rSymbolName )
+void SmSymbolManager::RemoveSymbol( const OUString & rSymbolName )
{
- if (rSymbolName.Len() > 0)
+ if (rSymbolName.getLength() > 0)
{
size_t nOldSize = m_aSymbols.size();
m_aSymbols.erase( rSymbolName );
@@ -209,9 +209,9 @@ void SmSymbolManager::RemoveSymbol( const String & rSymbolName )
}
-std::set< String > SmSymbolManager::GetSymbolSetNames() const
+std::set< OUString > SmSymbolManager::GetSymbolSetNames() const
{
- std::set< String > aRes;
+ std::set< OUString > aRes;
SymbolMap_t::const_iterator aIt( m_aSymbols.begin() );
for ( ; aIt != m_aSymbols.end(); ++aIt )
aRes.insert( aIt->second.GetSymbolSetName() );
@@ -219,10 +219,10 @@ std::set< String > SmSymbolManager::GetSymbolSetNames() const
}
-const SymbolPtrVec_t SmSymbolManager::GetSymbolSet( const String& rSymbolSetName )
+const SymbolPtrVec_t SmSymbolManager::GetSymbolSet( const OUString& rSymbolSetName )
{
SymbolPtrVec_t aRes;
- if (rSymbolSetName.Len() > 0)
+ if (rSymbolSetName.getLength() > 0)
{
SymbolMap_t::const_iterator aIt( m_aSymbols.begin() );
for ( ; aIt != m_aSymbols.end(); ++aIt )
@@ -246,8 +246,8 @@ void SmSymbolManager::Load()
for (size_t i = 0; i < nSymbolCount; ++i)
{
const SmSym &rSym = aSymbols[i];
- OSL_ENSURE( rSym.GetName().Len() > 0, "symbol without name!" );
- if (rSym.GetName().Len() > 0)
+ OSL_ENSURE( rSym.GetName().getLength() > 0, "symbol without name!" );
+ if (rSym.GetName().getLength() > 0)
AddOrReplaceSymbol( rSym );
}
m_bModified = true;
@@ -260,9 +260,9 @@ void SmSymbolManager::Load()
// now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
SmLocalizedSymbolData aLocalizedData;
- const String aGreekSymbolSetName( aLocalizedData.GetUiSymbolSetName( OUString::createFromAscii( "Greek" ) ));
+ const OUString aGreekSymbolSetName(aLocalizedData.GetUiSymbolSetName(OUString("Greek")));
const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) );
- String aSymbolSetName = rtl::OUString('i');
+ String aSymbolSetName = OUString('i');
aSymbolSetName += aGreekSymbolSetName;
size_t nSymbols = aGreekSymbols.size();
for (size_t i = 0; i < nSymbols; ++i)
@@ -272,7 +272,7 @@ void SmSymbolManager::Load()
Font aFont( rSym.GetFace() );
OSL_ENSURE( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." );
aFont.SetItalic( ITALIC_NORMAL );
- String aSymbolName = rtl::OUString('i');
+ String aSymbolName = OUString('i');
aSymbolName += rSym.GetName();
SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
aSymbolSetName, true /*bIsPredefined*/ );
@@ -289,8 +289,8 @@ void SmSymbolManager::Save()
// prepare to skip symbols from iGreek on saving
SmLocalizedSymbolData aLocalizedData;
- String aSymbolSetName = rtl::OUString('i');
- aSymbolSetName += aLocalizedData.GetUiSymbolSetName( OUString::createFromAscii( "Greek" ));
+ OUString aSymbolSetName('i');
+ aSymbolSetName += aLocalizedData.GetUiSymbolSetName(OUString("Greek"));
SymbolPtrVec_t aTmp( GetSymbols() );
std::vector< SmSym > aSymbols;
More information about the Libreoffice-commits
mailing list