Kaydet (Commit) 80dfbe76 authored tarafından Matteo Casalin's avatar Matteo Casalin

String to OUString

Change-Id: I5e071f9484abae04efa2ba1526448182068d8f9c
Reviewed-on: https://gerrit.libreoffice.org/5619Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
Tested-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst 99105031
...@@ -24,13 +24,14 @@ ...@@ -24,13 +24,14 @@
#include <vcl/window.hxx> #include <vcl/window.hxx>
class SwNumRule; class SwNumRule;
namespace rtl { class OUString; }
class NumberingPreview : public Window class NumberingPreview : public Window
{ {
const SwNumRule* pActNum; const SwNumRule* pActNum;
Font aStdFont; Font aStdFont;
long nPageWidth; long nPageWidth;
const String* pOutlineNames; const OUString* pOutlineNames;
sal_Bool bPosition; sal_Bool bPosition;
sal_uInt16 nActLevel; sal_uInt16 nActLevel;
...@@ -58,7 +59,7 @@ class NumberingPreview : public Window ...@@ -58,7 +59,7 @@ class NumberingPreview : public Window
{pActNum = pNum; Invalidate();}; {pActNum = pNum; Invalidate();};
void SetPageWidth(long nPgWidth) void SetPageWidth(long nPgWidth)
{nPageWidth = nPgWidth;} {nPageWidth = nPgWidth;}
void SetOutlineNames(const String* pNames) void SetOutlineNames(const OUString* pNames)
{pOutlineNames = pNames;} {pOutlineNames = pNames;}
void SetPositionMode() void SetPositionMode()
{ bPosition = sal_True;} { bPosition = sal_True;}
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "swtypes.hxx" //for MAXLEVEL #include "swtypes.hxx" //for MAXLEVEL
#include <numprevw.hxx> #include <numprevw.hxx>
#include <numberingtypelistbox.hxx> #include <numberingtypelistbox.hxx>
#include "rtl/ustring.hxx"
class SwWrtShell; class SwWrtShell;
class SwNumRule; class SwNumRule;
...@@ -50,7 +51,7 @@ class SwOutlineTabDialog : public SfxTabDialog ...@@ -50,7 +51,7 @@ class SwOutlineTabDialog : public SfxTabDialog
sal_uInt16 m_nNumPosId; sal_uInt16 m_nNumPosId;
sal_uInt16 m_nOutlineId; sal_uInt16 m_nOutlineId;
String aCollNames[MAXLEVEL]; OUString aCollNames[MAXLEVEL];
SwWrtShell& rWrtSh; SwWrtShell& rWrtSh;
SwNumRule* pNumRule; SwNumRule* pNumRule;
...@@ -74,7 +75,7 @@ class SwOutlineTabDialog : public SfxTabDialog ...@@ -74,7 +75,7 @@ class SwOutlineTabDialog : public SfxTabDialog
SwNumRule* GetNumRule() {return pNumRule;} SwNumRule* GetNumRule() {return pNumRule;}
sal_uInt16 GetLevel(const String &rFmtName) const; sal_uInt16 GetLevel(const String &rFmtName) const;
String* GetCollNames() {return aCollNames;} OUString* GetCollNames() {return aCollNames;}
static sal_uInt16 GetActNumLevel() {return nNumLevel;} static sal_uInt16 GetActNumLevel() {return nNumLevel;}
static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;} static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
...@@ -98,7 +99,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage ...@@ -98,7 +99,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
String aSaveCollNames[MAXLEVEL]; String aSaveCollNames[MAXLEVEL];
SwWrtShell* pSh; SwWrtShell* pSh;
SwNumRule* pNumRule; SwNumRule* pNumRule;
String* pCollNames; OUString* pCollNames;
sal_uInt16 nActLevel; sal_uInt16 nActLevel;
DECL_LINK( LevelHdl, ListBox * ); DECL_LINK( LevelHdl, ListBox * );
......
...@@ -390,7 +390,7 @@ short SwOutlineTabDialog::Ok() ...@@ -390,7 +390,7 @@ short SwOutlineTabDialog::Ok()
pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle(); pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle();
pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE); pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
if( aCollNames[i].Len() ) if( !aCollNames[i].isEmpty() )
{ {
pTxtColl = rWrtSh.GetParaStyle( pTxtColl = rWrtSh.GetParaStyle(
aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME); aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME);
...@@ -626,7 +626,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) ...@@ -626,7 +626,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
if( sOldName.Len() ) if( sOldName.Len() )
for( i = 0; i < MAXLEVEL; ++i) for( i = 0; i < MAXLEVEL; ++i)
if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel && if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel &&
!pCollNames[ i ].Len() ) pCollNames[ i ].isEmpty() )
{ {
sal_uInt8 n; sal_uInt8 n;
for( n = 0; n < MAXLEVEL; ++n ) for( n = 0; n < MAXLEVEL; ++n )
...@@ -1131,7 +1131,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) ...@@ -1131,7 +1131,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
Point(nXStart + nTextOffset, nYStart), Point(nXStart + nTextOffset, nYStart),
(pOutlineNames == 0 (pOutlineNames == 0
? utl::ConfigManager::getProductName() ? utl::ConfigManager::getProductName()
: OUString(pOutlineNames[nLevel]))); : pOutlineNames[nLevel]));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment