[Libreoffice-commits] .: 3 commits - basic/inc basic/source editeng/Library_editeng.mk editeng/source svx/inc svx/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Fri Jul 29 02:11:26 PDT 2011
basic/inc/basic/basmgr.hxx | 1
basic/source/basmgr/basmgr.cxx | 18 --------
editeng/Library_editeng.mk | 6 --
editeng/source/editeng/editdoc.cxx | 16 +++----
editeng/source/editeng/editdoc.hxx | 1
editeng/source/editeng/editdoc2.cxx | 6 --
editeng/source/editeng/impedit2.cxx | 2
editeng/source/editeng/impedit3.cxx | 10 ++--
editeng/source/editeng/impedit4.cxx | 4 -
editeng/source/editeng/makefile.mk | 4 -
editeng/source/rtf/rtfgrf.cxx | 1
svx/inc/svx/gallery1.hxx | 1
svx/source/gallery2/gallery1.cxx | 77 ------------------------------------
13 files changed, 16 insertions(+), 131 deletions(-)
New commits:
commit 67d43cc418c13b2cb993a3ee1e8df11138d929c6
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Thu Jul 28 21:15:56 2011 +0200
Get rid of these non-printable chars
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx
index a11e810..0ba18ab 100644
--- a/editeng/source/rtf/rtfgrf.cxx
+++ b/editeng/source/rtf/rtfgrf.cxx
@@ -159,7 +159,6 @@ static sal_uInt8 aPal8[ 256 * 4 ] =
};
-/* */
inline long SwapLong( long n )
commit 647d992d1beffb10ffe640d3d1b83802ae9391ed
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Thu Jul 28 17:52:20 2011 +0200
callcatcher: remove unused methods
diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index 9d7b44f..a5239b0 100644
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -164,7 +164,6 @@ protected:
sal_Bool ImplEncryptStream( SvStream& rStream ) const;
BasicLibInfo* FindLibInfo( StarBASIC* pBasic ) const;
void CheckModules( StarBASIC* pBasic, sal_Bool bReference ) const;
- void SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const;
BasicManager(); // This is used only to customize the paths for 'Save as'.
~BasicManager();
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index ad53d22..ce32c0b 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1841,24 +1841,6 @@ sal_Bool BasicManager::IsBasicModified() const
return sal_False;
}
-void BasicManager::SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const
-{
- sal_uInt16 nLibs = GetLibCount();
- for ( sal_uInt16 nL = 0; nL < nLibs; nL++ )
- {
- BasicLibInfo* pInfo = pLibs->GetObject( nL );
- DBG_ASSERT( pInfo, "Info?!" );
- StarBASIC* pLib = pInfo->GetLib();
- if ( pLib )
- {
- if ( bSet )
- pLib->SetFlag( nFlag );
- else
- pLib->ResetFlag( nFlag );
- }
- }
-}
-
sal_Bool BasicManager::HasErrors()
{
DBG_CHKTHIS( BasicManager, 0 );
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index f560b0a..055c48d 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -382,7 +382,6 @@ struct ExtraPortionInfo
~ExtraPortionInfo();
void SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen );
- void DestroyOrgDXArray();
};
diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx
index 4bf4ef3..249ab3f 100644
--- a/editeng/source/editeng/editdoc2.cxx
+++ b/editeng/source/editeng/editdoc2.cxx
@@ -152,12 +152,6 @@ void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLe
memcpy( pOrgDXArray, pDXArray, nLen*sizeof(sal_Int32) );
}
-void ExtraPortionInfo::DestroyOrgDXArray()
-{
- delete[] pOrgDXArray;
- pOrgDXArray = NULL;
-}
-
ParaPortion::ParaPortion( ContentNode* pN )
{
diff --git a/svx/inc/svx/gallery1.hxx b/svx/inc/svx/gallery1.hxx
index ca708cf..6c99ac3 100644
--- a/svx/inc/svx/gallery1.hxx
+++ b/svx/inc/svx/gallery1.hxx
@@ -167,7 +167,6 @@ public:
String GetThemeName( sal_uIntPtr nThemeId ) const;
SVX_DLLPUBLIC sal_Bool CreateTheme( const String& rThemeName, sal_uInt32 nNumFrom = 0 );
- sal_Bool CreateImportTheme( const INetURLObject& rURL, const String& rFileName );
sal_Bool RenameTheme( const String& rOldName, const String& rNewName );
SVX_DLLPUBLIC sal_Bool RemoveTheme( const String& rThemeName );
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 4ea9a6d..fac528b 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -633,83 +633,6 @@ sal_Bool Gallery::CreateTheme( const String& rThemeName, sal_uInt32 nNumFrom )
// ------------------------------------------------------------------------
-sal_Bool Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImportName )
-{
- INetURLObject aURL( rURL );
- sal_Bool bRet = sal_False;
-
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- if( FileExists( aURL ) )
- {
- SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
-
- if( pIStm )
- {
- sal_uIntPtr nStmErr;
- sal_uInt16 nId;
-
- *pIStm >> nId;
-
- if( nId > 0x0004 )
- ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
- else
- {
- ByteString aTmpStr;
- String aThemeName; *pIStm >> aTmpStr; aThemeName = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
- GalleryThemeEntry* pThemeEntry = new GalleryThemeEntry( aURL, rImportName,
- String(aURL.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(),
- sal_True, sal_True, sal_True, 0, sal_False );
- GalleryTheme* pImportTheme = new GalleryTheme( this, pThemeEntry );
-
- pIStm->Seek( STREAM_SEEK_TO_BEGIN );
- *pIStm >> *pImportTheme;
- nStmErr = pIStm->GetError();
-
- if( nStmErr )
- {
- delete pThemeEntry;
- ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
- }
- else
- {
- String aName( rImportName );
- String aNewName( aName );
- sal_uIntPtr nCount = 0;
-
- aName += ' ';
-
- while ( HasTheme( aNewName ) && ( nCount++ < 16000 ) )
- {
- aNewName = aName;
- aNewName += String::CreateFromInt32( nCount );
- }
-
- pImportTheme->SetImportName( aNewName );
- aThemeList.push_back( pThemeEntry );
-
- // Thema in Import-Liste eintragen und Import-Liste speichern
- GalleryImportThemeEntry* pImportEntry = new GalleryImportThemeEntry;
- pImportEntry->aThemeName = pImportEntry->aUIName = aNewName;
- pImportEntry->aURL = rURL;
- pImportEntry->aImportName = rImportName;
- aImportList.push_back( pImportEntry );
- ImplWriteImportList();
- bRet = sal_True;
- }
-
- delete pImportTheme;
- }
-
- delete pIStm;
- }
- }
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------
-
sal_Bool Gallery::RenameTheme( const String& rOldName, const String& rNewName )
{
GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName );
commit aad7baa4130ad8b1f1dad4a8d989637f86ef306d
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed Jul 27 10:20:12 2011 +0200
Move EDITDEBUG relics to OSL_DEBUG_LEVEL=3
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index c846e9c..cb722b3 100755
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -41,12 +41,6 @@ $(eval $(call gb_Library_add_defs,editeng,\
-DEDITENG_DLLIMPLEMENTATION \
))
-ifneq ($(strip $(EDITDEBUG)),)
-$(eval $(call gb_Library_add_defs,editeng,\
- -DEDITDEBUG \
-))
-endif
-
$(eval $(call gb_Library_add_api,editeng,\
udkapi \
offapi \
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 3412d70..30b0aa0 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -841,8 +841,8 @@ void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool
pWrongList->TextInserted( nIndex, nNew, bSep );
}
-#ifdef EDITDEBUG
- DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Expand: Start List distorted" );
+#if OSL_DEBUG_LEVEL > 2
+ OSL_ENSURE( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Expand: Start List distorted" );
#endif
}
@@ -929,8 +929,8 @@ void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxIte
if ( pWrongList )
pWrongList->TextDeleted( nIndex, nDeleted );
-#ifdef EDITDEBUG
- DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Collaps: Start list distorted" );
+#if OSL_DEBUG_LEVEL > 2
+ OSL_ENSURE( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Collaps: Start list distorted" );
#endif
}
@@ -991,8 +991,8 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
sal_uInt16 nNewStart = Len();
-#ifdef EDITDEBUG
- DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute before AppendAttribs broken" );
+#if OSL_DEBUG_LEVEL > 2
+ OSL_ENSURE( aCharAttribList.DbgCheckAttribs(), "Attribute before AppendAttribs broken" );
#endif
sal_uInt16 nAttr = 0;
@@ -1038,8 +1038,8 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
// For the Attributes that just moved over:
pNextNode->GetCharAttribs().Clear();
-#ifdef EDITDEBUG
- DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute after AppendAttribs broken" );
+#if OSL_DEBUG_LEVEL > 2
+ OSL_ENSURE( aCharAttribList.DbgCheckAttribs(), "Attribute after AppendAttribs broken" );
#endif
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index ba3cd53..b5abb91 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2239,7 +2239,7 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_uInt16
aTmpPortionList.Remove( 0, aTmpPortionList.Count() ); // important !
-#ifdef EDITDEBUG
+#if OSL_DEBUG_LEVEL > 2
GetParaPortions().DbgCheck(aEditDoc);
#endif
return aSelection;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index b43444d..74eb81a 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2347,8 +2347,8 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
}
DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No Portions?!" );
-#ifdef EDITDEBUG
- DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portion is broken?" );
+#if OSL_DEBUG_LEVEL > 2
+ OSL_ENSURE( pParaPortion->DbgCheckTextPortions(), "Portion is broken?" );
#endif
}
@@ -2463,8 +2463,8 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
delete pTP;
}
}
-#ifdef EDITDEBUG
- DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions are broken?" );
+#if OSL_DEBUG_LEVEL > 2
+ OSL_ENSURE( pParaPortion->DbgCheckTextPortions(), "Portions are broken?" );
#endif
}
@@ -2956,7 +2956,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
bDrawFrame = sal_True;
}
-#ifdef EDITDEBUG
+#if OSL_DEBUG_LEVEL > 2
if ( pTextPortion->GetKind() == PORTIONKIND_HYPHENATOR )
{
aTmpFont.SetFillColor( COL_LIGHTGRAY );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index e5b0841..bc0b332 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -159,7 +159,7 @@ EditPaM ImpEditEngine::ReadXML( SvStream& rInput, EditSelection aSel )
EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
{
-#if defined (EDITDEBUG) && !defined( UNX )
+#if (OSL_DEBUG_LEVEL > 2) && !defined( UNX )
SvFileStream aRTFOut( String( RTL_CONSTASCII_USTRINGPARAM ( "d:\\rtf_in.rtf" ) ), STREAM_WRITE );
aRTFOut << rInput;
aRTFOut.Close();
@@ -690,7 +690,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
rOutput << "}}"; // 1xparentheses paragraphs, 1xparentheses RTF document
rOutput.Flush();
-#if defined (EDITDEBUG) && !defined( UNX )
+#if (OSL_DEBUG_LEVEL > 2) && !defined( UNX )
{
SvFileStream aStream( String( RTL_CONSTASCII_USTRINGPARAM ( "d:\\rtf_out.rtf" ) ), STREAM_WRITE|STREAM_TRUNC );
sal_uLong nP = rOutput.Tell();
diff --git a/editeng/source/editeng/makefile.mk b/editeng/source/editeng/makefile.mk
index 6a623d0..838ad50 100644
--- a/editeng/source/editeng/makefile.mk
+++ b/editeng/source/editeng/makefile.mk
@@ -39,10 +39,6 @@ ENABLE_EXCEPTIONS=TRUE
# --- General ----------------------------------------------------------
-.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != ""
-CDEFS+=-DEDITDEBUG
-.ENDIF
-
SLOFILES = \
$(SLO)$/textconv.obj \
$(SLO)$/editattr.obj \
More information about the Libreoffice-commits
mailing list