extras/source/glade/libreoffice-catalog.xml.in | 3 sd/AllLangResTarget_sd.mk | 1 sd/UIConfig_sdraw.mk | 1 sd/inc/helpids.h | 3 sd/source/ui/dlg/inspagob.cxx | 59 ++++------ sd/source/ui/dlg/inspagob.src | 76 ------------- sd/source/ui/dlg/sdtreelb.cxx | 39 ++++++ sd/source/ui/inc/inspagob.hrc | 27 ---- sd/source/ui/inc/inspagob.hxx | 9 - sd/source/ui/inc/sdtreelb.hxx | 3 sd/source/ui/remotecontrol/BluetoothServer.cxx | 2 sd/uiconfig/sdraw/ui/insertslidesdialog.ui | 145 +++++++++++++++++++++++++ sw/inc/ndtxt.hxx | 12 +- sw/source/core/crsr/crstrvl.cxx | 2 sw/source/core/doc/docnum.cxx | 4 sw/source/core/edit/edattr.cxx | 2 sw/source/core/fields/expfld.cxx | 2 sw/source/core/fields/reffld.cxx | 2 sw/source/core/tox/txmsrt.cxx | 10 - sw/source/core/txtnode/ndtxt.cxx | 16 +- sw/source/ui/uno/unotxdoc.cxx | 2 21 files changed, 245 insertions(+), 175 deletions(-)
New commits: commit 904fe66ce17f24d8c81130ca204ee3c5cbf52802 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 14 11:04:59 2013 +0000 downgrade sdremote.bluetooth warning to info Change-Id: Iec39551dafead84f4f0ad246e7e1d1ad16e15b4a diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 54bc85a..63407a6 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -170,7 +170,7 @@ bluezGetDefaultService( DBusConnection *pConnection ) return NULL; if( DBUS_TYPE_OBJECT_PATH != dbus_message_iter_get_arg_type( &it ) ) - SAL_WARN( "sdremote.bluetooth", "invalid type of reply to DefaultAdapter: '" + SAL_INFO( "sdremote.bluetooth", "invalid type of reply to DefaultAdapter: '" << dbus_message_iter_get_arg_type( &it ) << "'" ); else { commit f13a47fa04db2e8c653df8adf8249a89ca06b291 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 14 10:40:16 2013 +0000 convert insert slides dialog to .ui Change-Id: I9dc8366d2e8bd2ab16ce11c9e69cbdbdca0ccae5 diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 6344078..487ff00c 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -421,6 +421,9 @@ <glade-widget-class title="Tab Order ListBox" name="pcrlo-TabOrderListBox" generic-name="TabOrderListBox" parent="svtlo-SvTreeListBox" icon-name="widget-gtk-treeview"/> + <glade-widget-class title="Page Objs ListBox" name="sdlo-SdPageObjsTLB" + generic-name="SdPageObjsTLB" parent="svtlo-SvTreeListBox" + icon-name="widget-gtk-treeview"/> <glade-widget-class title="Checked Tree List" name="svxlo-SvxCheckListBox" generic-name="Checked Tree List" parent="GtkTreeView" icon-name="widget-gtk-treeview"/> diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index b988697..3e36039 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/dlgass.src \ sd/source/ui/dlg/dlgfield.src \ sd/source/ui/dlg/dlgolbul.src \ - sd/source/ui/dlg/inspagob.src \ sd/source/ui/dlg/LayerDialog.src \ sd/source/ui/dlg/morphdlg.src \ sd/source/ui/dlg/navigatr.src \ diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index a578a2d..51c9726 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/drawpagedialog \ sd/uiconfig/sdraw/ui/drawprtldialog \ sd/uiconfig/sdraw/ui/insertlayer \ + sd/uiconfig/sdraw/ui/insertslidesdialog \ sd/uiconfig/sdraw/ui/namedesign \ sd/uiconfig/sdraw/ui/paranumberingtab \ sd/uiconfig/sdraw/ui/printeroptions \ diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h index 3d6aabf..1bab9f8 100644 --- a/sd/inc/helpids.h +++ b/sd/inc/helpids.h @@ -101,8 +101,6 @@ #define HID_SD_UNDODELETEWARNING_DLG "SD_HID_SD_UNDODELETEWARNING_DLG" #define HID_SD_UNDODELETEWARNING_CBX "SD_HID_SD_UNDODELETEWARNING_CBX" -#define HID_SD_PAGEOBJSTLB "SD_HID_SD_PAGEOBJSTLB" - #define HID_SD_NAMEDIALOG_OBJECT "SD_HID_SD_NAMEDIALOG_OBJECT" #define HID_SD_NAMEDIALOG_PAGE "SD_HID_SD_NAMEDIALOG_PAGE" #define HID_SD_NAMEDIALOG_LINEEND "SD_HID_SD_NAMEDIALOG_LINEEND" @@ -157,7 +155,6 @@ #define HID_SD_TABLE_DESIGN "SD_HID_SD_TABLE_DESIGN" #define HID_SD_ANNOTATIONS "SD_HID_SD_ANNOTATIONS" -#define HID_DLG_INSERT_PAGES_OBJS "SD_HID_DLG_INSERT_PAGES_OBJS" #define HID_VECTORIZE_DLG "SD_HID_VECTORIZE_DLG" #define HID_MN_SUB_GRAPHIC "SD_HID_MN_SUB_GRAPHIC" diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index 813c543..1c1ed12 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -25,30 +25,27 @@ #include "drawdoc.hxx" #include "DrawDocShell.hxx" #include "ViewShell.hxx" -#include "inspagob.hrc" SdInsertPagesObjsDlg::SdInsertPagesObjsDlg( - ::Window* pWindow, - const SdDrawDocument* pInDoc, - SfxMedium* pSfxMedium, - const OUString& rFileName ) - : ModalDialog ( pWindow, SdResId( DLG_INSERT_PAGES_OBJS ) ), - aLbTree ( this, SdResId( LB_TREE ) ), - aCbxLink ( this, SdResId( CBX_LINK ) ), - aCbxMasters ( this, SdResId( CBX_CHECK_MASTERS ) ), - aBtnOk ( this, SdResId( BTN_OK ) ), - aBtnCancel ( this, SdResId( BTN_CANCEL ) ), - aBtnHelp ( this, SdResId( BTN_HELP ) ), - pMedium ( pSfxMedium ), - mpDoc ( pInDoc ), - rName ( rFileName ) + ::Window* pWindow, const SdDrawDocument* pInDoc, + SfxMedium* pSfxMedium, const OUString& rFileName ) + : ModalDialog(pWindow, "InsertSlidesDialog", + "modules/sdraw/ui/insertslidesdialog.ui") + , pMedium(pSfxMedium) + , mpDoc(pInDoc) + , rName(rFileName) { - FreeResource(); + get(m_pLbTree, "tree"); + get(m_pCbxMasters, "backgrounds"); + get(m_pCbxLink, "links"); - aLbTree.SetViewFrame( ( (SdDrawDocument*) pInDoc )->GetDocSh()->GetViewShell()->GetViewFrame() ); + m_pLbTree->set_width_request(m_pLbTree->approximate_char_width() * 50); + m_pLbTree->set_height_request(m_pLbTree->GetTextHeight() * 12); - aLbTree.SetSelectHdl( LINK( this, SdInsertPagesObjsDlg, SelectObjectHdl ) ); + m_pLbTree->SetViewFrame( ( (SdDrawDocument*) pInDoc )->GetDocSh()->GetViewShell()->GetViewFrame() ); + + m_pLbTree->SetSelectHdl( LINK( this, SdInsertPagesObjsDlg, SelectObjectHdl ) ); // insert text if( !pMedium ) @@ -70,20 +67,20 @@ void SdInsertPagesObjsDlg::Reset() { if( pMedium ) { - aLbTree.SetSelectionMode( MULTIPLE_SELECTION ); + m_pLbTree->SetSelectionMode( MULTIPLE_SELECTION ); // transfer ownership of Medium - aLbTree.Fill( mpDoc, pMedium, rName ); + m_pLbTree->Fill( mpDoc, pMedium, rName ); } else { Color aColor( COL_WHITE ); Bitmap aBmpText( SdResId( BMP_DOC_TEXT ) ); Image aImgText( aBmpText, aColor ); - aLbTree.InsertEntry( rName, aImgText, aImgText ); + m_pLbTree->InsertEntry( rName, aImgText, aImgText ); } - aCbxMasters.Check( sal_True ); + m_pCbxMasters->Check( sal_True ); } std::vector<OUString> SdInsertPagesObjsDlg::GetList( const sal_uInt16 nType ) @@ -93,16 +90,16 @@ std::vector<OUString> SdInsertPagesObjsDlg::GetList( const sal_uInt16 nType ) { // to ensure that bookmarks are opened // (when the whole document is selected) - aLbTree.GetBookmarkDoc(); + m_pLbTree->GetBookmarkDoc(); // If the document is selected (too) or nothing is selected, // the whole document is inserted (but not more!) - if( aLbTree.GetSelectionCount() == 0 || - ( aLbTree.IsSelected( aLbTree.First() ) ) ) + if( m_pLbTree->GetSelectionCount() == 0 || + ( m_pLbTree->IsSelected( m_pLbTree->First() ) ) ) return std::vector<OUString>(); } - return aLbTree.GetSelectEntryList( nType ); + return m_pLbTree->GetSelectEntryList( nType ); } /** @@ -110,7 +107,7 @@ std::vector<OUString> SdInsertPagesObjsDlg::GetList( const sal_uInt16 nType ) */ sal_Bool SdInsertPagesObjsDlg::IsLink() { - return( aCbxLink.IsChecked() ); + return( m_pCbxLink->IsChecked() ); } /** @@ -118,7 +115,7 @@ sal_Bool SdInsertPagesObjsDlg::IsLink() */ sal_Bool SdInsertPagesObjsDlg::IsRemoveUnnessesaryMasterPages() const { - return( aCbxMasters.IsChecked() ); + return( m_pCbxMasters->IsChecked() ); } /** @@ -126,10 +123,10 @@ sal_Bool SdInsertPagesObjsDlg::IsRemoveUnnessesaryMasterPages() const */ IMPL_LINK_NOARG(SdInsertPagesObjsDlg, SelectObjectHdl) { - if( aLbTree.IsLinkableSelected() ) - aCbxLink.Enable(); + if( m_pLbTree->IsLinkableSelected() ) + m_pCbxLink->Enable(); else - aCbxLink.Disable(); + m_pCbxLink->Disable(); return( 0 ); } diff --git a/sd/source/ui/dlg/inspagob.src b/sd/source/ui/dlg/inspagob.src deleted file mode 100644 index b26936e0..0000000 --- a/sd/source/ui/dlg/inspagob.src +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "helpids.h" -#include "inspagob.hrc" - -ModalDialog DLG_INSERT_PAGES_OBJS -{ - HelpID = HID_DLG_INSERT_PAGES_OBJS ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 200 , 128 ) ; - Moveable = TRUE ; - Text [ en-US ] = "Insert Slides/Objects" ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 144 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 144 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 144 , 46 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - Control LB_TREE - { - HelpId = HID_SD_PAGEOBJSTLB; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 132 , 88 ) ; - TabStop = TRUE ; - }; - CheckBox CBX_LINK - { - HelpID = "sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_LINK"; - Pos = MAP_APPFONT ( 6 , 100 ) ; - Size = MAP_APPFONT ( 140 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Link" ; - }; - CheckBox CBX_CHECK_MASTERS - { - HelpID = "sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS"; - Pos = MAP_APPFONT ( 6 , 114 ) ; - Size = MAP_APPFONT ( 140 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Delete unused backg~rounds"; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index f01c00c..311d178 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -100,8 +100,14 @@ SdPageObjsTLB::SdPageObjsTransferable::SdPageObjsTransferable( { } - - +extern "C" SAL_DLLPUBLIC_EXPORT ::Window* SAL_CALL makeSdPageObjsTLB(::Window *pParent, VclBuilder::stringmap &rMap) +{ + WinBits nWinStyle = WB_TABSTOP; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinStyle |= WB_BORDER; + return new SdPageObjsTLB(pParent, nWinStyle); +} SdPageObjsTLB::SdPageObjsTransferable::~SdPageObjsTransferable() { @@ -243,6 +249,35 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId ) SV_DRAGDROP_APP_MOVE | SV_DRAGDROP_APP_COPY | SV_DRAGDROP_APP_DROP ); } +SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, WinBits nStyle ) +: SvTreeListBox ( pParentWin, nStyle ) +, mpParent ( pParentWin ) +, mpDoc ( NULL ) +, mpBookmarkDoc ( NULL ) +, mpMedium ( NULL ) +, mpOwnMedium ( NULL ) +, maImgOle ( BitmapEx( SdResId( BMP_OLE ) ) ) +, maImgGraphic ( BitmapEx( SdResId( BMP_GRAPHIC ) ) ) +, mbLinkableSelected ( sal_False ) +, mpDropNavWin ( NULL ) +, mbShowAllShapes ( false ) +, mbShowAllPages ( false ) + +{ + // add lines to Tree-ListBox + SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES | + WB_HASBUTTONS | // WB_HASLINESATROOT | + WB_HSCROLL | + WB_HASBUTTONSATROOT | + WB_QUICK_SEARCH /* i31275 */ ); + SetNodeBitmaps( Image(Bitmap( SdResId(BMP_EXPAND) )), + Image(Bitmap( SdResId(BMP_COLLAPSE) ))); + + SetDragDropMode( + SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY | + SV_DRAGDROP_APP_MOVE | SV_DRAGDROP_APP_COPY | SV_DRAGDROP_APP_DROP ); +} + SdPageObjsTLB::~SdPageObjsTLB() { diff --git a/sd/source/ui/inc/inspagob.hrc b/sd/source/ui/inc/inspagob.hrc deleted file mode 100644 index 4248b25..0000000 --- a/sd/source/ui/inc/inspagob.hrc +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define DLG_INSERT_PAGES_OBJS 938 -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 -#define LB_TREE 1 -#define CBX_LINK 1 -#define CBX_CHECK_MASTERS 2 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/inspagob.hxx b/sd/source/ui/inc/inspagob.hxx index a0d2da4..ae2f68a 100644 --- a/sd/source/ui/inc/inspagob.hxx +++ b/sd/source/ui/inc/inspagob.hxx @@ -31,12 +31,9 @@ class SdDrawDocument; class SdInsertPagesObjsDlg : public ModalDialog { private: - SdPageObjsTLB aLbTree; - CheckBox aCbxLink; - CheckBox aCbxMasters; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + SdPageObjsTLB* m_pLbTree; + CheckBox* m_pCbxLink; + CheckBox* m_pCbxMasters; SfxMedium* pMedium; const SdDrawDocument* mpDoc; diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index f78d5be..252a403 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -179,7 +179,8 @@ protected: public: - SdPageObjsTLB( Window* pParent, const SdResId& rSdResId ); + SdPageObjsTLB( Window* pParent, const SdResId& rSdResId ); + SdPageObjsTLB( Window* pParent, WinBits nStyle ); ~SdPageObjsTLB(); virtual void SelectHdl(); diff --git a/sd/uiconfig/sdraw/ui/insertslidesdialog.ui b/sd/uiconfig/sdraw/ui/insertslidesdialog.ui new file mode 100644 index 0000000..8a66c1f --- /dev/null +++ b/sd/uiconfig/sdraw/ui/insertslidesdialog.ui @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkDialog" id="InsertSlidesDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Insert Slides/Objects</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="margin_top">5</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="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="row_spacing">6</property> + <child> + <object class="GtkCheckButton" id="backgrounds"> + <property name="label" translatable="yes">Delete unused backg_rounds</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> + </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> + <child> + <object class="GtkCheckButton" id="links"> + <property name="label" translatable="yes">_Link</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> + </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="sdlo-SdPageObjsTLB" id="tree:border"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="SdPageObjsTLB-selection1"/> + </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> + </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 8820448bfebc362b31e673a5b7d01a8dc9144eca Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 14 10:01:08 2013 +0000 longparas: change GetExpandTxt to sal_Int32 Change-Id: I34b6f91d104e5f095f0aad58869d62d0a367d2b3 diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 923280e..516f9c7 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -680,15 +680,15 @@ public: add 5th optional parameter <bWithSpacesForLevel> indicating, if additional spaces are inserted in front of the expanded text string depending on the list level. */ - OUString GetExpandTxt( const xub_StrLen nIdx = 0, - const xub_StrLen nLen = STRING_LEN, + OUString GetExpandTxt( const sal_Int32 nIdx = 0, + const sal_Int32 nLen = -1, const bool bWithNum = false, const bool bAddSpaceAfterListLabelStr = false, const bool bWithSpacesForLevel = false ) const; - sal_Bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0, - xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN, - sal_Bool bWithNum = sal_False, sal_Bool bWithFtn = sal_True, - sal_Bool bReplaceTabsWithSpaces = sal_False ) const; + bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0, + sal_Int32 nIdx = 0, sal_Int32 nLen = -1, + bool bWithNum = false, bool bWithFtn = true, + bool bReplaceTabsWithSpaces = false ) const; OUString GetRedlineTxt( xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN, diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 8b33be1..20006dc 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1024,7 +1024,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( pONd ) { rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_OUTLINE; - rCntntAtPos.sStr = pONd->GetExpandTxt( 0, STRING_LEN, true, true ); + rCntntAtPos.sStr = pONd->GetExpandTxt( 0, -1, true, true ); bRet = sal_True; } } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 07d55dd..458f550 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -2376,7 +2376,7 @@ OUString SwDoc::getListItemText( const SwNodeNum& rNodeNum, const bool bWithSpacesForLevel ) const { return rNodeNum.GetTxtNode() - ? rNodeNum.GetTxtNode()->GetExpandTxt( 0, STRING_LEN, bWithNumber, + ? rNodeNum.GetTxtNode()->GetExpandTxt( 0, -1, bWithNumber, bWithNumber, bWithSpacesForLevel ) : OUString(); } @@ -2429,7 +2429,7 @@ OUString SwDoc::getOutlineText( const sal_Int32 nIdx, const bool bWithSpacesForLevel ) const { return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]-> - GetTxtNode()->GetExpandTxt( 0, STRING_LEN, bWithNumber, + GetTxtNode()->GetExpandTxt( 0, -1, bWithNumber, bWithNumber, bWithSpacesForLevel ); } diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 557c0ab..33dc8d7 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -357,7 +357,7 @@ sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes ) OUString sTxt( rFtn.GetViewNumStr( *mpDoc )); if( !sTxt.isEmpty() ) sTxt += " "; - sTxt += pTxtNd->GetExpandTxt( 0, STRING_LEN ); + sTxt += pTxtNd->GetExpandTxt( 0, -1 ); _SeqFldLstElem* pNew = new _SeqFldLstElem( sTxt, pTxtFtn->GetSeqRefNo() ); diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index a35d96b..31f9797 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -586,7 +586,7 @@ sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList ) pNd->GetNodes().IsDocNodes() ) { _SeqFldLstElem* pNew = new _SeqFldLstElem( - pNd->GetExpandTxt( 0, STRING_LEN ), + pNd->GetExpandTxt( 0, -1 ), ((SwSetExpField*)pF->GetField())->GetSeqNumber() ); rList.InsertSort( pNew ); } diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index ef5841f..3de9fe6 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -248,7 +248,7 @@ OUString SwGetRefField::GetExpandedTxtOfReferencedTxtNode() const { const SwTxtNode* pReferencedTxtNode( GetReferencedTxtNode() ); return pReferencedTxtNode - ? OUString(pReferencedTxtNode->GetExpandTxt( 0, STRING_LEN, true, true )) + ? OUString(pReferencedTxtNode->GetExpandTxt( 0, -1, true, true )) : OUString(); } diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 4739d31..445940f 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -540,10 +540,9 @@ TextAndReading SwTOXPara::GetText_Impl() const case nsSwTOXElement::TOX_TEMPLATE: case nsSwTOXElement::TOX_OUTLINELEVEL: { - xub_StrLen nStt = nStartIndex; return TextAndReading(((SwTxtNode*)pNd)->GetExpandTxt( - nStt, - nEndIndex == -1 ? STRING_LEN : nEndIndex - nStt), + nStartIndex, + nEndIndex == -1 ? -1 : nEndIndex - nStartIndex), OUString()); } break; @@ -576,9 +575,8 @@ void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) c if( nsSwTOXElement::TOX_TEMPLATE == eType || nsSwTOXElement::TOX_SEQUENCE == eType || nsSwTOXElement::TOX_OUTLINELEVEL == eType) { SwTxtNode* pSrc = (SwTxtNode*)aTOXSources[0].pNd; - xub_StrLen nStt = nStartIndex; - pSrc->GetExpandTxt( rNd, &rInsPos, nStt, - nEndIndex == -1 ? STRING_LEN : nEndIndex - nStt, + pSrc->GetExpandTxt( rNd, &rInsPos, nStartIndex, + nEndIndex == -1 ? -1 : nEndIndex - nStartIndex, sal_False, sal_False, sal_True ); } else diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 12e467d..7958ac3 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3008,14 +3008,14 @@ Replace0xFF(SwTxtNode const& rNode, OUStringBuffer & rTxt, sal_Int32 & rTxtStt, * Expand fields *************************************************************************/ // #i83479# - handling of new parameters -OUString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx, - const xub_StrLen nLen, +OUString SwTxtNode::GetExpandTxt( const sal_Int32 nIdx, + const sal_Int32 nLen, const bool bWithNum, const bool bAddSpaceAfterListLabelStr, const bool bWithSpacesForLevel ) const { OUStringBuffer aTxt( - (STRING_LEN == nLen) ? GetTxt().copy(nIdx) : GetTxt().copy(nIdx, nLen)); + (nLen == -1) ? GetTxt().copy(nIdx) : GetTxt().copy(nIdx, nLen)); sal_Int32 nTxtStt = nIdx; Replace0xFF(*this, aTxt, nTxtStt, aTxt.getLength(), true); if( bWithNum ) @@ -3044,9 +3044,9 @@ OUString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx, return aTxt.makeStringAndClear(); } -sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, - xub_StrLen nIdx, xub_StrLen nLen, sal_Bool bWithNum, - sal_Bool bWithFtn, sal_Bool bReplaceTabsWithSpaces ) const +bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, + sal_Int32 nIdx, sal_Int32 nLen, bool bWithNum, + bool bWithFtn, bool bReplaceTabsWithSpaces ) const { if( &rDestNd == this ) return sal_False; @@ -3066,7 +3066,7 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, SwScriptInfo::MaskHiddenRanges(*this, buf, 0, buf.getLength(), cChar); buf.remove(0, nIdx); - if (STRING_LEN != nLen) + if (nLen != -1) { buf.truncate(nLen); } @@ -3211,7 +3211,7 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, nStartDelete = -1; // reset } - return sal_True; + return true; } struct block diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index ea08ec5..b9dc0f0 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1056,7 +1056,7 @@ static OUString lcl_CreateOutlineString( sal_uInt16 nIndex, sEntry += "."; } sEntry += rOutlineNodes[ nIndex ]-> - GetTxtNode()->GetExpandTxt( 0, STRING_LEN, sal_False ); + GetTxtNode()->GetExpandTxt( 0, -1, false ); return sEntry; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits