[Libreoffice-commits] .: 2 commits - svtools/source tools/inc tools/source writerfilter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Jul 5 13:40:10 PDT 2012
svtools/source/misc/transfer.cxx | 6 +++---
tools/inc/tools/string.hxx | 9 ++++++---
tools/source/fsys/dirent.cxx | 12 ++++++------
tools/source/string/strucvt.cxx | 12 ------------
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 9 ++++++++-
5 files changed, 23 insertions(+), 25 deletions(-)
New commits:
commit 7e3923520c27ff139bc3abab35a1c01e1a785fb1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 5 21:37:49 2012 +0100
Resolves: fdo#49587 apparent loop in style hierarchy
Change-Id: I32317a1a6500377f7e7bb98d1dcc65ad86feb9a2
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 5c33f7b..a69e911 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -561,7 +561,14 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
}
}
//search until the property is set or no parent is available
- pEntry = GetStyleSheetTable()->FindParentStyleSheet(pEntry->sBaseStyleIdentifier);
+ StyleSheetEntryPtr pNewEntry = GetStyleSheetTable()->FindParentStyleSheet(pEntry->sBaseStyleIdentifier);
+
+ SAL_WARN_IF( pEntry == pNewEntry, "writerfilter", "circular loop in style hierarchy?");
+
+ if (pEntry == pNewEntry) //fdo#49587
+ break;
+
+ pEntry = pNewEntry;
}
return uno::Any();
}
commit 5218c0d6a8171400bee0d972ff05757849df4d19
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 4 09:23:10 2012 +0100
UniString(const rtl::OString ...) no longer implemented
Change-Id: Ie4fc4ed1a54889c1745a0d71d02211d6868340fa
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 373df6d..aadd6bf 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -2012,7 +2012,7 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr
if( ( aDesc.getLength() > 4 ) && aDesc.copy(aDesc.getLength() - 4).equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM(".URL")) )
{
- SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( INetURLObject( String( aDesc, eTextEncoding ) ).GetMainURL( INetURLObject::NO_DECODE ),
+ SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( INetURLObject( rtl::OStringToOUString(aDesc, eTextEncoding) ).GetMainURL( INetURLObject::NO_DECODE ),
STREAM_STD_READ );
if( !pStream || pStream->GetError() )
@@ -2042,8 +2042,8 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr
bSttFnd = sal_True;
else if (bSttFnd && aLine.copy(0, 4).equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("URL=")))
{
- rBmk = INetBookmark( String( aLine.copy(4), eTextEncoding ),
- String( aDesc.copy(0, aDesc.getLength() - 4), eTextEncoding ) );
+ rBmk = INetBookmark( rtl::OStringToOUString(aLine.copy(4), eTextEncoding),
+ rtl::OStringToOUString(aDesc.copy(0, aDesc.getLength() - 4), eTextEncoding) );
bRet = sal_True;
break;
}
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index c4a8c2a..ed641d0 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -156,6 +156,12 @@ private:
//a rtl::OString
TOOLS_DLLPRIVATE UniString(const rtl::OString& rByteStr, xub_StrLen nPos, xub_StrLen nLen,
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS);
+
+ //no longer implemented
+ TOOLS_DLLPRIVATE UniString( const rtl::OString& rByteStr,
+ rtl_TextEncoding eTextEncoding,
+ sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
+
public:
UniString();
UniString( const ResId& rResId );
@@ -166,9 +172,6 @@ public:
UniString( const sal_Unicode* pCharStr, xub_StrLen nLen );
UniString( sal_Unicode c );
UniString(char c); // ...but allow "UniString('a')"
- UniString( const rtl::OString& rByteStr,
- rtl_TextEncoding eTextEncoding,
- sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
UniString( const sal_Char* pByteStr,
rtl_TextEncoding eTextEncoding,
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 3b6e9cd..254c383 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -281,7 +281,7 @@ FSysError DirEntry::ImpParseName( const rtl::OString& rPfad )
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
// die einzelnen Namen auf einen Stack packen
- String aPfad( rPfad, osl_getThreadTextEncoding() );
+ String aPfad(rtl::OStringToOUString(rPfad, osl_getThreadTextEncoding()));
DirEntryStack aStack;
do
@@ -1789,8 +1789,8 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
// MoveTo nun atomar
SetLastError(0);
- DirEntry aFromDevice(String(bFrom, osl_getThreadTextEncoding()));
- DirEntry aToDevice(String(bTo,osl_getThreadTextEncoding()));
+ DirEntry aFromDevice(rtl::OStringToOUString(bFrom, osl_getThreadTextEncoding()));
+ DirEntry aToDevice(rtl::OStringToOUString(bTo,osl_getThreadTextEncoding()));
aFromDevice.ToAbs();
aToDevice.ToAbs();
aFromDevice=aFromDevice.GetDevice();
@@ -1811,11 +1811,11 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
//nein, also inter-device-move mit copy/delete
FSysError nCopyError = CopyTo(rNewName, FSYS_ACTION_COPYFILE);
- DirEntry aKill(String(bTo, osl_getThreadTextEncoding()));
- FileStat aKillStat(String(bTo, osl_getThreadTextEncoding()));
+ DirEntry aKill(rtl::OStringToOUString(bTo, osl_getThreadTextEncoding()));
+ FileStat aKillStat(String(rtl::OStringToOUString(bTo, osl_getThreadTextEncoding())));
if ( aKillStat.IsKind(FSYS_KIND_DIR ) )
{
- aKill += String(aName, osl_getThreadTextEncoding());
+ aKill += String(rtl::OStringToOUString(aName, osl_getThreadTextEncoding()));
}
if (nCopyError==FSYS_ERR_OK)
diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx
index f8d2dbd..f4144c7 100644
--- a/tools/source/string/strucvt.cxx
+++ b/tools/source/string/strucvt.cxx
@@ -28,18 +28,6 @@
// =======================================================================
-UniString::UniString( const rtl::OString& rByteStr, rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
-{
- DBG_CTOR( UniString, DbgCheckUniString );
-
- mpData = NULL;
- rtl_string2UString( (rtl_uString **)(&mpData),
- rByteStr.getStr(), rByteStr.getLength(),
- eTextEncoding, nCvtFlags );
-}
-
-// -----------------------------------------------------------------------
-
UniString::UniString( const char* pByteStr,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
More information about the Libreoffice-commits
mailing list