summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/sidebar/Deck.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 808c0b439a3f..983f36e83b3c 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -585,7 +585,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec);
pNewSlot->fnState = SFX_STUB_PTR(SfxShell,VerbState);
pNewSlot->pType = 0; // HACK(SFX_TYPE(SfxVoidItem)) ???
- pNewSlot->pName = OUStringToOString( aVerbs[n].VerbName, RTL_TEXTENCODING_UTF8 ).getStr();
+ pNewSlot->pName = strdup (OUStringToOString( aVerbs[n].VerbName, RTL_TEXTENCODING_UTF8 ).getStr());
pNewSlot->pLinkedSlot = 0;
pNewSlot->nArgDefCount = 0;
pNewSlot->pFirstArgDef = 0;
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 63e24dbe95b1..f08173a9ecc9 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -291,17 +291,17 @@ void Deck::ShowPanel (const Panel& rPanel)
-const char* GetWindowClassification (const Window* pWindow)
+const OUString& GetWindowClassification (const Window* pWindow)
{
const OUString& rsName (pWindow->GetText());
if (!rsName.isEmpty())
{
- return ::rtl::OUStringToOString(rsName, RTL_TEXTENCODING_ASCII_US).getStr();
+ return rsName;
}
else
{
- static const char msWindow[] = "window";
- return msWindow;
+ static const OUString aWindow ("window");
+ return aWindow;
}
}
@@ -311,12 +311,12 @@ void Deck::PrintWindowSubTree (Window* pRoot, int nIndentation)
static const char* sIndentation = " ";
const Point aLocation (pRoot->GetPosPixel());
const Size aSize (pRoot->GetSizePixel());
- const char* sClassification = GetWindowClassification(pRoot);
+ OUString sClassification = GetWindowClassification(pRoot);
const char* sVisible = pRoot->IsVisible() ? "visible" : "hidden";
OSL_TRACE("%s%x %s %s +%d+%d x%dx%d",
sIndentation+strlen(sIndentation)-nIndentation*4,
pRoot,
- sClassification,
+ OUStringToOString(sClassification, RTL_TEXTENCODING_ASCII_US).getStr(),
sVisible,
aLocation.X(),aLocation.Y(),
aSize.Width(),aSize.Height());