[Libreoffice-commits] core.git: 11 commits - cui/source dbaccess/uiconfig editeng/source fpicker/source helpcontent2 include/tools sc/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk tools/source uui/source vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Sun Sep 8 12:44:37 PDT 2013
cui/source/inc/cuisrchdlg.hxx | 2
cui/source/options/cuisrchdlg.cxx | 15 +-
cui/source/options/treeopt.cxx | 34 +++---
cui/source/tabpages/numfmt.cxx | 2
dbaccess/uiconfig/ui/generalpagewizard.ui | 11 --
editeng/source/misc/svxacorr.cxx | 24 ++--
editeng/source/uno/unofored.cxx | 2
editeng/source/uno/unoforou.cxx | 2
fpicker/source/office/iodlg.cxx | 10 -
helpcontent2 | 2
include/tools/string.hxx | 2
sc/source/core/data/postit.cxx | 4
sc/source/core/tool/address.cxx | 6 -
sc/source/filter/excel/xechart.cxx | 2
sc/source/filter/excel/xichart.cxx | 8 -
sc/source/filter/excel/xiroot.cxx | 2
sc/source/filter/excel/xlescher.cxx | 2
sc/source/filter/inc/xichart.hxx | 8 -
sc/source/ui/drawfunc/drawsh.cxx | 2
sw/UIConfig_swriter.mk | 2
sw/inc/dbui.hrc | 1
sw/inc/helpid.h | 1
sw/source/core/undo/unovwr.cxx | 5
sw/source/ui/chrdlg/drpcps.cxx | 16 ---
sw/source/ui/dbui/createaddresslistdialog.hrc | 4
sw/source/ui/dbui/customizeaddresslistdialog.cxx | 52 +++-------
sw/source/ui/dbui/customizeaddresslistdialog.hrc | 6 -
sw/source/ui/dbui/customizeaddresslistdialog.hxx | 39 +++++--
sw/source/ui/dbui/customizeaddresslistdialog.src | 50 ---------
sw/source/ui/dialog/addrdlg.cxx | 15 --
sw/source/ui/docvw/edtwin2.cxx | 13 +-
sw/source/ui/frmdlg/pattern.cxx | 24 ----
sw/source/ui/inc/addrdlg.hxx | 9 -
sw/source/ui/inc/content.hxx | 2
sw/source/ui/inc/drpcps.hxx | 8 -
sw/source/ui/inc/navipi.hxx | 2
sw/source/ui/inc/pattern.hxx | 7 -
sw/source/ui/utlui/content.cxx | 29 +++--
sw/source/ui/utlui/navipi.cxx | 16 +--
sw/uiconfig/swriter/ui/addentrydialog.ui | 119 +++++++++++++++++++++++
sw/uiconfig/swriter/ui/renameentrydialog.ui | 119 +++++++++++++++++++++++
tools/source/string/tustring.cxx | 19 ---
uui/source/filechanged.cxx | 2
uui/source/lockfailed.cxx | 2
vcl/inc/svdata.hxx | 4
vcl/source/app/help.cxx | 6 -
vcl/source/app/svapp.cxx | 2
vcl/source/control/edit.cxx | 2
vcl/source/control/field.cxx | 2
vcl/source/control/field2.cxx | 4
vcl/source/control/lstbox.cxx | 6 -
vcl/source/gdi/print.cxx | 4
vcl/source/window/msgbox.cxx | 8 -
53 files changed, 426 insertions(+), 314 deletions(-)
New commits:
commit 4b001d5d980a995b5ba06d20a20d47fd0340896b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 20:16:35 2013 +0100
convert add/rename entries dialogs to .ui
Change-Id: I40040a237763a0706177ba5c6c1a664a51b3ee07
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 83cf408..d05381b 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
$(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/abstractdialog \
+ sw/uiconfig/swriter/ui/addentrydialog \
sw/uiconfig/swriter/ui/alreadyexistsdialog \
sw/uiconfig/swriter/ui/asciifilterdialog \
sw/uiconfig/swriter/ui/assignstylesdialog \
@@ -161,6 +162,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/printoptionspage \
sw/uiconfig/swriter/ui/privateuserpage \
sw/uiconfig/swriter/ui/renameautotextdialog \
+ sw/uiconfig/swriter/ui/renameentrydialog \
sw/uiconfig/swriter/ui/renameobjectdialog \
sw/uiconfig/swriter/ui/rowheight \
sw/uiconfig/swriter/ui/saveashtmldialog \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 681a6e3..a03816e 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -37,7 +37,6 @@
#define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13)
#define DLG_MM_CREATEADDRESSLIST (RC_DBUI_BEGIN + 14)
#define DLG_MM_FIND_ENTRY (RC_DBUI_BEGIN + 15)
-#define DLG_MM_ADD_RENAME_ENTRY (RC_DBUI_BEGIN + 16)
#define DLG_MM_CUSTOMIZE_ADDRESS_LIST (RC_DBUI_BEGIN + 17)
#define DLG_MM_CUSTOMIZEADDRESSBLOCK (RC_DBUI_BEGIN + 18)
#define DLG_MM_SELECTADDRESSBLOCK (RC_DBUI_BEGIN + 19)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 56f931c..bc96436 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -381,7 +381,6 @@
#define HID_MM_DBTABLEPREVIEWDIALOG "SW_HID_MM_DBTABLEPREVIEWDIALOG"
#define HID_MM_CREATEADDRESSLIST "SW_HID_MM_CREATEADDRESSLIST"
#define HID_MM_FIND_ENTRY "SW_HID_MM_FIND_ENTRY"
-#define HID_MM_ADD_RENAME_ENTRY "SW_HID_MM_ADD_RENAME_ENTRY"
#define HID_MM_CUSTOMIZE_ADDRESS_LIST "SW_HID_MM_CUSTOMIZE_ADDRESS_LIST"
#define HID_MM_CUSTOMIZEADDRESSBLOCK "SW_HID_MM_CUSTOMIZEADDRESSBLOCK"
#define HID_MM_SELECTADDRESSBLOCK "SW_HID_MM_SELECTADDRESSBLOCK"
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hrc b/sw/source/ui/dbui/createaddresslistdialog.hrc
index dc436ab..1ec8a41 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hrc
+++ b/sw/source/ui/dbui/createaddresslistdialog.hrc
@@ -46,10 +46,6 @@
#define CB_FINDONLY 3
#define LB_FINDONLY 4
-#define FT_FIELDNAME 1
-#define ED_FIELDNAME 2
-#define ST_RENAME_TITLE 3
-#define ST_ADD_BUTTON 4
#define PB_FIND 5
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index b4784e4..881458d 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -58,7 +58,7 @@ SwCustomizeAddressListDialog::SwCustomizeAddressListDialog(
m_aUpPB.SetClickHdl(aUpDownLk);
m_aDownPB.SetClickHdl(aUpDownLk);
- ::std::vector< OUString >::iterator aHeaderIter;
+ std::vector< OUString >::iterator aHeaderIter;
for(aHeaderIter = m_pNewData->aDBColumnHeaders.begin();
aHeaderIter != m_pNewData->aDBColumnHeaders.end(); ++aHeaderIter)
@@ -85,8 +85,11 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- SwAddRenameEntryDialog* pDlg =
- new SwAddRenameEntryDialog(pButton, bRename, m_pNewData->aDBColumnHeaders);
+ SwAddRenameEntryDialog* pDlg;
+ if (bRename)
+ pDlg = new SwRenameEntryDialog(pButton, m_pNewData->aDBColumnHeaders);
+ else
+ pDlg = new SwAddEntryDialog(pButton, m_pNewData->aDBColumnHeaders);
if(bRename)
{
String aTemp = m_aFieldsLB.GetEntry(nPos);
@@ -108,7 +111,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
m_pNewData->aDBColumnHeaders.insert(m_pNewData->aDBColumnHeaders.begin() + nPos, sNew);
//add a new entry into all data arrays
String sTemp;
- ::std::vector< ::std::vector< OUString > >::iterator aDataIter;
+ std::vector< std::vector< OUString > >::iterator aDataIter;
for( aDataIter = m_pNewData->aDBData.begin(); aDataIter != m_pNewData->aDBData.end(); ++aDataIter)
aDataIter->insert(aDataIter->begin() + nPos, sTemp);
@@ -131,7 +134,7 @@ IMPL_LINK_NOARG(SwCustomizeAddressListDialog, DeleteHdl_Impl)
//remove the column
m_pNewData->aDBColumnHeaders.erase(m_pNewData->aDBColumnHeaders.begin() + nPos);
//remove the data
- ::std::vector< ::std::vector< OUString > >::iterator aDataIter;
+ std::vector< std::vector< OUString > >::iterator aDataIter;
for( aDataIter = m_pNewData->aDBData.begin(); aDataIter != m_pNewData->aDBData.end(); ++aDataIter)
aDataIter->erase(aDataIter->begin() + nPos);
@@ -155,7 +158,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
OUString sHeader = m_pNewData->aDBColumnHeaders[nOldPos];
m_pNewData->aDBColumnHeaders.erase(m_pNewData->aDBColumnHeaders.begin() + nOldPos);
m_pNewData->aDBColumnHeaders.insert(m_pNewData->aDBColumnHeaders.begin() + nPos, sHeader);
- ::std::vector< ::std::vector< OUString > >::iterator aDataIter;
+ std::vector< std::vector< OUString > >::iterator aDataIter;
for( aDataIter = m_pNewData->aDBData.begin(); aDataIter != m_pNewData->aDBData.end(); ++aDataIter)
{
OUString sData = (*aDataIter)[nOldPos];
@@ -183,32 +186,15 @@ SwCSVData* SwCustomizeAddressListDialog::GetNewData()
}
SwAddRenameEntryDialog::SwAddRenameEntryDialog(
- Window* pParent, bool bRename, const ::std::vector< OUString >& rCSVHeader) :
- SfxModalDialog(pParent, SW_RES(DLG_MM_ADD_RENAME_ENTRY)),
-#ifdef _MSC_VER
-#pragma warning (disable : 4355)
-#endif
- m_aFieldNameFT( this, SW_RES( FT_FIELDNAME)),
- m_aFieldNameED( this, SW_RES( ED_FIELDNAME)),
- m_aOK( this, SW_RES( PB_OK)),
- m_aCancel( this, SW_RES( PB_CANCEL)),
- m_aHelp( this, SW_RES( PB_HELP)),
-#ifdef _MSC_VER
-#pragma warning (default : 4355)
-#endif
- m_rCSVHeader(rCSVHeader)
-{
- if(bRename)
- SetText(String(SW_RES(ST_RENAME_TITLE)));
- else
- m_aOK.SetText(String(SW_RES(ST_ADD_BUTTON)));
- FreeResource();
- m_aFieldNameED.SetModifyHdl(LINK(this, SwAddRenameEntryDialog, ModifyHdl_Impl));
- ModifyHdl_Impl( &m_aFieldNameED );
-}
-
-SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
+ Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
+ const std::vector< OUString >& rCSVHeader)
+ : SfxModalDialog(pParent, rID, rUIXMLDescription)
+ , m_rCSVHeader(rCSVHeader)
{
+ get(m_pOK, "ok");
+ get(m_pFieldNameED, "entry");
+ m_pFieldNameED->SetModifyHdl(LINK(this, SwAddRenameEntryDialog, ModifyHdl_Impl));
+ ModifyHdl_Impl(m_pFieldNameED);
}
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
@@ -218,7 +204,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
if(!bFound)
{
- ::std::vector< OUString >::const_iterator aHeaderIter;
+ std::vector< OUString >::const_iterator aHeaderIter;
for(aHeaderIter = m_rCSVHeader.begin();
aHeaderIter != m_rCSVHeader.end();
++aHeaderIter)
@@ -228,7 +214,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
break;
}
}
- m_aOK.Enable(!bFound);
+ m_pOK->Enable(!bFound);
return 0;
}
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hrc b/sw/source/ui/dbui/customizeaddresslistdialog.hrc
index 67713ae..4130046 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hrc
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hrc
@@ -32,12 +32,6 @@
#define PB_CANCEL 15
#define PB_HELP 16
-#define FT_FIELDNAME 1
-#define ED_FIELDNAME 2
-#define ST_RENAME_TITLE 3
-#define ST_ADD_BUTTON 4
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
index 3eec3fb..ecea2dc 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
@@ -62,23 +62,38 @@ public:
class SwAddRenameEntryDialog : public SfxModalDialog
{
- FixedText m_aFieldNameFT;
- Edit m_aFieldNameED;
-
- OKButton m_aOK;
- CancelButton m_aCancel;
- HelpButton m_aHelp;
-
- const ::std::vector< OUString >& m_rCSVHeader;
+ Edit* m_pFieldNameED;
+ OKButton* m_pOK;
+ const std::vector< OUString >& m_rCSVHeader;
DECL_LINK(ModifyHdl_Impl, Edit*);
+protected:
+ SwAddRenameEntryDialog(Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription, const std::vector< OUString >& rCSVHeader);
public:
- SwAddRenameEntryDialog(Window* pParent, bool bRename, const ::std::vector< OUString >& aCSVHeader);
- ~SwAddRenameEntryDialog();
+ void SetFieldName(const OUString& rName) {m_pFieldNameED->SetText(rName);}
+ OUString GetFieldName() const {return m_pFieldNameED->GetText();};
+
+};
- void SetFieldName(const String& rName) {m_aFieldNameED.SetText(rName);}
- String GetFieldName() const {return m_aFieldNameED.GetText();};
+class SwAddEntryDialog : public SwAddRenameEntryDialog
+{
+public:
+ SwAddEntryDialog(Window* pParent, const std::vector< OUString >& rCSVHeader)
+ : SwAddRenameEntryDialog(pParent, "AddEntryDialog",
+ "modules/swriter/ui/addentrydialog.ui", rCSVHeader)
+ {
+ }
+};
+class SwRenameEntryDialog : public SwAddRenameEntryDialog
+{
+public:
+ SwRenameEntryDialog(Window* pParent, const std::vector< OUString >& rCSVHeader)
+ : SwAddRenameEntryDialog(pParent, "RenameEntryDialog",
+ "modules/swriter/ui/renameentrydialog.ui", rCSVHeader)
+ {
+ }
};
#endif
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src
index b58ee95..345f411 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.src
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.src
@@ -104,54 +104,4 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST
};
};
-ModalDialog DLG_MM_ADD_RENAME_ENTRY
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_MM_ADD_RENAME_ENTRY;
- Size = MAP_APPFONT ( 188 , 60 ) ;
- Moveable = TRUE ;
-
- Text [ en-US ] = "Add Element";
-
- FixedText FT_FIELDNAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Text [ en-US ] = "Element ~name";
- };
- Edit ED_FIELDNAME
- {
- HelpID = "sw:Edit:DLG_MM_ADD_RENAME_ENTRY:ED_FIELDNAME";
- Pos = MAP_APPFONT ( 6 , 14 ) ;
- Size = MAP_APPFONT ( 120 , 12 ) ;
- Border = TRUE;
- };
-
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 132 , 3 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 132 , 20 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 132 , 40 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- String ST_RENAME_TITLE
- {
- Text [ en-US ] = "Rename Element";
- };
- String ST_ADD_BUTTON
- {
- Text [ en-US ] = "Add";
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/uiconfig/swriter/ui/addentrydialog.ui b/sw/uiconfig/swriter/ui/addentrydialog.ui
new file mode 100644
index 0000000..1fdc491
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/addentrydialog.ui
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.6 -->
+ <object class="GtkDialog" id="AddEntryDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Add Element</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>
+ </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="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</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="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkEntry" id="entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">start</property>
+ <property name="invisible_char">â</property>
+ </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">Element name</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </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-widgets>
+ </object>
+</interface>
diff --git a/sw/uiconfig/swriter/ui/renameentrydialog.ui b/sw/uiconfig/swriter/ui/renameentrydialog.ui
new file mode 100644
index 0000000..9e2950b
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/renameentrydialog.ui
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.6 -->
+ <object class="GtkDialog" id="RenameEntryDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Rename Element</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>
+ </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="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</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="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkEntry" id="entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">start</property>
+ <property name="invisible_char">â</property>
+ </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">Element name</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </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-widgets>
+ </object>
+</interface>
commit a16f9eaa053b8a99c8c9ff6b0964f5c525d7a57e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 20:14:01 2013 +0100
fix empty
Change-Id: Ib15a230d67a9af048106d82ed30fec64803a97ef
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 4f10b75..1b02b1c 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -414,7 +414,7 @@ public:
/** Returns true, if the source link contains explicit string data. */
inline bool HasString() const { return mxString && !mxString->IsEmpty(); }
/** Returns explicit string data or an empty string. */
- OUString GetString() const { return mxString ? mxString->GetText() : OUString(); }
+ OUString GetString() const { if (mxString) return mxString->GetText(); return OUString(); }
/** Returns the number of data points of this source link. */
sal_uInt16 GetCellCount() const;
commit 40aa808b06d14bd7d0c41e2bd79c4f6762570391
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:37:23 2013 +0100
add mnemonic widgets
Change-Id: I0ad5c2f5b5a8037612f339fcd5fb246bb526aaf0
diff --git a/dbaccess/uiconfig/ui/generalpagewizard.ui b/dbaccess/uiconfig/ui/generalpagewizard.ui
index 0fcd591..b1f9dd4 100644
--- a/dbaccess/uiconfig/ui/generalpagewizard.ui
+++ b/dbaccess/uiconfig/ui/generalpagewizard.ui
@@ -59,12 +59,10 @@
<child>
<object class="GtkRadioButton" id="createDatabase">
<property name="label" translatable="yes">Create a n_ew database</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="margin_left">12</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -88,6 +86,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Embedded Database:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">embeddeddbList</property>
</object>
<packing>
<property name="expand">False</property>
@@ -118,12 +118,10 @@
<child>
<object class="GtkRadioButton" id="openExistingDatabase">
<property name="label" translatable="yes">Open an existing database _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="margin_left">12</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -149,6 +147,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Recently used:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">documentList</property>
</object>
<packing>
<property name="expand">False</property>
@@ -180,13 +179,11 @@
<child>
<object class="dbulo-OpenDocumentButton" id="openDatabase">
<property name="label" translatable="yes">Open</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">start</property>
<property name="margin_left">48</property>
- <property name="use_action_appearance">False</property>
<property name="always_show_image">True</property>
</object>
<packing>
@@ -198,12 +195,10 @@
<child>
<object class="GtkRadioButton" id="connectDatabase">
<property name="label" translatable="yes">Connect to an e_xisting database</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="margin_left">12</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
commit 02740cbe0a21939e3720b72a074ce71798e78d1d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:34:06 2013 +0100
Related: fdo#38838 drop String::EmptyString now as well
Change-Id: I849dbf3a40189e700036249b15dd8bde493083b6
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 920be54..bde4767 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -139,28 +139,28 @@ static inline String GetViewOptUserItem( const SvtViewOptions& rOpt )
struct ModuleToGroupNameMap_Impl
{
const char* m_pModule;
- String m_sGroupName;
- sal_uInt16 m_nNodeId;
+ OUString m_sGroupName;
+ sal_uInt16 m_nNodeId;
};
static OfaPageResource* pPageRes = NULL;
static ModuleToGroupNameMap_Impl ModuleMap[] =
{
- { "ProductName", String::EmptyString(), SID_GENERAL_OPTIONS },
- { "LanguageSettings", String::EmptyString(), SID_LANGUAGE_OPTIONS },
- { "Internet", String::EmptyString(), SID_INET_DLG },
- { "LoadSave", String::EmptyString(), SID_FILTER_DLG },
- { "Writer", String::EmptyString(), SID_SW_EDITOPTIONS },
- { "WriterWeb", String::EmptyString(), SID_SW_ONLINEOPTIONS },
- { "Math", String::EmptyString(), SID_SM_EDITOPTIONS },
- { "Calc", String::EmptyString(), SID_SC_EDITOPTIONS },
- { "Impress", String::EmptyString(), SID_SD_EDITOPTIONS },
- { "Draw", String::EmptyString(), SID_SD_GRAPHIC_OPTIONS },
- { "Charts", String::EmptyString(), SID_SCH_EDITOPTIONS },
- { "Base", String::EmptyString(), SID_SB_STARBASEOPTIONS },
-
- { NULL, String::EmptyString(), 0xFFFF }
+ { "ProductName", OUString(), SID_GENERAL_OPTIONS },
+ { "LanguageSettings", OUString(), SID_LANGUAGE_OPTIONS },
+ { "Internet", OUString(), SID_INET_DLG },
+ { "LoadSave", OUString(), SID_FILTER_DLG },
+ { "Writer", OUString(), SID_SW_EDITOPTIONS },
+ { "WriterWeb", OUString(), SID_SW_ONLINEOPTIONS },
+ { "Math", OUString(), SID_SM_EDITOPTIONS },
+ { "Calc", OUString(), SID_SC_EDITOPTIONS },
+ { "Impress", OUString(), SID_SD_EDITOPTIONS },
+ { "Draw", OUString(), SID_SD_GRAPHIC_OPTIONS },
+ { "Charts", OUString(), SID_SCH_EDITOPTIONS },
+ { "Base", OUString(), SID_SB_STARBASEOPTIONS },
+
+ { NULL, OUString(), 0xFFFF }
};
static void setGroupName( const OUString& rModule, const String& rGroupName )
@@ -222,7 +222,7 @@ static void deleteGroupNames()
{
sal_uInt16 nIndex = 0;
while ( ModuleMap[ nIndex ].m_pModule )
- ModuleMap[ nIndex++ ].m_sGroupName = String::EmptyString();
+ ModuleMap[ nIndex++ ].m_sGroupName = OUString();
}
static sal_uInt16 getGroupNodeId( const OUString& rModule )
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index 57d77fb..2e41013 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -474,7 +474,7 @@ const SfxItemSet * SvxEditEngineForwarder::GetEmptyItemSetPtr()
void SvxEditEngineForwarder::AppendParagraph()
{
- rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() );
+ rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), OUString() );
}
sal_uInt16 SvxEditEngineForwarder::AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet & /*rSet*/ )
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index d07c68a..8a98d64 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -548,7 +548,7 @@ const SfxItemSet * SvxOutlinerForwarder::GetEmptyItemSetPtr()
void SvxOutlinerForwarder::AppendParagraph()
{
EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() );
- rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() );
+ rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), OUString() );
}
sal_uInt16 SvxOutlinerForwarder::AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet & /*rSet*/ )
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index b744f88..56b6e9c 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -170,7 +170,6 @@ public:
{ return Append( UniString( concat ) ); }
#endif
- static const UniString& EmptyString();
sal_Int32 ToInt32() const;
UniString& Assign( const UniString& rStr );
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 8331021..ccbe256 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -117,11 +117,11 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc )
/* Line ends are now created with an empty name. The
checkForUniqueItem() method then finds a unique name for the item's
value. */
- aItemSet.Put( XLineStartItem( String::EmptyString(), ::basegfx::B2DPolyPolygon( aTriangle ) ) );
+ aItemSet.Put( XLineStartItem( OUString(), ::basegfx::B2DPolyPolygon( aTriangle ) ) );
aItemSet.Put( XLineStartWidthItem( 200 ) );
aItemSet.Put( XLineStartCenterItem( false ) );
aItemSet.Put( XFillStyleItem( XFILL_SOLID ) );
- aItemSet.Put( XFillColorItem( String::EmptyString(), ScDetectiveFunc::GetCommentColor() ) );
+ aItemSet.Put( XFillColorItem( OUString(), ScDetectiveFunc::GetCommentColor() ) );
aItemSet.Put( SdrCaptionEscDirItem( SDRCAPT_ESCBESTFIT ) );
// shadow
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 64e3f0d..d7a62b6 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -975,7 +975,7 @@ sal_uInt16 XclExpChSourceLink::ConvertStringSequence( const Sequence< Reference<
sal_uInt16 nFontIdx = EXC_FONT_APP;
if( rStringSeq.hasElements() )
{
- mxString = XclExpStringHelper::CreateString( GetRoot(), String::EmptyString(), EXC_STR_FORCEUNICODE | EXC_STR_8BITLENGTH | EXC_STR_SEPARATEFORMATS );
+ mxString = XclExpStringHelper::CreateString( GetRoot(), OUString(), EXC_STR_FORCEUNICODE | EXC_STR_8BITLENGTH | EXC_STR_SEPARATEFORMATS );
Reference< XBreakIterator > xBreakIt = GetDoc().GetBreakIterator();
namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index fb16dda..1df40df 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2747,12 +2747,12 @@ bool XclImpChTypeGroup::HasConnectorLines() const
return ( xConLine != maChartLines.end() && xConLine->second->HasLine() );
}
-const String& XclImpChTypeGroup::GetSingleSeriesTitle() const
+OUString XclImpChTypeGroup::GetSingleSeriesTitle() const
{
// no automatic title for series with trendlines or error bars
// pie charts always show an automatic title, even if more series exist
return (mxFirstSeries && !mxFirstSeries->HasChildSeries() && (maTypeInfo.mbSingleSeriesVis || (maSeries.size() == 1))) ?
- mxFirstSeries->GetTitle() : String::EmptyString();
+ mxFirstSeries->GetTitle() : OUString();
}
void XclImpChTypeGroup::ConvertChart3d( ScfPropertySet& rPropSet ) const
@@ -3590,9 +3590,9 @@ XclImpChLegendRef XclImpChAxesSet::GetLegend() const
return xLegend;
}
-const String& XclImpChAxesSet::GetSingleSeriesTitle() const
+OUString XclImpChAxesSet::GetSingleSeriesTitle() const
{
- return (maTypeGroups.size() == 1) ? maTypeGroups.begin()->second->GetSingleSeriesTitle() : String::EmptyString();
+ return (maTypeGroups.size() == 1) ? maTypeGroups.begin()->second->GetSingleSeriesTitle() : OUString();
}
void XclImpChAxesSet::Convert( Reference< XDiagram > xDiagram ) const
diff --git a/sc/source/filter/excel/xiroot.cxx b/sc/source/filter/excel/xiroot.cxx
index 206a093..6d53ae9 100644
--- a/sc/source/filter/excel/xiroot.cxx
+++ b/sc/source/filter/excel/xiroot.cxx
@@ -111,7 +111,7 @@ void XclImpRoot::InitializeTable( SCTAB nScTab )
GetPageSettings().Initialize();
GetTabViewSettings().Initialize();
// delete the automatically generated codename
- GetDoc().SetCodeName( nScTab, String::EmptyString() );
+ GetDoc().SetCodeName( nScTab, OUString() );
}
void XclImpRoot::FinalizeTable()
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index 974155a..00def46 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -339,7 +339,7 @@ String XclControlHelper::ExtractFromMacroDescriptor(
rDescriptor.ListenerType.equalsAscii( spTbxListenerData[ eEventType ].mpcListenerType ) &&
rDescriptor.EventMethod.equalsAscii( spTbxListenerData[ eEventType ].mpcEventMethod ) )
return XclTools::GetXclMacroName( rDescriptor.ScriptCode );
- return String::EmptyString();
+ return OUString();
}
// ============================================================================
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 308ca4c..4f10b75 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -414,7 +414,7 @@ public:
/** Returns true, if the source link contains explicit string data. */
inline bool HasString() const { return mxString && !mxString->IsEmpty(); }
/** Returns explicit string data or an empty string. */
- inline const String& GetString() const { return mxString ? mxString->GetText() : String::EmptyString(); }
+ OUString GetString() const { return mxString ? mxString->GetText() : OUString(); }
/** Returns the number of data points of this source link. */
sal_uInt16 GetCellCount() const;
@@ -828,7 +828,7 @@ public:
/** Returns true, if the series contains child series (e.g. trend lines). */
inline bool HasChildSeries() const { return !maTrendLines.empty() || !maErrorBars.empty(); }
/** Returns series title or an empty string, if the series does not contain a title. */
- inline const String& GetTitle() const { return mxTitleLink ? mxTitleLink->GetString() : String::EmptyString(); }
+ OUString GetTitle() const { return mxTitleLink ? mxTitleLink->GetString() : OUString(); }
/** Returns true, if the series line is smoothed. */
inline bool HasSpline() const { return mxSeriesFmt && mxSeriesFmt->HasSpline(); }
@@ -1066,7 +1066,7 @@ public:
/** Returns the default series data format. */
inline XclImpChDataFormatRef GetGroupFormat() const { return mxGroupFmt; }
/** Returns series title, if the chart type group contains only one single series. */
- const String& GetSingleSeriesTitle() const;
+ OUString GetSingleSeriesTitle() const;
/** Converts and writes all 3D settings to the passed diagram. */
void ConvertChart3d( ScfPropertySet& rPropSet ) const;
@@ -1303,7 +1303,7 @@ public:
/** Looks for a legend in all chart type groups and returns it. */
XclImpChLegendRef GetLegend() const;
/** Returns series title, if the axes set contains only one single series. */
- const String& GetSingleSeriesTitle() const;
+ OUString GetSingleSeriesTitle() const;
/** Creates a coordinate system and converts all series and axis settings. */
void Convert( XDiagramRef xDiagram ) const;
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 5a675be..ee9305c 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -228,7 +228,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
if ( pInfo && !pInfo->GetHlink().isEmpty() )
- ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() );
+ ScGlobal::OpenURL( pInfo->GetHlink(), OUString() );
}
break;
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 13b1e42..97f5e95 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -52,13 +52,6 @@ DBG_NAME( UniString )
UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
-namespace { struct Empty : public rtl::Static< const UniString, Empty> {}; }
-
-const UniString& UniString::EmptyString()
-{
- return Empty::get();
-}
-
sal_Int32 UniString::ToInt32() const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
index b8c1311..2e143ef 100644
--- a/uui/source/filechanged.cxx
+++ b/uui/source/filechanged.cxx
@@ -23,7 +23,7 @@
FileChangedQueryBox::FileChangedQueryBox( Window* pParent, ResMgr* pResMgr ) :
MessBox(pParent, 0,
ResId(STR_FILECHANGED_TITLE, *pResMgr).toString(),
- String::EmptyString() )
+ OUString() )
{
SetImage( QueryBox::GetStandardImage() );
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index 06f6b17..3fa4674 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -25,7 +25,7 @@
LockFailedQueryBox::LockFailedQueryBox( Window* pParent, ResMgr* pResMgr ) :
MessBox(pParent, 0,
ResId(STR_LOCKFAILED_TITLE, *pResMgr).toString(),
- String::EmptyString() )
+ OUString() )
{
SetImage( ErrorBox::GetStandardImage() );
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index a7db1f7..f594638 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -373,10 +373,6 @@ bool ImplInitAccessBridge( bool bAllowCancel, bool &rCancelled );
FieldUnitStringList* ImplGetFieldUnits();
FieldUnitStringList* ImplGetCleanedFieldUnits();
-
-inline const String& ImplGetSVEmptyStr()
- { return String::EmptyString(); }
-
// ImplDelData is used as a "dog tag" by a window when it
// does something that could indirectly destroy the window
// TODO: wild destruction of a window should not be possible
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 856ef1e0..5b2bd3d 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -74,7 +74,7 @@ sal_Bool Help::SearchKeyword( const OUString& )
OUString Help::GetHelpText( const OUString&, const Window* )
{
- return ImplGetSVEmptyStr();
+ return OUString();
}
// -----------------------------------------------------------------------
@@ -184,7 +184,7 @@ sal_Bool Help::ShowBalloon( Window* pParent,
const OUString& rHelpText )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, 0,
- rHelpText, ImplGetSVEmptyStr(), rScreenPos );
+ rHelpText, OUString(), rScreenPos );
return sal_True;
}
@@ -196,7 +196,7 @@ sal_Bool Help::ShowBalloon( Window* pParent,
const OUString& rHelpText )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, 0,
- rHelpText, ImplGetSVEmptyStr(), rScreenPos, &rRect );
+ rHelpText, OUString(), rScreenPos, &rRect );
return sal_True;
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 47222d0..c7c65fb 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1094,7 +1094,7 @@ OUString Application::GetAppName()
if ( pSVData->maAppData.mpAppName )
return *(pSVData->maAppData.mpAppName);
else
- return ImplGetSVEmptyStr();
+ return OUString();
}
void Application::SetDisplayName( const OUString& rName )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f887260..6fd9fd2 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2718,7 +2718,7 @@ void Edit::Cut()
if ( !(GetStyle() & WB_PASSWORD ) )
{
Copy();
- ReplaceSelected( ImplGetSVEmptyStr() );
+ ReplaceSelected( OUString() );
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index e0c7558..d994757 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -427,7 +427,7 @@ void FormatterBase::ImplSetText( const OUString& rText, Selection* pNewSelection
void FormatterBase::SetEmptyFieldValue()
{
if ( mpField )
- mpField->SetText( ImplGetSVEmptyStr() );
+ mpField->SetText( OUString() );
mbEmptyFieldValue = sal_True;
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 12d15a2..6a26106 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -836,7 +836,7 @@ void PatternFormatter::SetString( const OUString& rStr )
OUString PatternFormatter::GetString() const
{
if ( !GetField() )
- return ImplGetSVEmptyStr();
+ return OUString();
else
return ImplPatternReformat( GetField()->GetText(), m_aEditMask, maLiteralMask, mnFormatFlags );
}
@@ -1870,7 +1870,7 @@ void DateFormatter::Reformat()
SetDate( Date( Date::SYSTEM ) );
else
{
- ImplSetText( ImplGetSVEmptyStr() );
+ ImplSetText( OUString() );
SetEmptyFieldValueData( sal_True );
}
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 175e86d..b1e5df0 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -278,7 +278,7 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n )
else
{
mpImplWin->SetItemPos( LISTBOX_ENTRY_NOTFOUND );
- mpImplWin->SetString( ImplGetSVEmptyStr() );
+ mpImplWin->SetString( OUString() );
Image aImage;
mpImplWin->SetImage( aImage );
}
@@ -993,7 +993,7 @@ void ListBox::Clear()
if( IsDropDownBox() )
{
mpImplWin->SetItemPos( LISTBOX_ENTRY_NOTFOUND );
- mpImplWin->SetString( ImplGetSVEmptyStr() );
+ mpImplWin->SetString( OUString() );
Image aImage;
mpImplWin->SetImage( aImage );
mpImplWin->Invalidate();
@@ -1008,7 +1008,7 @@ void ListBox::SetNoSelection()
if( IsDropDownBox() )
{
mpImplWin->SetItemPos( LISTBOX_ENTRY_NOTFOUND );
- mpImplWin->SetString( ImplGetSVEmptyStr() );
+ mpImplWin->SetString( OUString() );
Image aImage;
mpImplWin->SetImage( aImage );
mpImplWin->Invalidate();
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index bbda65f..f5ce429b 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1288,12 +1288,12 @@ sal_uInt16 Printer::GetPaperBinCount() const
OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const
{
if ( IsDisplayPrinter() )
- return ImplGetSVEmptyStr();
+ return OUString();
if ( nPaperBin < GetPaperBinCount() )
return mpInfoPrinter->GetPaperBinName( maJobSetup.ImplGetConstData(), nPaperBin );
else
- return ImplGetSVEmptyStr();
+ return OUString();
}
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 83ab1ae..31c0c86 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -441,7 +441,7 @@ void InfoBox::ImplInitInfoBoxData()
// -----------------------------------------------------------------------
InfoBox::InfoBox( Window* pParent, const OUString& rMessage ) :
- MessBox( pParent, WB_OK | WB_DEF_OK, ImplGetSVEmptyStr(), rMessage )
+ MessBox( pParent, WB_OK | WB_DEF_OK, OUString(), rMessage )
{
ImplInitInfoBoxData();
}
@@ -477,7 +477,7 @@ void WarningBox::ImplInitWarningBoxData()
WarningBox::WarningBox( Window* pParent, WinBits nStyle,
const OUString& rMessage ) :
- MessBox( pParent, nStyle, ImplGetSVEmptyStr(), rMessage )
+ MessBox( pParent, nStyle, OUString(), rMessage )
{
ImplInitWarningBoxData();
}
@@ -522,7 +522,7 @@ void ErrorBox::ImplInitErrorBoxData()
ErrorBox::ErrorBox( Window* pParent, WinBits nStyle,
const OUString& rMessage ) :
- MessBox( pParent, nStyle, ImplGetSVEmptyStr(), rMessage )
+ MessBox( pParent, nStyle, OUString(), rMessage )
{
ImplInitErrorBoxData();
}
@@ -566,7 +566,7 @@ void QueryBox::ImplInitQueryBoxData()
// -----------------------------------------------------------------------
QueryBox::QueryBox( Window* pParent, WinBits nStyle, const OUString& rMessage ) :
- MessBox( pParent, nStyle, ImplGetSVEmptyStr(), rMessage )
+ MessBox( pParent, nStyle, OUString(), rMessage )
{
ImplInitQueryBoxData();
}
commit 6e016d0dc74c986073ae1428a16464a59c331d2d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:22:49 2013 +0100
SwAddrDlg can now be converted to SfxSingleTabDialog
Change-Id: I7fb53193d52d6c04c34fce23aa1610ce1035493c
diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx
index 0a9ebdc..daf4a95 100644
--- a/sw/source/ui/dialog/addrdlg.cxx
+++ b/sw/source/ui/dialog/addrdlg.cxx
@@ -21,24 +21,17 @@
#include <svx/svxdlg.hxx>
#include <sfx2/sfx.hrc>
-SwAddrDlg::SwAddrDlg(Window* pParent, const SfxItemSet& rSet ) :
-
- SfxNoLayoutSingleTabDialog(pParent, rSet, 0)
-
+SwAddrDlg::SwAddrDlg(Window* pParent, const SfxItemSet& rSet)
+ : SfxSingleTabDialog(pParent, rSet)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL );
if ( fnCreatePage )
{
- SfxTabPage* pPage2 = (*fnCreatePage)( this, rSet );
- SetTabPage(pPage2);
+ SfxTabPage* pPage2 = (*fnCreatePage)(get_content_area(), rSet);
+ setTabPage(pPage2);
}
}
-SwAddrDlg::~SwAddrDlg()
-{
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/addrdlg.hxx b/sw/source/ui/inc/addrdlg.hxx
index a39bd49..509a979 100644
--- a/sw/source/ui/inc/addrdlg.hxx
+++ b/sw/source/ui/inc/addrdlg.hxx
@@ -21,17 +21,12 @@
#include <sfx2/basedlgs.hxx>
-class SwAddrDlg : public SfxNoLayoutSingleTabDialog
+class SwAddrDlg : public SfxSingleTabDialog
{
public:
-
- SwAddrDlg( Window* pParent, const SfxItemSet& rSet );
- ~SwAddrDlg();
+ SwAddrDlg(Window* pParent, const SfxItemSet& rSet);
};
#endif
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 10cfd814696409b1fa64a1de8da0e9f359e8a85c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:18:54 2013 +0100
don't care if SfxNoLayoutSingleTabDialog or SfxSingleTabDialog here
Change-Id: Ic269a729a59c8dedb29b1f54b7413d65259363c0
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 4503e47..31dcfc7 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1115,7 +1115,7 @@ IMPL_LINK( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvxFontListBox*, pLb )
}
else
{
- SfxNoLayoutSingleTabDialog* pParent = dynamic_cast< SfxNoLayoutSingleTabDialog* >( GetParentDialog() );
+ SfxSingleTabDialogBase* pParent = dynamic_cast< SfxSingleTabDialogBase* >( GetParentDialog() );
OKButton* pOKButton = pParent ? pParent->GetOKButton() : NULL;
if ( pOKButton )
pOKButton->Click();
commit c3c6a5f68050a2abb49f37e6231fc77c1c4df543
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:14:41 2013 +0100
SwBackgroundDlg can now be converted to SfxSingleTabDialog
Change-Id: I6e15b914e022674e27a14023144fe7a3add0ed43
diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx
index 4b5b2ff..f329ba4 100644
--- a/sw/source/ui/frmdlg/pattern.cxx
+++ b/sw/source/ui/frmdlg/pattern.cxx
@@ -23,16 +23,8 @@
#include "pattern.hxx"
#include "frmui.hrc"
-
-/****************************************************************************
-Ctor
-****************************************************************************/
-
-
-
-SwBackgroundDlg::SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet) :
-
- SfxNoLayoutSingleTabDialog(pParent, rSet, 0)
+SwBackgroundDlg::SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet)
+ : SfxSingleTabDialog(pParent, rSet)
{
SetText(SW_RESSTR(STR_FRMUI_PATTERN));
@@ -41,19 +33,9 @@ SwBackgroundDlg::SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet) :
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND );
if ( fnCreatePage )
{
- SetTabPage((*fnCreatePage)( this, rSet ));
+ setTabPage((*fnCreatePage)(get_content_area(), rSet));
}
}
-/****************************************************************************
-Dtor
-****************************************************************************/
-
-
-
-SwBackgroundDlg::~SwBackgroundDlg()
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/pattern.hxx b/sw/source/ui/inc/pattern.hxx
index 66f9a5c..fc06b0b 100644
--- a/sw/source/ui/inc/pattern.hxx
+++ b/sw/source/ui/inc/pattern.hxx
@@ -21,15 +21,14 @@
#define _PATTERN_HXX
#include <sfx2/basedlgs.hxx>
+
class Window;
class SfxItemSet;
-class SwBackgroundDlg : public SfxNoLayoutSingleTabDialog
+class SwBackgroundDlg : public SfxSingleTabDialog
{
public:
-
- SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet);
- ~SwBackgroundDlg();
+ SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet);
};
#endif
commit 98dab08ecb744b97286a5a2d7d4bef29c49aafa3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:11:39 2013 +0100
SvxJSearchOptionsDialog can now be converted to SfxSingleTabDialog
Change-Id: I13ec9a61b24c937830faea4eba6bf59ae4cbc0b1
diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx
index 3ee1083..450dff4 100644
--- a/cui/source/inc/cuisrchdlg.hxx
+++ b/cui/source/inc/cuisrchdlg.hxx
@@ -34,7 +34,7 @@
class SvxJSearchOptionsPage;
-class SvxJSearchOptionsDialog : public SfxNoLayoutSingleTabDialog
+class SvxJSearchOptionsDialog : public SfxSingleTabDialog
{
sal_Int32 nInitialTlFlags;
SvxJSearchOptionsPage *pPage;
diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx
index f1c6947..5511875 100644
--- a/cui/source/options/cuisrchdlg.cxx
+++ b/cui/source/options/cuisrchdlg.cxx
@@ -47,16 +47,15 @@
// class SvxJSearchOptionsDialog -----------------------------------------
-SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(
- Window *pParent,
- const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags ) :
- SfxNoLayoutSingleTabDialog ( pParent, rOptionsSet, RID_SVXPAGE_JSEARCH_OPTIONS ),
- nInitialTlFlags( nInitialFlags )
+SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(Window *pParent,
+ const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags)
+ : SfxSingleTabDialog(pParent, rOptionsSet)
+ , nInitialTlFlags( nInitialFlags )
{
pPage = (SvxJSearchOptionsPage *)
- SvxJSearchOptionsPage::Create( this, rOptionsSet );
- SetTabPage( pPage ); //! implicitly calls pPage->Reset(...)!
- pPage->EnableSaveOptions( sal_False );
+ SvxJSearchOptionsPage::Create(get_content_area(), rOptionsSet );
+ setTabPage( pPage ); //! implicitly calls pPage->Reset(...)!
+ pPage->EnableSaveOptions(false);
}
commit 1d0be858055595c1312d4b1e9f433c5b1690fd67
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 17:06:56 2013 +0100
SwDropCapsDlg can now be converted to SfxSingleTabDialog
Change-Id: I2d9baf887cf31789e0d439c4b9bbe3c1371b8f18
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 5bd791f..b6f3163 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -519,18 +519,12 @@ void SwDropCapsPict::_InitPrinter()
}
}
-SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
-
- SfxNoLayoutSingleTabDialog(pParent, rSet, 0)
-
-{
- SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(this, rSet);
- pNewPage->SetFormat(sal_False);
- SetTabPage(pNewPage);
-}
-
- SwDropCapsDlg::~SwDropCapsDlg()
+SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet )
+ : SfxSingleTabDialog(pParent, rSet)
{
+ SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(get_content_area(), rSet);
+ pNewPage->SetFormat(false);
+ setTabPage(pNewPage);
}
SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet)
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 52ec44a..986c814 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -36,14 +36,10 @@ class SwWrtShell;
// class SwDropCapsDlg ******************************************************
-class SwDropCapsDlg : public SfxNoLayoutSingleTabDialog
+class SwDropCapsDlg : public SfxSingleTabDialog
{
-
public:
-
- SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet );
- ~SwDropCapsDlg();
-
+ SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet );
};
class SwDropCapsPict;
commit 7fd6d43c1dae1548aca5ae4ed6d63cbf7e10b7ea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 16:34:47 2013 +0100
Related: fdo#38838 String::GetBufferAccess is now no more
Change-Id: I9fdd600fd0a530c0763875109eee6600e4a77879
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index d49c229..8e60030 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -90,7 +90,7 @@ static const sal_Char
// These characters are allowed in words: (for FnCptlSttSntnc)
static const sal_Char sImplWordChars[] = "-'";
-void EncryptBlockName_Imp( String& rName );
+OUString EncryptBlockName_Imp(const OUString& rName);
TYPEINIT0(SvxAutoCorrect)
@@ -1626,16 +1626,16 @@ sal_Bool SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::su
return sal_False;
}
-void EncryptBlockName_Imp( String& rName )
+OUString EncryptBlockName_Imp(const OUString& rName)
{
- xub_StrLen nLen, nPos = 1;
- rName.Insert( '#', 0 );
- sal_Unicode* pName = rName.GetBufferAccess();
- for ( nLen = rName.Len(), ++pName; nPos < nLen; ++nPos, ++pName )
+ OUStringBuffer aName;
+ aName.append('#').append(rName);
+ for (sal_Int32 nLen = rName.getLength(), nPos = 1; nPos < nLen; ++nPos)
{
- if( lcl_IsInAsciiArr( "!/:.\\", *pName ))
- *pName &= 0x0f;
+ if (lcl_IsInAsciiArr( "!/:.\\", aName[nPos]))
+ aName[nPos] &= 0x0f;
}
+ return aName.makeStringAndClear();
}
/* This code is copied from SwXMLTextBlocks::GeneratePackageName */
@@ -2440,7 +2440,7 @@ sal_Bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutoco
{
String aName( aWordToDelete.GetShort() );
if (xStorage->IsOLEStorage())
- EncryptBlockName_Imp( aName );
+ aName = EncryptBlockName_Imp(aName);
else
GeneratePackageName ( aWordToDelete.GetShort(), aName );
@@ -2465,7 +2465,7 @@ sal_Bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutoco
// Still have to remove the Storage
String sStorageName( pWordToAdd->GetShort() );
if (xStorage->IsOLEStorage())
- EncryptBlockName_Imp( sStorageName );
+ sStorageName = EncryptBlockName_Imp(sStorageName);
else
GeneratePackageName ( pWordToAdd->GetShort(), sStorageName);
@@ -2513,7 +2513,7 @@ sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, const Strin
// Still have to remove the Storage
String sStgNm( rShort );
if (xStg->IsOLEStorage())
- EncryptBlockName_Imp( sStgNm );
+ sStgNm = EncryptBlockName_Imp(sStgNm);
else
GeneratePackageName ( rShort, sStgNm);
@@ -2593,7 +2593,7 @@ sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
{
String aName( rShort );
if (xStg->IsOLEStorage())
- EncryptBlockName_Imp( aName );
+ aName = EncryptBlockName_Imp(aName);
else
GeneratePackageName ( rShort, aName );
if( xStg->IsContained( aName ) )
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 40693ab..d2f1837 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -3288,12 +3288,12 @@ void SvtFileDialog::appendDefaultExtension(String& _rFileName,
for ( nIndex = 0; nIndex < nWildCard; nIndex++ )
{
- String aExt(aType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nPos ));
+ OUString aExt(aType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nPos ));
// take care of a leading *
- sal_uInt16 nExtOffset = (aExt.GetBuffer()[0] == '*' ? 1 : 0);
- sal_Unicode* pExt = aExt.GetBufferAccess() + nExtOffset;
- xub_StrLen nExtLen = aExt.Len() - nExtOffset;
- xub_StrLen nOffset = aTemp.Len() - nExtLen;
+ sal_Int32 nExtOffset = (aExt[0] == '*' ? 1 : 0);
+ const sal_Unicode* pExt = aExt.getStr() + nExtOffset;
+ sal_Int32 nExtLen = aExt.getLength() - nExtOffset;
+ sal_Int32 nOffset = aTemp.Len() - nExtLen;
// minimize search by starting at last possible index
if ( aTemp.Search(pExt, nOffset) == nOffset )
break;
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index 0331327..b744f88 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -273,7 +273,6 @@ public:
UniString GetToken( xub_StrLen nToken, sal_Unicode cTok = ';' ) const;
const sal_Unicode* GetBuffer() const { return mpData->maStr; }
- sal_Unicode* GetBufferAccess();
friend sal_Bool operator == ( const UniString& rStr1, const UniString& rStr2 )
{ return rStr1.Equals( rStr2 ); }
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 0a3d919..f528b77 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1398,9 +1398,9 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAdd
xub_StrLen nPos = ScGlobal::FindUnquoted( r, ':');
if (nPos != STRING_NOTFOUND)
{
- String aTmp( r );
- sal_Unicode* p = aTmp.GetBufferAccess();
- p[ nPos ] = 0;
+ OUStringBuffer aTmp(r);
+ aTmp[nPos] = 0;
+ const sal_Unicode* p = aTmp.getStr();
if( (nRes1 = lcl_ScAddress_Parse_OOo( p, pDoc, aRange.aStart, pExtInfo, NULL ) ) != 0 )
{
aRange.aEnd = aRange.aStart; // sheet must be initialized identical to first sheet
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index b223846..b7559c2 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -200,9 +200,6 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
if( aDelStr.Len() )
{
- String aTmpStr = OUString('1');
- sal_Unicode* pTmpStr = aTmpStr.GetBufferAccess();
-
bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
pTxtNd->SetIgnoreDontExpand( true );
@@ -210,7 +207,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
for( xub_StrLen n = 0; n < aDelStr.Len(); n++ )
{
// do it individually, to keep the attributes!
- *pTmpStr = aDelStr.GetChar( n );
+ OUString aTmpStr(aDelStr.GetChar(n));
OUString const ins( pTxtNd->InsertText(aTmpStr, rIdx) );
assert(ins.getLength() == 1); // cannot fail
rIdx -= 2;
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 559aa14..5758881 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -195,14 +195,15 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( sTxt.Len() )
{
- sTxt = comphelper::string::remove(sTxt, 0xad);
- for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+ OUStringBuffer sTmp(comphelper::string::remove(sTxt, 0xad));
+ for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
{
- if( *p < 0x20 )
- *p = 0x20;
- else if(*p == 0x2011)
- *p = '-';
+ if (sTmp[i] < 0x20)
+ sTmp[i] = 0x20;
+ else if (sTmp[i] == 0x2011)
+ sTmp[i] = '-';
}
+ sTxt = sTmp.makeStringAndClear();
}
}
}
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index 57c2927..4e1cbcd 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -181,7 +181,7 @@ class SwContentType : public SwTypeNumber
bool bEdit: 1; // can this type be edited?
bool bDelete: 1; // can this type be deleted?
protected:
- void RemoveNewline(String&);
+ OUString RemoveNewline(const OUString&);
public:
SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel );
~SwContentType();
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index 4e339cf..0fb4bd0 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -156,7 +156,7 @@ public:
const SfxPoolItem* pState );
static String CreateDropFileName( TransferableDataHelper& rData );
- static void CleanEntry( String& rEntry );
+ static OUString CleanEntry(const OUString& rEntry);
sal_uInt16 GetRegionDropMode() const {return nRegionMode;}
void SetRegionDropMode(sal_uInt16 nNewMode);
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 1a471c1..6d5ea1f 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -391,8 +391,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
{
- String sEntry = aFmtFld->GetFld()->GetPar2();
- RemoveNewline(sEntry);
+ OUString sEntry = aFmtFld->GetFld()->GetPar2();
+ sEntry = RemoveNewline(sEntry);
SwPostItContent* pCnt = new SwPostItContent(
this,
sEntry,
@@ -494,9 +494,9 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged)
nMemberCount--;
else
{
- String aEntry(comphelper::string::stripStart(
+ OUString aEntry(comphelper::string::stripStart(
pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineText(i), ' '));
- SwNavigationPI::CleanEntry( aEntry );
+ aEntry = SwNavigationPI::CleanEntry(aEntry);
SwOutlineContent* pCnt = new SwOutlineContent(this, aEntry, i, nLevel,
pWrtShell->IsOutlineMovable( i ), nPos );
pMember->insert(pCnt);//, nPos);
@@ -717,8 +717,8 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged)
if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
{
- String sEntry = aFmtFld->GetFld()->GetPar2();
- RemoveNewline(sEntry);
+ OUString sEntry = aFmtFld->GetFld()->GetPar2();
+ sEntry = RemoveNewline(sEntry);
SwPostItContent* pCnt = new SwPostItContent(
this,
sEntry,
@@ -2677,14 +2677,17 @@ void SwContentTree::SetRootType(sal_uInt16 nType)
pConfig->SetRootType( nRootType );
}
-void SwContentType::RemoveNewline(String& rEntry)
+OUString SwContentType::RemoveNewline(const OUString& rEntry)
{
- sal_Unicode* pStr = rEntry.GetBufferAccess();
- for(xub_StrLen i = rEntry.Len(); i; --i, ++pStr )
- {
- if( *pStr == 10 || *pStr == 13 )
- *pStr = 0x20;
- }
+ if (rEntry.isEmpty())
+ return rEntry;
+
+ OUStringBuffer aEntry(rEntry);
+ for (sal_Int32 i = 0; i < rEntry.getLength(); ++i)
+ if(aEntry[i] == 10 || aEntry[i] == 13)
+ aEntry[i] = 0x20;
+
+ return aEntry.makeStringAndClear();
}
void SwContentTree::EditEntry(SvTreeListEntry* pEntry, sal_uInt8 nMode)
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index 95a6e22..45a5317 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -63,13 +63,17 @@ SFX_IMPL_CHILDWINDOW_CONTEXT( SwNavigationChild, SID_NAVIGATOR, SwView )
// Filter the control characters out of the Outline-Entry
-void SwNavigationPI::CleanEntry( String& rEntry )
+OUString SwNavigationPI::CleanEntry(const OUString& rEntry)
{
- sal_uInt16 i = rEntry.Len();
- if( i )
- for( sal_Unicode* pStr = rEntry.GetBufferAccess(); i; --i, ++pStr )
- if( *pStr == 10 || *pStr == 9 )
- *pStr = 0x20;
+ if (rEntry.isEmpty())
+ return rEntry;
+
+ OUStringBuffer aEntry(rEntry);
+ for (sal_Int32 i = 0; i < rEntry.getLength(); ++i)
+ if(aEntry[i] == 10 || aEntry[i] == 9)
+ aEntry[i] = 0x20;
+
+ return aEntry.makeStringAndClear();
}
// Execution of the drag operation with and without the children.
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index a23f0fc..13b1e42 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -228,18 +228,6 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
return COMPARE_GREATER;
}
-STRCODE* STRING::GetBufferAccess()
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- // Copy data if necessary
- if ( mpData->mnLen )
- ImplCopyData();
-
- // return pointer to string data
- return mpData->maStr;
-}
-
STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
commit a77a573883ce49d045159bdf3f8735594d1e81b4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 8 20:41:39 2013 +0100
Updated core
Project: help de38f0c7333b468fe0fbc31fccbb42e33a59da27
diff --git a/helpcontent2 b/helpcontent2
index 23b68c3..de38f0c 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 23b68c3c3aff33699a8cd66da38431e801b5b933
+Subproject commit de38f0c7333b468fe0fbc31fccbb42e33a59da27
More information about the Libreoffice-commits
mailing list