diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-02 10:55:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 09:18:19 +0000 |
commit | bacfd2dc4cea1a5d87658ed8592116acd931e000 (patch) | |
tree | d22172a33fdd13a440b6882a28c23ea2d639bbad /sd/source/ui/dlg/tpaction.cxx | |
parent | 6281eb0e0792da0194c07da18296e94dd944b8e5 (diff) |
add a comphelper::string::getTokenCount
suitable for conversion from [Byte]String::GetTokenCount
converted low-hanging variants to rtl::O[UString]::getToken loops
added unit test
Diffstat (limited to 'sd/source/ui/dlg/tpaction.cxx')
-rw-r--r-- | sd/source/ui/dlg/tpaction.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 4e6db4f6ae9f..4608f0d4e52e 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <com/sun/star/embed/VerbAttributes.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> @@ -368,7 +369,7 @@ void SdTPAction::Reset( const SfxItemSet& rAttrs ) case presentation::ClickAction_DOCUMENT: { - if( aFileName.GetTokenCount( DOCUMENT_TOKEN ) == 2 ) + if( comphelper::string::getTokenCount(aFileName, DOCUMENT_TOKEN) == 2 ) aLbTreeDocument.SelectEntry( aFileName.GetToken( 1, DOCUMENT_TOKEN ) ); } break; @@ -778,7 +779,7 @@ void SdTPAction::SetEditText( String const & rStr ) switch( eCA ) { case presentation::ClickAction_DOCUMENT: - if( rStr.GetTokenCount( DOCUMENT_TOKEN ) == 2 ) + if( comphelper::string::getTokenCount(rStr, DOCUMENT_TOKEN) == 2 ) aText = rStr.GetToken( 0, DOCUMENT_TOKEN ); // fallthrough inteded |