summaryrefslogtreecommitdiffstats
path: root/framework/source/uielement/styletoolbarcontroller.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/uielement/styletoolbarcontroller.cxx')
-rw-r--r--framework/source/uielement/styletoolbarcontroller.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/framework/source/uielement/styletoolbarcontroller.cxx b/framework/source/uielement/styletoolbarcontroller.cxx
index 05af487ff48f..3ff1e777eb6d 100644
--- a/framework/source/uielement/styletoolbarcontroller.cxx
+++ b/framework/source/uielement/styletoolbarcontroller.cxx
@@ -10,9 +10,11 @@
#include <uielement/styletoolbarcontroller.hxx>
#include <tools/urlobj.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/toolbox.hxx>
#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/status/Template.hpp>
@@ -32,7 +34,8 @@ OUString MapFamilyToCommand( std::u16string_view rFamily )
return ".uno:CharStyle";
else if ( rFamily == u"PageStyles" )
return ".uno:PageStyle";
- else if ( rFamily == u"FrameStyles" )
+ else if ( rFamily == u"FrameStyles" ||
+ rFamily == u"GraphicStyles" ) // In sc
return ".uno:FrameStyle";
else if ( rFamily == u"NumberingStyles" )
return ".uno:ListStyle";
@@ -79,10 +82,10 @@ OUString GetDisplayFromInternalName( const css::uno::Reference< css::frame::XFra
namespace framework {
StyleDispatcher::StyleDispatcher( const css::uno::Reference< css::frame::XFrame >& rFrame,
- const css::uno::Reference< css::util::XURLTransformer >& rUrlTransformer,
+ css::uno::Reference< css::util::XURLTransformer > xUrlTransformer,
const css::util::URL& rURL )
: m_aCommand( rURL.Complete )
- , m_xUrlTransformer( rUrlTransformer )
+ , m_xUrlTransformer(std::move( xUrlTransformer ))
, m_xFrame( rFrame, css::uno::UNO_QUERY )
{
SAL_WARN_IF( !m_aCommand.startsWith( ".uno:StyleApply?" ), "fwk.uielement", "Wrong dispatcher!" );
@@ -92,21 +95,21 @@ StyleDispatcher::StyleDispatcher( const css::uno::Reference< css::frame::XFrame
sal_Int32 nIndex = 0;
do
{
- OUString aParam = aParams.getToken( 0, '&', nIndex );
+ std::u16string_view aParam = o3tl::getToken(aParams, 0, '&', nIndex );
sal_Int32 nParamIndex = 0;
- OUString aParamName = aParam.getToken( 0, '=', nParamIndex );
+ std::u16string_view aParamName = o3tl::getToken(aParam, 0, '=', nParamIndex );
if ( nParamIndex < 0 )
break;
- if ( aParamName == "Style:string" )
+ if ( aParamName == u"Style:string" )
{
- OUString aValue = aParam.getToken( 0, '=', nParamIndex );
+ std::u16string_view aValue = o3tl::getToken(aParam, 0, '=', nParamIndex );
aStyleName = INetURLObject::decode( aValue, INetURLObject::DecodeMechanism::WithCharset );
}
- else if ( aParamName == "FamilyName:string" )
+ else if ( aParamName == u"FamilyName:string" )
{
- aFamilyName = aParam.getToken( 0, '=', nParamIndex );
+ aFamilyName = o3tl::getToken(aParam, 0, '=', nParamIndex );
}
} while ( nIndex >= 0 );