summaryrefslogtreecommitdiffstats
path: root/sd/source/filter/eppt
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-07 23:50:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-08 12:02:37 +0000
commit5b395625901b1f9c2314a0b9a13f4876a3ae17ce (patch)
tree42f91df0ee35f2a55bac7da11442a4273c32b445 /sd/source/filter/eppt
parentforgot to remove x_rtl_ustring.h (diff)
downloadcore-5b395625901b1f9c2314a0b9a13f4876a3ae17ce.tar.gz
core-5b395625901b1f9c2314a0b9a13f4876a3ae17ce.zip
de-uno-ize ScriptTypeDetector
leave a UnoScriptTypeDetector implementation that points to the trivial ScriptTypeDetector for external consumers, e.g. sdext
Diffstat (limited to 'sd/source/filter/eppt')
-rw-r--r--sd/source/filter/eppt/epptbase.hxx2
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx26
2 files changed, 8 insertions, 20 deletions
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index 33a43d364fd7..c2bb4e31189e 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -190,7 +190,7 @@ public :
~FontCollection();
- short GetScriptDirection( const String& rText ) const;
+ short GetScriptDirection( const rtl::OUString& rText ) const;
sal_uInt32 GetId( FontCollectionEntry& rFontDescriptor );
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 38485286f9aa..e53b0c2230a9 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -37,7 +37,6 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/ScriptDirection.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
-#include <com/sun/star/i18n/XScriptTypeDetector.hpp>
#include <com/sun/star/text/FontRelief.hpp>
#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/text/XTextRange.hpp>
@@ -46,19 +45,19 @@
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/style/TabStop.hpp>
-#include <svl/languageoptions.hxx>
-#include <sfx2/app.hxx>
+#include <comphelper/processfactory.hxx>
#include <editeng/svxenum.hxx>
#include <editeng/frmdir.hxx>
+#include <i18nutil/scripttypedetector.hxx>
+#include <sfx2/app.hxx>
+#include <svl/languageoptions.hxx>
+#include <oox/export/drawingml.hxx> // for SubstituteBullet
#include <unotools/fontcvt.hxx>
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
-#include <comphelper/processfactory.hxx>
-#include <oox/export/drawingml.hxx> // for SubstituteBullet
com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xPPTBreakIter;
-com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > xScriptTypeDetector;
PortionObj::PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
FontCollection& rFontCollection ) :
@@ -1339,7 +1338,6 @@ FontCollection::~FontCollection()
{
delete pVDev;
xPPTBreakIter = NULL;
- xScriptTypeDetector = NULL;
}
FontCollection::FontCollection() :
@@ -1352,21 +1350,11 @@ FontCollection::FontCollection() :
if ( xInterface.is() )
xPPTBreakIter = com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator >
( xInterface, com::sun::star::uno::UNO_QUERY );
-
- xInterface = xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.ScriptTypeDetector" ) ) );
- if ( xInterface.is() )
- xScriptTypeDetector = com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector >
- ( xInterface, com::sun::star::uno::UNO_QUERY );
}
-short FontCollection::GetScriptDirection( const String& rString ) const
+short FontCollection::GetScriptDirection( const rtl::OUString& rString ) const
{
- short nRet = com::sun::star::i18n::ScriptDirection::NEUTRAL;
- if ( xScriptTypeDetector.is() )
- {
- const rtl::OUString sT( rString );
- nRet = xScriptTypeDetector->getScriptDirection( sT, 0, com::sun::star::i18n::ScriptDirection::NEUTRAL );
- }
+ short nRet = ScriptTypeDetector::getScriptDirection( rString, 0, com::sun::star::i18n::ScriptDirection::NEUTRAL );
return nRet;
}