Files
libreoffice/cui/source/tabpages/tpbitmap.cxx

964 lines
30 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
2012-10-04 11:25:41 +01:00
/*
* This file is part of the LibreOffice project.
2009-10-31 00:36:06 +01:00
*
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
2012-10-04 11:25:41 +01:00
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
2009-10-31 00:36:06 +01:00
*
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
2012-10-04 11:25:41 +01:00
* This file incorporates work covered by the following license notice:
2009-10-31 00:36:06 +01:00
*
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
2012-10-04 11:25:41 +01:00
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2009-10-31 00:36:06 +01:00
#include <vcl/wrkwin.hxx>
#include <tools/shl.hxx>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/pathoptions.hxx>
#include <sfx2/app.hxx>
#include <sfx2/dialoghelper.hxx>
2009-10-31 00:36:06 +01:00
#include <sfx2/filedlghelper.hxx>
#include <unotools/localfilehelper.hxx>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <svx/dialmgr.hxx>
2009-10-31 00:36:06 +01:00
#include <vcl/bmpacc.hxx>
#include <svx/dialogs.hrc>
2009-10-31 00:36:06 +01:00
#include <cuires.hrc>
2009-10-31 00:36:06 +01:00
#include "helpid.hrc"
#include "svx/xattr.hxx"
#include <svx/xpool.hxx>
#include <svx/xtable.hxx>
#include "svx/xoutbmp.hxx"
#include "svx/drawitem.hxx"
#include "cuitabarea.hxx"
#include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx>
#include <dialmgr.hxx>
2010-01-14 18:08:36 +01:00
#include "sfx2/opengrf.hxx"
#include "paragrph.hrc"
2009-10-31 00:36:06 +01:00
SvxBitmapTabPage::SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs) :
SvxTabPage ( pParent,
"BitmapTabPage",
"cui/ui/bitmaptabpage.ui",
rInAttrs ),
2009-10-31 00:36:06 +01:00
rOutAttrs ( rInAttrs ),
pnBitmapListState ( 0 ),
pnColorListState ( 0 ),
pPageType ( 0 ),
pDlgType ( 0 ),
pbAreaTP ( 0 ),
bBmpChanged ( false ),
2009-10-31 00:36:06 +01:00
pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
aXFStyleItem ( XFILL_BITMAP ),
aXBitmapItem ( String(), Graphic() ),
2009-10-31 00:36:06 +01:00
aXFillAttr ( pXPool ),
rXFSet ( aXFillAttr.GetItemSet() )
{
get(m_pBxPixelEditor,"maingrid");
get(m_pCtlPixel,"CTL_PIXEL");
get(m_pLbColor,"LB_COLOR");
get(m_pLbBackgroundColor,"LB_BACKGROUND_COLOR");
get(m_pCtlPreview,"CTL_PREVIEW");
get(m_pLbBitmaps,"LB_BITMAPS");
get(m_pLbBitmapsHidden,"FT_BITMAPS_HIDDEN");
get(m_pBtnAdd,"BTN_ADD");
get(m_pBtnModify,"BTN_MODIFY");
get(m_pBtnImport,"BTN_IMPORT");
get(m_pBtnDelete,"BTN_DELETE");
get(m_pBtnLoad,"BTN_LOAD");
get(m_pBtnSave,"BTN_SAVE");
// size of the bitmap listbox
Size aSize = getDrawListBoxOptimalSize(this);
m_pLbBitmaps->set_width_request(aSize.Width());
m_pLbBitmaps->set_height_request(aSize.Height());
// size of the bitmap display
Size aSize2 = getDrawPreviewOptimalSize(this);
m_pCtlPreview->set_width_request(aSize2.Width());
m_pCtlPreview->set_height_request(aSize2.Height());
m_pBitmapCtl = new SvxBitmapCtl(this, aSize2);
2009-10-31 00:36:06 +01:00
// this page needs ExchangeSupport
2009-10-31 00:36:06 +01:00
SetExchangeSupport();
// setting the output device
2009-10-31 00:36:06 +01:00
rXFSet.Put( aXFStyleItem );
rXFSet.Put( aXBitmapItem );
m_pBtnAdd->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickAddHdl_Impl ) );
m_pBtnImport->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickImportHdl_Impl ) );
m_pBtnModify->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickModifyHdl_Impl ) );
m_pBtnDelete->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickDeleteHdl_Impl ) );
m_pBtnLoad->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickLoadHdl_Impl ) );
m_pBtnSave->SetClickHdl( LINK( this, SvxBitmapTabPage, ClickSaveHdl_Impl ) );
m_pLbBitmaps->SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangeBitmapHdl_Impl ) );
m_pLbColor->SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangePixelColorHdl_Impl ) );
m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl ) );
setPreviewsToSamePlace(pParent, this);
}
SvxBitmapTabPage::~SvxBitmapTabPage()
{
delete m_pBitmapCtl;
2009-10-31 00:36:06 +01:00
}
// -----------------------------------------------------------------------
void SvxBitmapTabPage::Construct()
{
m_pLbColor->Fill( pColorList );
m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
2009-10-31 00:36:06 +01:00
m_pLbBitmaps->Fill( pBitmapList );
2009-10-31 00:36:06 +01:00
}
// -----------------------------------------------------------------------
void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
{
sal_uInt16 nPos;
sal_uInt16 nCount;
2009-10-31 00:36:06 +01:00
if( *pDlgType == 0 ) // area dialog
2009-10-31 00:36:06 +01:00
{
*pbAreaTP = sal_False;
2009-10-31 00:36:06 +01:00
if( pColorList.is() )
2009-10-31 00:36:06 +01:00
{
// ColorList
if( *pnColorListState & CT_CHANGED ||
*pnColorListState & CT_MODIFIED )
2009-10-31 00:36:06 +01:00
{
if( *pnColorListState & CT_CHANGED )
pColorList = ( (SvxAreaTabDialog*) GetParentDialog() )->GetNewColorList();
2009-10-31 00:36:06 +01:00
// LbColor
nPos = m_pLbColor->GetSelectEntryPos();
m_pLbColor->Clear();
m_pLbColor->Fill( pColorList );
nCount = m_pLbColor->GetEntryCount();
2009-10-31 00:36:06 +01:00
if( nCount == 0 )
; // this case should not occur
2009-10-31 00:36:06 +01:00
else if( nCount <= nPos )
m_pLbColor->SelectEntryPos( 0 );
2009-10-31 00:36:06 +01:00
else
m_pLbColor->SelectEntryPos( nPos );
2009-10-31 00:36:06 +01:00
// LbColorBackground
nPos = m_pLbBackgroundColor->GetSelectEntryPos();
m_pLbBackgroundColor->Clear();
m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
nCount = m_pLbBackgroundColor->GetEntryCount();
2009-10-31 00:36:06 +01:00
if( nCount == 0 )
; // this case should not occur
2009-10-31 00:36:06 +01:00
else if( nCount <= nPos )
m_pLbBackgroundColor->SelectEntryPos( 0 );
2009-10-31 00:36:06 +01:00
else
m_pLbBackgroundColor->SelectEntryPos( nPos );
2009-10-31 00:36:06 +01:00
ChangePixelColorHdl_Impl( this );
ChangeBackgrndColorHdl_Impl( this );
}
// determining (possibly cutting) the name and
// displaying it in the GroupBox
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
aString += ": ";
2009-10-31 00:36:06 +01:00
INetURLObject aURL( pBitmapList->GetPath() );
aURL.Append( pBitmapList->GetName() );
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
if( aURL.getBase().getLength() > 18 )
{
aString += aURL.getBase().copy( 0, 15 );
aString += "...";
2009-10-31 00:36:06 +01:00
}
else
aString += aURL.getBase();
2009-10-31 00:36:06 +01:00
if( *pPageType == PT_BITMAP && *pPos != LISTBOX_ENTRY_NOTFOUND )
{
m_pLbBitmaps->SelectEntryPos( *pPos );
2009-10-31 00:36:06 +01:00
}
// colors could have been deleted
2009-10-31 00:36:06 +01:00
ChangeBitmapHdl_Impl( this );
*pPageType = PT_BITMAP;
*pPos = LISTBOX_ENTRY_NOTFOUND;
}
}
}
// -----------------------------------------------------------------------
int SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet)
{
if ( CheckChanges_Impl() == -1L )
return KEEP_PAGE;
if( _pSet )
FillItemSet( *_pSet );
return LEAVE_PAGE;
}
// -----------------------------------------------------------------------
sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs )
2009-10-31 00:36:06 +01:00
{
if( *pDlgType == 0 && *pbAreaTP == sal_False ) // area dialog
2009-10-31 00:36:06 +01:00
{
if(PT_BITMAP == *pPageType)
2009-10-31 00:36:06 +01:00
{
_rOutAttrs.Put(XFillStyleItem(XFILL_BITMAP));
sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
2009-10-31 00:36:06 +01:00
{
const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
const String aString(m_pLbBitmaps->GetSelectEntry());
2009-10-31 00:36:06 +01:00
_rOutAttrs.Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
2009-10-31 00:36:06 +01:00
}
else
{
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
2009-10-31 00:36:06 +01:00
_rOutAttrs.Put(XFillBitmapItem(String(), Graphic(aBitmapEx)));
2009-10-31 00:36:06 +01:00
}
}
}
return sal_True;
2009-10-31 00:36:06 +01:00
}
// -----------------------------------------------------------------------
void SvxBitmapTabPage::Reset( const SfxItemSet& )
{
// aLbBitmaps.SelectEntryPos( 0 );
m_pBitmapCtl->SetLines( m_pCtlPixel->GetLineCount() );
m_pBitmapCtl->SetPixelColor( m_pLbColor->GetSelectEntryColor() );
m_pBitmapCtl->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() );
m_pBitmapCtl->SetBmpArray( m_pCtlPixel->GetBitmapPixelPtr() );
2009-10-31 00:36:06 +01:00
// get bitmap and display it
const XFillBitmapItem aBmpItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx()));
2009-10-31 00:36:06 +01:00
rXFSet.Put( aBmpItem );
m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlPreview->Invalidate();
2009-10-31 00:36:06 +01:00
ChangeBitmapHdl_Impl( this );
// determine button state
if( pBitmapList.is() && pBitmapList->Count() )
2009-10-31 00:36:06 +01:00
{
m_pBtnAdd->Enable();
m_pBtnModify->Enable();
m_pBtnDelete->Enable();
m_pBtnSave->Enable();
2009-10-31 00:36:06 +01:00
}
else
{
m_pBtnModify->Disable();
m_pBtnDelete->Disable();
m_pBtnSave->Disable();
2009-10-31 00:36:06 +01:00
}
}
// -----------------------------------------------------------------------
SfxTabPage* SvxBitmapTabPage::Create( Window* pWindow,
const SfxItemSet& rSet )
{
return new SvxBitmapTabPage( pWindow, rSet );
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
2009-10-31 00:36:06 +01:00
{
GraphicObject* pGraphicObject = 0;
int nPos(m_pLbBitmaps->GetSelectEntryPos());
2009-10-31 00:36:06 +01:00
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
pGraphicObject = new GraphicObject(pBitmapList->GetBitmap(nPos)->GetGraphicObject());
}
2009-10-31 00:36:06 +01:00
else
{
const SfxPoolItem* pPoolItem = 0;
if(SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem))
2009-10-31 00:36:06 +01:00
{
const XFillStyle eXFS((XFillStyle)((const XFillStyleItem*)pPoolItem)->GetValue());
if((XFILL_BITMAP == eXFS) && (SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem)))
2009-10-31 00:36:06 +01:00
{
pGraphicObject = new GraphicObject(((const XFillBitmapItem*)pPoolItem)->GetGraphicObject());
2009-10-31 00:36:06 +01:00
}
}
if(!pGraphicObject)
2009-10-31 00:36:06 +01:00
{
m_pLbBitmaps->SelectEntryPos(0);
nPos = m_pLbBitmaps->GetSelectEntryPos();
2009-10-31 00:36:06 +01:00
if(LISTBOX_ENTRY_NOTFOUND != nPos)
2009-10-31 00:36:06 +01:00
{
pGraphicObject = new GraphicObject(pBitmapList->GetBitmap(nPos)->GetGraphicObject());
2009-10-31 00:36:06 +01:00
}
}
}
if(pGraphicObject)
{
BitmapColor aBack;
BitmapColor aFront;
bool bIs8x8(isHistorical8x8(pGraphicObject->GetGraphic().GetBitmap(), aBack, aFront));
2009-10-31 00:36:06 +01:00
m_pLbColor->SetNoSelection();
m_pLbBackgroundColor->SetNoSelection();
2009-10-31 00:36:06 +01:00
if(bIs8x8)
2009-10-31 00:36:06 +01:00
{
m_pCtlPixel->SetPaintable( sal_True );
m_pBxPixelEditor->Enable();
m_pBtnModify->Enable();
m_pBtnAdd->Enable();
2009-10-31 00:36:06 +01:00
// setting the pixel control
m_pCtlPixel->SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
2009-10-31 00:36:06 +01:00
Color aPixelColor = aFront;
Color aBackColor = aBack;
2009-10-31 00:36:06 +01:00
m_pBitmapCtl->SetPixelColor( aPixelColor );
m_pBitmapCtl->SetBackgroundColor( aBackColor );
2009-10-31 00:36:06 +01:00
// if the entry is not in the listbox,
// the color is added temporarily
if( 0 == m_pLbBitmaps->GetSelectEntryPos() )
2009-10-31 00:36:06 +01:00
{
m_pLbColor->SelectEntry( Color( COL_BLACK ) );
2009-10-31 00:36:06 +01:00
ChangePixelColorHdl_Impl( this );
}
else
m_pLbColor->SelectEntry( aPixelColor );
if( m_pLbColor->GetSelectEntryCount() == 0 )
2009-10-31 00:36:06 +01:00
{
m_pLbColor->InsertEntry( aPixelColor, String() );
m_pLbColor->SelectEntry( aPixelColor );
2009-10-31 00:36:06 +01:00
}
m_pLbBackgroundColor->SelectEntry( aBackColor );
if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
2009-10-31 00:36:06 +01:00
{
m_pLbBackgroundColor->InsertEntry( aBackColor, String() );
m_pLbBackgroundColor->SelectEntry( aBackColor );
2009-10-31 00:36:06 +01:00
}
}
else
{
m_pCtlPixel->Reset();
m_pCtlPixel->SetPaintable( sal_False );
m_pBxPixelEditor->Disable();
m_pBtnModify->Disable();
m_pBtnAdd->Disable();
}
m_pCtlPixel->Invalidate();
2009-10-31 00:36:06 +01:00
// display bitmap
const XFillBitmapItem aXBmpItem(String(), *pGraphicObject);
2009-10-31 00:36:06 +01:00
rXFSet.Put( aXBmpItem );
m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlPreview->Invalidate();
2009-10-31 00:36:06 +01:00
bBmpChanged = sal_False;
delete pGraphicObject;
2009-10-31 00:36:06 +01:00
}
return 0;
2009-10-31 00:36:06 +01:00
}
// -----------------------------------------------------------------------
long SvxBitmapTabPage::CheckChanges_Impl()
{
sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
2009-10-31 00:36:06 +01:00
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if( bBmpChanged )
{
ResMgr& rMgr = CUI_MGR();
2009-10-31 00:36:06 +01:00
Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
String( SVX_RES( RID_SVXSTR_BITMAP ) ),
String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ),
2009-10-31 00:36:06 +01:00
&aWarningBoxImage );
DBG_ASSERT(aMessDlg, "Dialogdiet fail!");
aMessDlg->SetButtonText( MESS_BTN_1, String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
aMessDlg->SetButtonText( MESS_BTN_2, String( ResId( RID_SVXSTR_ADD, rMgr ) ) );
2009-10-31 00:36:06 +01:00
short nRet = aMessDlg->Execute();
2009-10-31 00:36:06 +01:00
switch( nRet )
{
case RET_BTN_1:
2009-10-31 00:36:06 +01:00
{
ClickModifyHdl_Impl( this );
}
break;
case RET_BTN_2:
2009-10-31 00:36:06 +01:00
{
ClickAddHdl_Impl( this );
nPos = m_pLbBitmaps->GetSelectEntryPos();
2009-10-31 00:36:06 +01:00
}
break;
case RET_CANCEL:
break;
}
delete aMessDlg;
2009-10-31 00:36:06 +01:00
}
}
nPos = m_pLbBitmaps->GetSelectEntryPos();
2009-10-31 00:36:06 +01:00
if( nPos != LISTBOX_ENTRY_NOTFOUND )
*pPos = nPos;
return 0L;
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
2009-10-31 00:36:06 +01:00
{
String aNewName( SVX_RES( RID_SVXSTR_BITMAP ) );
String aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_BITMAP ) );
OUString aName;
2009-10-31 00:36:06 +01:00
long nCount = pBitmapList->Count();
long j = 1;
sal_Bool bDifferent = sal_False;
2009-10-31 00:36:06 +01:00
while( !bDifferent )
{
aName = aNewName;
aName += " ";
aName += OUString::number( j++ );
bDifferent = sal_True;
2009-10-31 00:36:06 +01:00
for( long i = 0; i < nCount && bDifferent; i++ )
if( aName == pBitmapList->GetBitmap( i )->GetName() )
bDifferent = sal_False;
2009-10-31 00:36:06 +01:00
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
MessageDialog* pWarnBox = NULL;
sal_uInt16 nError(1);
2009-10-31 00:36:06 +01:00
while( pDlg->Execute() == RET_OK )
{
pDlg->GetName( aName );
bDifferent = sal_True;
2009-10-31 00:36:06 +01:00
for( long i = 0; i < nCount && bDifferent; i++ )
if( aName == pBitmapList->GetBitmap( i )->GetName() )
bDifferent = sal_False;
2009-10-31 00:36:06 +01:00
if( bDifferent ) {
nError = 0;
break;
}
if( !pWarnBox )
{
pWarnBox = new MessageDialog( GetParentDialog()
,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui");
2009-10-31 00:36:06 +01:00
}
if( pWarnBox->Execute() != RET_OK )
break;
}
2009-10-31 00:36:06 +01:00
delete pDlg;
delete pWarnBox;
if( !nError )
{
XBitmapEntry* pEntry = 0;
if( m_pCtlPixel->IsEnabled() )
2009-10-31 00:36:06 +01:00
{
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
2009-10-31 00:36:06 +01:00
pEntry = new XBitmapEntry(Graphic(aBitmapEx), aName);
2009-10-31 00:36:06 +01:00
}
else // it must be a not existing imported bitmap
2009-10-31 00:36:06 +01:00
{
const SfxPoolItem* pPoolItem = 0;
if(SFX_ITEM_SET == rOutAttrs.GetItemState(XATTR_FILLBITMAP, true, &pPoolItem))
2009-10-31 00:36:06 +01:00
{
pEntry = new XBitmapEntry(dynamic_cast< const XFillBitmapItem* >(pPoolItem)->GetGraphicObject(), aName);
2009-10-31 00:36:06 +01:00
}
}
DBG_ASSERT( pEntry, "SvxBitmapTabPage::ClickAddHdl_Impl(), pEntry == 0 ?" );
if( pEntry )
{
pBitmapList->Insert( pEntry );
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
m_pLbBitmaps->Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
m_pLbBitmaps->SelectEntryPos( m_pLbBitmaps->GetEntryCount() - 1 );
2009-10-31 00:36:06 +01:00
*pnBitmapListState |= CT_MODIFIED;
ChangeBitmapHdl_Impl( this );
}
}
// determine button state
2009-10-31 00:36:06 +01:00
if( pBitmapList->Count() )
{
m_pBtnModify->Enable();
m_pBtnDelete->Enable();
m_pBtnSave->Enable();
2009-10-31 00:36:06 +01:00
}
return 0L;
}
/******************************************************************************/
/******************************************************************************/
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
2009-10-31 00:36:06 +01:00
{
ResMgr& rMgr = CUI_MGR();
SvxOpenGraphicDialog aDlg( OUString("Import") );
2009-10-31 00:36:06 +01:00
aDlg.EnableLink(sal_False);
if( !aDlg.Execute() )
{
Graphic aGraphic;
EnterWait();
int nError = aDlg.GetGraphic( aGraphic );
2009-10-31 00:36:06 +01:00
LeaveWait();
if( !nError )
{
String aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) );
MessageDialog* pWarnBox = NULL;
2009-10-31 00:36:06 +01:00
// convert file URL to UI name
OUString aName;
2009-10-31 00:36:06 +01:00
INetURLObject aURL( aDlg.GetPath() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), String(aURL.GetName()).GetToken( 0, '.' ), aDesc );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
nError = 1;
2009-10-31 00:36:06 +01:00
while( pDlg->Execute() == RET_OK )
{
pDlg->GetName( aName );
sal_Bool bDifferent = sal_True;
2009-10-31 00:36:06 +01:00
long nCount = pBitmapList->Count();
for( long i = 0; i < nCount && bDifferent; i++ )
if( aName == pBitmapList->GetBitmap( i )->GetName() )
bDifferent = sal_False;
2009-10-31 00:36:06 +01:00
if( bDifferent ) {
nError = 0;
break;
}
if( !pWarnBox )
{
pWarnBox = new MessageDialog( GetParentDialog()
,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui");
2009-10-31 00:36:06 +01:00
}
if( pWarnBox->Execute() != RET_OK )
break;
}
2009-10-31 00:36:06 +01:00
delete pDlg;
delete pWarnBox;
if( !nError )
{
XBitmapEntry* pEntry = new XBitmapEntry( aGraphic, aName );
2009-10-31 00:36:06 +01:00
pBitmapList->Insert( pEntry );
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
m_pLbBitmaps->Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
m_pLbBitmaps->SelectEntryPos( m_pLbBitmaps->GetEntryCount() - 1 );
2009-10-31 00:36:06 +01:00
*pnBitmapListState |= CT_MODIFIED;
ChangeBitmapHdl_Impl( this );
}
}
else
// graphic couldn't be loaded
MessageDialog( GetParentDialog()
,"NoLoadedFileDialog"
,"cui/ui/querynoloadedfiledialog.ui").Execute();
2009-10-31 00:36:06 +01:00
}
return 0L;
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
2009-10-31 00:36:06 +01:00
{
sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
2009-10-31 00:36:06 +01:00
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
ResMgr& rMgr = CUI_MGR();
2009-10-31 00:36:06 +01:00
String aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, rMgr ) );
OUString aName( pBitmapList->GetBitmap( nPos )->GetName() );
OUString aOldName = aName;
2009-10-31 00:36:06 +01:00
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
2009-10-31 00:36:06 +01:00
long nCount = pBitmapList->Count();
sal_Bool bDifferent = sal_False;
sal_Bool bLoop = sal_True;
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
2009-10-31 00:36:06 +01:00
while( bLoop && pDlg->Execute() == RET_OK )
{
pDlg->GetName( aName );
bDifferent = sal_True;
2009-10-31 00:36:06 +01:00
for( long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pBitmapList->GetBitmap( i )->GetName() &&
aName != aOldName )
bDifferent = sal_False;
2009-10-31 00:36:06 +01:00
}
if( bDifferent )
{
bLoop = sal_False;
2009-10-31 00:36:06 +01:00
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
const XBitmapEntry aEntry(Graphic(aBitmapEx), aName);
2009-10-31 00:36:06 +01:00
m_pLbBitmaps->Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
m_pLbBitmaps->SelectEntryPos( nPos );
2009-10-31 00:36:06 +01:00
*pnBitmapListState |= CT_MODIFIED;
bBmpChanged = sal_False;
2009-10-31 00:36:06 +01:00
}
else
{
MessageDialog aBox( GetParentDialog()
,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui");
2009-10-31 00:36:06 +01:00
aBox.Execute();
}
}
delete pDlg;
}
return 0L;
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
2009-10-31 00:36:06 +01:00
{
sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
2009-10-31 00:36:06 +01:00
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ),
String( CUI_RES( RID_SVXSTR_ASK_DEL_BITMAP ) ) );
2009-10-31 00:36:06 +01:00
if( aQueryBox.Execute() == RET_YES )
{
delete pBitmapList->Remove( nPos );
m_pLbBitmaps->RemoveEntry( nPos );
m_pLbBitmaps->SelectEntryPos( 0 );
2009-10-31 00:36:06 +01:00
m_pCtlPreview->Invalidate();
m_pCtlPixel->Invalidate();
2009-10-31 00:36:06 +01:00
ChangeBitmapHdl_Impl( this );
*pnBitmapListState |= CT_MODIFIED;
}
}
// determine button state
2009-10-31 00:36:06 +01:00
if( !pBitmapList->Count() )
{
m_pBtnModify->Disable();
m_pBtnDelete->Disable();
m_pBtnSave->Disable();
2009-10-31 00:36:06 +01:00
}
return 0L;
}
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
2009-10-31 00:36:06 +01:00
{
sal_uInt16 nReturn = RET_YES;
ResMgr& rMgr = CUI_MGR();
2009-10-31 00:36:06 +01:00
if ( *pnBitmapListState & CT_MODIFIED )
{
nReturn = MessageDialog( GetParentDialog()
,"AskSaveList"
,"cui/ui/querysavelistdialog.ui").Execute();
2009-10-31 00:36:06 +01:00
if ( nReturn == RET_YES )
pBitmapList->Save();
}
if ( nReturn != RET_CANCEL )
{
::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
String aStrFilterType( "*.sob" );
2009-10-31 00:36:06 +01:00
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
if ( aDlg.Execute() == ERRCODE_NONE )
{
EnterWait();
INetURLObject aURL( aDlg.GetPath() );
INetURLObject aPathURL( aURL );
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
// save table
XBitmapListRef pBmpList = XPropertyList::CreatePropertyList(
XBITMAP_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ) )->AsBitmapList();
2009-10-31 00:36:06 +01:00
pBmpList->SetName( aURL.getName() );
if( pBmpList->Load() )
{
2010-11-24 09:53:21 +00:00
pBitmapList = pBmpList;
( (SvxAreaTabDialog*) GetParentDialog() )->SetNewBitmapList( pBitmapList );
2009-10-31 00:36:06 +01:00
m_pLbBitmaps->Clear();
m_pLbBitmaps->Fill( pBitmapList );
2010-11-24 09:53:21 +00:00
Reset( rOutAttrs );
2009-10-31 00:36:06 +01:00
2010-11-24 09:53:21 +00:00
pBitmapList->SetName( aURL.getName() );
2009-10-31 00:36:06 +01:00
// determining (possibly cutting) the name
// displaying it in the GroupBox
OUString aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
aString += ": ";
2009-10-31 00:36:06 +01:00
2010-11-24 09:53:21 +00:00
if ( aURL.getBase().getLength() > 18 )
{
aString += aURL.getBase().copy( 0, 15 );
aString += "...";
2009-10-31 00:36:06 +01:00
}
2010-11-24 09:53:21 +00:00
else
aString += aURL.getBase();
2010-11-24 09:53:21 +00:00
*pnBitmapListState |= CT_CHANGED;
*pnBitmapListState &= ~CT_MODIFIED;
2009-10-31 00:36:06 +01:00
LeaveWait();
}
else
{
LeaveWait();
MessageDialog( GetParentDialog()
,"NoLoadedFileDialog"
,"cui/ui/querynoloadedfiledialog.ui").Execute();
2009-10-31 00:36:06 +01:00
}
}
}
// determine button state
2009-10-31 00:36:06 +01:00
if( pBitmapList->Count() )
{
m_pBtnModify->Enable();
m_pBtnDelete->Enable();
m_pBtnSave->Enable();
2009-10-31 00:36:06 +01:00
}
else
{
m_pBtnModify->Disable();
m_pBtnDelete->Disable();
m_pBtnSave->Disable();
2009-10-31 00:36:06 +01:00
}
return 0L;
}
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
2009-10-31 00:36:06 +01:00
{
::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
String aStrFilterType( "*.sob" );
2009-10-31 00:36:06 +01:00
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
if( !pBitmapList->GetName().isEmpty() )
2009-10-31 00:36:06 +01:00
{
aFile.Append( pBitmapList->GetName() );
if( aFile.getExtension().isEmpty() )
aFile.SetExtension( OUString("sob") );
2009-10-31 00:36:06 +01:00
}
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
if ( aDlg.Execute() == ERRCODE_NONE )
{
INetURLObject aURL( aDlg.GetPath() );
INetURLObject aPathURL( aURL );
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
pBitmapList->SetName( aURL.getName() );
pBitmapList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
if( pBitmapList->Save() )
{
// determining (possibly cutting) the name
// displaying it in the GroupBox
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
aString += ": ";
2009-10-31 00:36:06 +01:00
if ( aURL.getBase().getLength() > 18 )
{
aString += aURL.getBase().copy( 0, 15 );
aString += "...";
2009-10-31 00:36:06 +01:00
}
else
aString += aURL.getBase();
2009-10-31 00:36:06 +01:00
*pnBitmapListState |= CT_SAVED;
*pnBitmapListState &= ~CT_MODIFIED;
}
else
{
MessageDialog( GetParentDialog()
,"NoSaveFileDialog"
,"cui/ui/querynosavefiledialog.ui").Execute();
2009-10-31 00:36:06 +01:00
}
}
return 0L;
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ChangePixelColorHdl_Impl)
2009-10-31 00:36:06 +01:00
{
m_pCtlPixel->SetPixelColor( m_pLbColor->GetSelectEntryColor() );
m_pCtlPixel->Invalidate();
2009-10-31 00:36:06 +01:00
m_pBitmapCtl->SetPixelColor( m_pLbColor->GetSelectEntryColor() );
2009-10-31 00:36:06 +01:00
// get bitmap and display it
rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx())));
m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlPreview->Invalidate();
2009-10-31 00:36:06 +01:00
bBmpChanged = sal_True;
2009-10-31 00:36:06 +01:00
return 0L;
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl)
2009-10-31 00:36:06 +01:00
{
m_pCtlPixel->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() );
m_pCtlPixel->Invalidate();
2009-10-31 00:36:06 +01:00
m_pBitmapCtl->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() );
2009-10-31 00:36:06 +01:00
// get bitmap and display it
rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx())));
m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlPreview->Invalidate();
2009-10-31 00:36:06 +01:00
bBmpChanged = sal_True;
2009-10-31 00:36:06 +01:00
return 0L;
}
//------------------------------------------------------------------------
void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT )
{
if( pWindow == m_pCtlPixel )
2009-10-31 00:36:06 +01:00
{
m_pBitmapCtl->SetBmpArray( m_pCtlPixel->GetBitmapPixelPtr() );
2009-10-31 00:36:06 +01:00
// get bitmap and display it
rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx())));
m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlPreview->Invalidate();
2009-10-31 00:36:06 +01:00
bBmpChanged = sal_True;
2009-10-31 00:36:06 +01:00
}
}
Window* SvxBitmapTabPage::GetParentLabeledBy( const Window* pLabeled ) const
{
if (pLabeled == m_pLbBitmaps)
return const_cast<FixedText*>(m_pLbBitmapsHidden);
2009-10-31 00:36:06 +01:00
else
return SvxTabPage::GetParentLabeledBy (pLabeled);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */