Kaydet (Commit) 8848c6ec authored tarafından Matthias Freund's avatar Matthias Freund Kaydeden (comit) Thomas Arnhold

fdo#39468 Comment translation GER-ENG in svx/source/gallery2/

Translate some german comments and remove ascii art. :-)

Change-Id: Ie0ba349b95e4f73aea7b6e20ed3fc86ded14c444
Reviewed-on: https://gerrit.libreoffice.org/5870Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 5ba5c492
......@@ -34,7 +34,6 @@ namespace svx { namespace sidebar {
static const sal_Int32 gnInitialVerticalSplitPosition (150);
GalleryControl::GalleryControl (
SfxBindings* /*pBindings*/,
Window* pParentWindow)
......@@ -68,16 +67,10 @@ GalleryControl::GalleryControl (
InitSettings();
}
GalleryControl::~GalleryControl (void)
{
}
void GalleryControl::InitSettings (void)
{
SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
......@@ -102,9 +95,6 @@ void GalleryControl::InitSettings (void)
mpBrowser2->SetBackground(aBackground);
}
void GalleryControl::Resize (void)
{
// call parent
......@@ -180,9 +170,6 @@ void GalleryControl::Resize (void)
maLastSize = aNewSize;
}
sal_Bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, Window* )
{
const sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
......@@ -218,24 +205,17 @@ sal_Bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, Window* )
return bRet;
}
void GalleryControl::GetFocus (void)
{
Window::GetFocus();
mpBrowser1->GrabFocus();
}
void GalleryControl::ThemeSelectionHasChanged (void)
{
mpBrowser2->SelectTheme(mpBrowser1->GetSelectedTheme());
}
IMPL_LINK( GalleryControl, SplitHdl, void*, EMPTYARG )
{
if(mpSplitter->IsHorizontal())
......
......@@ -31,17 +31,11 @@ GallerySplitter::GallerySplitter(
DBG_CTOR(GallerySplitter,NULL);
}
GallerySplitter::~GallerySplitter()
{
DBG_DTOR(GallerySplitter,NULL);
}
void GallerySplitter::DataChanged( const DataChangedEvent& rDCEvt )
{
Splitter::DataChanged( rDCEvt );
......
......@@ -23,9 +23,8 @@
#include <tools/debug.hxx>
#include "codec.hxx"
// ----------------
// - GalleryCodec -
// ----------------
DBG_NAME(GalleryCodec)
GalleryCodec::GalleryCodec( SvStream& rIOStm ) :
......@@ -34,15 +33,11 @@ GalleryCodec::GalleryCodec( SvStream& rIOStm ) :
DBG_CTOR(GalleryCodec,NULL);
}
// -----------------------------------------------------------------------------
GalleryCodec::~GalleryCodec()
{
DBG_DTOR(GalleryCodec,NULL);
}
// -----------------------------------------------------------------------------
sal_Bool GalleryCodec::IsCoded( SvStream& rStm, sal_uInt32& rVersion )
{
const sal_uIntPtr nPos = rStm.Tell();
......@@ -67,8 +62,6 @@ sal_Bool GalleryCodec::IsCoded( SvStream& rStm, sal_uInt32& rVersion )
return bRet;
}
// -----------------------------------------------------------------------------
void GalleryCodec::Write( SvStream& rStmToWrite )
{
sal_uInt32 nPos, nCompSize;
......@@ -94,8 +87,6 @@ void GalleryCodec::Write( SvStream& rStmToWrite )
rStm.Seek( STREAM_SEEK_TO_END );
}
// -----------------------------------------------------------------------------
void GalleryCodec::Read( SvStream& rStmToRead )
{
sal_uInt32 nVersion = 0;
......@@ -128,16 +119,16 @@ void GalleryCodec::Read( SvStream& rStmToRead )
if ( nRunByte > 2 )
{
// absolutes Fuellen
// filling absolutely
memcpy( &pTmpBuf[ nIndex ], pInBuf, nRunByte );
pInBuf += nRunByte;
nIndex += nRunByte;
// WORD-Alignment beachten
// note WORD alignment
if ( nRunByte & 1 )
pInBuf++;
}
else if ( nRunByte == 1 ) // Ende des Bildes
else if ( nRunByte == 1 ) // End of the image
bEndDecoding = sal_True;
}
else
......
......@@ -19,10 +19,6 @@
#include <sal/types.h>
// ----------------
// - GalleryCodec -
// ----------------
class SvStream;
class GalleryCodec
......
......@@ -32,9 +32,6 @@
#include <boost/bind.hpp>
// -------------------------
// - SvxGalleryChildWindow -
// -------------------------
DBG_NAME(GalleryChildWindow)
GalleryChildWindow::GalleryChildWindow( Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
......@@ -47,20 +44,15 @@ GalleryChildWindow::GalleryChildWindow( Window* _pParent, sal_uInt16 nId, SfxBin
( (GalleryBrowser*) pWindow )->Initialize( pInfo );
};
// -----------------------------------------------------------------------------
GalleryChildWindow::~GalleryChildWindow()
{
DBG_DTOR(GalleryChildWindow,NULL);
}
// -----------------------------------------------------------------------------
SFX_IMPL_DOCKINGWINDOW_WITHID( GalleryChildWindow, SID_GALLERY )
// ------------------
// - GalleryBrowser -
// ------------------
DBG_NAME(GalleryBrowser)
GalleryBrowser::GalleryBrowser(
......@@ -103,8 +95,6 @@ GalleryBrowser::GalleryBrowser(
InitSettings();
}
// -----------------------------------------------------------------------------
GalleryBrowser::~GalleryBrowser()
{
delete mpBrowser2;
......@@ -114,8 +104,6 @@ GalleryBrowser::~GalleryBrowser()
DBG_DTOR(GalleryBrowser,NULL);
}
// -----------------------------------------------------------------------------
void GalleryBrowser::InitSettings()
{
SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
......@@ -135,8 +123,6 @@ void GalleryBrowser::InitSettings()
mpBrowser2->SetControlForeground( GALLERY_DLG_COLOR );
}
// -----------------------------------------------------------------------------
void GalleryBrowser::Resize()
{
// call parent
......@@ -199,8 +185,6 @@ void GalleryBrowser::Resize()
maLastSize = aNewSize;
}
// -----------------------------------------------------------------------------
sal_Bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* )
{
const sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
......@@ -236,30 +220,22 @@ sal_Bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* )
return bRet;
}
// -----------------------------------------------------------------------------
sal_Bool GalleryBrowser::Close()
{
return SfxDockingWindow::Close();
}
// -----------------------------------------------------------------------------
void GalleryBrowser::GetFocus()
{
SfxDockingWindow::GetFocus();
mpBrowser1->GrabFocus();
}
// -----------------------------------------------------------------------------
void GalleryBrowser::ThemeSelectionHasChanged()
{
mpBrowser2->SelectTheme( mpBrowser1->GetSelectedTheme() );
}
// -----------------------------------------------------------------------------
IMPL_LINK_NOARG(GalleryBrowser, SplitHdl)
{
if(mpSplitter->IsHorizontal())
......
......@@ -38,39 +38,29 @@
#include <svx/svxdlg.hxx>
// --------------
// - Namespaces -
// --------------
using namespace ::rtl;
using namespace ::com::sun::star;
// -----------------
// - GalleryButton -
// -----------------
GalleryButton::GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits ) :
PushButton( pParent, nWinBits )
{
}
// -----------------------------------------------------------------------------
GalleryButton::~GalleryButton()
{
}
// -----------------------------------------------------------------------------
void GalleryButton::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser1* >( GetParent() )->KeyInput( rKEvt, this ) )
PushButton::KeyInput( rKEvt );
}
// -----------------------
// - GalleryThemeListBox -
// -----------------------
GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits ) :
ListBox( pParent, nWinBits )
......@@ -78,14 +68,10 @@ GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWin
InitSettings();
}
// -----------------------------------------------------------------------------
GalleryThemeListBox::~GalleryThemeListBox()
{
}
// ------------------------------------------------------------------------
void GalleryThemeListBox::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
......@@ -93,8 +79,6 @@ void GalleryThemeListBox::InitSettings()
SetControlForeground( GALLERY_FG_COLOR );
}
// -----------------------------------------------------------------------
void GalleryThemeListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
......@@ -103,8 +87,6 @@ void GalleryThemeListBox::DataChanged( const DataChangedEvent& rDCEvt )
ListBox::DataChanged( rDCEvt );
}
// -----------------------------------------------------------------------------
long GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
{
long nDone = 0;
......@@ -127,9 +109,7 @@ long GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
return( nDone ? nDone : ListBox::PreNotify( rNEvt ) );
}
// -------------------
// - GalleryBrowser1 -
// -------------------
GalleryBrowser1::GalleryBrowser1(
Window* pParent,
......@@ -172,8 +152,6 @@ GalleryBrowser1::GalleryBrowser1(
mpThemes->Show( sal_True );
}
// -----------------------------------------------------------------------------
GalleryBrowser1::~GalleryBrowser1()
{
EndListening( *mpGallery );
......@@ -183,8 +161,6 @@ GalleryBrowser1::~GalleryBrowser1()
mpExchangeData = NULL;
}
// -----------------------------------------------------------------------------
sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry )
{
static const sal_Bool bShowHiddenThemes = ( getenv( "GALLERY_SHOW_HIDDEN_THEMES" ) != NULL );
......@@ -208,8 +184,6 @@ sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEnt
return nRet;
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ImplAdjustControls()
{
const Size aOutSize( GetOutputSizePixel() );
......@@ -223,8 +197,6 @@ void GalleryBrowser1::ImplAdjustControls()
Size( aOutSize.Width(), aOutSize.Height() - nStartY ) );
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData )
{
rData.pTheme = (GalleryTheme*) pThm;
......@@ -252,8 +224,6 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa
}
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec)
{
GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this );
......@@ -291,8 +261,6 @@ void GalleryBrowser1::ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec)
}
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, bool bCreateNew )
{
DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already set!");
......@@ -318,8 +286,6 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, b
}
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog, bool bCreateNew )
{
long nRet = pDialog->GetResult();
......@@ -363,24 +329,18 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog
Application::PostUserEvent( LINK( this, GalleryBrowser1, DestroyThemePropertiesDlgHdl ) );
}
// -----------------------------------------------------------------------------
IMPL_LINK( GalleryBrowser1, EndNewThemePropertiesDlgHdl, VclAbstractDialog2*, pDialog )
{
ImplEndGalleryThemeProperties( pDialog, true );
return 0L;
}
// -----------------------------------------------------------------------------
IMPL_LINK( GalleryBrowser1, EndThemePropertiesDlgHdl, VclAbstractDialog2*, pDialog )
{
ImplEndGalleryThemeProperties( pDialog, false );
return 0L;
}
// -----------------------------------------------------------------------------
IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, VclAbstractDialog2*, pDialog )
{
delete pDialog;
......@@ -389,8 +349,6 @@ IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, VclAbstractDialog2*, p
return 0L;
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ImplExecute( sal_uInt16 nId )
{
switch( nId )
......@@ -485,16 +443,12 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId )
}
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::Resize()
{
Control::Resize();
ImplAdjustControls();
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::GetFocus()
{
Control::GetFocus();
......@@ -502,8 +456,6 @@ void GalleryBrowser1::GetFocus()
mpThemes->GrabFocus();
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const GalleryHint& rGalleryHint = (const GalleryHint&) rHint;
......@@ -560,15 +512,11 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
// -----------------------------------------------------------------------------
void GalleryBrowser1::ShowContextMenu()
{
Application::PostUserEvent( LINK( this, GalleryBrowser1, ShowContextMenuHdl ), this );
}
// -----------------------------------------------------------------------------
sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow )
{
sal_Bool bRet (sal_False);
......@@ -638,8 +586,6 @@ sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow )
return bRet;
}
// -----------------------------------------------------------------------------
IMPL_LINK_NOARG(GalleryBrowser1, ShowContextMenuHdl)
{
::std::vector< sal_uInt16 > aExecVector;
......@@ -669,16 +615,12 @@ IMPL_LINK_NOARG(GalleryBrowser1, ShowContextMenuHdl)
return 0L;
}
// -----------------------------------------------------------------------------
IMPL_LINK( GalleryBrowser1, PopupMenuHdl, Menu*, pMenu )
{
ImplExecute( pMenu->GetCurItemId() );
return 0L;
}
// -----------------------------------------------------------------------------
IMPL_LINK_NOARG(GalleryBrowser1, SelectThemeHdl)
{
if (maThemeSlectionHandler)
......@@ -686,8 +628,6 @@ IMPL_LINK_NOARG(GalleryBrowser1, SelectThemeHdl)
return 0L;
}
// -----------------------------------------------------------------------------
IMPL_LINK_NOARG(GalleryBrowser1, ClickNewThemeHdl)
{
OUString aNewTheme( GAL_RESSTR(RID_SVXSTR_GALLERY_NEWTHEME) );
......
......@@ -26,9 +26,7 @@
#include <boost/function.hpp>
// -----------------
// - GalleryButton -
// -----------------
class GalleryButton : public PushButton
{
......@@ -42,9 +40,7 @@ public:
~GalleryButton();
};
// -----------------------
// - GalleryThemeListBox -
// -----------------------
class GalleryThemeListBox : public ListBox
{
......@@ -61,9 +57,7 @@ public:
~GalleryThemeListBox();
};
// -------------------
// - GalleryBrowser1 -
// -------------------
class Gallery;
class GalleryThemeEntry;
......
......@@ -32,9 +32,7 @@ namespace
class theLockListener : public rtl::Static< SfxListener, theLockListener > {};
}
// -------------------
// - GalleryExplorer -
// -------------------
bool GalleryExplorer::FillThemeList( std::vector<String>& rThemeList )
{
......@@ -54,8 +52,6 @@ bool GalleryExplorer::FillThemeList( std::vector<String>& rThemeList )
return !rThemeList.empty();
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector<String> &rObjList )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -77,8 +73,6 @@ sal_Bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector<S
return !rObjList.empty();
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<String> &rObjList )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -105,8 +99,6 @@ bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<OUStri
return true;
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -133,8 +125,6 @@ sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vect
return !rList.empty();
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString& rURL )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -157,16 +147,12 @@ sal_Bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString&
return bRet;
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const OUString& rURL )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL ) : sal_False );
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos,
Graphic* pGraphic, BitmapEx* pThumb,
sal_Bool bProgress )
......@@ -194,8 +180,6 @@ sal_Bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr
return bRet;
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos,
Graphic* pGraphic, BitmapEx* pThumb,
sal_Bool bProgress )
......@@ -204,8 +188,6 @@ sal_Bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos,
return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : sal_False );
}
// ------------------------------------------------------------------------
sal_uIntPtr GalleryExplorer::GetSdrObjCount( const OUString& rThemeName )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -229,16 +211,12 @@ sal_uIntPtr GalleryExplorer::GetSdrObjCount( const OUString& rThemeName )
return nRet;
}
// ------------------------------------------------------------------------
sal_uIntPtr GalleryExplorer::GetSdrObjCount( sal_uIntPtr nThemeId )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False );
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos,
SdrModel* pModel, BitmapEx* pThumb )
{
......@@ -274,8 +252,6 @@ sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSd
return bRet;
}
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos,
SdrModel* pModel, BitmapEx* pThumb )
{
......@@ -283,8 +259,6 @@ sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModel
return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : sal_False );
}
// -----------------------------------------------------------------------------
sal_Bool GalleryExplorer::BeginLocking( const OUString& rThemeName )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -304,16 +278,12 @@ sal_Bool GalleryExplorer::BeginLocking( const OUString& rThemeName )
return bRet;
}
// -----------------------------------------------------------------------------
sal_Bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : sal_False );
}
// -----------------------------------------------------------------------------
sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......@@ -343,8 +313,6 @@ sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName )
return bRet;
}
// -----------------------------------------------------------------------------
sal_Bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
......
......@@ -21,8 +21,6 @@
#include "helpid.hrc"
#include "gallery.hrc"
/******************************************************************************/
#define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
DockingWindow RID_SVXDLG_GALLERYBROWSER
......@@ -63,8 +61,6 @@ DockingWindow RID_SVXDLG_GALLERYBROWSER
};
};
/******************************************************************************/
String RID_SVXSTR_GALLERY_ACTUALIZE_PROGRESS
{
Text [ en-US ] = "Update";
......@@ -170,8 +166,6 @@ String RID_SVXSTR_GALLERY_LISTVIEW
Text [ en-US ] = "Detailed View";
};
/******************************************************************************/
Bitmap RID_SVXBMP_GALLERY
{
File = "lx03135.bmp" ;
......@@ -244,8 +238,6 @@ Image RID_SVXIMG_GALLERY_VIEW_LIST
MASKCOLOR
};
/******************************************************************************/
Menu RID_SVXMN_GALLERY1
{
ItemList =
......@@ -294,8 +286,6 @@ Menu RID_SVXMN_GALLERY1
};
};
/******************************************************************************/
Menu RID_SVXMN_GALLERY2
{
ItemList =
......
......@@ -34,16 +34,12 @@
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
// --------------
// - Namespaces -
// --------------
using namespace ::rtl;
using namespace ::com::sun::star;
// ---------------------
// - GalleryThemeEntry -
// ---------------------
GalleryThemeEntry::GalleryThemeEntry( const INetURLObject& rBaseURL, const OUString& rName,
sal_Bool _bReadOnly, sal_Bool _bNewFile,
......@@ -80,8 +76,6 @@ GalleryThemeEntry::GalleryThemeEntry( const INetURLObject& rBaseURL, const OUStr
aName = rName;
}
// -----------------------------------------------------------------------------
INetURLObject GalleryThemeEntry::ImplGetURLIgnoreCase( const INetURLObject& rURL ) const
{
INetURLObject aURL( rURL );
......@@ -102,8 +96,6 @@ INetURLObject GalleryThemeEntry::ImplGetURLIgnoreCase( const INetURLObject& rURL
return aURL;
}
// -----------------------------------------------------------------------------
void GalleryThemeEntry::SetName( const OUString& rNewName )
{
if( aName != rNewName )
......@@ -114,8 +106,6 @@ void GalleryThemeEntry::SetName( const OUString& rNewName )
}
}
// -----------------------------------------------------------------------------
void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName )
{
nId = nNewId;
......@@ -123,9 +113,7 @@ void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName )
bThemeNameFromResource = ( nId && bResetThemeName );
}
// --------------------------
// - GalleryThemeCacheEntry -
// --------------------------
class GalleryThemeCacheEntry
{
......@@ -144,9 +132,7 @@ public:
GalleryTheme* GetTheme() const { return mpTheme; }
};
// -----------
// - Gallery -
// -----------
Gallery::Gallery( const OUString& rMultiPath )
: nReadTextEncoding ( osl_getThreadTextEncoding() )
......@@ -155,18 +141,14 @@ Gallery::Gallery( const OUString& rMultiPath )
ImplLoad( rMultiPath );
}
// ------------------------------------------------------------------------
Gallery::~Gallery()
{
// Themen-Liste loeschen
// erase theme list
for ( size_t i = 0, n = aThemeList.size(); i < n; ++i )
delete aThemeList[ i ];
aThemeList.clear();
}
// ------------------------------------------------------------------------
Gallery* Gallery::GetGalleryInstance()
{
static Gallery* pGallery = NULL;
......@@ -183,8 +165,6 @@ Gallery* Gallery::GetGalleryInstance()
return pGallery;
}
// ------------------------------------------------------------------------
void Gallery::ImplLoad( const OUString& rMultiPath )
{
const sal_Int32 nTokenCount = comphelper::string::getTokenCount(rMultiPath, ';');
......@@ -219,8 +199,6 @@ void Gallery::ImplLoad( const OUString& rMultiPath )
DBG_ASSERT( aRelURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
}
// ------------------------------------------------------------------------
void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsReadOnly )
{
rbDirIsReadOnly = sal_False;
......@@ -406,8 +384,6 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
}
}
// ------------------------------------------------------------------------
GalleryThemeEntry* Gallery::ImplGetThemeEntry( const OUString& rThemeName )
{
GalleryThemeEntry* pFound = NULL;
......@@ -422,8 +398,6 @@ GalleryThemeEntry* Gallery::ImplGetThemeEntry( const OUString& rThemeName )
return pFound;
}
// ------------------------------------------------------------------------
OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const
{
GalleryThemeEntry* pFound = NULL;
......@@ -503,15 +477,11 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const
return( pFound ? pFound->GetThemeName() : OUString() );
}
// ------------------------------------------------------------------------
sal_Bool Gallery::HasTheme( const OUString& rThemeName )
{
return( ImplGetThemeEntry( rThemeName ) != NULL );
}
// ------------------------------------------------------------------------
sal_Bool Gallery::CreateTheme( const OUString& rThemeName )
{
sal_Bool bRet = sal_False;
......@@ -532,14 +502,12 @@ sal_Bool Gallery::CreateTheme( const OUString& rThemeName )
return bRet;
}
// ------------------------------------------------------------------------
sal_Bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName )
{
GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName );
sal_Bool bRet = sal_False;
// Ueberpruefen, ob neuer Themenname schon vorhanden ist
// check if the new theme name is already present
if( pThemeEntry && !HasTheme( rNewName ) && !pThemeEntry->IsReadOnly() )
{
SfxListener aListener;
......@@ -561,8 +529,6 @@ sal_Bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewNam
return bRet;
}
// ------------------------------------------------------------------------
sal_Bool Gallery::RemoveTheme( const OUString& rThemeName )
{
GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName );
......@@ -607,8 +573,6 @@ sal_Bool Gallery::RemoveTheme( const OUString& rThemeName )
return bRet;
}
// ------------------------------------------------------------------------
GalleryTheme* Gallery::ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry )
{
GalleryTheme* pTheme = NULL;
......@@ -656,8 +620,6 @@ GalleryTheme* Gallery::ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry
return pTheme;
}
// ------------------------------------------------------------------------
void Gallery::ImplDeleteCachedTheme( GalleryTheme* pTheme )
{
for (GalleryCacheThemeList::iterator it = aThemeCache.begin(); it != aThemeCache.end(); ++it)
......@@ -671,8 +633,6 @@ void Gallery::ImplDeleteCachedTheme( GalleryTheme* pTheme )
}
}
// ------------------------------------------------------------------------
GalleryTheme* Gallery::AcquireTheme( const OUString& rThemeName, SfxListener& rListener )
{
GalleryTheme* pTheme = NULL;
......@@ -684,8 +644,6 @@ GalleryTheme* Gallery::AcquireTheme( const OUString& rThemeName, SfxListener& rL
return pTheme;
}
// ------------------------------------------------------------------------
void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener )
{
if( pTheme )
......
......@@ -47,17 +47,9 @@
#include <com/sun/star/ucb/TransferInfo.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
// --------------
// - Namespaces -
// --------------
using namespace ::rtl;
using namespace ::com::sun::star;
// ----------
// - ResMgr -
// ----------
ResMgr* GetGalleryResMgr()
{
static ResMgr* pGalleryResMgr = NULL;
......@@ -71,10 +63,6 @@ ResMgr* GetGalleryResMgr()
return pGalleryResMgr;
}
// -------------------------
// - GalleryResGetBitmapEx -
// -------------------------
BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId )
{
BitmapEx aBmpEx( GAL_RES( nId ) );
......@@ -85,10 +73,6 @@ BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId )
return aBmpEx;
}
// ----------------------
// - SgaUserDataFactory -
// ----------------------
IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory )
{
if ( pObjFactory->nInventor == IV_IMAPINFO && pObjFactory->nIdentifier == ID_IMAPINFO )
......@@ -97,10 +81,6 @@ IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory )
return 0L;
}
// ------------------------
// - GalleryGraphicImport -
// ------------------------
sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic,
OUString& rFilterName, sal_Bool bShowProgress )
{
......@@ -129,10 +109,6 @@ sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic,
return nRet;
}
// -----------------------
// - GallerySvDrawImport -
// -----------------------
sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
{
sal_uInt32 nVersion;
......@@ -177,10 +153,6 @@ sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
return bRet;
}
// ---------------------
// - CreateIMapGraphic -
// ---------------------
sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap )
{
sal_Bool bRet = sal_False;
......@@ -194,7 +166,7 @@ sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageM
{
const sal_uInt16 nCount = pObj->GetUserDataCount();
// gibt es in den User-Daten eine IMap-Information?
// Exist in the user data an IMap information?
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
const SdrObjUserData* pUserData = pObj->GetUserData( i );
......@@ -213,10 +185,6 @@ sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageM
return bRet;
}
// --------------------
// - GetReducedString -
// --------------------
OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
{
OUString aReduced( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
......@@ -243,8 +211,6 @@ OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
return aReduced;
}
// -----------------------------------------------------------------------------
String GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL )
{
OUString aRet;
......@@ -258,8 +224,6 @@ String GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL )
return aRet;
}
// -----------------------------------------------------------------------------
sal_Bool FileExists( const INetURLObject& rURL )
{
sal_Bool bRet = sal_False;
......@@ -288,8 +252,6 @@ sal_Bool FileExists( const INetURLObject& rURL )
return bRet;
}
// -----------------------------------------------------------------------------
sal_Bool CreateDir( const INetURLObject& rURL )
{
sal_Bool bRet = FileExists( rURL );
......@@ -325,8 +287,6 @@ sal_Bool CreateDir( const INetURLObject& rURL )
return bRet;
}
// -----------------------------------------------------------------------------
sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
{
sal_Bool bRet = sal_False;
......@@ -353,8 +313,6 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
return bRet;
}
// -----------------------------------------------------------------------------
sal_Bool KillFile( const INetURLObject& rURL )
{
sal_Bool bRet = FileExists( rURL );
......@@ -383,9 +341,6 @@ sal_Bool KillFile( const INetURLObject& rURL )
return bRet;
}
// -------------------
// - GalleryProgress -
// -------------------
DBG_NAME(GalleryProgress)
GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) :
......@@ -423,24 +378,17 @@ GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) :
}
}
// ------------------------------------------------------------------------
GalleryProgress::~GalleryProgress()
{
DBG_DTOR(GalleryProgress,NULL);
}
// ------------------------------------------------------------------------
void GalleryProgress::Update( sal_uIntPtr nVal, sal_uIntPtr nMaxVal )
{
if( mxProgressBar.is() && nMaxVal )
mxProgressBar->setValue( std::min( (sal_uIntPtr)( (double) nVal / nMaxVal * GALLERY_PROGRESS_RANGE ), (sal_uIntPtr) GALLERY_PROGRESS_RANGE ) );
}
// -----------------------
// - GalleryTransferable -
// -----------------------
DBG_NAME(GalleryTransferable)
GalleryTransferable::GalleryTransferable( GalleryTheme* pTheme, sal_uIntPtr nObjectPos, bool bLazy ) :
......@@ -456,15 +404,11 @@ GalleryTransferable::GalleryTransferable( GalleryTheme* pTheme, sal_uIntPtr nObj
InitData( bLazy );
}
// ------------------------------------------------------------------------
GalleryTransferable::~GalleryTransferable()
{
DBG_DTOR(GalleryTransferable,NULL);
}
// ------------------------------------------------------------------------
void GalleryTransferable::InitData( bool bLazy )
{
switch( meObjectKind )
......@@ -524,8 +468,6 @@ void GalleryTransferable::InitData( bool bLazy )
}
}
// ------------------------------------------------------------------------
void GalleryTransferable::AddSupportedFormats()
{
if( SGA_OBJ_SVDRAW == meObjectKind )
......@@ -558,8 +500,6 @@ void GalleryTransferable::AddSupportedFormats()
}
}
// ------------------------------------------------------------------------
sal_Bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor )
{
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
......@@ -596,8 +536,6 @@ sal_Bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor )
return bRet;
}
// ------------------------------------------------------------------------
sal_Bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject,
sal_uInt32, const datatransfer::DataFlavor& )
{
......@@ -612,8 +550,6 @@ sal_Bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pU
return bRet;
}
// ------------------------------------------------------------------------
void GalleryTransferable::DragFinished( sal_Int8 nDropAction )
{
mpTheme->SetDragging( sal_False );
......@@ -626,8 +562,6 @@ void GalleryTransferable::DragFinished( sal_Int8 nDropAction )
}
}
// ------------------------------------------------------------------------
void GalleryTransferable::ObjectReleased()
{
mxModelStream.Clear();
......@@ -636,15 +570,11 @@ void GalleryTransferable::ObjectReleased()
delete mpURL, mpURL = NULL;
}
// ------------------------------------------------------------------------
void GalleryTransferable::CopyToClipboard( Window* pWindow )
{
TransferableHelper::CopyToClipboard( pWindow );
}
// ------------------------------------------------------------------------
void GalleryTransferable::StartDrag( Window* pWindow, sal_Int8 nDragSourceActions,
sal_Int32 nDragPointer, sal_Int32 nDragImage )
{
......
......@@ -41,10 +41,6 @@
using namespace ::com::sun::star;
// -------------
// - SgaObject -
// -------------
SgaObject::SgaObject()
: bIsValid ( sal_False ),
bIsThumbBmp ( sal_True )
......@@ -93,8 +89,6 @@ BitmapEx SgaObject::createPreviewBitmapEx(const Size& rSizePixel) const
return aRetval;
}
// ------------------------------------------------------------------------
sal_Bool SgaObject::CreateThumb( const Graphic& rGraphic )
{
sal_Bool bRet = sal_False;
......@@ -173,8 +167,6 @@ sal_Bool SgaObject::CreateThumb( const Graphic& rGraphic )
return bRet;
}
// ------------------------------------------------------------------------
void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
static const sal_uInt32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' );
......@@ -203,8 +195,6 @@ void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aURLWithoutDestDir, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
{
sal_uInt32 nTmp32;
......@@ -225,8 +215,6 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
aURL = INetURLObject(aTmpStr);
}
// ------------------------------------------------------------------------
const OUString SgaObject::GetTitle() const
{
OUString aReturnValue( aTitle );
......@@ -259,23 +247,17 @@ const OUString SgaObject::GetTitle() const
return aReturnValue;
}
// ------------------------------------------------------------------------
void SgaObject::SetTitle( const OUString& rTitle )
{
aTitle = rTitle;
}
// ------------------------------------------------------------------------
SvStream& operator<<( SvStream& rOut, const SgaObject& rObj )
{
rObj.WriteData( rOut, "" );
return rOut;
}
// ------------------------------------------------------------------------
SvStream& operator>>( SvStream& rIn, SgaObject& rObj )
{
sal_uInt16 nReadVersion;
......@@ -286,16 +268,10 @@ SvStream& operator>>( SvStream& rIn, SgaObject& rObj )
return rIn;
}
// ----------------
// - SgaObjectBmp -
// ----------------
SgaObjectBmp::SgaObjectBmp()
{
}
// ------------------------------------------------------------------------
SgaObjectBmp::SgaObjectBmp( const INetURLObject& rURL )
{
Graphic aGraphic;
......@@ -305,27 +281,21 @@ SgaObjectBmp::SgaObjectBmp( const INetURLObject& rURL )
Init( aGraphic, rURL );
}
// ------------------------------------------------------------------------
SgaObjectBmp::SgaObjectBmp( const Graphic& rGraphic, const INetURLObject& rURL, const OUString& )
{
if( FileExists( rURL ) )
Init( rGraphic, rURL );
}
// ------------------------------------------------------------------------
void SgaObjectBmp::Init( const Graphic& rGraphic, const INetURLObject& rURL )
{
aURL = rURL;
bIsValid = CreateThumb( rGraphic );
}
// ------------------------------------------------------------------------
void SgaObjectBmp::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
// Version setzen
// Set version
SgaObject::WriteData( rOut, rDestDir );
char aDummy[ 10 ];
rOut.Write( aDummy, 10 );
......@@ -333,8 +303,6 @@ void SgaObjectBmp::WriteData( SvStream& rOut, const OUString& rDestDir ) const
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
void SgaObjectBmp::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
{
......@@ -346,9 +314,6 @@ void SgaObjectBmp::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
aTitle = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
}
// ------------------
// - SgaObjectSound -
// ------------------
DBG_NAME(SgaObjectSound)
SgaObjectSound::SgaObjectSound() :
......@@ -357,8 +322,6 @@ SgaObjectSound::SgaObjectSound() :
DBG_CTOR(SgaObjectSound,NULL);
}
// ------------------------------------------------------------------------
SgaObjectSound::SgaObjectSound( const INetURLObject& rURL ) :
eSoundType( SOUND_STANDARD )
{
......@@ -374,15 +337,11 @@ SgaObjectSound::SgaObjectSound( const INetURLObject& rURL ) :
bIsValid = sal_False;
}
// ------------------------------------------------------------------------
SgaObjectSound::~SgaObjectSound()
{
DBG_DTOR(SgaObjectSound,NULL);
}
// ------------------------------------------------------------------------
BitmapEx SgaObjectSound::GetThumbBmp() const
{
sal_uInt16 nId;
......@@ -408,8 +367,6 @@ BitmapEx SgaObjectSound::GetThumbBmp() const
return aBmpEx;
}
// ------------------------------------------------------------------------
void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
......@@ -417,8 +374,6 @@ void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) const
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
{
SgaObject::ReadData( rIn, rReadVersion );
......@@ -434,16 +389,10 @@ void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
}
}
// -----------------
// - SgaObjectAnim -
// -----------------
SgaObjectAnim::SgaObjectAnim()
{
}
// ------------------------------------------------------------------------
SgaObjectAnim::SgaObjectAnim( const Graphic& rGraphic,
const INetURLObject& rURL,
const OUString& )
......@@ -452,38 +401,25 @@ SgaObjectAnim::SgaObjectAnim( const Graphic& rGraphic,
bIsValid = CreateThumb( rGraphic );
}
// -----------------
// - SgaObjectINet -
// -----------------
SgaObjectINet::SgaObjectINet()
{
}
// ------------------------------------------------------------------------
SgaObjectINet::SgaObjectINet( const Graphic& rGraphic, const INetURLObject& rURL, const OUString& rFormatName ) :
SgaObjectAnim ( rGraphic, rURL, rFormatName )
{
}
// -------------------
// - SgaObjectSvDraw -
// -------------------
SgaObjectSvDraw::SgaObjectSvDraw()
{
}
// ------------------------------------------------------------------------
SgaObjectSvDraw::SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject& rURL )
{
aURL = rURL;
bIsValid = CreateThumb( rModel );
}
// ------------------------------------------------------------------------
DBG_NAME(SvxGalleryDrawModel)
SvxGalleryDrawModel::SvxGalleryDrawModel()
......@@ -512,8 +448,6 @@ SvxGalleryDrawModel::SvxGalleryDrawModel()
}
}
// ------------------------------------------------------------------------
SvxGalleryDrawModel::~SvxGalleryDrawModel()
{
if( mxDoc.Is() )
......@@ -522,8 +456,6 @@ SvxGalleryDrawModel::~SvxGalleryDrawModel()
DBG_DTOR(SvxGalleryDrawModel,NULL);
}
// ------------------------------------------------------------------------
SgaObjectSvDraw::SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL )
{
SvxGalleryDrawModel aModel;
......@@ -538,8 +470,6 @@ SgaObjectSvDraw::SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL )
}
}
// ------------------------------------------------------------------------
sal_Bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
{
Graphic aGraphic;
......@@ -597,16 +527,12 @@ sal_Bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
return bRet;
}
// ------------------------------------------------------------------------
void SgaObjectSvDraw::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
void SgaObjectSvDraw::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
{
SgaObject::ReadData( rIn, rReadVersion );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment