summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2013-04-28 12:31:12 +1000
committerDavid Tardon <dtardon@redhat.com>2013-04-29 04:15:58 +0000
commite986d3e396174096abb46075bf7488677b9a35f9 (patch)
tree8a166704ed5a1c8cbea6a8875bce92c7b0056025
parente81d0c400c02a87d7fa492dbc5ac9f7921167920 (diff)
fdo#39468 Translation and cleanup
Cleanup of source code: - translated German to English - removed useless comment decorations - removed commented out code - some reformatting of code Change-Id: I71d5fdab8226d61bda9ac906bb82176dc11cafd2 Reviewed-on: https://gerrit.libreoffice.org/3643 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--vcl/generic/glyphs/gcach_rbmp.cxx9
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx30
-rw-r--r--vcl/headless/svptext.cxx24
-rw-r--r--vcl/source/control/quickselectionengine.cxx19
-rw-r--r--vcl/source/control/throbber.cxx7
-rw-r--r--vcl/source/filter/graphicfilter.cxx156
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx36
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx132
-rw-r--r--vcl/source/gdi/imagerepository.cxx9
-rw-r--r--vcl/source/gdi/textlayout.cxx42
-rw-r--r--vcl/source/helper/canvastools.cxx5
-rw-r--r--vcl/source/window/mnemonicengine.cxx15
12 files changed, 129 insertions, 355 deletions
diff --git a/vcl/generic/glyphs/gcach_rbmp.cxx b/vcl/generic/glyphs/gcach_rbmp.cxx
index 72a76d4f121a..684f8869328d 100644
--- a/vcl/generic/glyphs/gcach_rbmp.cxx
+++ b/vcl/generic/glyphs/gcach_rbmp.cxx
@@ -21,13 +21,11 @@
#include "generic/glyphcache.hxx"
#include <string.h>
-//------------------------------------------------------------------------
RawBitmap::RawBitmap()
: mpBits(0), mnAllocated(0)
{}
-//------------------------------------------------------------------------
RawBitmap::~RawBitmap()
{
@@ -36,7 +34,6 @@ RawBitmap::~RawBitmap()
mnAllocated = 0;
}
-//------------------------------------------------------------------------
// used by 90 and 270 degree rotations on 8 bit deep bitmaps
static void ImplRotate8_90( unsigned char* p1, const unsigned char* p2,
@@ -51,7 +48,6 @@ static void ImplRotate8_90( unsigned char* p1, const unsigned char* p2,
}
}
-//------------------------------------------------------------------------
// used by inplace 180 degree rotation on 8 bit deep bitmaps
static void ImplRotate8_180( unsigned char* p1, int xmax, int ymax, int nPad )
@@ -79,7 +75,6 @@ static void ImplRotate8_180( unsigned char* p1, int xmax, int ymax, int nPad )
}
}
-//------------------------------------------------------------------------
// used by 90 or 270 degree rotations on 1 bit deep bitmaps
static void ImplRotate1_90( unsigned char* p1, const unsigned char* p2,
@@ -119,7 +114,6 @@ static void ImplRotate1_90( unsigned char* p1, const unsigned char* p2,
}
}
-//------------------------------------------------------------------------
// used by 180 degrees rotations on 1 bit deep bitmaps
static void ImplRotate1_180( unsigned char* p1, const unsigned char* p2,
@@ -157,7 +151,6 @@ static void ImplRotate1_180( unsigned char* p1, const unsigned char* p2,
}
}
-//------------------------------------------------------------------------
bool RawBitmap::Rotate( int nAngle )
{
@@ -261,6 +254,4 @@ bool RawBitmap::Rotate( int nAngle )
return true;
}
-//------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index a6849ececd8b..a32b88fd82a0 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -36,10 +36,6 @@
#include <osl/file.hxx>
#include <tools/debug.hxx>
-// =======================================================================
-// GlyphCache
-// =======================================================================
-
static GlyphCache* pInstance = NULL;
GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
@@ -55,7 +51,6 @@ GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
mpFtManager = new FreetypeManager;
}
-// -----------------------------------------------------------------------
GlyphCache::~GlyphCache()
{
@@ -63,7 +58,6 @@ GlyphCache::~GlyphCache()
delete mpFtManager;
}
-// -----------------------------------------------------------------------
void GlyphCache::InvalidateAllGlyphs()
{
@@ -78,7 +72,6 @@ void GlyphCache::InvalidateAllGlyphs()
mpCurrentGCFont = NULL;
}
-// -----------------------------------------------------------------------
inline
size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData ) const
@@ -105,7 +98,6 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData
return nHash;
}
-// -----------------------------------------------------------------------
bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const FontSelectPattern& rB) const
{
@@ -154,14 +146,12 @@ bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const Font
return true;
}
-// -----------------------------------------------------------------------
GlyphCache& GlyphCache::GetInstance()
{
return *pInstance;
}
-// -----------------------------------------------------------------------
void GlyphCache::AddFontFile( const OString& rNormalizedName, int nFaceNum,
sal_IntPtr nFontId, const ImplDevFontAttributes& rDFA, const ExtraKernInfo* pExtraKern )
@@ -170,7 +160,6 @@ void GlyphCache::AddFontFile( const OString& rNormalizedName, int nFaceNum,
mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, rDFA, pExtraKern );
}
-// -----------------------------------------------------------------------
void GlyphCache::AnnounceFonts( ImplDevFontList* pList ) const
{
@@ -185,7 +174,6 @@ void GlyphCache::ClearFontCache()
mpFtManager->ClearFontList();
}
-// -----------------------------------------------------------------------
ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
{
@@ -238,7 +226,6 @@ ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
return pNew;
}
-// -----------------------------------------------------------------------
void GlyphCache::UncacheFont( ServerFont& rServerFont )
{
@@ -254,7 +241,6 @@ void GlyphCache::UncacheFont( ServerFont& rServerFont )
}
}
-// -----------------------------------------------------------------------
void GlyphCache::GarbageCollect()
{
@@ -306,14 +292,12 @@ void GlyphCache::GarbageCollect()
}
}
-// -----------------------------------------------------------------------
inline void GlyphCache::UsingGlyph( ServerFont&, GlyphData& rGlyphData )
{
rGlyphData.SetLruValue( mnLruIndex++ );
}
-// -----------------------------------------------------------------------
inline void GlyphCache::AddedGlyph( ServerFont& rServerFont, GlyphData& rGlyphData )
{
@@ -323,7 +307,6 @@ inline void GlyphCache::AddedGlyph( ServerFont& rServerFont, GlyphData& rGlyphDa
GrowNotify();
}
-// -----------------------------------------------------------------------
void GlyphCache::GrowNotify()
{
@@ -331,7 +314,6 @@ void GlyphCache::GrowNotify()
GarbageCollect();
}
-// -----------------------------------------------------------------------
inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGlyphIndex )
{
@@ -340,11 +322,10 @@ inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGly
--mnGlyphCount;
}
-// -----------------------------------------------------------------------
void ServerFont::ReleaseFromGarbageCollect()
{
- // remove from GC list
+ // remove from GC list
ServerFont* pPrev = mpPrevGCFont;
ServerFont* pNext = mpNextGCFont;
if( pPrev ) pPrev->mpNextGCFont = pNext;
@@ -353,7 +334,6 @@ void ServerFont::ReleaseFromGarbageCollect()
mpNextGCFont = NULL;
}
-// -----------------------------------------------------------------------
long ServerFont::Release() const
{
@@ -361,7 +341,6 @@ long ServerFont::Release() const
return --mnRefCount;
}
-// -----------------------------------------------------------------------
GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
{
@@ -381,7 +360,6 @@ GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
return rGlyphData;
}
-// -----------------------------------------------------------------------
void ServerFont::GarbageCollect( long nMinLruIndex )
{
@@ -401,7 +379,6 @@ void ServerFont::GarbageCollect( long nMinLruIndex )
}
}
-// =======================================================================
ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
: ImplFontEntry( rFSD )
@@ -409,7 +386,6 @@ ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
, mbGotFontOptions( false )
{}
-// -----------------------------------------------------------------------
void ImplServerFontEntry::SetServerFont(ServerFont* p)
{
@@ -429,7 +405,6 @@ ImplServerFontEntry::~ImplServerFontEntry()
mpServerFont->Release();
}
-// =======================================================================
ExtraKernInfo::ExtraKernInfo( sal_IntPtr nFontId )
: mbInitialized( false ),
@@ -437,7 +412,6 @@ ExtraKernInfo::ExtraKernInfo( sal_IntPtr nFontId )
maUnicodeKernPairs( 0 )
{}
-//--------------------------------------------------------------------------
int ExtraKernInfo::GetUnscaledKernPairs( ImplKernPairData** ppKernPairs ) const
{
@@ -461,6 +435,4 @@ int ExtraKernInfo::GetUnscaledKernPairs( ImplKernPairData** ppKernPairs ) const
return nKernCount;
}
-// =======================================================================
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 717579f8e90a..2b657461036d 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -39,8 +39,6 @@
using namespace basegfx;
using namespace basebmp;
-// ===========================================================================
-
class SvpGlyphPeer
: public GlyphCachePeer
{
@@ -62,8 +60,6 @@ protected:
};
};
-// ===========================================================================
-
class SvpGlyphCache : public GlyphCache
{
public:
@@ -112,7 +108,6 @@ SvpGlyphCache& SvpGlyphCache::GetInstance()
return theGlyphCacheHolder::get().getGlyphCache();
}
-// ===========================================================================
BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
int nGlyphIndex, sal_uInt32 nBmpFormat, B2IPoint& rTargetPos )
@@ -168,14 +163,12 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
return pGcpHelper->maBitmapDev;
}
-//--------------------------------------------------------------------------
void SvpGlyphPeer::RemovingFont( ServerFont& )
{
// nothing to do: no font resources held in SvpGlyphPeer
}
-//--------------------------------------------------------------------------
void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int /*nGlyphIndex*/ )
{
@@ -189,7 +182,6 @@ void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int /*nGly
}
}
-// ===========================================================================
// PspKernInfo allows on-demand-querying of psprint provided kerning info (#i29881#)
class PspKernInfo : public ExtraKernInfo
@@ -200,7 +192,6 @@ protected:
virtual void Initialize() const;
};
-//--------------------------------------------------------------------------
void PspKernInfo::Initialize() const
{
@@ -221,7 +212,6 @@ void PspKernInfo::Initialize() const
}
}
-// ===========================================================================
sal_uInt16 SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel )
{
@@ -257,7 +247,6 @@ sal_uInt16 SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel
return SAL_SETFONT_USEDRAWTEXTARRAY;
}
-// ---------------------------------------------------------------------------
void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel )
{
@@ -271,7 +260,6 @@ void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
}
}
-// ---------------------------------------------------------------------------
sal_uLong SvpSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
{
@@ -289,7 +277,6 @@ sal_uLong SvpSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKer
return nGotPairs;
}
-// ---------------------------------------------------------------------------
const ImplFontCharMap* SvpSalGraphics::GetImplFontCharMap() const
{
@@ -308,7 +295,6 @@ bool SvpSalGraphics::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabil
return m_pServerFont[0]->GetFontCapabilities(rFontCapabilities);
}
-// ---------------------------------------------------------------------------
void SvpSalGraphics::GetDevFontList( ImplDevFontList* pDevFontList )
{
@@ -360,12 +346,10 @@ void SvpSalGraphics::ClearDevFontCache()
rGC.ClearFontCache();
}
-// ---------------------------------------------------------------------------
void SvpSalGraphics::GetDevFontSubstList( OutputDevice* )
{}
-// ---------------------------------------------------------------------------
bool SvpSalGraphics::AddTempDevFont( ImplDevFontList*,
const OUString&, const OUString& )
@@ -373,7 +357,6 @@ bool SvpSalGraphics::AddTempDevFont( ImplDevFontList*,
return false;
}
-// ---------------------------------------------------------------------------
sal_Bool SvpSalGraphics::CreateFontSubset(
const OUString& rToFile,
@@ -403,7 +386,6 @@ sal_Bool SvpSalGraphics::CreateFontSubset(
return bSuccess;
}
-// ---------------------------------------------------------------------------
const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
{
@@ -416,7 +398,6 @@ const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace
return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded );
}
-// ---------------------------------------------------------------------------
const void* SvpSalGraphics::GetEmbedFontData(
const PhysicalFontFace* pFont,
@@ -435,7 +416,6 @@ const void* SvpSalGraphics::GetEmbedFontData(
return GenPspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen );
}
-// ---------------------------------------------------------------------------
void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen )
{
@@ -456,7 +436,6 @@ void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
}
-// ---------------------------------------------------------------------------
sal_Bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
{
@@ -474,7 +453,6 @@ sal_Bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle&
return sal_True;
}
-// ---------------------------------------------------------------------------
sal_Bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex, B2DPolyPolygon& rPolyPoly )
{
@@ -493,7 +471,6 @@ sal_Bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex, B2DPolyPolygo
return sal_False;
}
-// ---------------------------------------------------------------------------
SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs&, int nFallbackLevel )
{
@@ -505,7 +482,6 @@ SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs&, int nFallbackLevel )
return pLayout;
}
-// ---------------------------------------------------------------------------
void SvpSalGraphics::DrawServerFontLayout( const ServerFontLayout& rSalLayout )
{
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index d00944a06fc7..2f379661dd79 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -26,14 +26,9 @@
#include <boost/optional.hpp>
-//........................................................................
namespace vcl
{
-//........................................................................
- //====================================================================
- //= QuickSelectionEngine_Data
- //====================================================================
struct QuickSelectionEngine_Data
{
ISearchableStringList& rEntryList;
@@ -59,7 +54,6 @@ namespace vcl
DECL_LINK( SearchStringTimeout, Timer* );
};
- //--------------------------------------------------------------------
namespace
{
static void lcl_reset( QuickSelectionEngine_Data& _data )
@@ -70,18 +64,16 @@ namespace vcl
}
}
- //--------------------------------------------------------------------
IMPL_LINK( QuickSelectionEngine_Data, SearchStringTimeout, Timer*, /*EMPTYARG*/ )
{
lcl_reset( *this );
return 1;
}
- //--------------------------------------------------------------------
static StringEntryIdentifier findMatchingEntry( const OUString& _searchString, QuickSelectionEngine_Data& _engineData )
{
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetLocaleI18nHelper();
- // TODO: do we really need the Window's settings here? The original code used it ...
+ // TODO: do we really need the Window's settings here? The original code used it ...
String sEntryText;
// get the "current + 1" entry
@@ -103,21 +95,15 @@ namespace vcl
return pSearchEntry;
}
- //====================================================================
- //= QuickSelectionEngine
- //====================================================================
- //--------------------------------------------------------------------
QuickSelectionEngine::QuickSelectionEngine( ISearchableStringList& _entryList )
:m_pData( new QuickSelectionEngine_Data( _entryList ) )
{
}
- //--------------------------------------------------------------------
QuickSelectionEngine::~QuickSelectionEngine()
{
}
- //--------------------------------------------------------------------
bool QuickSelectionEngine::HandleKeyEvent( const KeyEvent& _keyEvent )
{
sal_Unicode c = _keyEvent.GetCharCode();
@@ -164,14 +150,11 @@ namespace vcl
return false;
}
- //--------------------------------------------------------------------
void QuickSelectionEngine::Reset()
{
lcl_reset( *m_pData );
}
-//........................................................................
} // namespace vcl
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 3197b257467c..de04560f1d2b 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -179,25 +179,21 @@ void Throbber::initImages()
}
}
-//----------------------------------------------------------------------------------------------------------------------
void Throbber::start()
{
maWaitTimer.Start();
}
-//----------------------------------------------------------------------------------------------------------------------
void Throbber::stop()
{
maWaitTimer.Stop();
}
-//----------------------------------------------------------------------------------------------------------------------
bool Throbber::isRunning() const
{
return maWaitTimer.IsActive();
}
-//----------------------------------------------------------------------------------------------------------------------
void Throbber::setImageList( ::std::vector< Image > const& i_images )
{
maImageList = i_images;
@@ -207,7 +203,6 @@ void Throbber::setImageList( ::std::vector< Image > const& i_images )
SetImage( aInitialImage );
}
-//----------------------------------------------------------------------------------------------------------------------
void Throbber::setImageList( const Sequence< Reference< XGraphic > >& rImageList )
{
::std::vector< Image > aImages( rImageList.getLength() );
@@ -219,7 +214,6 @@ void Throbber::setImageList( const Sequence< Reference< XGraphic > >& rImageList
setImageList( aImages );
}
-//----------------------------------------------------------------------------------------------------------------------
::std::vector< OUString > Throbber::getDefaultImageURLs( const ImageSet i_imageSet )
{
::std::vector< OUString > aImageURLs;
@@ -257,7 +251,6 @@ void Throbber::setImageList( const Sequence< Reference< XGraphic > >& rImageList
return aImageURLs;
}
-//----------------------------------------------------------------------------------------------------------------------
IMPL_LINK_NOARG(Throbber, TimeOutHdl)
{
SolarMutexGuard aGuard;
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 15d68f8b9b47..d9944facd16b 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -88,16 +88,20 @@ class ImpFilterOutputStream : public ::cppu::WeakImplHelper1< ::com::sun::star::
{
protected:
- SvStream& mrStm;
+ SvStream& mrStm;
- virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Write( rData.getConstArray(), rData.getLength() ); }
- virtual void SAL_CALL flush() throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Flush(); }
- virtual void SAL_CALL closeOutput() throw() {}
+ virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData )
+ throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+ { mrStm.Write( rData.getConstArray(), rData.getLength() ); }
+ virtual void SAL_CALL flush()
+ throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+ { mrStm.Flush(); }
+ virtual void SAL_CALL closeOutput() throw() {}
public:
- ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {}
- ~ImpFilterOutputStream() {}
+ ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {}
+ ~ImpFilterOutputStream() {}
};
#ifndef DISABLE_EXPORT
@@ -108,9 +112,9 @@ static sal_Bool DirEntryExists( const INetURLObject& rObj )
try
{
- ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ),
- ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
- comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ),
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
+ comphelper::getProcessComponentContext() );
bExists = aCnt.isDocument();
}
@@ -171,7 +175,6 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nCom
return NULL;
}
-//--------------------------------------------------------------------------
inline String ImpGetExtension( const String &rPath )
{
@@ -186,7 +189,7 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
sal_uInt8 sBuf[3];
// store number format
sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt();
- sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes
+ sal_uInt32 nOffset; // in MS documents the pict format is used without the first 512 bytes
for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 )
{
short y1,x1,y2,x2;
@@ -220,34 +223,31 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
/*************************************************************************
-|*
-|* ImpPeekGraphicFormat()
-|*
-|* Beschreibung:
-|* Diese Funktion kann zweierlei:
-|* 1.) Datei anlesen, Dateiformat ermitteln
-|* Eingabe-prarameter:
-|* rPath - Dateipfad
-|* rFormatExtension - Inhalt egal
-|* bTest - setze sal_False
-|* Ausgabe-parameter:
-|* Funkionswert - sal_True wenn Erfolg
-|* rFormatExtension - Bei Erfolg: uebliche Dateiendung
-|* des Formats (Grossbuchstaben)
-|* 2.) Datei anlesen, Dateiformat ueberpruefen
-|* Eingabe-prarameter:
-|* rPath - Dateipfad
-|* rFormatExtension - uebliche Dateiendung des Formats
-|* (Grossbuchstaben)
-|* bTest - setze sal_True
-|* Ausgabe-parameter:
-|* Funkionswert - sal_False, wenn die Datei bestimmt nicht
-|* vom uebgebenen Format ist.
-|* sal_True, wenn die Datei WAHRSCHEINLICH von
-|* dem Format ist, ODER WENN DAS FORMAT
-|* DIESER FUNKTION NICHT BEKANNT IST!
-|*
-*************************************************************************/
+ *
+ * ImpPeekGraphicFormat()
+ *
+ * Description:
+ * This function is two-fold:
+ * 1.) Start reading file, determine the file format:
+ * Input parameters:
+ * rPath - file path
+ * rFormatExtension - content matter
+ * bTest - set sal_False
+ * Output parameters:
+ * Return value - sal_True if success
+ * rFormatExtension - on success: normal file extension in capitals
+ * 2.) Start reading file, check file format
+ * Input parameters:
+ * rPath - file path
+ * rFormatExtension - normal file extension in capitals
+ * bTest - set sal_True
+ * Output parameters:
+ * Return value - sal_False, if cannot verify the file type
+ * passed to the function
+ * sal_True, when the format is PROBABLY verified or
+ * WHEN THE FORMAT IS NOT KNOWN!
+ *
+ *************************************************************************/
static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, sal_Bool bTest )
{
@@ -289,7 +289,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if( rStream.GetError() )
return sal_False;
- // Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen,
+ // Accommodate the first 8 bytes in nFirstLong, nSecondLong
// Big-Endian:
for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ )
{
@@ -297,23 +297,17 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
nSecondLong=(nSecondLong<<8)|(sal_uLong)sFirstBytes[i+4];
}
- // Folgende Variable ist nur bei bTest==sal_True interessant. Sie
- // bleibt sal_False, wenn das Format (rFormatExtension) hier noch nicht
- // einprogrammiert wurde.
+ // The following variable is used when bTest == sal_True. It remains sal_False
+ // if the format (rFormatExtension) has not yet been set.
sal_Bool bSomethingTested = sal_False;
- // Nun werden die verschieden Formate ueberprueft. Dabei ist die
- // Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch
- // den BMP-Test gehen, umgekehrt kann eine BMP-Datei kaum durch den
- // MET-Test gehen. Also sollte MET vor BMP getestet werden.
- // Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar,
- // die durch den MET-Test geht.
- // Diese Probleme gibt es natuerlich nicht nur bei MET und BMP.
- // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==sal_True)
- // nur genau dieses eine Format getestet. Alles andere koennte fatale
- // Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es
- // ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen...
-
+ // Now the different formats are checked. The order does not matter. e.g. a MET file
+ // could also go through the BMP test, howeve a BMP file can hardly go through the MET test.
+ // So MET should be tested prior to BMP. However, theoretically a BMP file could conceivably
+ // go through the MET test. These problems are of course not only in MET and BMP.
+ // Therefore, in the case of a format check (bTest == sal_True) we only test this format.
+ // Everything else could have fatal consequences, for example if the user says it is a BMP file
+ // (and it is a BMP) file, and the file would go through the MET test ...
//--------------------------- MET ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) )
{
@@ -348,20 +342,20 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
- // OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen,
- // dementspr. muessen wir den Offset anpassen,
- // um auf die erste Bitmap im Array zu stossen
+ // We could be reading an OS/2 bitmap array ('BA'), therefore we must adjust
+ // the offset to discover the first bitmap in the array
if ( sFirstBytes[0] == 0x42 && sFirstBytes[1] == 0x41 )
nOffs = 14;
else
nOffs = 0;
- // Jetzt testen wir zunaechst auf 'BM'
+ // Now we initially test on 'BM'
if ( sFirstBytes[0+nOffs]==0x42 && sFirstBytes[1+nOffs]==0x4d )
{
- // unter OS/2 koennen die Reserved-Flags != 0 sein
- // (was sie eigentlich nicht duerften);
- // in diesem Fall testen wir die Groesse des BmpInfoHeaders
+
+ // OS/2 can set the Reserved flags to a value other than 0
+ // (which they really should not do...);
+ // In this case we test the size of the BmpInfoHeaders
if ( ( sFirstBytes[6+nOffs]==0x00 &&
sFirstBytes[7+nOffs]==0x00 &&
sFirstBytes[8+nOffs]==0x00 &&
@@ -518,14 +512,14 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
//--------------------------- DXF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) )
{
- //Binary DXF File Format
+ // Binary DXF File Format
if( strncmp( (const char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 )
{
rFormatExtension = OUString("DXF");
return sal_True;
}
- //ASCII DXF File Format
+ // ASCII DXF File Format
i=0;
while (i<256 && sFirstBytes[i]<=32)
++i;
@@ -534,8 +528,8 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
{
++i;
- //only now do we have sufficient data to make a judgement
- //based on a '0' + 'SECTION' == DXF argument
+ // only now do we have sufficient data to make a judgement
+ // based on a '0' + 'SECTION' == DXF argument
bSomethingTested=sal_True;
while( i<256 && sFirstBytes[i]<=32 )
@@ -694,7 +688,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
}
else
{
- // #119176# Svg files which have no xml header at all have shown up,
+ // #119176# SVG files which have no xml header at all have shown up,
// detect those, too
bool bIsSvg(false);
@@ -708,7 +702,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
{
// look for '<svg' in full file. Should not happen too
// often since the tests above will handle most cases, but can happen
- // with Svg files containing big comment headers or Svg as the host
+ // with SVG files containing big comment headers or SVG as the host
// language
const sal_uLong nSize((nStreamLen > 2048) ? 2048 : nStreamLen);
sal_uInt8* pBuf = new sal_uInt8[nSize];
@@ -856,7 +850,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
if( rGraphic.GetType() == GRAPHIC_BITMAP )
{
- // Aufloesung wird eingestellt
+ // Resolution is set
if( nMode == 1 )
{
Bitmap aBitmap( rGraphic.GetBitmap() );
@@ -874,7 +868,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
aGraphic.SetPrefSize( Size( aOldSize.Width() * 100,
aOldSize.Height() * 100 ) );
}
- // Groesse wird eingestellt
+ // Size is set
else if( nMode == 2 )
{
aGraphic = rGraphic;
@@ -1398,8 +1392,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath,
bAbort = sal_False;
nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat );
- // Falls Pending, geben wir GRFILTER_OK zurueck,
- // um mehr Bytes anzufordern
+ // if pending, return GRFILTER_OK in order to request more bytes
if( rIStream.GetError() == ERRCODE_IO_PENDING )
{
rGraphic.SetContext( (GraphicReader*) 1 );
@@ -1563,7 +1556,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath,
else if( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP ) ||
aFilterName.EqualsIgnoreCaseAscii( IMP_SVMETAFILE ) )
{
- // SV interne Importfilter fuer Bitmaps und MetaFiles
+ // SV internal filters for import bitmaps and MetaFiles
rIStream >> rGraphic;
if( rIStream.GetError() )
nStatus = GRFILTER_FORMATERROR;
@@ -1838,18 +1831,13 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
sal_uLong nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
VirtualDevice aVirDev;
- // Maximalen Speicherbedarf fuer das Bildes holen:
-// if( GetOptionsConfig() )
-// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
-// else
- nMaxMem = 1024;
-
+ nMaxMem = 1024;
nMaxMem *= 1024; // In Bytes
- // Berechnen, wie gross das Bild normalerweise werden wuerde:
+ // Calculate how big the image would normally be:
aSizePixel=aVirDev.LogicToPixel(aGraphic.GetPrefSize(),aGraphic.GetPrefMapMode());
- // Berechnen, wieviel Speicher das Bild benoetigen wuerde:
+ // Calculate how much memory the image will take up
nColorCount=aVirDev.GetColorCount();
if (nColorCount<=2) nBitsPerPixel=1;
else if (nColorCount<=4) nBitsPerPixel=2;
@@ -1859,7 +1847,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
else nBitsPerPixel=24;
nNeededMem=((sal_uLong)aSizePixel.Width()*(sal_uLong)aSizePixel.Height()*nBitsPerPixel+7)/8;
- // ggf. Groesse des Bildes einschraenken:
+ // is the image larger than available memory?
if (nMaxMem<nNeededMem)
{
double fFak=sqrt(((double)nMaxMem)/((double)nNeededMem));
@@ -1870,7 +1858,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
aVirDev.SetMapMode(MapMode(MAP_PIXEL));
aVirDev.SetOutputSizePixel(aSizePixel);
Graphic aGraphic2=aGraphic;
- aGraphic2.Draw(&aVirDev,Point(0,0),aSizePixel); // Gemein: dies aendert den MapMode
+ aGraphic2.Draw(&aVirDev,Point(0,0),aSizePixel); // this changes the MapMode
aVirDev.SetMapMode(MapMode(MAP_PIXEL));
aGraphic=Graphic(aVirDev.GetBitmap(Point(0,0),aSizePixel));
}
@@ -2071,7 +2059,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
osl::Module aLibrary( aPhysicalName );
PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol(OUString(aFilterName+EXPORT_FUNCTION_NAME));
- // Dialog in DLL ausfuehren
+ // Execute dialog in DLL
#else
PFilterCall pFunc = NULL;
if( aFilterName.EqualsAscii( "egi" ) )
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index c19e48efd95d..cd71a6bbb4cb 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -23,7 +23,8 @@
#include <boost/bind.hpp>
using namespace std;
-//=========================== GDI-Array ===================================
+
+// GDI-Array
#define EMR_HEADER 1
#define EMR_POLYBEZIER 2
@@ -156,7 +157,6 @@ using namespace std;
#define EMFP_DEBUG(x)
#endif
-//-----------------------------------------------------------------------------------
#ifdef OSL_BIGENDIAN
// currently unused
@@ -264,8 +264,8 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
bHaveDC = false;
OSL_ASSERT(length >= 4);
- //reduce by 32bit length itself, skip in SeekRel if
- //impossibly unavailble
+ // reduce by 32bit length itself, skip in SeekRel if
+ // impossibly unavailble
sal_uInt32 nRemainder = length >= 4 ? length-4 : length;
const size_t nRequiredHeaderSize = 12;
@@ -285,11 +285,11 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
EMFP_DEBUG(printf ("\t\tEMF+ lock DC (device context)\n"));
}
- //Get the length of the remaining data of this record based
- //on the alleged size
+ // Get the length of the remaining data of this record based
+ // on the alleged size
sal_uInt32 nRemainingRecordData = size >= nRequiredHeaderSize ?
size-nRequiredHeaderSize : 0;
- //clip to available size
+ // clip to available size
nRemainingRecordData = std::min(nRemainingRecordData, nRemainder);
pWMF->SeekRel(nRemainingRecordData);
nRemainder -= nRemainingRecordData;
@@ -394,13 +394,13 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) &&
( ( nPoly * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) ))
{
- //Get number of points in each polygon
+ // Get number of points in each polygon
sal_uInt16 * pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly && pWMF->good(); i++ )
{
*pWMF >> nPoints;
pnPoints[ i ] = (sal_uInt16)nPoints;
- } //end for
+ }
if ( pWMF->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) <= ( nEndPos - pWMF->Tell() ) )
{
// Get polygon points
@@ -410,14 +410,14 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
T nX, nY;
*pWMF >> nX >> nY;
pPtAry[ i ] = Point( nX, nY );
- } //end for
+ }
// Create PolyPolygon Actions
PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
delete[] pPtAry;
- } //end if
+ }
delete[] pnPoints;
- } //end if
+ }
}
sal_Bool EnhWMFReader::ReadEnhWMF()
@@ -475,12 +475,12 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
EMFP_DEBUG(printf ("\t\tbegin %c%c%c%c id: 0x%x\n", (char)(id & 0xff), (char)((id & 0xff00) >> 8), (char)((id & 0xff0000) >> 16), (char)((id & 0xff000000) >> 24), (unsigned int)id));
- // EMF+ comment (fixme: BE?)
+ // EMF+ comment (FIXME: BE?)
if( id == 0x2B464D45 && nRecSize >= 12 )
ReadEMFPlusComment( length, bHaveDC );
// GDIC comment, doesn't do anything useful yet
else if( id == 0x43494447 && nRecSize >= 12 ) {
- //ToDo: ReadGDIComment()
+ // TODO: ReadGDIComment()
} else {
EMFP_DEBUG(printf ("\t\tunknown id: 0x%x\n",(unsigned int) id));
}
@@ -685,7 +685,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
LineInfo aLineInfo;
sal_uInt32 nStyle;
Size aSize;
- //#fdo39428 Remove SvStream operator>>(long&)
+ // #fdo39428 Remove SvStream operator>>(long&)
sal_Int32 nTmpW(0), nTmpH(0);
*pWMF >> nStyle >> nTmpW >> nTmpH;
@@ -1338,7 +1338,6 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
return bStatus;
};
-//-----------------------------------------------------------------------------------
sal_Bool EnhWMFReader::ReadHeader()
{
@@ -1367,12 +1366,12 @@ sal_Bool EnhWMFReader::ReadHeader()
rclFrame.Right() = nRight;
rclFrame.Bottom() = nBottom;
- *pWMF >> nsal_uInt32; // signature
+ *pWMF >> nsal_uInt32; // signature
if ( nsal_uInt32 != 0x464d4520 )
return sal_False;
- *pWMF >> nsal_uInt32; // nVersion
+ *pWMF >> nsal_uInt32; // nVersion
*pWMF >> nEndPos; // size of metafile
nEndPos += nStartPos;
@@ -1401,7 +1400,6 @@ sal_Bool EnhWMFReader::ReadHeader()
return sal_True;
}
-//-----------------------------------------------------------------------------------
Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
{
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 63af42605fa3..1fc47f55df34 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -30,7 +30,6 @@
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
-// ------------------------------------------------------------------------
#if OSL_DEBUG_LEVEL > 1
#define EMFP_DEBUG(x) x
@@ -90,7 +89,6 @@ basegfx::B2DPolyPolygon WinMtfClipPath::getClipPath() const
return maClip.getClipPoly();
}
-// ------------------------------------------------------------------------
void WinMtfPathObj::AddPoint( const Point& rPoint )
{
@@ -139,7 +137,6 @@ void WinMtfPathObj::ClosePath()
bClosed = sal_True;
}
-// ------------------------------------------------------------------------
WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
{
@@ -267,7 +264,6 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
aFont.SetSize( aFontSize );
};
-// ------------------------------------------------------------------------
#ifdef WIN_MTF_ASSERT
void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags )
@@ -294,7 +290,6 @@ void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags )
}
#endif
-// ------------------------------------------------------------------------
WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) :
pOut ( pWinMtfOutput ),
@@ -303,7 +298,7 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigI
{
#ifdef WIN_MTF_ASSERT
// we want to assert not implemented features, but we do this
- // only once, so that nobody is handicaped by getting too much assertions
+ // only once, so that nobody is handicapped by getting too many assertions
// I hope this will bring more testdocuments, without support of these
// testdocuments the implementation of missing features won't be possible. (SJ)
WinMtfAssertHandler( NULL, WIN_MTF_ASSERT_INIT | WIN_MTF_ASSERT_ONCE );
@@ -327,7 +322,6 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigI
}
}
-// ------------------------------------------------------------------------
WinMtf::~WinMtf()
{
@@ -337,7 +331,6 @@ WinMtf::~WinMtf()
xStatusIndicator->end();
}
-// ------------------------------------------------------------------------
void WinMtf::Callback( sal_uInt16 nPercent )
{
@@ -345,7 +338,6 @@ void WinMtf::Callback( sal_uInt16 nPercent )
xStatusIndicator->setValue( nPercent );
}
-// ------------------------------------------------------------------------
Color WinMtf::ReadColor()
{
@@ -354,11 +346,8 @@ Color WinMtf::ReadColor()
return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
};
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
-Point WinMtfOutput::ImplScale( const Point& rPt)//Hack to set varying defaults for incompletely defined files.
+Point WinMtfOutput::ImplScale( const Point& rPt) // Hack to set varying defaults for incompletely defined files.
{
if (mbIsMapDevSet && mbIsMapWinSet)
{
@@ -370,7 +359,6 @@ Point WinMtfOutput::ImplScale( const Point& rPt)//Hack to set varying defaults f
}
}
-//-----------------------------------------------------------------------------------
Point WinMtfOutput::ImplMap( const Point& rPt )
{
@@ -439,7 +427,7 @@ Point WinMtfOutput::ImplMap( const Point& rPt )
fY2 += mnDevOrgY;
}
break;
- case MM_HIMETRIC : //in hundredth of a millimeter
+ case MM_HIMETRIC : // in hundredth of a millimeter
{
fX2 -= mnWinOrgX;
fY2 = mnWinOrgY-fY2;
@@ -471,7 +459,6 @@ Point WinMtfOutput::ImplMap( const Point& rPt )
return Point();
};
-// ------------------------------------------------------------------------
Size WinMtfOutput::ImplMap( const Size& rSz )
{
@@ -511,7 +498,7 @@ Size WinMtfOutput::ImplMap( const Size& rSz )
fHeight*=-10;
}
break;
- case MM_HIMETRIC : //in hundredth of millimeters
+ case MM_HIMETRIC : // in hundredth of millimeters
{
fHeight *= -1;
}
@@ -540,20 +527,17 @@ Size WinMtfOutput::ImplMap( const Size& rSz )
return Size();
}
-//-----------------------------------------------------------------------------------
Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect )
{
return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::ImplMap( Font& rFont )
{
- // !!! HACK: Wir setzen die Breite jetzt immer auf Null,
- // da OS die Breite unterschiedlich interpretieren;
- // muss spaeter in SV portabel gemacht werden ( KA 08.02.96 )
+ // !!! HACK: we now always set the width to zero because the OS width is interpreted differently;
+ // must later be made portable in SV (CA 08/02/96)
Size aFontSize = ImplMap ( rFont.GetSize() );
if( aFontSize.Height() < 0 )
@@ -565,8 +549,6 @@ void WinMtfOutput::ImplMap( Font& rFont )
rFont.SetOrientation( 3600 - rFont.GetOrientation() );
}
-//-----------------------------------------------------------------------------------
-
Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
{
sal_uInt16 nPoints = rPolygon.GetSize();
@@ -577,7 +559,6 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
return rPolygon;
}
-//-----------------------------------------------------------------------------------
Polygon& WinMtfOutput::ImplScale( Polygon& rPolygon )
{
@@ -589,7 +570,6 @@ Polygon& WinMtfOutput::ImplScale( Polygon& rPolygon )
return rPolygon;
}
-//-----------------------------------------------------------------------------------
PolyPolygon& WinMtfOutput::ImplScale( PolyPolygon& rPolyPolygon )
{
@@ -598,7 +578,6 @@ PolyPolygon& WinMtfOutput::ImplScale( PolyPolygon& rPolyPolygon )
return rPolyPolygon;
}
-//-----------------------------------------------------------------------------------
PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon )
{
@@ -607,7 +586,6 @@ PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon )
return rPolyPolygon;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::SelectObject( sal_Int32 nIndex )
{
@@ -617,7 +595,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
pGDIObj = new GDIObj();
else
{
- nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen
+ nIndex &= 0xffff; // safety check: don't allow index to be > 65535
if ( (sal_uInt32)nIndex < vGDIObj.size() )
pGDIObj = vGDIObj[ nIndex ];
@@ -700,49 +678,42 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
delete pGDIObj;
}
-//-----------------------------------------------------------------------------------
const Font& WinMtfOutput::GetFont() const
{
return maFont;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::SetTextLayoutMode( const sal_uInt32 nTextLayoutMode )
{
mnTextLayoutMode = nTextLayoutMode;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::SetBkMode( sal_uInt32 nMode )
{
mnBkMode = nMode;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::SetBkColor( const Color& rColor )
{
maBkColor = rColor;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::SetTextColor( const Color& rColor )
{
maTextColor = rColor;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign )
{
mnTextAlign = nAlign;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
{
@@ -752,7 +723,6 @@ void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
vGDIObj[ i ] = NULL;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly )
{
@@ -784,7 +754,6 @@ void WinMtfOutput::ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly )
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
{
@@ -822,13 +791,12 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
vGDIObj[ nIndex ] = new GDIObj( eType, pStyle );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pStyle )
{
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
- nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen
+ nIndex &= 0xffff; // safety check: do not allow index to be > 65535
if ( pStyle )
{
if ( eType == GDI_FONT )
@@ -876,7 +844,6 @@ void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pS
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
{
@@ -890,7 +857,6 @@ void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
{
@@ -902,7 +868,6 @@ void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
aClipPath.intersectClipRect( ImplMap( rRect ) );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect )
{
@@ -910,7 +875,6 @@ void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect )
aClipPath.excludeClipRect( ImplMap( rRect ) );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::MoveClipRegion( const Size& rSize )
{
@@ -933,9 +897,6 @@ void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClip
}
}
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
mnLatestTextAlign ( 0 ),
@@ -977,8 +938,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
// this is necessary to be able to support
// SetClipRgn( NULL ) and similar ClipRgn actions (SJ)
- maFont.SetName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using
- maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); // the default font then most times a x11 font is used, we
+ maFont.SetName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using
+ maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); // the default font then most times a x11 font is used, we
maFont.SetHeight( 423 ); // will prevent this defining a font
maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 );
@@ -988,7 +949,6 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
SetRasterOp( R2_BLACK );
};
-//-----------------------------------------------------------------------------------
WinMtfOutput::~WinMtfOutput()
{
@@ -1003,7 +963,6 @@ WinMtfOutput::~WinMtfOutput()
delete vGDIObj[ i ];
};
-//-----------------------------------------------------------------------------------
void WinMtfOutput::UpdateClipRegion()
{
@@ -1012,7 +971,7 @@ void WinMtfOutput::UpdateClipRegion()
mbClipNeedsUpdate = false;
mbComplexClip = false;
- mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the orignal clipregion
+ mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the original clipregion
mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); //
// skip for 'no clipping at all' case
@@ -1030,7 +989,6 @@ void WinMtfOutput::UpdateClipRegion()
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz()
{
@@ -1043,7 +1001,6 @@ void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz()
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::UpdateLineStyle()
{
@@ -1054,7 +1011,6 @@ void WinMtfOutput::UpdateLineStyle()
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::UpdateFillStyle()
{
@@ -1068,7 +1024,6 @@ void WinMtfOutput::UpdateFillStyle()
}
}
-//-----------------------------------------------------------------------------------
sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp )
{
@@ -1080,8 +1035,7 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp )
static WinMtfLineStyle aNopLineStyle;
if ( mbNopMode && ( nRasterOp != R2_NOP ) )
- { // beim uebergang von R2_NOP auf anderen Modus
- // gesetzten Pen und Brush aktivieren
+ { // changing modes from R2_NOP so set pen and brush
maFillStyle = aNopFillStyle;
maLineStyle = aNopLineStyle;
mbNopMode = sal_False;
@@ -1120,7 +1074,6 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp )
return nRetROP;
};
-//-----------------------------------------------------------------------------------
void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill )
{
@@ -1154,14 +1107,12 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill )
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawPixel( const Point& rSource, const Color& rColor )
{
mpGDIMetaFile->AddAction( new MetaPixelAction( ImplMap( rSource), rColor ) );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath )
{
@@ -1177,7 +1128,6 @@ void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath )
maActPos = aDest;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath )
{
@@ -1193,7 +1143,6 @@ void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath )
maActPos = aDest;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge )
{
@@ -1233,7 +1182,6 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge )
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
{
@@ -1243,7 +1191,6 @@ void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
{
@@ -1267,7 +1214,6 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo )
{
@@ -1298,7 +1244,6 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P
maActPos = aEnd;
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
@@ -1323,7 +1268,6 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
@@ -1348,7 +1292,6 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath )
{
@@ -1422,7 +1365,6 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath )
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath )
{
@@ -1450,7 +1392,6 @@ void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordP
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath )
{
@@ -1471,7 +1412,6 @@ void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bReco
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath )
{
@@ -1503,7 +1443,6 @@ void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRe
}
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry, sal_Bool bRecordPath, sal_Int32 nGfxMode )
{
@@ -1645,7 +1584,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
}
if ( bRecordPath )
{
- // ToDo
+ // TODO
}
else
{
@@ -1670,7 +1609,6 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
SetGfxMode( nOldGfxMode );
}
-//-----------------------------------------------------------------------------------
void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap )
{
@@ -1715,7 +1653,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B
mpGDIMetaFile->AddAction( new MetaBmpScaleAction( rPos, rSize, aBmpEx.GetBitmap() ) );
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList )
{
@@ -1941,7 +1879,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList )
rSaveList.clear();
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetDevOrg( const Point& rPoint )
{
@@ -1949,7 +1887,7 @@ void WinMtfOutput::SetDevOrg( const Point& rPoint )
mnDevOrgY = rPoint.Y();
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
{
@@ -1957,7 +1895,7 @@ void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
mnDevOrgY += nYAdd;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular)
{
@@ -1979,7 +1917,7 @@ void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular)
}
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::ScaleDevExt( double fX, double fY )
{
@@ -1987,7 +1925,7 @@ void WinMtfOutput::ScaleDevExt( double fX, double fY )
mnDevHeight = FRound( mnDevHeight * fY );
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF)
{
@@ -2000,7 +1938,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF)
mbIsMapWinSet=sal_True;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
{
@@ -2008,7 +1946,7 @@ void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
mnWinOrgY += nYAdd;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetDevByWin() //mnWinExt...-stuff has to be assigned before.
{
@@ -2021,7 +1959,7 @@ void WinMtfOutput::SetDevByWin() //mnWinExt...-stuff has to be assigned before.
}
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF )
{
@@ -2044,7 +1982,7 @@ void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF )
}
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::ScaleWinExt( double fX, double fY )
{
@@ -2052,21 +1990,21 @@ void WinMtfOutput::ScaleWinExt( double fX, double fY )
mnWinExtY = FRound( mnWinExtY * fY );
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetrclBounds( const Rectangle& rRect )
{
mrclBounds = rRect;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetrclFrame( const Rectangle& rRect )
{
mrclFrame = rRect;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetRefPix( const Size& rSize )
{
@@ -2074,7 +2012,7 @@ void WinMtfOutput::SetRefPix( const Size& rSize )
mnPixY = rSize.Height();
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetRefMill( const Size& rSize )
{
@@ -2082,7 +2020,7 @@ void WinMtfOutput::SetRefMill( const Size& rSize )
mnMillY = rSize.Height();
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode )
{
@@ -2099,7 +2037,7 @@ void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode )
}
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetUnitsPerInch( sal_uInt16 nUnitsPerInch )
{
@@ -2107,7 +2045,7 @@ void WinMtfOutput::SetUnitsPerInch( sal_uInt16 nUnitsPerInch )
mnUnitsPerInch = nUnitsPerInch;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::SetWorldTransform( const XForm& rXForm )
{
@@ -2119,7 +2057,7 @@ void WinMtfOutput::SetWorldTransform( const XForm& rXForm )
maXForm.eDy = rXForm.eDy;
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode )
{
@@ -2194,7 +2132,7 @@ void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode )
}
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::Push() // !! to be able to access the original ClipRegion it
{ // is not allowed to use the MetaPushAction()
@@ -2233,14 +2171,14 @@ void WinMtfOutput::Push() // !! to be able to access the o
vSaveStack.push_back( pSave );
}
-//-----------------------------------------------------------------------------------
+
void WinMtfOutput::Pop()
{
- // Die aktuellen Daten vom Stack holen
+ // Get the latest data from the stack
if( !vSaveStack.empty() )
{
- // Die aktuelle Daten auf dem Stack sichern
+ // Backup the current data on the stack
SaveStructPtr pSave( vSaveStack.back() );
maLineStyle = pSave->aLineStyle;
diff --git a/vcl/source/gdi/imagerepository.cxx b/vcl/source/gdi/imagerepository.cxx
index 63aee8a202a0..3dc04e349d15 100644
--- a/vcl/source/gdi/imagerepository.cxx
+++ b/vcl/source/gdi/imagerepository.cxx
@@ -23,15 +23,8 @@
#include <vcl/svapp.hxx>
#include "impimagetree.hxx"
-//........................................................................
namespace vcl
{
-//........................................................................
-
- //====================================================================
- //= ImageRepository
- //====================================================================
- //--------------------------------------------------------------------
bool ImageRepository::loadImage( const OUString& _rName, BitmapEx& _out_rImage, bool _bSearchLanguageDependent, bool loadMissing )
{
OUString sCurrentSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyleName();
@@ -47,8 +40,6 @@ namespace vcl
return aImplImageTree->loadDefaultImage( sCurrentSymbolsStyle,_out_rImage);
}
-//........................................................................
} // namespace vcl
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index a081188181ba..ebac54121f83 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -32,58 +32,44 @@
#include <rtl/strbuf.hxx>
#endif
-//........................................................................
namespace vcl
{
-//........................................................................
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Exception;
namespace ScriptDirection = ::com::sun::star::i18n::ScriptDirection;
- //====================================================================
- //= DefaultTextLayout
- //====================================================================
- //--------------------------------------------------------------------
DefaultTextLayout::~DefaultTextLayout()
{
}
- //--------------------------------------------------------------------
long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return m_rTargetDevice.GetTextWidth( _rText, _nStartIndex, _nLength );
}
- //--------------------------------------------------------------------
void DefaultTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex,
sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText )
{
m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
}
- //--------------------------------------------------------------------
bool DefaultTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return m_rTargetDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
}
- //--------------------------------------------------------------------
xub_StrLen DefaultTextLayout::GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return m_rTargetDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
}
- //--------------------------------------------------------------------
bool DefaultTextLayout::DecomposeTextRectAction() const
{
return false;
}
- //====================================================================
- //= ReferenceDeviceTextLayout
- //====================================================================
class ReferenceDeviceTextLayout : public ITextLayout
{
public:
@@ -122,9 +108,6 @@ namespace vcl
Rectangle m_aCompleteTextRect;
};
- //====================================================================
- //= ControlTextRenderer
- //====================================================================
ReferenceDeviceTextLayout::ReferenceDeviceTextLayout( const Control& _rControl, OutputDevice& _rTargetDevice,
OutputDevice& _rReferenceDevice )
:m_rTargetDevice( _rTargetDevice )
@@ -170,17 +153,14 @@ namespace vcl
m_rReferenceDevice.SetFont( aRefFont );
}
- //--------------------------------------------------------------------
ReferenceDeviceTextLayout::~ReferenceDeviceTextLayout()
{
m_rReferenceDevice.Pop();
m_rTargetDevice.Pop();
}
- //--------------------------------------------------------------------
namespace
{
- //................................................................
bool lcl_normalizeLength( const OUString& _rText, const sal_Int32 _nStartIndex, sal_Int32& _io_nLength )
{
sal_Int32 nTextLength = _rText.getLength();
@@ -192,7 +172,6 @@ namespace vcl
}
}
- //--------------------------------------------------------------------
long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, sal_Int32* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -222,13 +201,11 @@ namespace vcl
return nTextWidth;
}
- //--------------------------------------------------------------------
long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return GetTextArray( _rText, NULL, _nStartIndex, _nLength );
}
- //--------------------------------------------------------------------
void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText )
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -253,7 +230,6 @@ namespace vcl
m_aCompleteTextRect.Union( Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
}
- //--------------------------------------------------------------------
bool ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
@@ -267,7 +243,6 @@ namespace vcl
return true;
}
- //--------------------------------------------------------------------
xub_StrLen ReferenceDeviceTextLayout::GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -276,13 +251,11 @@ namespace vcl
return m_rReferenceDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
}
- //--------------------------------------------------------------------
bool ReferenceDeviceTextLayout::DecomposeTextRectAction() const
{
return true;
}
- //--------------------------------------------------------------------
Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const OUString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText )
{
if ( _rText.isEmpty() )
@@ -292,11 +265,10 @@ namespace vcl
sal_uLong nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
m_rTargetDevice.SetLayoutMode( nTextLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT );
- // TEXT_LAYOUT_TEXTORIGIN_LEFT is because when we do actually draw the text (in DrawText( Point, ... )), then
- // our caller gives us the left border of the draw position, regardless of script type, text layout,
- // and the like
- // in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
+ // TEXT_LAYOUT_TEXTORIGIN_LEFT is because when we do actually draw the text (in DrawText( Point, ... )), then
+ // our caller gives us the left border of the draw position, regardless of script type, text layout,
+ // and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
// but passed pixel coordinates. So, adjust the rect.
Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
@@ -334,29 +306,21 @@ namespace vcl
return aTextRect;
}
- //====================================================================
- //= ControlTextRenderer
- //====================================================================
- //--------------------------------------------------------------------
ControlTextRenderer::ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice )
:m_pImpl( new ReferenceDeviceTextLayout( _rControl, _rTargetDevice, _rReferenceDevice ) )
{
}
- //--------------------------------------------------------------------
ControlTextRenderer::~ControlTextRenderer()
{
}
- //--------------------------------------------------------------------
Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle,
MetricVector* _pVector, OUString* _pDisplayText )
{
return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText );
}
-//........................................................................
} // namespace vcl
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index d05f7e78bfb3..4218cb1a692e 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -218,13 +218,11 @@ namespace vcl
return ::BitmapEx();
// tunnel directly for known implementation
- // ----------------------------------------------------------------
VclCanvasBitmap* pImplBitmap = dynamic_cast<VclCanvasBitmap*>(xInputBitmap.get());
if( pImplBitmap )
return pImplBitmap->getBitmapEx();
// retrieve data via UNO interface
- // ----------------------------------------------------------------
// volatile bitmaps are a bit more complicated to read
// from..
@@ -358,7 +356,6 @@ namespace vcl
return ::BitmapEx();
}
- //---------------------------------------------------------------------------------------
geometry::RealSize2D size2DFromSize( const Size& rSize )
{
@@ -603,7 +600,6 @@ namespace vcl
return new StandardColorSpace();
}
- //---------------------------------------------------------------------------------------
Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor )
{
@@ -648,7 +644,6 @@ namespace vcl
toByteColor(aARGBColor.Blue) );
}
- //---------------------------------------------------------------------------------------
} // namespace vcltools
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index 2fc66cbde557..1c834804e7e6 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -23,14 +23,8 @@
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
-//........................................................................
namespace vcl
{
-//........................................................................
-
- //====================================================================
- //= MnemonicEngine_Data
- //====================================================================
struct MnemonicEngine_Data
{
IMnemonicEntryList& rEntryList;
@@ -41,7 +35,6 @@ namespace vcl
}
};
- //--------------------------------------------------------------------
namespace
{
const void* lcl_getEntryForMnemonic( IMnemonicEntryList& _rEntryList, sal_Unicode _cMnemonic, bool& _rbAmbiguous )
@@ -80,16 +73,11 @@ namespace vcl
}
}
- //====================================================================
- //= MnemonicEngine
- //====================================================================
- //--------------------------------------------------------------------
MnemonicEngine::MnemonicEngine( IMnemonicEntryList& _rEntryList )
:m_pData( new MnemonicEngine_Data( _rEntryList ) )
{
}
- //--------------------------------------------------------------------
bool MnemonicEngine::HandleKeyEvent( const KeyEvent& _rKEvt )
{
sal_Bool bAccelKey = _rKEvt.GetKeyCode().IsMod2();
@@ -110,13 +98,10 @@ namespace vcl
return true;
}
- //--------------------------------------------------------------------
MnemonicEngine::~MnemonicEngine()
{
}
-//........................................................................
} // namespace vcl
-//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */