summaryrefslogtreecommitdiffstats
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-02-26 08:13:29 +0100
committerThomas Lange [tl] <tl@openoffice.org>2010-02-26 08:13:29 +0100
commit6f5a1d754c17404c1dd7a71aaed5a1a9f8d08f3a (patch)
treebb97a8e23e6bad31a87abd7598b78f7f44662874 /cui/source/dialogs
parentcws tl74: merge (diff)
parentCWS-TOOLING: integrate CWS changefileheader2 (diff)
downloadcore-6f5a1d754c17404c1dd7a71aaed5a1a9f8d08f3a.tar.gz
core-6f5a1d754c17404c1dd7a71aaed5a1a9f8d08f3a.zip
cws tl74: merge with DEV300_m72
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/SpellAttrib.cxx5
-rw-r--r--cui/source/dialogs/SpellAttrib.hxx5
-rwxr-xr-xcui/source/dialogs/SpellDialog.cxx19
-rw-r--r--cui/source/dialogs/SpellDialog.hrc5
-rw-r--r--cui/source/dialogs/SpellDialog.src5
-rw-r--r--cui/source/dialogs/charmap.hrc5
-rw-r--r--cui/source/dialogs/charmap.src5
-rw-r--r--cui/source/dialogs/commonlingui.cxx5
-rw-r--r--cui/source/dialogs/commonlingui.hxx7
-rw-r--r--cui/source/dialogs/commonlingui.src5
-rw-r--r--cui/source/dialogs/cuicharmap.cxx4
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx5
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx11
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx5
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx5
-rw-r--r--[-rwxr-xr-x]cui/source/dialogs/cuiimapdlg.hrc5
-rw-r--r--[-rwxr-xr-x]cui/source/dialogs/cuiimapdlg.src5
-rw-r--r--cui/source/dialogs/cuiimapwnd.cxx5
-rw-r--r--cui/source/dialogs/cuitbxform.cxx5
-rw-r--r--cui/source/dialogs/dlgname.cxx5
-rw-r--r--cui/source/dialogs/dlgname.hrc5
-rw-r--r--cui/source/dialogs/dlgname.src5
-rw-r--r--cui/source/dialogs/fmsearch.hrc5
-rw-r--r--cui/source/dialogs/fmsearch.src5
-rw-r--r--cui/source/dialogs/gallery.src5
-rw-r--r--cui/source/dialogs/grfflt.hrc5
-rw-r--r--cui/source/dialogs/grfflt.src5
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx9
-rw-r--r--cui/source/dialogs/hangulhanjadlg.hrc5
-rw-r--r--cui/source/dialogs/hangulhanjadlg.src5
-rw-r--r--cui/source/dialogs/hldocntp.cxx5
-rw-r--r--cui/source/dialogs/hldoctp.cxx5
-rw-r--r--cui/source/dialogs/hlinettp.cxx5
-rw-r--r--cui/source/dialogs/hlmailtp.cxx5
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx5
-rw-r--r--cui/source/dialogs/hlmarkwn.hrc5
-rw-r--r--cui/source/dialogs/hlmarkwn.src5
-rw-r--r--cui/source/dialogs/hltpbase.cxx5
-rw-r--r--cui/source/dialogs/hyperdlg.hrc5
-rw-r--r--cui/source/dialogs/hyperdlg.src5
-rwxr-xr-xcui/source/dialogs/hyphen.cxx569
-rwxr-xr-xcui/source/dialogs/hyphen.hrc46
-rwxr-xr-xcui/source/dialogs/hyphen.src126
-rw-r--r--cui/source/dialogs/iconcdlg.cxx5
-rw-r--r--cui/source/dialogs/iconcdlg.src5
-rw-r--r--cui/source/dialogs/insdlg.cxx5
-rw-r--r--cui/source/dialogs/insrc.cxx5
-rw-r--r--cui/source/dialogs/insrc.hrc5
-rw-r--r--cui/source/dialogs/insrc.src5
-rw-r--r--cui/source/dialogs/linkdlg.cxx17
-rw-r--r--[-rwxr-xr-x]cui/source/dialogs/makefile.mk12
-rw-r--r--cui/source/dialogs/multifil.cxx5
-rw-r--r--cui/source/dialogs/multipat.cxx5
-rw-r--r--cui/source/dialogs/multipat.hrc5
-rw-r--r--cui/source/dialogs/multipat.src5
-rw-r--r--cui/source/dialogs/newtabledlg.cxx5
-rw-r--r--cui/source/dialogs/newtabledlg.hrc5
-rw-r--r--cui/source/dialogs/newtabledlg.src5
-rw-r--r--cui/source/dialogs/pastedlg.cxx5
-rw-r--r--cui/source/dialogs/plfilter.cxx5
-rw-r--r--cui/source/dialogs/postdlg.cxx5
-rw-r--r--cui/source/dialogs/postdlg.hrc5
-rw-r--r--cui/source/dialogs/postdlg.src5
-rw-r--r--cui/source/dialogs/scriptdlg.cxx5
-rw-r--r--cui/source/dialogs/scriptdlg.hrc5
-rw-r--r--cui/source/dialogs/scriptdlg.src5
-rw-r--r--cui/source/dialogs/sdrcelldlg.cxx5
-rw-r--r--cui/source/dialogs/sdrcelldlg.src5
-rw-r--r--cui/source/dialogs/showcols.cxx5
-rw-r--r--cui/source/dialogs/showcols.src5
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx5
-rw-r--r--cui/source/dialogs/splitcelldlg.hrc5
-rw-r--r--cui/source/dialogs/splitcelldlg.src5
-rw-r--r--cui/source/dialogs/srchxtra.cxx19
-rw-r--r--cui/source/dialogs/srchxtra.hrc5
-rw-r--r--cui/source/dialogs/srchxtra.src5
-rw-r--r--cui/source/dialogs/svuidlg.hrc5
-rw-r--r--cui/source/dialogs/svuidlg.src5
-rw-r--r--cui/source/dialogs/tbxform.src5
-rwxr-xr-xcui/source/dialogs/thesdlg.cxx756
-rwxr-xr-xcui/source/dialogs/thesdlg.hrc52
-rwxr-xr-xcui/source/dialogs/thesdlg.src147
-rwxr-xr-xcui/source/dialogs/thesdlg_impl.hxx220
-rw-r--r--cui/source/dialogs/winpluginlib.cpp9
-rw-r--r--cui/source/dialogs/zoom.cxx5
-rw-r--r--cui/source/dialogs/zoom.hrc5
-rw-r--r--cui/source/dialogs/zoom.src5
87 files changed, 2027 insertions, 351 deletions
diff --git a/cui/source/dialogs/SpellAttrib.cxx b/cui/source/dialogs/SpellAttrib.cxx
index 9c26dc321f7b..4d3240597259 100644
--- a/cui/source/dialogs/SpellAttrib.cxx
+++ b/cui/source/dialogs/SpellAttrib.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SpellAttrib.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx
index ac2bb278c594..bbd631f056b0 100644
--- a/cui/source/dialogs/SpellAttrib.hxx
+++ b/cui/source/dialogs/SpellAttrib.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SpellAttrib.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 48ecbf5205f7..6a2962716f27 100755
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SpellDialog.cxx,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,8 +43,8 @@
#include <unotools/lingucfg.hxx>
#include <svtools/textdata.hxx>
#include <svtools/filter.hxx>
-#include <svx/unolingu.hxx>
-#include <svx/splwrap.hxx>
+#include <editeng/unolingu.hxx>
+#include <editeng/splwrap.hxx>
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
#include <comphelper/processfactory.hxx>
@@ -60,12 +57,11 @@
#include <vcl/help.hxx>
#include <vcl/graph.hxx>
#include <osl/file.hxx>
-#include <svx/impgrf.hxx>
#include <cuires.hrc>
#include <helpid.hrc>
#include "SpellDialog.hrc"
-#include <svx/optitems.hxx>
-#include <svx/svxenum.hxx>
+#include <editeng/optitems.hxx>
+#include <editeng/svxenum.hxx>
#include <svx/SpellDialogChildWindow.hxx>
#include "SpellDialog.hxx"
#include <svx/dlgutil.hxx>
@@ -73,6 +69,7 @@
#include <dialmgr.hxx>
#include <svx/svxerr.hxx>
#include "treeopt.hxx"
+#include <svtools/langtab.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -887,7 +884,7 @@ static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl )
osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
Graphic aGraphic;
const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
- if( GRFILTER_OK == LoadGraphic( aTmp, aFilterName, aGraphic ) )
+ if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
{
aRes = Image( aGraphic.GetBitmapEx() );
}
@@ -927,7 +924,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
sTitle = m_sTitleSpellingGrammar;
}
}
- sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", ::GetLanguageString(nLang) );
+ sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", SvtLanguageTable::GetLanguageString(nLang) );
SetText( sTitle );
}
/*-------------------------------------------------------------------------
diff --git a/cui/source/dialogs/SpellDialog.hrc b/cui/source/dialogs/SpellDialog.hrc
index f571525a25db..5c9a82ffef0e 100644
--- a/cui/source/dialogs/SpellDialog.hrc
+++ b/cui/source/dialogs/SpellDialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SpellDialog.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/SpellDialog.src b/cui/source/dialogs/SpellDialog.src
index 61ef8b4e6ab2..5a97025f02af 100644
--- a/cui/source/dialogs/SpellDialog.src
+++ b/cui/source/dialogs/SpellDialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SpellDialog.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/charmap.hrc b/cui/source/dialogs/charmap.hrc
index 49dae5c98f06..0b3aa3e09b49 100644
--- a/cui/source/dialogs/charmap.hrc
+++ b/cui/source/dialogs/charmap.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: charmap.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/charmap.src b/cui/source/dialogs/charmap.src
index c8b1030cb328..02e2e728f412 100644
--- a/cui/source/dialogs/charmap.src
+++ b/cui/source/dialogs/charmap.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: charmap.src,v $
- * $Revision: 1.57 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/commonlingui.cxx b/cui/source/dialogs/commonlingui.cxx
index 4f2ab5677b63..f1cc2a869d6a 100644
--- a/cui/source/dialogs/commonlingui.cxx
+++ b/cui/source/dialogs/commonlingui.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: commonlingui.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx
index d1781e83348f..04d9fbcc58e4 100644
--- a/cui/source/dialogs/commonlingui.hxx
+++ b/cui/source/dialogs/commonlingui.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: commonlingui.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include <vcl/ctrl.hxx>
#include <svtools/stdctrl.hxx>
#include <vcl/edit.hxx>
-#include <svx/svxbox.hxx>
+#include <svtools/svxbox.hxx>
#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
#endif
diff --git a/cui/source/dialogs/commonlingui.src b/cui/source/dialogs/commonlingui.src
index 1a58a9ef7fa8..60a1eff0e14f 100644
--- a/cui/source/dialogs/commonlingui.src
+++ b/cui/source/dialogs/commonlingui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: commonlingui.src,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 83dc06e606a3..b8b6d2567a47 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -2,7 +2,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
@@ -53,7 +53,7 @@
#include <sfx2/request.hxx>
#include <sfx2/sfxsids.hrc>
#include <sfx2/app.hxx>
-#include <svx/fontitem.hxx>
+#include <editeng/fontitem.hxx>
#include "charmap.hrc"
#include "macroass.hxx"
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 7411224a0f93..cd67d1ab5bb3 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuifmsearch.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 426d6fef86ea..a205db2a28c9 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuigaldlg.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,8 +35,8 @@
#include <vcl/msgbox.hxx>
#include <avmedia/mediawindow.hxx>
#include <unotools/pathoptions.hxx>
-#include <svx/opengrf.hxx>
-#include <svx/impgrf.hxx>
+#include <sfx2/opengrf.hxx>
+#include <svtools/filter.hxx>
#include <svx/gallery1.hxx>
#include <svx/galtheme.hxx>
#include "cuigaldlg.hxx"
@@ -856,7 +853,7 @@ SfxTabPage* TPGalleryThemeProperties::Create( Window* pParent, const SfxItemSet&
void TPGalleryThemeProperties::FillFilterList()
{
- GraphicFilter* pFilter = GetGrfFilter();
+ GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
String aExt;
String aName;
FilterEntry* pFilterEntry;
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index be2b401320fd..8bbbfb5f8df2 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuigrfflt.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index a73cc0007a6f..db4a3d15f4a4 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuihyperdlg.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuiimapdlg.hrc b/cui/source/dialogs/cuiimapdlg.hrc
index 9424d94c1f05..5be30abc13a7 100755..100644
--- a/cui/source/dialogs/cuiimapdlg.hrc
+++ b/cui/source/dialogs/cuiimapdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: imapdlg.hrc,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuiimapdlg.src b/cui/source/dialogs/cuiimapdlg.src
index de41ca0d1d55..9b60adf854ca 100755..100644
--- a/cui/source/dialogs/cuiimapdlg.src
+++ b/cui/source/dialogs/cuiimapdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: imapdlg.src,v $
- * $Revision: 1.53 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx
index 841b9ca59b78..950d400bb42e 100644
--- a/cui/source/dialogs/cuiimapwnd.cxx
+++ b/cui/source/dialogs/cuiimapwnd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuiimapwnd.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx
index 1ca37f425a10..e3115875fab2 100644
--- a/cui/source/dialogs/cuitbxform.cxx
+++ b/cui/source/dialogs/cuitbxform.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuitbxform.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 8cf36980decf..c5bf6d8ffa39 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlgname.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/dlgname.hrc b/cui/source/dialogs/dlgname.hrc
index 787a5b9bd6df..04e9377be619 100644
--- a/cui/source/dialogs/dlgname.hrc
+++ b/cui/source/dialogs/dlgname.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlgname.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/dlgname.src b/cui/source/dialogs/dlgname.src
index 93a2e5979671..e3e961880dfc 100644
--- a/cui/source/dialogs/dlgname.src
+++ b/cui/source/dialogs/dlgname.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlgname.src,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/fmsearch.hrc b/cui/source/dialogs/fmsearch.hrc
index 579602ec2b5f..cfad011101c2 100644
--- a/cui/source/dialogs/fmsearch.hrc
+++ b/cui/source/dialogs/fmsearch.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmsearch.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/fmsearch.src b/cui/source/dialogs/fmsearch.src
index 83b04a138b0d..186db5a48735 100644
--- a/cui/source/dialogs/fmsearch.src
+++ b/cui/source/dialogs/fmsearch.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmsearch.src,v $
- * $Revision: 1.59 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src
index e4db69f6f73d..db0d4bbf3973 100644
--- a/cui/source/dialogs/gallery.src
+++ b/cui/source/dialogs/gallery.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gallery.src,v $
- * $Revision: 1.79 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/grfflt.hrc b/cui/source/dialogs/grfflt.hrc
index b04d025d4d13..94d7f8fe392f 100644
--- a/cui/source/dialogs/grfflt.hrc
+++ b/cui/source/dialogs/grfflt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: grfflt.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/grfflt.src b/cui/source/dialogs/grfflt.src
index c01dc4060b6c..a94161c0a1ed 100644
--- a/cui/source/dialogs/grfflt.src
+++ b/cui/source/dialogs/grfflt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: grfflt.src,v $
- * $Revision: 1.45 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index afef3c1edb5f..2198a42c3fcf 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hangulhanjadlg.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -53,7 +50,7 @@
#include <comphelper/processfactory.hxx>
-#define HHC HangulHanjaConversion
+#define HHC editeng::HangulHanjaConversion
#define LINE_CNT static_cast< USHORT >(2)
//.............................................................................
@@ -604,7 +601,7 @@ namespace svx
m_pPlayground->GetButton( SvxCommonLinguisticControl::eOptions )->Show();
// m_pPlayground->EnableButton( SvxCommonLinguisticControl::eOptions, true );
- if ( HangulHanjaConversion::eHangulToHanja == _ePrimaryDirection )
+ if ( editeng::HangulHanjaConversion::eHangulToHanja == _ePrimaryDirection )
{
// m_aHanjaOnly.Enable( sal_False );
m_pIgnoreNonPrimary = &m_aHangulOnly;
diff --git a/cui/source/dialogs/hangulhanjadlg.hrc b/cui/source/dialogs/hangulhanjadlg.hrc
index 882d12a4c997..817e3a17264a 100644
--- a/cui/source/dialogs/hangulhanjadlg.hrc
+++ b/cui/source/dialogs/hangulhanjadlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hangulhanjadlg.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hangulhanjadlg.src b/cui/source/dialogs/hangulhanjadlg.src
index 93d58755b14b..11e2fe415c38 100644
--- a/cui/source/dialogs/hangulhanjadlg.src
+++ b/cui/source/dialogs/hangulhanjadlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hangulhanjadlg.src,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 0a2dfa9955f5..dc50bd8f205d 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hldocntp.cxx,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 1f4689c33fff..d8e5878c3a8e 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hldoctp.cxx,v $
- * $Revision: 1.28 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index ef0a330f00ef..79fde6c7a64c 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hlinettp.cxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 389fb20bf48b..bb59ac425e91 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hlmailtp.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index f5005dbedfd7..e7f40766d836 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hlmarkwn.cxx,v $
- * $Revision: 1.19.216.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hlmarkwn.hrc b/cui/source/dialogs/hlmarkwn.hrc
index d79da8b38dd6..1ac36dafa099 100644
--- a/cui/source/dialogs/hlmarkwn.hrc
+++ b/cui/source/dialogs/hlmarkwn.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hlmarkwn.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hlmarkwn.src b/cui/source/dialogs/hlmarkwn.src
index 48bf6d40fcb6..396e8cd573e0 100644
--- a/cui/source/dialogs/hlmarkwn.src
+++ b/cui/source/dialogs/hlmarkwn.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hlmarkwn.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 8ee78806ab0e..879eeab2c40f 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hltpbase.cxx,v $
- * $Revision: 1.37.216.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hyperdlg.hrc b/cui/source/dialogs/hyperdlg.hrc
index 69dae5d1ce57..0228d65bf3d2 100644
--- a/cui/source/dialogs/hyperdlg.hrc
+++ b/cui/source/dialogs/hyperdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hyperdlg.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src
index 4811fa4662e6..4ed7d1419bba 100644
--- a/cui/source/dialogs/hyperdlg.src
+++ b/cui/source/dialogs/hyperdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hyperdlg.src,v $
- * $Revision: 1.78 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
new file mode 100755
index 000000000000..d99a640e20fa
--- /dev/null
+++ b/cui/source/dialogs/hyphen.cxx
@@ -0,0 +1,569 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_cui.hxx"
+
+// include ---------------------------------------------------------------
+#include <tools/shl.hxx>
+#include <tools/list.hxx>
+#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
+#include <vcl/msgbox.hxx>
+#include "cuires.hrc"
+#include "hyphen.hrc"
+#include <editeng/svxenum.hxx>
+#include "hyphen.hxx"
+#include <editeng/splwrap.hxx>
+#include <svx/dlgutil.hxx>
+#include <svx/dialmgr.hxx>
+#include <editeng/unolingu.hxx>
+#include <svtools/langtab.hxx>
+#include "dialmgr.hxx"
+
+using namespace ::com::sun::star;
+
+
+// define ----------------------------------------------------------------
+
+#define HYPHHERE '-'
+#define CONTINUE_HYPH USHRT_MAX
+
+// Dies ist nur ein Hack, weil an dieser Stelle das extern char aus hmwrap
+// nicht bekannt ist, wird demnaechst in hmwrap durch ein define ersetzt.
+#define SW_SOFT_HYPHEN '='
+
+// class SvxHyphenEdit ---------------------------------------------------
+
+SvxHyphenEdit::SvxHyphenEdit( Window* pParent, const ResId& rResId ) :
+
+ Edit( pParent, rResId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt )
+{
+// sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+
+ switch ( nCode )
+ {
+ case KEY_LEFT:
+ ( (SvxHyphenWordDialog*)GetParent() )->SelLeft();
+ break;
+
+ case KEY_RIGHT:
+ ( (SvxHyphenWordDialog*)GetParent() )->SelRight();
+ break;
+
+ case KEY_TAB:
+ case KEY_ESCAPE:
+ case KEY_RETURN:
+ Edit::KeyInput(rKEvt);
+ break;
+ default:
+ Control::KeyInput( rKEvt ); // An den Dialog weiterleiten
+ break;
+ }
+}
+
+// struct SvxHyphenWordDialog_Impl ---------------------------------------------
+
+struct SvxHyphenWordDialog_Impl
+{
+ FixedText aWordFT;
+ SvxHyphenEdit aWordEdit;
+ ImageButton aLeftBtn;
+ ImageButton aRightBtn;
+ OKButton aOkBtn;
+ PushButton aContBtn;
+ PushButton aDelBtn;
+ FixedLine aFLBottom;
+ HelpButton aHelpBtn;
+ PushButton aHyphAll;
+ CancelButton aCancelBtn;
+ String aLabel;
+ SvxSpellWrapper* pHyphWrapper;
+ uno::Reference< linguistic2::XHyphenator > xHyphenator;
+ uno::Reference< linguistic2::XPossibleHyphens > xPossHyph;
+ String aActWord; // actual (to be displayed) word
+ LanguageType nActLanguage; // and language
+ sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos
+ sal_uInt16 nHyphPos;
+ sal_uInt16 nOldPos;
+ sal_Bool bBusy;
+
+ SvxHyphenWordDialog_Impl( Window* pParent );
+ ~SvxHyphenWordDialog_Impl();
+};
+
+
+SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( Window* pParent ) :
+ aWordFT ( pParent, SVX_RES( FT_WORD ) ),
+ aWordEdit ( pParent, SVX_RES( ED_WORD ) ),
+ aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ),
+ aRightBtn ( pParent, SVX_RES( BTN_RIGHT ) ),
+ aOkBtn ( pParent, SVX_RES( BTN_HYPH_CUT ) ),
+ aContBtn ( pParent, SVX_RES( BTN_HYPH_CONTINUE ) ),
+ aDelBtn ( pParent, SVX_RES( BTN_HYPH_DELETE ) ),
+ aFLBottom ( pParent, SVX_RES( FL_BOTTOM ) ),
+ aHelpBtn ( pParent, SVX_RES( BTN_HYPH_HELP ) ),
+ aHyphAll ( pParent, SVX_RES( BTN_HYPH_ALL ) ),
+ aCancelBtn ( pParent, SVX_RES( BTN_HYPH_CANCEL ) ),
+ aLabel ( ),
+ pHyphWrapper ( NULL ),
+ xHyphenator ( NULL ),
+ xPossHyph ( NULL ),
+ aActWord ( ),
+ nActLanguage ( LANGUAGE_NONE ),
+ nMaxHyphenationPos ( 0 ),
+ nHyphPos ( 0 ),
+ nOldPos ( 0 ),
+ bBusy ( sal_False )
+{
+}
+
+
+SvxHyphenWordDialog_Impl::~SvxHyphenWordDialog_Impl()
+{
+}
+
+// class SvxHyphenWordDialog ---------------------------------------------
+
+SvxHyphenWordDialog::SvxHyphenWordDialog(
+ const String &rWord, LanguageType nLang,
+ Window* pParent,
+ uno::Reference< linguistic2::XHyphenator > &xHyphen,
+ SvxSpellWrapper* pWrapper ) :
+
+ SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) )
+{
+ m_pImpl = boost::shared_ptr< SvxHyphenWordDialog_Impl >(new SvxHyphenWordDialog_Impl( this ));
+
+ FreeResource();
+
+ m_pImpl->aLabel = GetText();
+ m_pImpl->pHyphWrapper = pWrapper;
+ m_pImpl->xHyphenator = xHyphen;
+ m_pImpl->aActWord = rWord;
+ m_pImpl->nActLanguage = nLang;
+
+ m_pImpl->aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Left_Impl ) );
+ m_pImpl->aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Right_Impl ) );
+ m_pImpl->aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CutHdl_Impl ) );
+ m_pImpl->aContBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, ContinueHdl_Impl ) );
+ m_pImpl->aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, DeleteHdl_Impl ) );
+ m_pImpl->aHyphAll.SetClickHdl( LINK( this, SvxHyphenWordDialog, HyphenateAllHdl_Impl ) );
+ m_pImpl->aCancelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CancelHdl_Impl ) );
+ m_pImpl->aWordEdit.SetGetFocusHdl( LINK( this, SvxHyphenWordDialog, GetFocusHdl_Impl ) );
+
+ uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pWrapper ?
+ pWrapper->GetLast() : uno::Reference< uno::XInterface > () , uno::UNO_QUERY );
+ DBG_ASSERT(xHyphWord.is(), "missing hyphenated word");
+ m_pImpl->nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0;
+ SetLabel_Impl( nLang );
+
+ InitControls_Impl();
+ m_pImpl->aWordEdit.GrabFocus();
+
+ // disable controls if service is not available
+ if (!m_pImpl->xHyphenator.is())
+ Enable( sal_False );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::SelLeft()
+{
+ String aTxt( m_pImpl->aWordEdit.GetText() );
+
+ for ( xub_StrLen i = m_pImpl->nOldPos + 1; i-- > 0 ; )
+ {
+ DBG_ASSERT(i <= aTxt.Len(), "index out of range");
+ if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ aTxt.SetChar( i, sal_Unicode( HYPHHERE ) );
+
+ if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() )
+ aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) );
+ m_pImpl->nOldPos = i;
+ m_pImpl->aWordEdit.SetText( aTxt );
+ m_pImpl->aWordEdit.GrabFocus();
+ m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) );
+ break;
+ }
+ }
+ m_pImpl->nHyphPos = GetHyphIndex_Impl();
+ EnableLRBtn_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::SelRight()
+{
+ String aTxt( m_pImpl->aWordEdit.GetText() );
+
+ for ( xub_StrLen i = m_pImpl->nOldPos + 1; i < aTxt.Len(); ++i )
+ {
+ if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ aTxt.SetChar( i, sal_Unicode( HYPHHERE ) );
+
+ if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() )
+ aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) );
+ m_pImpl->nOldPos = i;
+ m_pImpl->aWordEdit.SetText( aTxt );
+ m_pImpl->aWordEdit.GrabFocus();
+ m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) );
+ break;
+ }
+ }
+ m_pImpl->nHyphPos = GetHyphIndex_Impl();
+ EnableLRBtn_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::EnableLRBtn_Impl()
+{
+ String aTxt( m_pImpl->aWordEdit.GetText() );
+ xub_StrLen nLen = aTxt.Len();
+ xub_StrLen i;
+
+ m_pImpl->aRightBtn.Disable();
+ for ( i = m_pImpl->nOldPos + 2; i < nLen; ++i )
+ {
+ if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ m_pImpl->aRightBtn.Enable();
+ break;
+ }
+ }
+
+ DBG_ASSERT(m_pImpl->nOldPos < aTxt.Len(), "m_pImpl->nOldPos out of range");
+ if (m_pImpl->nOldPos >= aTxt.Len())
+ m_pImpl->nOldPos = aTxt.Len() - 1;
+ m_pImpl->aLeftBtn.Disable();
+ for ( i = m_pImpl->nOldPos; i-- > 0; )
+ {
+ if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ m_pImpl->aLeftBtn.Enable();
+ break;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxHyphenWordDialog::SetLabel_Impl( LanguageType nLang )
+{
+ String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
+ String aTmp( m_pImpl->aLabel );
+ aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
+ aTmp.Append( aLangStr );
+ aTmp.Append( sal_Unicode( ')' ) );
+ SetText( aTmp );
+}
+
+// -----------------------------------------------------------------------
+
+String SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
+ uno::Reference< linguistic2::XPossibleHyphens > &rxPossHyph,
+ sal_uInt16 _nMaxHyphenationPos )
+{
+ // returns a String showing only those hyphen positions which will result
+ // in a line break if hyphenation is done there
+
+ String aTxt;
+ DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens");
+ if (rxPossHyph.is())
+ {
+ aTxt = String( rxPossHyph->getPossibleHyphens() );
+
+ uno::Sequence< sal_Int16 > aHyphenationPositions(
+ rxPossHyph->getHyphenationPositions() );
+ sal_Int32 nLen = aHyphenationPositions.getLength();
+ const sal_Int16 *pHyphenationPos = aHyphenationPositions.getConstArray();
+
+ // find position nIdx after which all hyphen positions are unusable
+ xub_StrLen nIdx = STRING_NOTFOUND,
+ nPos;
+ if (nLen)
+ {
+ xub_StrLen nStart = 0;
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ if (pHyphenationPos[i] > _nMaxHyphenationPos)
+ break;
+ else
+ {
+ // find corresponding hyphen pos in string
+ nPos = aTxt.Search( sal_Unicode( SW_SOFT_HYPHEN ), nStart );
+
+ if (nStart == STRING_NOTFOUND)
+ break;
+ else
+ {
+ nIdx = nPos;
+ nStart = nPos + 1;
+ }
+ }
+ }
+ }
+ DBG_ASSERT(nIdx != STRING_NOTFOUND, "no usable hyphenation position");
+
+ // remove not usable hyphens from string
+ nPos = nIdx == STRING_NOTFOUND ? 0 : nIdx + 1;
+ String aTmp( sal_Unicode( SW_SOFT_HYPHEN ) ),
+ aEmpty;
+ while (nPos != STRING_NOTFOUND)
+ nPos = aTxt.SearchAndReplace( aTmp, aEmpty, nPos + 1 );
+ }
+ return aTxt;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::InitControls_Impl()
+{
+ String aTxt;
+ m_pImpl->xPossHyph = NULL;
+ if (m_pImpl->xHyphenator.is())
+ {
+ lang::Locale aLocale( SvxCreateLocale(m_pImpl->nActLanguage) );
+ m_pImpl->xPossHyph = m_pImpl->xHyphenator->createPossibleHyphens( m_pImpl->aActWord, aLocale,
+ uno::Sequence< beans::PropertyValue >() );
+ if (m_pImpl->xPossHyph.is())
+ {
+ aTxt = EraseUnusableHyphens_Impl( m_pImpl->xPossHyph, m_pImpl->nMaxHyphenationPos );
+ }
+ SetLabel_Impl( m_pImpl->nActLanguage );
+ }
+ m_pImpl->aWordEdit.SetText( aTxt );
+
+ m_pImpl->nOldPos = aTxt.Len();
+ SelLeft();
+ EnableLRBtn_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos )
+{
+ if ( nInsPos != CONTINUE_HYPH && m_pImpl->xPossHyph.is())
+ {
+ if (nInsPos)
+ {
+ String aTmp( m_pImpl->aWordEdit.GetText() );
+ DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position");
+
+ sal_uInt16 nIdxPos = 0;
+ sal_uInt16 i = 0;
+ sal_Unicode c;
+ while (i < aTmp.Len() && HYPHHERE != (c = aTmp.GetChar(i++)) )
+ {
+ if (SW_SOFT_HYPHEN == c)
+ nIdxPos++;
+ }
+
+ uno::Sequence< sal_Int16 > aSeq = m_pImpl->xPossHyph->getHyphenationPositions();
+ sal_Int32 nLen = aSeq.getLength();
+ DBG_ASSERT(nLen, "empty sequence");
+ DBG_ASSERT(nIdxPos < nLen, "index out of range");
+ if (nLen && nIdxPos < nLen)
+ {
+ nInsPos = aSeq.getConstArray()[ nIdxPos ];
+ m_pImpl->pHyphWrapper->InsertHyphen( nInsPos );
+ }
+ }
+ else
+ {
+ //! calling with 0 as argument will remove hyphens!
+ m_pImpl->pHyphWrapper->InsertHyphen( nInsPos );
+ }
+ }
+
+ if ( m_pImpl->pHyphWrapper->FindSpellError() )
+ {
+ uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( m_pImpl->pHyphWrapper->GetLast(), uno::UNO_QUERY );
+
+ // adapt actual word and language to new found hyphenation result
+ if(xHyphWord.is())
+ {
+ m_pImpl->aActWord = String( xHyphWord->getWord() );
+ m_pImpl->nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() );
+ m_pImpl->nMaxHyphenationPos = xHyphWord->getHyphenationPos();
+ InitControls_Impl();
+ }
+ }
+ else
+ EndDialog( RET_OK );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl()
+{
+ sal_uInt16 nPos = 0;
+ String aTxt(m_pImpl->aWordEdit.GetText());
+
+ for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i )
+ {
+ sal_Unicode nChar = aTxt.GetChar( i );
+
+ if ( nChar == HYPHHERE )
+ break;
+
+ if ( nChar != SW_SOFT_HYPHEN )
+ nPos++;
+ }
+ return nPos;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG )
+{
+ if( !m_pImpl->bBusy )
+ {
+ m_pImpl->bBusy = sal_True;
+ ContinueHyph_Impl( m_pImpl->nHyphPos );
+ m_pImpl->bBusy = sal_False;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButton*/ )
+{
+ if( !m_pImpl->bBusy )
+ {
+ try
+ {
+ uno::Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() );
+ const rtl::OUString aName( rtl::OUString::createFromAscii( "IsHyphAuto" ) );
+ uno::Any aAny;
+
+ aAny <<= sal_True;
+ xProp->setPropertyValue( aName, aAny );
+
+ m_pImpl->bBusy = sal_True;
+ ContinueHyph_Impl( m_pImpl->nHyphPos );
+ m_pImpl->bBusy = sal_False;
+
+ aAny <<= sal_False;
+ xProp->setPropertyValue( aName, aAny );
+ }
+ catch (uno::Exception &e)
+ {
+ (void) e;
+ DBG_ASSERT( 0, "Hyphenate All failed" );
+ }
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG )
+{
+ if( !m_pImpl->bBusy )
+ {
+ m_pImpl->bBusy = sal_True;
+ ContinueHyph_Impl();
+ m_pImpl->bBusy = sal_False;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG )
+{
+ if( !m_pImpl->bBusy )
+ {
+ m_pImpl->bBusy = sal_True;
+ ContinueHyph_Impl( CONTINUE_HYPH );
+ m_pImpl->bBusy = sal_False;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG )
+{
+ if( !m_pImpl->bBusy )
+ {
+ m_pImpl->bBusy = sal_True;
+ m_pImpl->pHyphWrapper->SpellEnd();
+ EndDialog( RET_CANCEL );
+ m_pImpl->bBusy = sal_False;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG )
+{
+ if( !m_pImpl->bBusy )
+ {
+ m_pImpl->bBusy = sal_True;
+ SelLeft();
+ m_pImpl->bBusy = sal_False;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG )
+{
+ if( !m_pImpl->bBusy )
+ {
+ m_pImpl->bBusy = sal_True;
+ SelRight();
+ m_pImpl->bBusy = sal_False;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG )
+{
+ m_pImpl->aWordEdit.SetSelection( Selection( m_pImpl->nOldPos, m_pImpl->nOldPos + 1 ) );
+ return 0;
+}
+
+
+
diff --git a/cui/source/dialogs/hyphen.hrc b/cui/source/dialogs/hyphen.hrc
new file mode 100755
index 000000000000..f76e2aa75770
--- /dev/null
+++ b/cui/source/dialogs/hyphen.hrc
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_HYPHEN_HRC
+#define _SVX_HYPHEN_HRC
+
+// defines ------------------------------------------------------------------
+
+#define ED_WORD 10
+#define BTN_LEFT 11
+#define BTN_RIGHT 12
+#define FT_WORD 13
+#define FL_BOTTOM 14
+
+#define BTN_HYPH_CONTINUE 20
+#define BTN_HYPH_DELETE 21
+#define BTN_HYPH_CUT 22
+#define BTN_HYPH_CANCEL 23
+#define BTN_HYPH_HELP 24
+#define BTN_HYPH_ALL 25
+
+#endif
+
diff --git a/cui/source/dialogs/hyphen.src b/cui/source/dialogs/hyphen.src
new file mode 100755
index 000000000000..f10e94626f31
--- /dev/null
+++ b/cui/source/dialogs/hyphen.src
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "cuires.hrc"
+#include "hyphen.hrc"
+
+String RID_SVXSTR_HMERR_CHECKINSTALL
+{
+ /* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
+ /* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
+ Text [ en-US ] = "is not available for spellchecking\nPlease check your installation and install the desired language\n" ;
+};
+
+ // RID_SVXDLG_HYPHENATE --------------------------------------------------
+ModalDialog RID_SVXDLG_HYPHENATE
+{
+ HelpId = HID_HYPHENATE ;
+ Size = MAP_APPFONT ( 200 , 111 ) ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Text [ en-US ] = "Hyphenation" ;
+ Moveable = TRUE ;
+
+ FixedText FT_WORD
+ {
+ Pos = MAP_APPFONT ( 5 , 5 ) ;
+ Size = MAP_APPFONT ( 120 , 8 ) ;
+ Text [ en-US ] = "~Word" ;
+ };
+ Edit ED_WORD
+ {
+ BORDER = TRUE ;
+ Pos = MAP_APPFONT ( 5 , 17 ) ;
+ Size = MAP_APPFONT ( 132 , 12 ) ;
+ TABSTOP = TRUE ;
+ LEFT = TRUE ;
+ };
+ ImageButton BTN_LEFT
+ {
+ Pos = MAP_APPFONT ( 56 , 33 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TABSTOP = TRUE ;
+ SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
+ };
+ ImageButton BTN_RIGHT
+ {
+ Pos = MAP_APPFONT ( 75 , 33 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TABSTOP = TRUE ;
+ Symbol = IMAGEBUTTON_ARROW_RIGHT ;
+ };
+ OKButton BTN_HYPH_CUT
+ {
+ Pos = MAP_APPFONT ( 144 , 17 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text [ en-US ] = "H~yphenate" ;
+ TABSTOP = TRUE ;
+ DEFBUTTON = TRUE ;
+ };
+ PushButton BTN_HYPH_CONTINUE
+ {
+ Pos = MAP_APPFONT ( 144 , 35 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text [ en-US ] = "~Skip" ;
+ TABSTOP = TRUE ;
+ };
+ PushButton BTN_HYPH_DELETE
+ {
+ Pos = MAP_APPFONT ( 144 , 52 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text [ en-US ] = "~Remove" ;
+ TABSTOP = TRUE ;
+ };
+ FixedLine FL_BOTTOM
+ {
+ Pos = MAP_APPFONT ( 0 , 81 ) ;
+ Size = MAP_APPFONT ( 200 , 8 ) ;
+ };
+ HelpButton BTN_HYPH_HELP
+ {
+ Pos = MAP_APPFONT ( 5 , 93 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TABSTOP = TRUE ;
+ };
+ PushButton BTN_HYPH_ALL
+ {
+ Pos = MAP_APPFONT ( 63 , 93 ) ;
+ Size = MAP_APPFONT ( 74 , 14 ) ;
+ Text [ en-US ] = "Hyphenate ~All" ;
+ TABSTOP = TRUE ;
+ };
+ CancelButton BTN_HYPH_CANCEL
+ {
+ Pos = MAP_APPFONT ( 144 , 93 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text [ en-US ] = "~Close";
+ TABSTOP = TRUE ;
+ };
+};
+
+
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 95f49308acb4..adea20068499 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: iconcdlg.cxx,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/iconcdlg.src b/cui/source/dialogs/iconcdlg.src
index 83c8b8825aaf..c7d7d029b0df 100644
--- a/cui/source/dialogs/iconcdlg.src
+++ b/cui/source/dialogs/iconcdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: iconcdlg.src,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 3bbcf25643e0..c45dfeb9dc06 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insdlg.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index 270a36202c90..41d603c81802 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrc.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/insrc.hrc b/cui/source/dialogs/insrc.hrc
index e07c7cb2f1d5..2583ade5619f 100644
--- a/cui/source/dialogs/insrc.hrc
+++ b/cui/source/dialogs/insrc.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrc.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/insrc.src b/cui/source/dialogs/insrc.src
index 7d6845c32910..69f934a29049 100644
--- a/cui/source/dialogs/insrc.src
+++ b/cui/source/dialogs/insrc.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrc.src,v $
- * $Revision: 1.32 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 106e3b898243..0193cefa2964 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linkdlg.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -77,7 +74,7 @@ static long nTabs[] =
};
-SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, SvLinkManager* pMgr, BOOL bHtml )
+SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml )
: ModalDialog( pParent, CUI_RES( MD_UPDATE_BASELINKS ) ),
aFtFiles( this, CUI_RES( FT_FILES ) ),
aFtLinks( this, CUI_RES( FT_LINKS ) ),
@@ -304,7 +301,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG )
}
// falls jemand der Meinung ist, seine Links auszutauschen (SD)
- SvLinkManager* pNewMgr = pLinkMgr;
+ LinkManager* pNewMgr = pLinkMgr;
pLinkMgr = 0;
SetManager( pNewMgr );
@@ -391,7 +388,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
}
if( pLinkMgr->GetPersist() )
pLinkMgr->GetPersist()->SetModified();
- SvLinkManager* pNewMgr = pLinkMgr;
+ LinkManager* pNewMgr = pLinkMgr;
pLinkMgr = 0;
SetManager( pNewMgr );
}
@@ -436,7 +433,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
if( bNewLnkMgr )
{
- SvLinkManager* pNewMgr = pLinkMgr;
+ LinkManager* pNewMgr = pLinkMgr;
pLinkMgr = 0;
SetManager( pNewMgr );
@@ -554,7 +551,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
}
else
{
- SvLinkManager* pNewMgr = pLinkMgr;
+ LinkManager* pNewMgr = pLinkMgr;
pLinkMgr = 0;
SetManager( pNewMgr );
}
@@ -582,7 +579,7 @@ String SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk )
return sRet;
}
-void SvBaseLinksDlg::SetManager( SvLinkManager* pNewMgr )
+void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
{
if( pLinkMgr == pNewMgr )
return;
diff --git a/cui/source/dialogs/makefile.mk b/cui/source/dialogs/makefile.mk
index f7d597a219a1..0c5b90aff202 100755..100644
--- a/cui/source/dialogs/makefile.mk
+++ b/cui/source/dialogs/makefile.mk
@@ -1,15 +1,11 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.65 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,6 +50,7 @@ SRC1FILES = \
gallery.src \
grfflt.src \
hangulhanjadlg.src \
+ hyphen.src \
hlmarkwn.src \
hyperdlg.src \
iconcdlg.src \
@@ -69,6 +66,7 @@ SRC1FILES = \
srchxtra.src \
svuidlg.src \
tbxform.src \
+ thesdlg.src \
zoom.src \
@@ -89,6 +87,7 @@ SLOFILES+=\
$(SLO)$/hlmailtp.obj \
$(SLO)$/hlmarkwn.obj \
$(SLO)$/hltpbase.obj \
+ $(SLO)$/hyphen.obj \
$(SLO)$/iconcdlg.obj \
$(SLO)$/insdlg.obj \
$(SLO)$/insrc.obj \
@@ -106,6 +105,7 @@ SLOFILES+=\
$(SLO)$/SpellDialog.obj \
$(SLO)$/splitcelldlg.obj \
$(SLO)$/srchxtra.obj \
+ $(SLO)$/thesdlg.obj \
$(SLO)$/zoom.obj \
diff --git a/cui/source/dialogs/multifil.cxx b/cui/source/dialogs/multifil.cxx
index 8f5eadae306a..40d62c0311bb 100644
--- a/cui/source/dialogs/multifil.cxx
+++ b/cui/source/dialogs/multifil.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multifil.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index 6d55f4de9f35..1d3af44facf6 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multipat.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/multipat.hrc b/cui/source/dialogs/multipat.hrc
index 6ef22855ff8b..0bfda7212fb8 100644
--- a/cui/source/dialogs/multipat.hrc
+++ b/cui/source/dialogs/multipat.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multipat.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/multipat.src b/cui/source/dialogs/multipat.src
index 64dc9b412311..987867492e13 100644
--- a/cui/source/dialogs/multipat.src
+++ b/cui/source/dialogs/multipat.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multipat.src,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx
index 6309de2c3b7d..2c44e5add84d 100644
--- a/cui/source/dialogs/newtabledlg.cxx
+++ b/cui/source/dialogs/newtabledlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: newtabledlg.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/newtabledlg.hrc b/cui/source/dialogs/newtabledlg.hrc
index b17631658341..2357a4b1a280 100644
--- a/cui/source/dialogs/newtabledlg.hrc
+++ b/cui/source/dialogs/newtabledlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: newtabledlg.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/newtabledlg.src b/cui/source/dialogs/newtabledlg.src
index e02338d6085e..4bbbd564edd1 100644
--- a/cui/source/dialogs/newtabledlg.src
+++ b/cui/source/dialogs/newtabledlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: newtabledlg.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index e0892bfca427..2fe952b9197a 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pastedlg.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx
index d09cc00d2a34..4a90c54a277f 100644
--- a/cui/source/dialogs/plfilter.cxx
+++ b/cui/source/dialogs/plfilter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: plfilter.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index e695aaafa420..8ff20084f591 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: postdlg.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/postdlg.hrc b/cui/source/dialogs/postdlg.hrc
index b2b615647438..c0df97b971e2 100644
--- a/cui/source/dialogs/postdlg.hrc
+++ b/cui/source/dialogs/postdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: postdlg.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/postdlg.src b/cui/source/dialogs/postdlg.src
index 02face52b1b5..904319d45355 100644
--- a/cui/source/dialogs/postdlg.src
+++ b/cui/source/dialogs/postdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: postdlg.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index d68792732d7e..e1763249479c 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: scriptdlg.cxx,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/scriptdlg.hrc b/cui/source/dialogs/scriptdlg.hrc
index 0079037c7680..95ba3ddf38c2 100644
--- a/cui/source/dialogs/scriptdlg.hrc
+++ b/cui/source/dialogs/scriptdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: scriptdlg.hrc,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/scriptdlg.src b/cui/source/dialogs/scriptdlg.src
index cceca0bc64ff..67a81376d662 100644
--- a/cui/source/dialogs/scriptdlg.src
+++ b/cui/source/dialogs/scriptdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: scriptdlg.src,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx
index a5f8e074758e..0018fe5ce410 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sdrcelldlg.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/sdrcelldlg.src b/cui/source/dialogs/sdrcelldlg.src
index 0c721bc11d2b..c3ece3326544 100644
--- a/cui/source/dialogs/sdrcelldlg.src
+++ b/cui/source/dialogs/sdrcelldlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sdrcelldlg.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 4b3930a692c1..62e6e405dbd2 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: showcols.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/showcols.src b/cui/source/dialogs/showcols.src
index f22c0e0e3557..465591e8f0a0 100644
--- a/cui/source/dialogs/showcols.src
+++ b/cui/source/dialogs/showcols.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: showcols.src,v $
- * $Revision: 1.28 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index c6c1f173322c..1025d53c5b1f 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splitcelldlg.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/splitcelldlg.hrc b/cui/source/dialogs/splitcelldlg.hrc
index cab8b4ed02ad..143f4685abe4 100644
--- a/cui/source/dialogs/splitcelldlg.hrc
+++ b/cui/source/dialogs/splitcelldlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splitcelldlg.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/splitcelldlg.src b/cui/source/dialogs/splitcelldlg.src
index f33243450e07..5326ca2d0e4d 100644
--- a/cui/source/dialogs/splitcelldlg.src
+++ b/cui/source/dialogs/splitcelldlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splitcelldlg.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index 5b28029920cc..dafec167af2c 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srchxtra.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,12 +40,13 @@
#include "srchxtra.hrc"
#include <svx/svxitems.hrc> // RID_ATTR_BEGIN
#include <svx/dialmgr.hxx> // item resources
-#include <svx/flstitem.hxx>
+#include <editeng/flstitem.hxx>
#include "chardlg.hxx"
#include "paragrph.hxx"
#include <dialmgr.hxx>
#include "backgrnd.hxx"
#include <svx/dialogs.hrc> // RID_SVXPAGE_...
+#include <tools/resary.hxx>
// class SvxSearchFormatDialog -------------------------------------------
@@ -161,6 +159,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent,
SfxObjectShell* pSh = SfxObjectShell::Current();
DBG_ASSERT( pSh, "No DocShell" );
+ ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) );
SfxItemPool& rPool = pSh->GetPool();
SfxItemSet aSet( rPool, pWhRanges );
SfxWhichIter aIter( aSet );
@@ -183,18 +182,14 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent,
}
// item resources are in svx
- USHORT nResId = nSlot - SID_SVX_START + RID_ATTR_BEGIN;
+ sal_uInt32 nId = aAttrNames.FindIndex( nSlot );
SvLBoxEntry* pEntry = NULL;
- ResId aId( nResId, DIALOG_MGR() );
- aId.SetRT( RSC_STRING );
- if ( DIALOG_MGR().IsAvailable( aId ) )
- pEntry = aAttrLB.SvTreeListBox::InsertEntry( CUI_RESSTR( nResId ) );
+ if ( RESARRAY_INDEX_NOTFOUND != nId )
+ pEntry = aAttrLB.SvTreeListBox::InsertEntry( aAttrNames.GetString(nId) );
else
{
ByteString sError( "no resource for slot id\nslot = " );
sError += ByteString::CreateFromInt32( nSlot );
- sError += ByteString( "\nresid = " );
- sError += ByteString::CreateFromInt32( nResId );
DBG_ERRORFILE( sError.GetBuffer() );
}
diff --git a/cui/source/dialogs/srchxtra.hrc b/cui/source/dialogs/srchxtra.hrc
index 870303efd72c..5df6d9bd4767 100644
--- a/cui/source/dialogs/srchxtra.hrc
+++ b/cui/source/dialogs/srchxtra.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srchxtra.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/srchxtra.src b/cui/source/dialogs/srchxtra.src
index bde692af7447..04265a6d6726 100644
--- a/cui/source/dialogs/srchxtra.src
+++ b/cui/source/dialogs/srchxtra.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srchxtra.src,v $
- * $Revision: 1.52 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/svuidlg.hrc b/cui/source/dialogs/svuidlg.hrc
index ba3602fb18bd..8add126a33c7 100644
--- a/cui/source/dialogs/svuidlg.hrc
+++ b/cui/source/dialogs/svuidlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: svuidlg.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/svuidlg.src b/cui/source/dialogs/svuidlg.src
index cc8f2db676ae..74a8eae82274 100644
--- a/cui/source/dialogs/svuidlg.src
+++ b/cui/source/dialogs/svuidlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: svuidlg.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/tbxform.src b/cui/source/dialogs/tbxform.src
index e19818d51072..9e9d2fb6eb03 100644
--- a/cui/source/dialogs/tbxform.src
+++ b/cui/source/dialogs/tbxform.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxform.src,v $
- * $Revision: 1.31 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
new file mode 100755
index 000000000000..0a730c4e97e5
--- /dev/null
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -0,0 +1,756 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+
+#include "precompiled_cui.hxx"
+
+#include "cuires.hrc"
+#include "thesdlg.hrc"
+#include "thesdlg.hxx"
+#include "thesdlg_impl.hxx"
+
+//#include <svx/dialmgr.hxx>
+//#include <svx/dialogs.hrc>
+//#include <svx/langbox.hxx>
+//#include <svx/checklbx.hxx>
+//#include <dlgutil.hxx>
+//#include <svxerr.hxx>
+
+#include <editeng/unolingu.hxx>
+#include <tools/shl.hxx>
+#include <svl/lngmisc.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/svlbitm.hxx>
+#include <svtools/svtreebx.hxx>
+#include <vcl/wrkwin.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
+#include <com/sun/star/linguistic2/XThesaurus.hpp>
+#include <com/sun/star/linguistic2/XMeaning.hpp>
+#include <thesdlg.hxx>
+#include <svx/dlgutil.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/svxerr.hxx>
+#include <editeng/unolingu.hxx>
+#include <svx/langbox.hxx>
+#include <svtools/langtab.hxx>
+#include <unotools/lingucfg.hxx>
+#include <i18npool/mslangid.hxx>
+#include <comphelper/processfactory.hxx>
+#include <osl/file.hxx>
+
+
+#include <stack>
+#include <algorithm>
+
+#include <com/sun/star/linguistic2/XThesaurus.hpp>
+#include <com/sun/star/linguistic2/XMeaning.hpp>
+#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+
+using namespace ::com::sun::star;
+using ::rtl::OUString;
+
+
+#define A2S(x) String::CreateFromAscii( x )
+
+
+
+// GetReplaceEditString -------------------------------
+
+static void GetReplaceEditString( String &rText )
+{
+ // The strings returned by the thesaurus saometimes have some
+ // explanation text put in between '(' and ')' or a trailing '*'.
+ // These parts should not be put in the ReplaceEdit Text that may get
+ // inserted into the document. Thus we strip them from the text.
+
+ xub_StrLen nPos = rText.Search( sal_Unicode('(') );
+ while (STRING_NOTFOUND != nPos)
+ {
+ xub_StrLen nEnd = rText.Search( sal_Unicode(')'), nPos );
+ if (STRING_NOTFOUND != nEnd)
+ rText.Erase( nPos, nEnd-nPos+1 );
+ else
+ break;
+ nPos = rText.Search( sal_Unicode('(') );
+ }
+
+ nPos = rText.Search( sal_Unicode('*') );
+ if (STRING_NOTFOUND != nPos)
+ rText.Erase( nPos );
+
+ // remove any possible remaining ' ' that may confuse the thesaurus
+ // when it gets called with the text
+ rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
+}
+
+// class LookUpComboBox_Impl --------------------------------------------------
+
+LookUpComboBox_Impl::LookUpComboBox_Impl(
+ Window *pParent, const ResId &rResId, SvxThesaurusDialog_Impl &rImpl ) :
+ ComboBox (pParent, rResId),
+ m_rDialogImpl( rImpl )
+{
+ m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox_Impl, ModifyTimer_Hdl ) );
+ m_aModifyTimer.SetTimeout( 500 );
+
+ EnableAutocomplete( FALSE );
+}
+
+
+LookUpComboBox_Impl::~LookUpComboBox_Impl()
+{
+}
+
+
+void LookUpComboBox_Impl::Modify()
+{
+ m_aModifyTimer.Start();
+}
+
+
+IMPL_LINK( LookUpComboBox_Impl, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ )
+{
+ m_rDialogImpl.LookUp( GetText() );
+ m_aModifyTimer.Stop();
+ return 0;
+}
+
+
+// class ReplaceEdit_Impl --------------------------------------------------
+
+ReplaceEdit_Impl::ReplaceEdit_Impl(
+ Window *pParent, const ResId &rResId ) :
+ Edit (pParent, rResId)
+{
+}
+
+
+ReplaceEdit_Impl::~ReplaceEdit_Impl()
+{
+}
+
+
+void ReplaceEdit_Impl::Modify()
+{
+ if (m_pBtn)
+ m_pBtn->Enable( GetText().Len() > 0 );
+}
+
+void ReplaceEdit_Impl::SetText( const XubString& rStr )
+{
+ Edit::SetText( rStr );
+ Modify();
+}
+
+
+void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSelection )
+{
+ Edit::SetText( rStr, rNewSelection );
+ Modify();
+}
+
+
+// class ThesaurusAlternativesCtrl_Impl ----------------------------------
+
+void AlternativesString_Impl::Paint(
+ const Point& rPos,
+ SvLBox& rDev, USHORT,
+ SvLBoxEntry* pEntry )
+{
+ AlternativesUserData_Impl* pData = (AlternativesUserData_Impl*)pEntry->GetUserData();
+ Point aPos( rPos );
+ Font aOldFont( rDev.GetFont());
+ if (pData && pData->IsHeader())
+ {
+ Font aFont( aOldFont );
+ aFont.SetWeight( WEIGHT_BOLD );
+ rDev.SetFont( aFont );
+ aPos.X() = 0;
+ }
+ else
+ aPos.X() += 5;
+ rDev.DrawText( aPos, GetText() );
+ rDev.SetFont( aOldFont );
+}
+
+
+ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl(
+ Window* pParent,
+ SvxThesaurusDialog_Impl &rImpl ) :
+ SvxCheckListBox( pParent, SVX_RES( CT_THES_ALTERNATIVES ) ),
+ m_rDialogImpl( rImpl )
+{
+ SetWindowBits( WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE );
+ SetHighlightRange();
+}
+
+
+ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl()
+{
+ ClearUserData();
+}
+
+
+void ThesaurusAlternativesCtrl_Impl::ClearUserData()
+{
+ for (USHORT i = 0; i < GetEntryCount(); ++i)
+ delete (AlternativesUserData_Impl*)GetEntry(i)->GetUserData();
+}
+
+
+SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader )
+{
+ SvLBoxEntry* pEntry = new SvLBoxEntry;
+ String aText;
+ if (bIsHeader && nVal >= 0)
+ {
+ aText = String::CreateFromInt32( nVal );
+ aText += A2S( ". " );
+ }
+ pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) ); // add empty column
+ aText += rText;
+ pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0 ) ); // otherwise crash
+ pEntry->AddItem( new AlternativesString_Impl( pEntry, 0, aText ) );
+
+ AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader );
+ pEntry->SetUserData( pUserData );
+ GetModel()->Insert( pEntry );
+
+ if (bIsHeader)
+ GetViewDataEntry( pEntry )->SetSelectable( false );
+
+ return pEntry;
+}
+
+
+void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
+{
+ const KeyCode& rKey = rKEvt.GetKeyCode();
+
+ if (rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_ESCAPE)
+ GetParent()->KeyInput( rKEvt ); // parent will close dialog...
+ else if (rKey.GetCode() == KEY_SPACE)
+ m_rDialogImpl.AlternativesDoubleClickHdl_Impl( this ); // look up current selected entry
+ else if (GetEntryCount())
+ SvxCheckListBox::KeyInput( rKEvt );
+}
+
+
+void ThesaurusAlternativesCtrl_Impl::Paint( const Rectangle& rRect )
+{
+ if (!m_rDialogImpl.m_bWordFound)
+ {
+/* Push( PUSH_FONT );
+
+ Font aFont( GetFont() );
+ aFont.SetHeight( 2 * aFont.GetHeight() );
+ SetFont( aFont );
+*/
+ Size aTextSize( GetTextWidth( m_rDialogImpl.aErrStr ), GetTextHeight() );
+ aTextSize = LogicToPixel( aTextSize );
+ Point aPos;
+ aPos.X() += GetSizePixel().Width() / 2 - aTextSize.Width() / 2;
+ aPos.Y() += GetSizePixel().Height() / 2 /*- aTextSize.Height() / 2*/;
+ aPos = PixelToLogic( aPos );
+ DrawText( aPos, m_rDialogImpl.aErrStr );
+
+// Pop();
+ }
+ else
+ SvxCheckListBox::Paint( rRect );
+}
+
+
+// struct SvxThesaurusDialog_Impl ----------------------------------------
+
+SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) :
+ m_pParent ( pParent ),
+ aVendorImageFI ( pParent , SVX_RES( IMG_VENDOR ) ),
+ aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ),
+ aWordText ( pParent, SVX_RES( FT_WORD ) ),
+ aWordCB ( pParent, SVX_RES( CB_WORD ), *this ),
+ m_aAlternativesText ( pParent, SVX_RES( FT_THES_ALTERNATIVES ) ),
+ m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pParent, *this ) ),
+ aReplaceText ( pParent, SVX_RES( FT_REPL ) ),
+ aReplaceEdit ( pParent, SVX_RES( ED_REPL ) ),
+ aFL ( pParent, SVX_RES( FL_VAR ) ),
+ aHelpBtn ( pParent, SVX_RES( BTN_THES_HELP ) ),
+ aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ),
+ aReplaceBtn ( pParent, SVX_RES( BTN_THES_OK ) ),
+ aCancelBtn ( pParent, SVX_RES( BTN_THES_CANCEL ) ),
+ aErrStr ( SVX_RES( STR_ERR_TEXTNOTFOUND ) ),
+ aVendorDefaultImage ( SVX_RES( IMG_DEFAULT_VENDOR ) ),
+ aVendorDefaultImageHC ( SVX_RES( IMG_DEFAULT_VENDOR_HC ) ),
+ xThesaurus ( NULL ),
+ aLookUpText (),
+ nLookUpLanguage ( LANGUAGE_NONE ),
+ m_bWordFound( false ),
+ pErrContext ( NULL )
+{
+ // note: FreeResource must only be called in the c-tor of SvxThesaurusDialog
+
+ aReplaceEdit.SetButton( &aReplaceBtn );
+
+ aLeftBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LeftBtnHdl_Impl ) );
+ aWordCB.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, WordSelectHdl_Impl ) );
+ aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, LanguageHdl_Impl ) );
+ m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl ));
+ m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl ));
+
+ Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog_Impl, VendorImageInitHdl ) );
+}
+
+
+SvxThesaurusDialog_Impl::~SvxThesaurusDialog_Impl()
+{
+ delete aLangMBtn.GetPopupMenu();
+ delete pErrContext;
+}
+
+
+uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDialog_Impl::queryMeanings_Impl(
+ OUString& rTerm,
+ const lang::Locale& rLocale,
+ const beans::PropertyValues& rProperties )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+ uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeanings(
+ xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) );
+
+ // text with '.' at the end?
+ if (0 == aMeanings.getLength() && rTerm.getLength() &&
+ rTerm.getStr()[ rTerm.getLength() - 1 ] == '.')
+ {
+ // try again without trailing '.' chars. It may be a word at the
+ // end of a sentence and not an abbreviation...
+ String aTxt( rTerm );
+ aTxt.EraseTrailingChars( '.' );
+ aMeanings = xThesaurus->queryMeanings( aTxt, rLocale, rProperties );
+ if (aMeanings.getLength())
+ {
+ rTerm = aTxt;
+ }
+ }
+
+ return aMeanings;
+}
+
+
+bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl()
+{
+ lang::Locale aLocale( SvxCreateLocale( nLookUpLanguage ) );
+ uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeanings = queryMeanings_Impl(
+ aLookUpText, aLocale, uno::Sequence< beans::PropertyValue >() );
+ const sal_Int32 nMeanings = aMeanings.getLength();
+ const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray();
+
+ m_pAlternativesCT->SetUpdateMode( FALSE );
+
+ // clear old user data of control before creating new ones via AddEntry below
+ m_pAlternativesCT->ClearUserData();
+
+ m_pAlternativesCT->Clear();
+ for (sal_Int32 i = 0; i < nMeanings; ++i)
+ {
+ OUString rMeaningTxt = pMeanings[i]->getMeaning();
+ uno::Sequence< OUString > aSynonyms( pMeanings[i]->querySynonyms() );
+ const sal_Int32 nSynonyms = aSynonyms.getLength();
+ const OUString *pSynonyms = aSynonyms.getConstArray();
+ DBG_ASSERT( rMeaningTxt.getLength() > 0, "meaning with empty text" );
+ DBG_ASSERT( nSynonyms > 0, "meaning without synonym" );
+
+ m_pAlternativesCT->AddEntry( i + 1, rMeaningTxt, true );
+ for (sal_Int32 k = 0; k < nSynonyms; ++k)
+ m_pAlternativesCT->AddEntry( -1, pSynonyms[k], false );
+ }
+
+ m_pAlternativesCT->SetUpdateMode( TRUE );
+
+ return nMeanings > 0;
+}
+
+
+void SvxThesaurusDialog_Impl::SetWindowTitle( LanguageType nLanguage )
+{
+ // Sprache anpassen
+ String aStr( m_pParent->GetText() );
+ aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 );
+ aStr.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ) );
+ aStr += GetLanguageString( (LanguageType) nLanguage );
+ aStr.Append( sal_Unicode( ')' ) );
+ m_pParent->SetText( aStr ); // set window title
+}
+
+
+void SvxThesaurusDialog_Impl::LookUp( const String &rText )
+{
+ if (rText != aWordCB.GetText()) // avoid moving of the cursor if the text is the same
+ aWordCB.SetText( rText );
+ LookUp_Impl();
+}
+
+
+IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn )
+{
+ if (pBtn && aLookUpHistory.size() >= 2)
+ {
+ aLookUpHistory.pop(); // remove current look up word from stack
+ aWordCB.SetText( aLookUpHistory.top() ); // retrieve previous look up word
+ aLookUpHistory.pop();
+ LookUp_Impl();
+ }
+ return 0;
+}
+
+
+IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn )
+{
+ PopupMenu *pMenu = aLangMBtn.GetPopupMenu();
+ if (pMenu && pBtn)
+ {
+ USHORT nItem = pBtn->GetCurItemId();
+ String aLangText( pMenu->GetItemText( nItem ) );
+ LanguageType nLang = SvtLanguageTable().GetType( aLangText );
+ DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" );
+ if (xThesaurus->hasLocale( SvxCreateLocale( nLang ) ))
+ nLookUpLanguage = nLang;
+ SetWindowTitle( nLang );
+ UpdateVendorImage();
+ LookUp_Impl();
+ }
+ return 0;
+}
+
+
+void SvxThesaurusDialog_Impl::LookUp_Impl()
+{
+ String aText( aWordCB.GetText() );
+
+ aLookUpText = OUString( aText );
+ if (aLookUpText.getLength() > 0 &&
+ (aLookUpHistory.size() == 0 || aLookUpText != aLookUpHistory.top()))
+ aLookUpHistory.push( aLookUpText );
+
+ m_bWordFound = UpdateAlternativesBox_Impl();
+ m_pAlternativesCT->Enable( m_bWordFound );
+
+ if ( aWordCB.GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND )
+ aWordCB.InsertEntry( aText );
+
+ aReplaceEdit.SetText( String() );
+ aLeftBtn.Enable( aLookUpHistory.size() > 1 );
+}
+
+
+IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox )
+{
+ if (pBox && !aWordCB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys
+ {
+ USHORT nPos = pBox->GetSelectEntryPos();
+ String aStr( pBox->GetEntry( nPos ) );
+ GetReplaceEditString( aStr );
+ aWordCB.SetText( aStr );
+ LookUp_Impl();
+ }
+
+ return 0;
+}
+
+
+IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox *, pBox )
+{
+ SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL;
+ if (pEntry)
+ {
+ AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData();
+ String aStr;
+ if (!pData->IsHeader())
+ {
+ aStr = pData->GetText();
+ GetReplaceEditString( aStr );
+ }
+ aReplaceEdit.SetText( aStr );
+ }
+ return 0;
+}
+
+
+IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckListBox *, pBox )
+{
+ SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL;
+ if (pEntry)
+ {
+ AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData();
+ String aStr;
+ if (!pData->IsHeader())
+ {
+ aStr = pData->GetText();
+ GetReplaceEditString( aStr );
+ }
+
+ aWordCB.SetText( aStr );
+ if (aStr.Len() > 0)
+ LookUp_Impl();
+ }
+
+ //! workaround to set the selection since calling SelectEntryPos within
+ //! the double click handler does not work
+ Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog_Impl, SelectFirstHdl_Impl ), pBox );
+ return 0;
+}
+
+
+IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox )
+{
+ (void) pThis;
+ if (pBox && pBox->GetEntryCount() > 0)
+ pBox->SelectEntryPos( 0 );
+ return 0;
+}
+
+////////////////////////////////////////////////////////////
+
+static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
+{
+ Image aRes;
+
+ OUString aTmp;
+ osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
+
+ Graphic aGraphic;
+ const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
+ if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic, NULL, NULL ) )
+ {
+ aRes = Image( aGraphic.GetBitmapEx() );
+ }
+ return aRes;
+}
+
+
+static String lcl_GetThesImplName( const lang::Locale &rLocale )
+{
+ String aRes;
+
+ uno::Reference< linguistic2::XLinguServiceManager > xLngMgr;
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ xLngMgr = uno::Reference< linguistic2::XLinguServiceManager >( xMSF->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.linguistic2.LinguServiceManager" ))), uno::UNO_QUERY_THROW );
+
+ DBG_ASSERT( xLngMgr.is(), "LinguServiceManager missing" );
+ if (xLngMgr.is())
+ {
+ uno::Sequence< OUString > aServiceNames = xLngMgr->getConfiguredServices(
+ OUString::createFromAscii("com.sun.star.linguistic2.Thesaurus"), rLocale );
+ // there should be at most one thesaurus configured for each language
+ DBG_ASSERT( aServiceNames.getLength() <= 1, "more than one thesaurus found. Should not be possible" );
+ if (aServiceNames.getLength() == 1)
+ aRes = aServiceNames[0];
+ }
+ }
+ catch (uno::Exception &e)
+ {
+ (void) e;
+ DBG_ASSERT( 0, "failed to get thesaurus" );
+ }
+
+ return aRes;
+}
+
+
+void SvxThesaurusDialog_Impl::UpdateVendorImage()
+{
+ m_pParent->SetUpdateMode( sal_False );
+
+ SvtLinguConfig aCfg;
+ if (aCfg.HasVendorImages( "ThesaurusDialogImage" ))
+ {
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ Image aImage;
+ String sThesImplName( lcl_GetThesImplName( SvxCreateLocale( nLookUpLanguage ) ) );
+ OUString aThesDialogImageUrl( aCfg.GetThesaurusDialogImage( sThesImplName, bHC ) );
+ if (sThesImplName.Len() > 0 && aThesDialogImageUrl.getLength() > 0)
+ aImage = Image( lcl_GetImageFromPngUrl( aThesDialogImageUrl ) );
+ else
+ aImage = bHC ? aVendorDefaultImageHC : aVendorDefaultImage;
+ aVendorImageFI.SetImage( aImage );
+ }
+
+ m_pParent->SetUpdateMode( sal_True );
+}
+
+
+IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl *, EMPTYARG )
+{
+ pThis->m_pParent->SetUpdateMode( sal_False );
+
+ SvtLinguConfig aCfg;
+ if (aCfg.HasVendorImages( "ThesaurusDialogImage" ))
+ {
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ Image aImage( bHC ? pThis->aVendorDefaultImageHC : pThis->aVendorDefaultImage );
+ pThis->aVendorImageFI.SetImage( aImage );
+ pThis->aVendorImageFI.Show();
+
+ // move down visible controls according to the vendor images height
+ Size aVendorSize = pThis->aVendorImageFI.GetSizePixel();
+ Size aImageSize = pThis->aVendorImageFI.GetImage().GetSizePixel();
+ if (aImageSize.Height())
+ {
+ aVendorSize.Height() = aImageSize.Height();
+ if(aVendorSize.Width() < aImageSize.Width())
+ aVendorSize.Width() = aImageSize.Width();
+ pThis->aVendorImageFI.SetSizePixel( aVendorSize );
+ }
+ const sal_Int32 nDiff = aVendorSize.Height();
+ pThis->aVendorImageFI.SetSizePixel( aVendorSize );
+ Control* aControls[] = {
+ &pThis->aLeftBtn,
+ &pThis->aWordText,
+ &pThis->aWordCB,
+ &pThis->m_aAlternativesText,
+ pThis->m_pAlternativesCT.get(),
+ &pThis->aReplaceText,
+ &pThis->aReplaceEdit,
+ &pThis->aFL,
+ &pThis->aHelpBtn,
+ &pThis->aLangMBtn,
+ &pThis->aReplaceBtn,
+ &pThis->aCancelBtn,
+ 0
+ };
+ sal_Int32 nControl = 0;
+ while (aControls[nControl])
+ {
+ Point aPos = aControls[nControl]->GetPosPixel();
+ aPos.Y() += nDiff;
+ aControls[nControl]->SetPosPixel(aPos);
+ ++nControl;
+ }
+ Size aDlgSize = pThis->m_pParent->GetSizePixel();
+ aDlgSize.Height() += nDiff;
+ pThis->m_pParent->SetSizePixel( aDlgSize );
+ pThis->m_pParent->Invalidate();
+ }
+
+ pThis->UpdateVendorImage();
+ pThis->m_pParent->SetUpdateMode( sal_True );
+
+ return 0;
+};
+
+
+// class SvxThesaurusDialog ----------------------------------------------
+
+SvxThesaurusDialog::SvxThesaurusDialog(
+ Window* pParent,
+ uno::Reference< linguistic2::XThesaurus > xThes,
+ const String &rWord,
+ LanguageType nLanguage ) :
+
+ SvxStandardDialog( pParent, SVX_RES( RID_SVXDLG_THESAURUS ) )
+{
+ m_pImpl = boost::shared_ptr< SvxThesaurusDialog_Impl >(new SvxThesaurusDialog_Impl( this ));
+
+ m_pImpl->xThesaurus = xThes;
+ m_pImpl->aLookUpText = OUString( rWord );
+ m_pImpl->nLookUpLanguage = nLanguage;
+ if (rWord.Len() > 0)
+ m_pImpl->aLookUpHistory.push( rWord );
+ m_pImpl->pErrContext = new SfxErrorContext( ERRCTX_SVX_LINGU_THESAURUS, String(), this,
+ RID_SVXERRCTX, &DIALOG_MGR() );
+
+ FreeResource();
+
+ OUString aTmp( rWord );
+ linguistic::RemoveHyphens( aTmp );
+ linguistic::ReplaceControlChars( aTmp );
+ String aTmp2( aTmp );
+ m_pImpl->aReplaceEdit.SetText( aTmp2 );
+ m_pImpl->aWordCB.InsertEntry( aTmp2 );
+
+ m_pImpl->SetWindowTitle( nLanguage );
+
+ m_pImpl->LookUp( aTmp2 );
+ m_pImpl->m_pAlternativesCT->GrabFocus();
+ m_pImpl->aLeftBtn.Enable( sal_False );
+
+ // fill language menu button list
+ SvtLanguageTable aLangTab;
+ uno::Sequence< lang::Locale > aLocales;
+ if (m_pImpl->xThesaurus.is())
+ aLocales = m_pImpl->xThesaurus->getLocales();
+ const sal_Int32 nLocales = aLocales.getLength();
+ const lang::Locale *pLocales = aLocales.getConstArray();
+ delete m_pImpl->aLangMBtn.GetPopupMenu();
+ PopupMenu* pMenu = new PopupMenu;
+ pMenu->SetMenuFlags( MENU_FLAG_NOAUTOMNEMONICS );
+ std::vector< OUString > aLangVec;
+ for (sal_Int32 i = 0; i < nLocales; ++i )
+ {
+ const LanguageType nLang = SvxLocaleToLanguage( pLocales[i] );
+ DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" );
+ aLangVec.push_back( aLangTab.GetString( nLang ) );
+ }
+ std::sort( aLangVec.begin(), aLangVec.end() );
+ for (size_t i = 0; i < aLangVec.size(); ++i)
+ pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0
+ m_pImpl->aLangMBtn.SetPopupMenu( pMenu );
+
+ // disable controls if service is missing
+ if (!m_pImpl->xThesaurus.is())
+ Enable( sal_False );
+}
+
+
+SvxThesaurusDialog::~SvxThesaurusDialog()
+{
+}
+
+
+String SvxThesaurusDialog::GetWord()
+{
+ return m_pImpl->aReplaceEdit.GetText();
+}
+
+
+sal_uInt16 SvxThesaurusDialog::GetLanguage() const
+{
+ return m_pImpl->nLookUpLanguage;
+}
+
+
+void SvxThesaurusDialog::Apply()
+{
+}
+
+
diff --git a/cui/source/dialogs/thesdlg.hrc b/cui/source/dialogs/thesdlg.hrc
new file mode 100755
index 000000000000..994c933246de
--- /dev/null
+++ b/cui/source/dialogs/thesdlg.hrc
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_THESDLG_HRC
+#define _SVX_THESDLG_HRC
+
+// defines ---------------------------------------------------------------
+
+#define BTN_LEFT 9
+#define BTN_THES_OK 10
+#define BTN_THES_CANCEL 11
+#define MB_LANGUAGE 12
+#define BTN_THES_HELP 13
+#define FT_WORD 15
+#define CB_WORD 16
+#define FT_REPL 21
+#define ED_REPL 22
+#define FL_VAR 23
+#define FT_THES_ALTERNATIVES 24
+#define CT_THES_ALTERNATIVES 25
+#define IMG_VENDOR 26
+#define IMG_DEFAULT_VENDOR 27
+#define IMG_DEFAULT_VENDOR_HC 28
+
+#define STR_ERR_TEXTNOTFOUND 101
+
+
+#endif
+
diff --git a/cui/source/dialogs/thesdlg.src b/cui/source/dialogs/thesdlg.src
new file mode 100755
index 000000000000..bec4ef14c261
--- /dev/null
+++ b/cui/source/dialogs/thesdlg.src
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "cuires.hrc"
+#include "thesdlg.hrc"
+#include "helpid.hrc"
+#include <svx/svxids.hrc> // SID_THESAURUS
+
+// pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_THES -------------------------------------------------------
+ModalDialog RID_SVXDLG_THESAURUS
+{
+ HelpId = SID_THESAURUS ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 235, 230 ) ;
+ Text [ en-US ] = "Thesaurus" ;
+ SvLook = TRUE ;
+ Moveable = TRUE ;
+
+ FixedImage IMG_VENDOR
+ {
+ Pos = MAP_APPFONT ( 0, 0 ) ;
+ Size = MAP_APPFONT ( 235, 0 ) ; // correct size will be applied at runtime
+ Hide = TRUE;
+ };
+
+ ImageButton BTN_LEFT
+ {
+ Pos = MAP_APPFONT ( 5 , 15 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TABSTOP = TRUE ;
+ SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
+ };
+ FixedText FT_WORD
+ {
+ Pos = MAP_APPFONT ( 24 , 5 ) ;
+ Size = MAP_APPFONT ( 143 , 8 ) ;
+ Text [ en-US ] = "Current ~word" ;
+ LEFT = TRUE ;
+ };
+ ComboBox CB_WORD
+ {
+ DropDown = TRUE ;
+ Pos = MAP_APPFONT ( 24 , 16 ) ;
+ Size = MAP_APPFONT ( 141 , 60 ) ; // have drop down space for several lines
+ };
+ MenuButton MB_LANGUAGE
+ {
+ Pos = MAP_APPFONT ( 170 , 16 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ en-US ] = "~Language" ;
+ };
+
+ FixedText FT_THES_ALTERNATIVES
+ {
+ Pos = MAP_APPFONT ( 5 , 33 ) ;
+ Size = MAP_APPFONT ( 255 , 8 ) ;
+ Text [ en-US ] = "~Alternatives" ;
+ LEFT = TRUE ;
+ };
+ Control CT_THES_ALTERNATIVES
+ {
+ HelpID = HID_CT_THES_ALTERNATIVES ;
+ Pos = MAP_APPFONT ( 5 , 45 ) ;
+ Size = MAP_APPFONT ( 225 , 121 ) ;
+ Border = TRUE;
+ TabStop = TRUE ;
+ };
+
+ FixedText FT_REPL
+ {
+ Pos = MAP_APPFONT ( 5 , 173 ) ;
+ Size = MAP_APPFONT ( 255 , 8 ) ;
+ Text [ en-US ] = "Replace ~with" ;
+ LEFT = TRUE ;
+ };
+ Edit ED_REPL
+ {
+ BORDER = TRUE ;
+ Pos = MAP_APPFONT ( 5 , 184 ) ;
+ Size = MAP_APPFONT ( 225 , 12 ) ;
+ LEFT = TRUE ;
+ };
+ FixedLine FL_VAR
+ {
+ Pos = MAP_APPFONT ( 0 , 200 ) ;
+ Size = MAP_APPFONT ( 235 , 8 ) ;
+ };
+
+ HelpButton BTN_THES_HELP
+ {
+ Pos = MAP_APPFONT ( 5 , 210 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ };
+ OkButton BTN_THES_OK
+ {
+ Pos = MAP_APPFONT ( 105 , 210 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ en-US ] = "~Replace" ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_THES_CANCEL
+ {
+ Pos = MAP_APPFONT ( 170 , 210 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ };
+
+ String STR_ERR_TEXTNOTFOUND
+ {
+ Text [ en-US ] = "No alternatives found." ;
+ };
+
+ Image IMG_DEFAULT_VENDOR
+ {
+ ImageBitmap = Bitmap { File = "vendor01.png"; };
+ };
+ Image IMG_DEFAULT_VENDOR_HC
+ {
+ ImageBitmap = Bitmap { File = "vendor01h.png"; };
+ };
+};
+
diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx
new file mode 100755
index 000000000000..354bc95c09db
--- /dev/null
+++ b/cui/source/dialogs/thesdlg_impl.hxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_THESDLG_IMPL_HXX
+#define _SVX_THESDLG_IMPL_HXX
+
+#include <svx/thesdlg.hxx>
+#include <svx/checklbx.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/image.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/menubtn.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/wrkwin.hxx>
+
+#include <com/sun/star/linguistic2/XThesaurus.hpp>
+#include <com/sun/star/linguistic2/XMeaning.hpp>
+
+#include <stack>
+#include <algorithm>
+
+using namespace ::com::sun::star;
+using ::rtl::OUString;
+
+// class LookUpComboBox_Impl --------------------------------------------------
+
+class LookUpComboBox_Impl : public ComboBox
+{
+ Timer m_aModifyTimer;
+ Selection m_aSelection;
+ Button * m_pBtn;
+ SvxThesaurusDialog_Impl & m_rDialogImpl;
+
+ // disable copy c-tor and assignment operator
+ LookUpComboBox_Impl( const LookUpComboBox_Impl & );
+ LookUpComboBox_Impl & operator = ( const LookUpComboBox_Impl & );
+
+public:
+ LookUpComboBox_Impl( Window *pParent, const ResId &rResId, SvxThesaurusDialog_Impl &rImpl );
+ virtual ~LookUpComboBox_Impl();
+
+ DECL_LINK( ModifyTimer_Hdl, Timer * );
+
+ void SetButton( Button *pBtn ) { m_pBtn = pBtn; }
+
+ // ComboBox
+ virtual void Modify();
+};
+
+// class ReplaceEdit_Impl --------------------------------------------------
+
+class ReplaceEdit_Impl : public Edit
+{
+ Button * m_pBtn;
+
+ // disable copy c-tor and assignment operator
+ ReplaceEdit_Impl( const ReplaceEdit_Impl & );
+ ReplaceEdit_Impl & operator = ( const ReplaceEdit_Impl & );
+
+public:
+ ReplaceEdit_Impl( Window *pParent, const ResId &rResId );
+ virtual ~ReplaceEdit_Impl();
+
+ void SetButton( Button *pBtn ) { m_pBtn = pBtn; }
+
+ // Edit
+ virtual void Modify();
+ virtual void SetText( const XubString& rStr );
+ virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
+};
+
+// class ThesaurusAlternativesCtrl_Impl ----------------------------------
+
+class AlternativesUserData_Impl
+{
+ String sText;
+ bool bHeader;
+
+ // disable copy c-tor and assignment operator
+ AlternativesUserData_Impl( const AlternativesUserData_Impl & );
+ AlternativesUserData_Impl & operator = ( const AlternativesUserData_Impl & );
+
+public:
+ AlternativesUserData_Impl( const String &rText, bool bIsHeader ) :
+ sText(rText),
+ bHeader(bIsHeader)
+ {
+ }
+
+ bool IsHeader() const { return bHeader; }
+ const String& GetText() const { return sText; }
+};
+
+
+class AlternativesString_Impl : public SvLBoxString
+{
+public:
+
+ AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr )
+ : SvLBoxString( pEntry, nFlags, rStr ) {}
+
+ virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry);
+};
+
+
+class ThesaurusAlternativesCtrl_Impl :
+ public SvxCheckListBox
+{
+ SvxThesaurusDialog_Impl & m_rDialogImpl;
+
+ // disable copy c-tor and assignment operator
+ ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & );
+ ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & );
+
+public:
+ ThesaurusAlternativesCtrl_Impl( Window* pParent, SvxThesaurusDialog_Impl &rImpl );
+ virtual ~ThesaurusAlternativesCtrl_Impl();
+
+
+ SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader );
+ void ClearUserData();
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Paint( const Rectangle& rRect );
+};
+
+
+// struct SvxThesaurusDialog_Impl ----------------------------------------
+
+struct SvxThesaurusDialog_Impl
+{
+ Window * m_pParent;
+
+ FixedImage aVendorImageFI;
+ ImageButton aLeftBtn;
+ FixedText aWordText;
+ LookUpComboBox_Impl aWordCB;
+ FixedText m_aAlternativesText;
+ boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT;
+ FixedText aReplaceText;
+ ReplaceEdit_Impl aReplaceEdit;
+ FixedLine aFL;
+ HelpButton aHelpBtn;
+ MenuButton aLangMBtn;
+ OKButton aReplaceBtn;
+ CancelButton aCancelBtn;
+
+ String aErrStr;
+ Image aVendorDefaultImage;
+ Image aVendorDefaultImageHC;
+
+ uno::Reference< linguistic2::XThesaurus > xThesaurus;
+ OUString aLookUpText;
+ LanguageType nLookUpLanguage;
+ std::stack< OUString > aLookUpHistory;
+ bool m_bWordFound;
+
+ SfxErrorContext* pErrContext; // error context while dfalog is opened
+
+
+ // Handler
+ DECL_LINK( LeftBtnHdl_Impl, Button * );
+ DECL_LINK( LanguageHdl_Impl, MenuButton * );
+ DECL_LINK( LookUpHdl_Impl, Button * );
+ DECL_LINK( WordSelectHdl_Impl, ComboBox * );
+ DECL_LINK( AlternativesSelectHdl_Impl, SvxCheckListBox * );
+ DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * );
+
+ DECL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox * );
+ DECL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl * );
+
+
+ SvxThesaurusDialog_Impl( Window* pParent );
+ ~SvxThesaurusDialog_Impl();
+
+ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL
+ queryMeanings_Impl( ::rtl::OUString& rTerm, const lang::Locale& rLocale, const beans::PropertyValues& rProperties ) throw(lang::IllegalArgumentException, uno::RuntimeException);
+
+ bool UpdateAlternativesBox_Impl();
+ void UpdateVendorImage();
+ void SetWindowTitle( LanguageType nLanguage );
+ void LookUp( const String &rText );
+ void LookUp_Impl();
+};
+
+#endif
+
diff --git a/cui/source/dialogs/winpluginlib.cpp b/cui/source/dialogs/winpluginlib.cpp
index 0b1fced85b40..d1bdf9eb2002 100644
--- a/cui/source/dialogs/winpluginlib.cpp
+++ b/cui/source/dialogs/winpluginlib.cpp
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: winpluginlib.cpp,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -28,10 +25,6 @@
*
************************************************************************/
-#ifdef SVX_DLLIMPLEMENTATION
-#undef SVX_DLLIMPLEMENTATION
-#endif
-
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 1330f48818f6..1b6d1c37651e 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zoom.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/zoom.hrc b/cui/source/dialogs/zoom.hrc
index 70e488c2893e..49412ad085f0 100644
--- a/cui/source/dialogs/zoom.hrc
+++ b/cui/source/dialogs/zoom.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zoom.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cui/source/dialogs/zoom.src b/cui/source/dialogs/zoom.src
index a27c41d7e1cc..8137b1c7bb89 100644
--- a/cui/source/dialogs/zoom.src
+++ b/cui/source/dialogs/zoom.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zoom.src,v $
- * $Revision: 1.31 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify