summaryrefslogtreecommitdiff
path: root/sw/source/core/edit
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/edfld.cxx5
-rw-r--r--sw/source/core/edit/editsh.cxx29
3 files changed, 30 insertions, 6 deletions
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 37ba5e5ced31..31c4a7dfea3e 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -457,7 +457,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwField* const pFld = pAttr->GetFld().GetFld();
if (pFld)
{
- sExp += pFld->Expand();
+ sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard());
}
}
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index a919da9a6515..1e4f699fa203 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -42,9 +42,7 @@
#include <expfld.hxx>
#include <flddat.hxx>
#include <swundo.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <swddetbl.hxx>
#include <hints.hxx>
@@ -226,7 +224,8 @@ void SwEditShell::FieldToText( SwFieldType* pType )
*pFmtFld->GetTxtFld()->GetStart() );
// Feldinhalt durch Text ersetzen
- String aEntry( pFmtFld->GetFld()->Expand() );
+ String const aEntry(
+ pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) );
pPaM->SetMark();
pPaM->Move( fnMoveForward );
GetDoc()->DeleteRange( *pPaM );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7af79fde80a8..32ab9fa07e94 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -1162,8 +1162,7 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData )
void SwEditShell::TransliterateText( sal_uInt32 nType )
{
- utl::TransliterationWrapper aTrans(
- ::comphelper::getProcessServiceFactory(), nType );
+ utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType );
StartAllAction();
SET_CURR_SHELL( this );
@@ -1185,6 +1184,32 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
EndAllAction();
}
+void SwEditShell::TransliterateText( const String& rModuleName )
+{
+ utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 );
+ aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM );
+ StartAllAction();
+ SET_CURR_SHELL( this );
+
+ SwPaM* pCrsr = GetCrsr();
+ if( pCrsr->GetNext() != pCrsr )
+ {
+ GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ FOREACHPAM_START( this )
+
+ if( PCURCRSR->HasMark() )
+ GetDoc()->TransliterateText( *PCURCRSR, aTrans );
+
+ FOREACHPAM_END()
+ GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ }
+ else
+ GetDoc()->TransliterateText( *pCrsr, aTrans );
+
+ EndAllAction();
+}
+
+
void SwEditShell::CountWords( SwDocStat& rStat ) const
{
FOREACHPAM_START( this )