editeng/source/editeng/editeng.cxx | 4 editeng/source/editeng/editview.cxx | 6 editeng/source/outliner/outleeng.cxx | 4 editeng/source/outliner/outleeng.hxx | 6 editeng/source/outliner/outlin2.cxx | 2 editeng/source/outliner/outliner.cxx | 59 +-- extras/source/glade/libreoffice-catalog.xml.in | 3 include/editeng/editeng.hxx | 4 include/editeng/editview.hxx | 6 include/editeng/outliner.hxx | 10 sd/source/core/drawdoc.cxx | 2 sd/source/ui/annotations/annotationmanager.cxx | 2 sd/source/ui/func/fuinsfil.cxx | 4 sd/source/ui/func/futext.cxx | 2 svx/source/table/tablecontroller.cxx | 2 sw/UIConfig_swriter.mk | 1 sw/inc/helpid.h | 1 sw/source/ui/envelp/envlop.hrc | 12 sw/source/ui/envelp/envlop.src | 106 ------- sw/source/ui/envelp/envlop1.cxx | 134 +++++--- sw/source/ui/inc/envlop.hxx | 25 - sw/uiconfig/swriter/ui/envaddresspage.ui | 375 +++++++++++++++++++++++++ 22 files changed, 522 insertions(+), 248 deletions(-)
New commits: commit 34790f2be829ebf0628d5e66c8b0a77b686cddab Author: Caolán McNamara <[email protected]> Date: Wed Aug 14 16:02:44 2013 +0100 convert envelope format page to .ui Change-Id: I0f473ebfc7bd6a8bd5aa1b8749fc3afa7a51bb70 diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 6ff3b4c..cd382c6 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -317,6 +317,9 @@ <glade-widget-class title="Label Preview" name="swuilo-SwLabPreview" generic-name="Label Preview" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="Envelope Preview" name="swuilo-SwEnvPreview" + generic-name="Envelope Preview" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> <glade-widget-class title="Rectangle Control" name="svxlo-SvxRectCtl" generic-name="Rectangle Control" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 020df2d..4cd0273 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -85,6 +85,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/editcategories \ sw/uiconfig/swriter/ui/editsectiondialog \ sw/uiconfig/swriter/ui/endnotepage \ + sw/uiconfig/swriter/ui/envaddresspage \ sw/uiconfig/swriter/ui/envprinterpage \ sw/uiconfig/swriter/ui/exchangedatabases \ sw/uiconfig/swriter/ui/formatsectiondialog \ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index ddad116..6af945c 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -144,7 +144,6 @@ #define HID_FRM_STD "SW_HID_FRM_STD" #define HID_GRF_EXT "SW_HID_GRF_EXT" -#define HID_ENV_ENV "SW_HID_ENV_ENV" #define HID_ENV_FMT "SW_HID_ENV_FMT" #define HID_COND_COLL "SW_HID_COND_COLL" diff --git a/sw/source/ui/envelp/envlop.hrc b/sw/source/ui/envelp/envlop.hrc index 166f55b..69e61d0 100644 --- a/sw/source/ui/envelp/envlop.hrc +++ b/sw/source/ui/envelp/envlop.hrc @@ -24,18 +24,6 @@ // local resources ********************************************************* -#define TXT_ADDR 1 -#define EDT_ADDR 2 -#define FT_DATABASE 3 -#define LB_DATABASE 4 -#define FT_TABLE 5 -#define LB_TABLE 6 -#define BTN_INSERT 7 -#define FT_DBFIELD 8 -#define LB_DBFIELD 9 -#define BOX_SEND 10 -#define EDT_SEND 11 -#define WIN_PREVIEW 12 #define ST_INSERT 13 #define ST_CHANGE 14 diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src index 82ca4dc..53a28e8 100644 --- a/sw/source/ui/envelp/envlop.src +++ b/sw/source/ui/envelp/envlop.src @@ -60,111 +60,5 @@ TabDialog DLG_ENV Text [ en-US ] = "~Modify" ; }; }; - // TP_ENV_ENV --------------------------------------------------------------- -TabPage TP_ENV_ENV -{ - HelpID = HID_ENV_ENV ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE ; - FixedText TXT_ADDR - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 124 , 8 ) ; - Text [ en-US ] = "Addr~essee" ; - Group = TRUE ; - Left = TRUE ; - }; - MultiLineEdit EDT_ADDR - { - HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_ADDR"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 17 ) ; - Size = MAP_APPFONT ( 124 , 66 ) ; - TabStop = TRUE ; - Left = TRUE ; - HScroll = TRUE ; - VScroll = TRUE ; - IgnoreTab = TRUE; - }; - FixedText FT_DATABASE - { - Pos = MAP_APPFONT ( 162 , 6 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "Database" ; - }; - ListBox LB_DATABASE - { - HelpID = "sw:ListBox:TP_ENV_ENV:LB_DATABASE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 162 , 17 ) ; - Size = MAP_APPFONT ( 82 , 50 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_TABLE - { - Pos = MAP_APPFONT ( 162 , 33 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "Table" ; - }; - ListBox LB_TABLE - { - HelpID = "sw:ListBox:TP_ENV_ENV:LB_TABLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 162 , 44 ) ; - Size = MAP_APPFONT ( 82 , 50 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - ImageButton BTN_INSERT - { - HelpID = "sw:ImageButton:TP_ENV_ENV:BTN_INSERT"; - Pos = MAP_APPFONT ( 137 , 71 ) ; - Size = MAP_APPFONT ( 18 , 12 ) ; - SYMBOL = IMAGEBUTTON_ARROW_LEFT ; - TabStop = TRUE ; - }; - FixedText FT_DBFIELD - { - Pos = MAP_APPFONT ( 162 , 60 ) ; - Size = MAP_APPFONT ( 92 , 8 ) ; - Text [ en-US ] = "~Database field" ; - }; - ListBox LB_DBFIELD - { - HelpID = "sw:ListBox:TP_ENV_ENV:LB_DBFIELD"; - Border = TRUE ; - Pos = MAP_APPFONT ( 162 , 71 ) ; - Size = MAP_APPFONT ( 82 , 50 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - CheckBox BOX_SEND - { - HelpID = "sw:CheckBox:TP_ENV_ENV:BOX_SEND"; - Pos = MAP_APPFONT ( 6 , 105 ) ; - Size = MAP_APPFONT ( 124 , 8 ) ; - Text [ en-US ] = "~Sender" ; - TabStop = TRUE ; - }; - MultiLineEdit EDT_SEND - { - HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_SEND"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 116) ; - Size = MAP_APPFONT ( 124 , 63 ) ; - TabStop = TRUE ; - Left = TRUE ; - HScroll = TRUE ; - VScroll = TRUE ; - IgnoreTab = TRUE; - }; - Window WIN_PREVIEW - { - Border = TRUE ; - Pos = MAP_APPFONT ( 160 , 116 ) ; - Size = MAP_APPFONT ( 84 , 63 ) ; - }; -}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 29ab6f8..f6838d8 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -19,6 +19,7 @@ #include "dbmgr.hxx" #include <sfx2/app.hxx> +#include <vcl/builder.hxx> #include <vcl/msgbox.hxx> #include <swwait.hxx> #include <viewopt.hxx> @@ -56,8 +57,20 @@ SwEnvPreview::SwEnvPreview(SfxTabPage* pParent, const ResId& rResID) : SetMapMode(MapMode(MAP_PIXEL)); } -SwEnvPreview::~SwEnvPreview() +SwEnvPreview::SwEnvPreview(Window* pParent, WinBits nStyle) + : Window(pParent, nStyle) { + SetMapMode(MapMode(MAP_PIXEL)); +} + +Size SwEnvPreview::GetOptimalSize() const +{ + return LogicToPixel(Size(84 , 63), MAP_APPFONT); +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwEnvPreview(Window *pParent, VclBuilder::stringmap &) +{ + return new SwEnvPreview(pParent, 0); } void SwEnvPreview::DataChanged( const DataChangedEvent& rDCEvt ) @@ -191,34 +204,41 @@ short SwEnvDlg::Ok() return nRet; } -SwEnvPage::SwEnvPage(Window* pParent, const SfxItemSet& rSet) : - - SfxTabPage(pParent, SW_RES(TP_ENV_ENV), rSet), - - aAddrText (this, SW_RES(TXT_ADDR )), - aAddrEdit (this, SW_RES(EDT_ADDR )), - aDatabaseFT (this, SW_RES(FT_DATABASE)), - aDatabaseLB (this, SW_RES(LB_DATABASE)), - aTableFT (this, SW_RES(FT_TABLE )), - aTableLB (this, SW_RES(LB_TABLE )), - aInsertBT (this, SW_RES(BTN_INSERT )), - aDBFieldFT (this, SW_RES(FT_DBFIELD )), - aDBFieldLB (this, SW_RES(LB_DBFIELD )), - aSenderBox (this, SW_RES(BOX_SEND )), - aSenderEdit (this, SW_RES(EDT_SEND )), - aPreview (this, SW_RES(WIN_PREVIEW)) - +SwEnvPage::SwEnvPage(Window* pParent, const SfxItemSet& rSet) + : SfxTabPage(pParent, "EnvAddressPage", + "modules/swriter/ui/envaddresspage.ui", rSet) { - FreeResource(); + get(m_pAddrEdit, "addredit"); + get(m_pDatabaseLB, "database"); + get(m_pTableLB, "table"); + get(m_pDBFieldLB, "field"); + get(m_pInsertBT, "insert"); + get(m_pSenderBox, "sender"); + get(m_pSenderEdit, "senderedit"); + get(m_pPreview, "preview"); + + long nTextBoxHeight(m_pAddrEdit->GetTextHeight() * 10); + long nTextBoxWidth(m_pAddrEdit->approximate_char_width() * 25); + + m_pAddrEdit->set_height_request(nTextBoxHeight); + m_pAddrEdit->set_width_request(nTextBoxWidth); + m_pSenderEdit->set_height_request(nTextBoxHeight); + m_pSenderEdit->set_width_request(nTextBoxWidth); + + long nListBoxWidth = approximate_char_width() * 30; + m_pTableLB->set_width_request(nListBoxWidth); + m_pDatabaseLB->set_width_request(nListBoxWidth); + m_pDBFieldLB->set_width_request(nListBoxWidth); + SetExchangeSupport(); pSh = GetParentSwEnvDlg()->pSh; // Install handlers - aDatabaseLB .SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl )); - aTableLB .SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl )); - aInsertBT .SetClickHdl (LINK(this, SwEnvPage, FieldHdl )); - aSenderBox .SetClickHdl (LINK(this, SwEnvPage, SenderHdl )); - aPreview.SetBorderStyle( WINDOW_BORDER_MONO ); + m_pDatabaseLB->SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl )); + m_pTableLB->SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl )); + m_pInsertBT->SetClickHdl (LINK(this, SwEnvPage, FieldHdl )); + m_pSenderBox->SetClickHdl (LINK(this, SwEnvPage, SenderHdl )); + m_pPreview->SetBorderStyle( WINDOW_BORDER_MONO ); SwDBData aData = pSh->GetDBData(); sActDBName = aData.sDataSource; @@ -235,44 +255,44 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox ) { SwWait aWait( *pSh->GetView().GetDocShell(), sal_True ); - if (pListBox == &aDatabaseLB) + if (pListBox == m_pDatabaseLB) { sActDBName = pListBox->GetSelectEntry(); - pSh->GetNewDBMgr()->GetTableNames(&aTableLB, sActDBName); + pSh->GetNewDBMgr()->GetTableNames(m_pTableLB, sActDBName); sActDBName += DB_DELIM; } else - sActDBName.SetToken(1, DB_DELIM, aTableLB.GetSelectEntry()); - pSh->GetNewDBMgr()->GetColumnNames(&aDBFieldLB, aDatabaseLB.GetSelectEntry(), - aTableLB.GetSelectEntry()); + sActDBName.SetToken(1, DB_DELIM, m_pTableLB->GetSelectEntry()); + pSh->GetNewDBMgr()->GetColumnNames(m_pDBFieldLB, m_pDatabaseLB->GetSelectEntry(), + m_pTableLB->GetSelectEntry()); return 0; } IMPL_LINK_NOARG(SwEnvPage, FieldHdl) { - OUString aStr("<" + aDatabaseLB.GetSelectEntry() + "." + - aTableLB.GetSelectEntry() + "." + - OUString(aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1') + "." + - aDBFieldLB.GetSelectEntry() + ">"); - aAddrEdit.ReplaceSelected(aStr); - Selection aSel = aAddrEdit.GetSelection(); - aAddrEdit.GrabFocus(); - aAddrEdit.SetSelection(aSel); + OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." + + m_pTableLB->GetSelectEntry() + "." + + OUString(m_pTableLB->GetEntryData(m_pTableLB->GetSelectEntryPos()) == 0 ? '0' : '1') + "." + + m_pDBFieldLB->GetSelectEntry() + ">"); + m_pAddrEdit->ReplaceSelected(aStr); + Selection aSel = m_pAddrEdit->GetSelection(); + m_pAddrEdit->GrabFocus(); + m_pAddrEdit->SetSelection(aSel); return 0; } IMPL_LINK_NOARG(SwEnvPage, SenderHdl) { - const sal_Bool bEnable = aSenderBox.IsChecked(); + const sal_Bool bEnable = m_pSenderBox->IsChecked(); GetParentSwEnvDlg()->aEnvItem.bSend = bEnable; - aSenderEdit.Enable(bEnable); + m_pSenderEdit->Enable(bEnable); if ( bEnable ) { - aSenderEdit.GrabFocus(); - if(aSenderEdit.GetText().isEmpty()) - aSenderEdit.SetText(MakeSender()); + m_pSenderEdit->GrabFocus(); + if(m_pSenderEdit->GetText().isEmpty()) + m_pSenderEdit->SetText(MakeSender()); } - aPreview.Invalidate(); + m_pPreview->Invalidate(); return 0; } @@ -280,23 +300,23 @@ void SwEnvPage::InitDatabaseBox() { if (pSh->GetNewDBMgr()) { - aDatabaseLB.Clear(); + m_pDatabaseLB->Clear(); Sequence<OUString> aDataNames = SwNewDBMgr::GetExistingDatabaseNames(); const OUString* pDataNames = aDataNames.getConstArray(); for (long i = 0; i < aDataNames.getLength(); i++) - aDatabaseLB.InsertEntry(pDataNames[i]); + m_pDatabaseLB->InsertEntry(pDataNames[i]); String sDBName = sActDBName.GetToken( 0, DB_DELIM ); String sTableName = sActDBName.GetToken( 1, DB_DELIM ); - aDatabaseLB.SelectEntry(sDBName); - if (pSh->GetNewDBMgr()->GetTableNames(&aTableLB, sDBName)) + m_pDatabaseLB->SelectEntry(sDBName); + if (pSh->GetNewDBMgr()->GetTableNames(m_pTableLB, sDBName)) { - aTableLB.SelectEntry(sTableName); - pSh->GetNewDBMgr()->GetColumnNames(&aDBFieldLB, sDBName, sTableName); + m_pTableLB->SelectEntry(sTableName); + pSh->GetNewDBMgr()->GetColumnNames(m_pDBFieldLB, sDBName, sTableName); } else - aDBFieldLB.Clear(); + m_pDBFieldLB->Clear(); } } @@ -323,9 +343,9 @@ int SwEnvPage::DeactivatePage(SfxItemSet* _pSet) void SwEnvPage::FillItem(SwEnvItem& rItem) { - rItem.aAddrText = aAddrEdit .GetText(); - rItem.bSend = aSenderBox .IsChecked(); - rItem.aSendText = aSenderEdit.GetText(); + rItem.aAddrText = m_pAddrEdit->GetText(); + rItem.bSend = m_pSenderBox->IsChecked(); + rItem.aSendText = m_pSenderEdit->GetText(); } sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet) @@ -338,10 +358,10 @@ sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet) void SwEnvPage::Reset(const SfxItemSet& rSet) { SwEnvItem aItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP); - aAddrEdit .SetText(convertLineEnd(aItem.aAddrText, GetSystemLineEnd())); - aSenderEdit.SetText(convertLineEnd(aItem.aSendText, GetSystemLineEnd())); - aSenderBox .Check (aItem.bSend); - aSenderBox.GetClickHdl().Call(&aSenderBox); + m_pAddrEdit->SetText(convertLineEnd(aItem.aAddrText, GetSystemLineEnd())); + m_pSenderEdit->SetText(convertLineEnd(aItem.aSendText, GetSystemLineEnd())); + m_pSenderBox->Check (aItem.bSend); + m_pSenderBox->GetClickHdl().Call(m_pSenderBox); } diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx index 2025d3d..43a69d9 100644 --- a/sw/source/ui/inc/envlop.hxx +++ b/sw/source/ui/inc/envlop.hxx @@ -47,11 +47,12 @@ class SwEnvPreview : public Window public: - SwEnvPreview(SfxTabPage* pParent, const ResId& rResID); - ~SwEnvPreview(); + SwEnvPreview(SfxTabPage* pParent, const ResId& rResID); + SwEnvPreview(Window * pParent, WinBits nStyle); protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual Size GetOptimalSize() const; }; // class SwEnvDlg ----------------------------------------------------------- @@ -81,18 +82,14 @@ public: // class SwEnvPage ---------------------------------------------------------- class SwEnvPage : public SfxTabPage { - FixedText aAddrText; - MultiLineEdit aAddrEdit; - FixedText aDatabaseFT; - ListBox aDatabaseLB; - FixedText aTableFT; - ListBox aTableLB; - ImageButton aInsertBT; - FixedText aDBFieldFT; - ListBox aDBFieldLB; - CheckBox aSenderBox; - MultiLineEdit aSenderEdit; - SwEnvPreview aPreview; + VclMultiLineEdit* m_pAddrEdit; + ListBox* m_pDatabaseLB; + ListBox* m_pTableLB; + ListBox* m_pDBFieldLB; + PushButton* m_pInsertBT; + CheckBox* m_pSenderBox; + VclMultiLineEdit* m_pSenderEdit; + SwEnvPreview* m_pPreview; SwWrtShell* pSh; String sActDBName; diff --git a/sw/uiconfig/swriter/ui/envaddresspage.ui b/sw/uiconfig/swriter/ui/envaddresspage.ui new file mode 100644 index 0000000..3893f7d --- /dev/null +++ b/sw/uiconfig/swriter/ui/envaddresspage.ui @@ -0,0 +1,375 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-back</property> + </object> + <object class="GtkBox" id="EnvAddressPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">18</property> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="hscrollbar_policy">always</property> + <property name="vscrollbar_policy">always</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTextView" id="addredit:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + </object> + </child> + </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> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Addr_essee</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">addredit:border</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">12</property> + <property name="row_homogeneous">True</property> + <child> + <object class="GtkGrid" id="grid8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Database</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">database</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="database"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</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> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Table</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">table</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="table"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</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> + <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> + <child> + <object class="GtkGrid" id="grid10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">end</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Database field</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">field</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="field"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</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> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="insert"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_markup" translatable="yes">Insert</property> + <property name="valign">center</property> + <property name="image">image1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">18</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="hscrollbar_policy">always</property> + <property name="vscrollbar_policy">always</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTextView" id="senderedit:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <accessibility> + <relation type="labelled-by" target="sender"/> + </accessibility> + </object> + </child> + </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> + <child> + <object class="GtkCheckButton" id="sender"> + <property name="label" translatable="yes">_Sender</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <accessibility> + <relation type="label-for" target="senderedit:border"/> + </accessibility> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="swuilo-SwEnvPreview" id="preview"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <widgets> + <widget name="insert"/> + <widget name="box1"/> + </widgets> + </object> + <object class="GtkSizeGroup" id="sizegroup2"> + <widgets> + <widget name="grid6"/> + <widget name="preview"/> + </widgets> + </object> +</interface> commit 96f24b9cc07d3b83618811434e4cfcac515f8aa1 Author: Caolán McNamara <[email protected]> Date: Wed Aug 14 13:44:38 2013 +0100 XubString->OUString Change-Id: I9ccb06134dfadd9bf1ecb8e5edcd24c02980b754 diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 0684bfe..89067a2 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2576,7 +2576,7 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_Int32 nPara ) // ===================================================================== // ====================== Virtual Methods ======================== // ===================================================================== -void EditEngine::DrawingText( const Point&, const XubString&, sal_uInt16, sal_uInt16, +void EditEngine::DrawingText( const Point&, const OUString&, sal_uInt16, sal_uInt16, const sal_Int32*, const SvxFont&, sal_Int32, sal_uInt16, sal_uInt8, const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool, const ::com::sun::star::lang::Locale*, const Color&, const Color&) @@ -2660,7 +2660,7 @@ void EditEngine::ParagraphHeightChanged( sal_Int32 nPara ) } } -XubString EditEngine::GetUndoComment( sal_uInt16 nId ) const +OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const { DBG_CHKTHIS( EditEngine, 0 ); XubString aComment; diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 17d9fb1..af14c5e 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -364,7 +364,7 @@ Cursor* EditView::GetCursor() const return pImpEditView->pCursor; } -void EditView::InsertText( const XubString& rStr, sal_Bool bSelect ) +void EditView::InsertText( const OUString& rStr, sal_Bool bSelect ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -613,7 +613,7 @@ void EditView::SetSelectionMode( EESelectionMode eMode ) pImpEditView->SetSelectionMode( eMode ); } -XubString EditView::GetSelected() +OUString EditView::GetSelected() { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -691,7 +691,7 @@ void EditView::InsertText( const EditTextObject& rTextObject ) PIMPE->FormatAndUpdate( this ); } -void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ) +void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const OUString& rBaseURL, sal_Bool bUseSpecial ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index 6418310..9396e68 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -122,7 +122,7 @@ sal_Bool OutlinerEditEng::ConvertNextDocument() return pOwner->ConvertNextDocument(); } -XubString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const +OUString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const { switch( nUndoId ) { @@ -146,7 +146,7 @@ XubString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const } } -void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, +void OutlinerEditEng::DrawingText( const Point& rStartPos, const OUString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index 59b4958..960e452 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -45,7 +45,7 @@ public: virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph ); virtual void DrawingText( - const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, + const Point& rStartPos, const OUString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -66,8 +66,8 @@ public: virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); virtual void ParaAttribsChanged( sal_Int32 nPara ); - virtual sal_Bool SpellNextDocument(); - virtual XubString GetUndoComment( sal_uInt16 nUndoId ) const; + virtual sal_Bool SpellNextDocument(); + virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const; // for text conversion virtual sal_Bool ConvertNextDocument(); diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index ff8bc74..83b83c9 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -541,7 +541,7 @@ void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) pEditEngine->QuickSetAttribs( rSet, rSel ); } -void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel ) +void Outliner::QuickInsertText( const OUString& rText, const ESelection& rSel ) { bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertText( rText, rSel ); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index db6915d..cb27c69 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -75,7 +75,7 @@ void Outliner::ImplCheckDepth( sal_Int16& rnDepth ) const rnDepth = nMaxDepth; } -Paragraph* Outliner::Insert(const XubString& rText, sal_Int32 nAbsPos, sal_Int16 nDepth) +Paragraph* Outliner::Insert(const OUString& rText, sal_Int32 nAbsPos, sal_Int16 nDepth) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pParaList->GetParagraphCount(),"Insert:No Paras"); @@ -425,7 +425,7 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32 return pPObj; } -void Outliner::SetText( const XubString& rText, Paragraph* pPara ) +void Outliner::SetText( const OUString& rText, Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pPara,"SetText:No Para"); @@ -436,24 +436,24 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) sal_Int32 nPara = pParaList->GetAbsPos( pPara ); - if( !rText.Len() ) + if (rText.isEmpty()) { pEditEngine->SetText( nPara, rText ); ImplInitDepth( nPara, pPara->GetDepth(), sal_False ); } else { - XubString aText(convertLineEnd(rText, LINEEND_LF)); + OUString aText(convertLineEnd(rText, LINEEND_LF)); - if( aText.GetChar( aText.Len()-1 ) == '\x0A' ) - aText.Erase( aText.Len()-1, 1 ); // Delete the last break + if (aText[aText.getLength()-1] == '\x0A') + aText = aText.copy(0, aText.getLength()-1); // Delete the last break sal_uInt16 nCount = comphelper::string::getTokenCount(aText, '\x0A'); sal_uInt16 nPos = 0; sal_Int32 nInsPos = nPara+1; while( nCount > nPos ) { - XubString aStr = aText.GetToken( nPos, '\x0A' ); + OUString aStr = aText.getToken( nPos, '\x0A' ); sal_Int16 nCurDepth; if( nPos ) @@ -471,10 +471,10 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) { // Extract Tabs sal_uInt16 nTabs = 0; - while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) ) + while ( ( nTabs < aStr.getLength() ) && ( aStr[nTabs] == '\t' ) ) nTabs++; if ( nTabs ) - aStr.Erase( 0, nTabs ); + aStr = aStr.copy(nTabs); // Keep depth? (see Outliner::Insert) if( !(pPara->nFlags & PARAFLAG_HOLDDEPTH) ) @@ -519,15 +519,12 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView) sal_uInt16 nTabs = 0; ESelection aDelSel; -// const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( nPara ); -// bool bAlreadyOutliner = rAttrs.GetItemState( EE_PARA_OUTLLRSPACE ) == SFX_ITEM_ON ? true : false; + OUString aName; + OUString aHeading_US( "heading" ); + OUString aNumber_US( "Numbering" ); - XubString aName; - XubString aHeading_US( RTL_CONSTASCII_USTRINGPARAM( "heading" ) ); - XubString aNumber_US( RTL_CONSTASCII_USTRINGPARAM( "Numbering" ) ); - - XubString aStr( pEditEngine->GetText( nPara ) ); - sal_Unicode* pPtr = (sal_Unicode*)aStr.GetBuffer(); + OUString aStr( pEditEngine->GetText( nPara ) ); + const sal_Unicode* pPtr = aStr.getStr(); sal_uInt16 nHeadingNumberStart = 0; sal_uInt16 nNumberingNumberStart = 0; @@ -535,17 +532,17 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView) if( pStyle ) { aName = pStyle->GetName(); - sal_uInt16 nSearch; - if ( ( nSearch = aName.Search( aHeading_US ) ) != STRING_NOTFOUND ) - nHeadingNumberStart = nSearch + aHeading_US.Len(); - else if ( ( nSearch = aName.Search( aNumber_US ) ) != STRING_NOTFOUND ) - nNumberingNumberStart = nSearch + aNumber_US.Len(); + sal_Int32 nSearch; + if ( ( nSearch = aName.indexOf( aHeading_US ) ) != -1 ) + nHeadingNumberStart = nSearch + aHeading_US.getLength(); + else if ( ( nSearch = aName.indexOf( aNumber_US ) ) != -1 ) + nNumberingNumberStart = nSearch + aNumber_US.getLength(); } if ( nHeadingNumberStart || nNumberingNumberStart ) { // PowerPoint import ? - if( nHeadingNumberStart && ( aStr.Len() >= 2 ) && + if( nHeadingNumberStart && ( aStr.getLength() >= 2 ) && ( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) ) { // Extract Bullet and Tab @@ -553,8 +550,8 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView) } sal_uInt16 nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart; - String aLevel = comphelper::string::stripStart(aName.Copy(nPos), ' '); - nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.ToInt32()); + OUString aLevel = comphelper::string::stripStart(aName.copy(nPos), ' '); + nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.toInt32()); if( nTabs ) nTabs--; // Level 0 = "heading 1" bConverted = sal_True; @@ -1749,17 +1746,17 @@ EBulletInfo Outliner::GetBulletInfo( sal_Int32 nPara ) return aInfo; } -XubString Outliner::GetText( Paragraph* pParagraph, sal_Int32 nCount ) const +OUString Outliner::GetText( Paragraph* pParagraph, sal_Int32 nCount ) const { DBG_CHKTHIS(Outliner,0); - XubString aText; + OUString aText; sal_Int32 nStartPara = pParaList->GetAbsPos( pParagraph ); for ( sal_Int32 n = 0; n < nCount; n++ ) { aText += pEditEngine->GetText( nStartPara + n ); if ( (n+1) < nCount ) - aText += '\n'; + aText += "\n"; } return aText; } @@ -1788,7 +1785,7 @@ void Outliner::StripPortions() bStrippingPortions = sal_False; } -void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, +void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -1973,14 +1970,14 @@ void Outliner::ImplCalcBulletText( sal_Int32 nPara, sal_Bool bRecalcLevel, sal_B while ( pPara ) { - XubString aBulletText; + OUString aBulletText; const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); if( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) ) { aBulletText += pFmt->GetPrefix(); if( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL ) { - aBulletText += pFmt->GetBulletChar(); + aBulletText += OUString(pFmt->GetBulletChar()); } else if( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) { diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 0246cbe..3bb562d 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -452,7 +452,7 @@ public: virtual void ParagraphHeightChanged( sal_Int32 nPara ); virtual void DrawingText( - const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, + const Point& rStartPos, const OUString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -470,7 +470,7 @@ public: bool bEndOfParagraph, const Color& rOverlineColor, const Color& rTextLineColor); - virtual String GetUndoComment( sal_uInt16 nUndoId ) const; + virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const; virtual sal_Bool FormattingParagraph( sal_Int32 nPara ); virtual sal_Bool SpellNextDocument(); virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos ); diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 1eaec52..37a0f5d 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -115,7 +115,7 @@ public: void SetInsertMode( sal_Bool bInsert ); void ReplaceSelected( const String& rStr ); - String GetSelected(); + OUString GetSelected(); void DeleteSelected(); sal_uInt16 GetSelectedScriptType() const; @@ -134,7 +134,7 @@ public: Cursor* GetCursor() const; - void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); + void InsertText( const OUString& rNew, sal_Bool bSelect = sal_False ); sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL ); @@ -173,7 +173,7 @@ public: EditTextObject* CreateTextObject(); void InsertText( const EditTextObject& rTextObject ); - void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ); + void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const OUString& rBaseURL, sal_Bool bUseSpecial ); ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable(); diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 7336870..ab67096 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -717,11 +717,11 @@ public: OutlinerView* GetView( size_t nIndex ) const; size_t GetViewCount() const; - Paragraph* Insert( const String& rText, sal_Int32 nAbsPos = EE_PARA_APPEND, sal_Int16 nDepth = 0 ); + Paragraph* Insert( const OUString& rText, sal_Int32 nAbsPos = EE_PARA_APPEND, sal_Int16 nDepth = 0 ); void SetText( const OutlinerParaObject& ); void AddText( const OutlinerParaObject& ); - void SetText( const String& rText, Paragraph* pParagraph ); - String GetText( Paragraph* pPara, sal_Int32 nParaCount=1 ) const; + void SetText( const OUString& rText, Paragraph* pParagraph ); + OUString GetText( Paragraph* pPara, sal_Int32 nParaCount=1 ) const; OutlinerParaObject* CreateParaObject( sal_Int32 nStartPara = 0, sal_Int32 nParaCount = EE_PARA_ALL ) const; @@ -864,7 +864,7 @@ public: void StripPortions(); virtual void DrawingText( - const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, + const Point& rStartPos, const OUString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -931,7 +931,7 @@ public: void QuickInsertLineBreak( const ESelection& rSel ); // Only for EditEngine mode - void QuickInsertText( const String& rText, const ESelection& rSel ); + void QuickInsertText( const OUString& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); void QuickRemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 ); void QuickFormatDoc( sal_Bool bFull = sal_False ); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 552e46d..ede243c 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -814,7 +814,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool // Advantages: // a) no unnecessary Clear calls // b) no wasted memory - DBG_ASSERT( !mpInternalOutliner || ( ( mpInternalOutliner->GetParagraphCount() == 1 ) && ( mpInternalOutliner->GetText( mpInternalOutliner->GetParagraph( 0 ) ).Len() == 0 ) ), "InternalOutliner: not empty!" ); + DBG_ASSERT( !mpInternalOutliner || ( ( mpInternalOutliner->GetParagraphCount() == 1 ) && ( mpInternalOutliner->GetText( mpInternalOutliner->GetParagraph( 0 ) ).isEmpty() ) ), "InternalOutliner: not empty!" ); return mpInternalOutliner; } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 5baa4ba..a6128cb 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -487,7 +487,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) ESelection aSel; aSel.nEndPara = pOutliner->GetParagraphCount()-2; - aSel.nEndPos = pOutliner->GetText( pOutliner->GetParagraph( aSel.nEndPara ) ).Len(); + aSel.nEndPos = pOutliner->GetText( pOutliner->GetParagraph( aSel.nEndPara ) ).getLength(); pOutliner->QuickSetAttribs( aAnswerSet, aSel ); } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index e84696f..e7f882b 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -488,7 +488,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) while ( pOutliner->GetParagraphCount() > 1 ) { Paragraph* pPara = pOutliner->GetParagraph( 0 ); - sal_uLong nLen = pOutliner->GetText( pPara, 1 ).Len(); + sal_uLong nLen = pOutliner->GetText( pPara, 1 ).getLength(); pOutliner->QuickDelete( ESelection( 0, (sal_uInt16) nLen, 1, 0 ) ); pOutliner->QuickInsertLineBreak( ESelection( 0, (sal_uInt16) nLen, 0, (sal_uInt16) nLen ) ); } @@ -647,7 +647,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) // only take the last paragraph if it is filled if (nSourcePos < nParaCount - 1 || - pOutliner->GetText(pSourcePara).Len() > 0) + !pOutliner->GetText(pSourcePara).isEmpty()) { pDocliner->Insert( pOutliner->GetText(pSourcePara), nTargetPos, nDepth ); String aStyleSheetName( pStyleSheet->GetName() ); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 6784daa..ada1937 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1031,7 +1031,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, sal_Bool bQuickDrag) if (nParaAnz==1 && p1stPara) { // with only one paragraph - if (pOutl->GetText(p1stPara).Len() == 0) + if (pOutl->GetText(p1stPara).isEmpty()) { bEmptyOutliner = sal_True; } diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index d4aba09..a2f68bd 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1667,7 +1667,7 @@ void SvxTableController::EditCell( const CellPos& rPos, ::Window* pWindow, const if(nParaAnz==1 && p1stPara) { // Bei nur einem Pararaph - if (pOutl->GetText(p1stPara).Len() == 0) + if (pOutl->GetText(p1stPara).isEmpty()) { bEmptyOutliner = true; }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
