13#include <rtl/ustrbuf.hxx>
16using css::uno::Sequence;
31OUString lclConvertToCanonicalName(
const OUString& rFileName)
33 bool bRemoveSlash(
true);
34 sal_Int32
nLength = rFileName.getLength();
37 OUStringBuffer
aBuffer(nLength*2);
49 case '\\':
aBuffer.append(
"%5c"); bRemoveSlash =
false;
break;
50 case ':':
aBuffer.append(
"%3a"); bRemoveSlash =
false;
break;
51 case '*':
aBuffer.append(
"%2a"); bRemoveSlash =
false;
break;
52 case '?':
aBuffer.append(
"%3f"); bRemoveSlash =
false;
break;
53 case '<':
aBuffer.append(
"%3c"); bRemoveSlash =
false;
break;
54 case '>':
aBuffer.append(
"%3e"); bRemoveSlash =
false;
break;
55 case '|':
aBuffer.append(
"%7c"); bRemoveSlash =
false;
break;
57 aBuffer.append(cCurrentChar); bRemoveSlash =
false;
break;
60 return aBuffer.makeStringAndClear();
75 sal_Int32 nSequenceSize = aCommandSequence.getLength();
80 for (sal_Int32
i = 0;
i < nSequenceSize; ++
i)
91 aImageName = lclConvertToCanonicalName(aImageName);
100 if (aImageName.indexOf(
'?') != -1)
101 aImageName = lclConvertToCanonicalName(aImageName);
106 aImageName = aImageName.toAsciiLowerCase() +
".png";
132 OUString sIconPath = OUString::createFromAscii(ImageType_Prefixes[nImageType]);
145 return pImageList->
GetImage(pIterator->second);
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
OUString GetURLPath(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
Image GetImage(const OUString &rImageName) const
OUString DetermineIconTheme() const
bool hasImage(const OUString &rCommandURL)
std::vector< OUString > m_aImageCommandNameVector
Image getImageFromCommandURL(ImageType nImageType, const OUString &rCommandURL)
std::vector< OUString > m_aImageNameVector
CommandToImageNameMap m_aCommandToImageNameMap
ImageList * getImageList(ImageType nImageType)
o3tl::enumarray< ImageType, std::unique_ptr< ImageList > > m_pImageList
void registerCommands(const css::uno::Sequence< OUString > &aCommandSequence)
std::unique_ptr< char[]> aBuffer