[Libreoffice-commits] core.git: 3 commits - animations/source dbaccess/AllLangResTarget_dbu.mk dbaccess/inc dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk extras/source
Caolán McNamara
caolanm at redhat.com
Tue Feb 4 04:01:43 PST 2014
animations/source/animcore/animcore.cxx | 10
dbaccess/AllLangResTarget_dbu.mk | 1
dbaccess/UIConfig_dbaccess.mk | 1
dbaccess/inc/dbaccess_helpid.hrc | 3
dbaccess/source/ui/app/app.src | 25 ++
dbaccess/source/ui/control/SqlNameEdit.cxx | 12 +
dbaccess/source/ui/dlg/dlgsave.cxx | 251 ++++++++----------------
dbaccess/source/ui/dlg/dlgsave.hrc | 46 ----
dbaccess/source/ui/dlg/dlgsave.src | 131 ------------
dbaccess/source/ui/inc/FieldControls.hxx | 2
dbaccess/source/ui/inc/SqlNameEdit.hxx | 8
dbaccess/source/ui/inc/dbu_resource.hrc | 6
dbaccess/source/ui/tabledesign/TEditControl.cxx | 2
dbaccess/uiconfig/ui/savedialog.ui | 195 ++++++++++++++++++
extras/source/glade/libreoffice-catalog.xml.in | 8
15 files changed, 351 insertions(+), 350 deletions(-)
New commits:
commit 24a00c43c2b59df9b3f29c76f2e898e43bbb27ba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 4 09:55:32 2014 +0000
convert database save as dialog to .ui
Change-Id: Ifc8d43930ecbd3ccd67147cd891260555976dc0d
diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
index 6840629..3974924 100644
--- a/dbaccess/AllLangResTarget_dbu.mk
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/dlg/dbadmin.src \
dbaccess/source/ui/dlg/dbfindex.src \
dbaccess/source/ui/dlg/directsql.src \
- dbaccess/source/ui/dlg/dlgsave.src \
dbaccess/source/ui/dlg/dsselect.src \
dbaccess/source/ui/dlg/indexdialog.src \
dbaccess/source/ui/dlg/paramdialog.src \
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index d8f71c8..206a81b 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/queryfilterdialog \
dbaccess/uiconfig/ui/querypropertiesdialog \
dbaccess/uiconfig/ui/rowheightdialog \
+ dbaccess/uiconfig/ui/savedialog \
dbaccess/uiconfig/ui/specialsettingspage \
dbaccess/uiconfig/ui/sortdialog \
dbaccess/uiconfig/ui/tablesfilterdialog \
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 84de271..04f230c 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -78,7 +78,6 @@
#define HID_DLG_ERROR "DBACCESS_HID_DLG_ERROR"
#define HID_DLG_TEXT "DBACCESS_HID_DLG_TEXT"
#define UID_SQLERROR_BUTTONMORE "DBACCESS_UID_SQLERROR_BUTTONMORE"
-#define HID_DLG_SAVE_AS "DBACCESS_HID_DLG_SAVE_AS"
#define HID_BROWSER_QUERY_EDIT "DBACCESS_HID_BROWSER_QUERY_EDIT"
#define HID_BROWSER_QUERY_DELETE "DBACCESS_HID_BROWSER_QUERY_DELETE"
@@ -247,8 +246,6 @@
#define HID_DSADMIN_USESSL_LDAP "DBACCESS_HID_DSADMIN_USESSL_LDAP"
#define HID_BROWSER_QUERY_WIZARD "DBACCESS_HID_BROWSER_QUERY_WIZARD"
-#define HID_DLG_RENAME "DBACCESS_HID_DLG_RENAME"
-
#define HID_DSADMIN_PAGE_MYSQL_JDBC "DBACCESS_HID_DSADMIN_PAGE_MYSQL_JDBC"
#define HID_DSADMIN_DBASE_PATH "DBACCESS_HID_DSADMIN_DBASE_PATH"
diff --git a/dbaccess/source/ui/app/app.src b/dbaccess/source/ui/app/app.src
index f06f29b..585fa43 100644
--- a/dbaccess/source/ui/app/app.src
+++ b/dbaccess/source/ui/app/app.src
@@ -471,4 +471,29 @@ String STR_PAGETITLE_CONNECTION
Text [ en-US ] = "Connection settings" ;
};
+String STR_TBL_LABEL
+{
+ Text [ en-US ] = "~Table Name" ;
+};
+
+String STR_VW_LABEL
+{
+ Text [ en-US ] = "~Name of table view" ;
+};
+
+String STR_QRY_LABEL
+{
+ Text [ en-US ] = "~Query name" ;
+};
+
+String STR_TITLE_RENAME
+{
+ Text [ en-US ] = "Rename to";
+};
+
+String STR_TITLE_PASTE_AS
+{
+ Text [ en-US ] = "Insert as";
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx
index 8a6f861..603a50c 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -18,6 +18,8 @@
*/
#include "SqlNameEdit.hxx"
+#include <vcl/builder.hxx>
+
namespace dbaui
{
sal_Bool isCharOk(sal_Unicode _cChar,sal_Bool _bFirstChar,sal_Bool _bUpperCase,const OUString& _sAllowedChars)
@@ -79,4 +81,14 @@ namespace dbaui
}
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOSQLNameEdit(Window *pParent, VclBuilder::stringmap &)
+{
+ return new dbaui::OSQLNameEdit(pParent);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOSQLNameComboBox(Window *pParent, VclBuilder::stringmap &)
+{
+ return new dbaui::OSQLNameComboBox(pParent);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index ce21f4d..0f217d4 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -18,7 +18,6 @@
*/
#include "dlgsave.hxx"
-#include "dlgsave.hrc"
#include <vcl/msgbox.hxx>
#include "dbu_dlg.hrc"
#include <com/sun/star/sdb/CommandType.hpp>
@@ -49,16 +48,14 @@ namespace dbaui
class OSaveAsDlgImpl
{
public:
- FixedText m_aDescription;
- FixedText m_aCatalogLbl;
- OSQLNameComboBox m_aCatalog;
- FixedText m_aSchemaLbl;
- OSQLNameComboBox m_aSchema;
- FixedText m_aLabel;
- OSQLNameEdit m_aTitle;
- OKButton m_aPB_OK;
- CancelButton m_aPB_CANCEL;
- HelpButton m_aPB_HELP;
+ FixedText* m_pDescription;
+ FixedText* m_pCatalogLbl;
+ OSQLNameComboBox* m_pCatalog;
+ FixedText* m_pSchemaLbl;
+ OSQLNameComboBox* m_pSchema;
+ FixedText* m_pLabel;
+ OSQLNameEdit* m_pTitle;
+ OKButton* m_pPB_OK;
OUString m_aQryLabel;
OUString m_sTblLabel;
OUString m_aName;
@@ -69,12 +66,12 @@ public:
sal_Int32 m_nType;
sal_Int32 m_nFlags;
- OSaveAsDlgImpl( Window * pParent,const sal_Int32& _rType,
+ OSaveAsDlgImpl( OSaveAsDlg* pParent,const sal_Int32& _rType,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
sal_Int32 _nFlags);
- OSaveAsDlgImpl( Window * pParent,
+ OSaveAsDlgImpl( OSaveAsDlg* pParent,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
sal_Int32 _nFlags);
@@ -82,67 +79,65 @@ public:
} // dbaui
-OSaveAsDlgImpl::OSaveAsDlgImpl( Window * _pParent,
+OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
const sal_Int32& _rType,
const Reference< XConnection>& _xConnection,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
sal_Int32 _nFlags)
- :m_aDescription(_pParent, ModuleRes (FT_DESCRIPTION))
- ,m_aCatalogLbl(_pParent, ModuleRes (FT_CATALOG))
- ,m_aCatalog(_pParent, ModuleRes (ET_CATALOG), OUString())
- ,m_aSchemaLbl(_pParent, ModuleRes (FT_SCHEMA))
- ,m_aSchema(_pParent, ModuleRes (ET_SCHEMA), OUString())
- ,m_aLabel(_pParent, ModuleRes (FT_TITLE))
- ,m_aTitle(_pParent, ModuleRes (ET_TITLE), OUString())
- ,m_aPB_OK(_pParent, ModuleRes( PB_OK ) )
- ,m_aPB_CANCEL(_pParent, ModuleRes( PB_CANCEL ))
- ,m_aPB_HELP(_pParent, ModuleRes( PB_HELP))
- ,m_aQryLabel(ModuleRes(STR_QRY_LABEL))
- ,m_sTblLabel(ModuleRes(STR_TBL_LABEL))
- ,m_aName(rDefault)
- ,m_rObjectNameCheck( _rObjectNameCheck )
- ,m_nType(_rType)
- ,m_nFlags(_nFlags)
+ : m_aQryLabel(ModuleRes(STR_QRY_LABEL))
+ , m_sTblLabel(ModuleRes(STR_TBL_LABEL))
+ , m_aName(rDefault)
+ , m_rObjectNameCheck( _rObjectNameCheck )
+ , m_nType(_rType)
+ , m_nFlags(_nFlags)
{
+ pParent->get(m_pDescription, "descriptionft");
+ pParent->get(m_pCatalogLbl, "catalogft");
+ pParent->get(m_pCatalog, "catalog");
+ pParent->get(m_pSchemaLbl, "schemaft");
+ pParent->get(m_pSchema, "schema");
+ pParent->get(m_pLabel, "titleft");
+ pParent->get(m_pTitle, "title");
+ pParent->get(m_pPB_OK, "ok");
+
if ( _xConnection.is() )
m_xMetaData = _xConnection->getMetaData();
if ( m_xMetaData.is() )
{
OUString sExtraNameChars( m_xMetaData->getExtraNameCharacters() );
- m_aCatalog.setAllowedChars( sExtraNameChars );
- m_aSchema.setAllowedChars( sExtraNameChars );
- m_aTitle.setAllowedChars( sExtraNameChars );
+ m_pCatalog->setAllowedChars( sExtraNameChars );
+ m_pSchema->setAllowedChars( sExtraNameChars );
+ m_pTitle->setAllowedChars( sExtraNameChars );
}
- m_aCatalog.SetDropDownLineCount( 10 );
- m_aSchema.SetDropDownLineCount( 10 );
+ m_pCatalog->SetDropDownLineCount( 10 );
+ m_pSchema->SetDropDownLineCount( 10 );
}
-OSaveAsDlgImpl::OSaveAsDlgImpl( Window * _pParent,
+OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
sal_Int32 _nFlags)
- :m_aDescription(_pParent, ModuleRes (FT_DESCRIPTION))
- ,m_aCatalogLbl(_pParent, ModuleRes (FT_CATALOG))
- ,m_aCatalog(_pParent, ModuleRes (ET_CATALOG))
- ,m_aSchemaLbl(_pParent, ModuleRes (FT_SCHEMA))
- ,m_aSchema(_pParent, ModuleRes (ET_SCHEMA))
- ,m_aLabel(_pParent, ModuleRes (FT_TITLE))
- ,m_aTitle(_pParent, ModuleRes (ET_TITLE))
- ,m_aPB_OK(_pParent, ModuleRes( PB_OK ) )
- ,m_aPB_CANCEL(_pParent, ModuleRes( PB_CANCEL ))
- ,m_aPB_HELP(_pParent, ModuleRes( PB_HELP))
- ,m_aQryLabel(ModuleRes(STR_QRY_LABEL))
- ,m_sTblLabel(ModuleRes(STR_TBL_LABEL))
- ,m_aName(rDefault)
- ,m_rObjectNameCheck( _rObjectNameCheck )
- ,m_nType(CommandType::COMMAND)
- ,m_nFlags(_nFlags)
+ : m_aQryLabel(ModuleRes(STR_QRY_LABEL))
+ , m_sTblLabel(ModuleRes(STR_TBL_LABEL))
+ , m_aName(rDefault)
+ , m_rObjectNameCheck( _rObjectNameCheck )
+ , m_nType(CommandType::COMMAND)
+ , m_nFlags(_nFlags)
{
- m_aCatalog.SetDropDownLineCount( 10 );
- m_aSchema.SetDropDownLineCount( 10 );
+ pParent->get(m_pDescription, "descriptionft");
+ pParent->get(m_pCatalogLbl, "catalogft");
+ pParent->get(m_pCatalog, "catalog");
+ pParent->get(m_pSchemaLbl, "schemaft");
+ pParent->get(m_pSchema, "schema");
+ pParent->get(m_pLabel, "titleft");
+ pParent->get(m_pTitle, "title");
+ pParent->get(m_pPB_OK, "ok");
+
+ m_pCatalog->SetDropDownLineCount( 10 );
+ m_pSchema->SetDropDownLineCount( 10 );
}
using namespace ::com::sun::star::lang;
@@ -188,8 +183,8 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
sal_Int32 _nFlags)
- :ModalDialog( pParent, ModuleRes(DLG_SAVE_AS))
- ,m_xContext( _rxContext )
+ : ModalDialog(pParent, "SaveDialog", "dbaccess/ui/savedialog.ui")
+ , m_xContext( _rxContext )
{
m_pImpl = new OSaveAsDlgImpl(this,_rType,_xConnection,rDefault,_rObjectNameCheck,_nFlags);
@@ -202,41 +197,27 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
case CommandType::TABLE:
OSL_ENSURE( m_pImpl->m_xMetaData.is(), "OSaveAsDlg::OSaveAsDlg: no meta data for entering table names: this will crash!" );
{
- m_pImpl->m_aLabel.SetText(m_pImpl->m_sTblLabel);
- Point aPos(m_pImpl->m_aPB_OK.GetPosPixel());
+ m_pImpl->m_pLabel->SetText(m_pImpl->m_sTblLabel);
if(m_pImpl->m_xMetaData.is() && !m_pImpl->m_xMetaData->supportsCatalogsInTableDefinitions())
{
- m_pImpl->m_aCatalogLbl.Hide();
- m_pImpl->m_aCatalog.Hide();
-
- aPos = m_pImpl->m_aLabel.GetPosPixel();
-
- m_pImpl->m_aLabel.SetPosPixel(m_pImpl->m_aSchemaLbl.GetPosPixel());
- m_pImpl->m_aTitle.SetPosPixel(m_pImpl->m_aSchema.GetPosPixel());
-
- m_pImpl->m_aSchemaLbl.SetPosPixel(m_pImpl->m_aCatalogLbl.GetPosPixel());
- m_pImpl->m_aSchema.SetPosPixel(m_pImpl->m_aCatalog.GetPosPixel());
+ m_pImpl->m_pCatalogLbl->Hide();
+ m_pImpl->m_pCatalog->Hide();
}
else
{
// now fill the catalogs
- lcl_fillComboList( m_pImpl->m_aCatalog, _xConnection,
+ lcl_fillComboList( *m_pImpl->m_pCatalog, _xConnection,
&XDatabaseMetaData::getCatalogs, _xConnection->getCatalog() );
}
if ( !m_pImpl->m_xMetaData->supportsSchemasInTableDefinitions())
{
- m_pImpl->m_aSchemaLbl.Hide();
- m_pImpl->m_aSchema.Hide();
-
- aPos = m_pImpl->m_aLabel.GetPosPixel();
-
- m_pImpl->m_aLabel.SetPosPixel(m_pImpl->m_aSchemaLbl.GetPosPixel());
- m_pImpl->m_aTitle.SetPosPixel(m_pImpl->m_aSchema.GetPosPixel());
+ m_pImpl->m_pSchemaLbl->Hide();
+ m_pImpl->m_pSchema->Hide();
}
else
{
- lcl_fillComboList( m_pImpl->m_aSchema, _xConnection,
+ lcl_fillComboList( *m_pImpl->m_pSchema, _xConnection,
&XDatabaseMetaData::getSchemas, m_pImpl->m_xMetaData->getUserName() );
}
@@ -251,42 +232,33 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
sTable,
::dbtools::eInDataManipulation);
- sal_uInt16 nPos = m_pImpl->m_aCatalog.GetEntryPos(OUString(sCatalog));
+ sal_uInt16 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog));
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
- m_pImpl->m_aCatalog.SelectEntryPos(nPos);
+ m_pImpl->m_pCatalog->SelectEntryPos(nPos);
if ( !sSchema.isEmpty() )
{
- nPos = m_pImpl->m_aSchema.GetEntryPos(OUString(sSchema));
+ nPos = m_pImpl->m_pSchema->GetEntryPos(OUString(sSchema));
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
- m_pImpl->m_aSchema.SelectEntryPos(nPos);
+ m_pImpl->m_pSchema->SelectEntryPos(nPos);
}
- m_pImpl->m_aTitle.SetText(sTable);
+ m_pImpl->m_pTitle->SetText(sTable);
}
else
- m_pImpl->m_aTitle.SetText(m_pImpl->m_aName);
- m_pImpl->m_aTitle.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
-
- m_pImpl->m_aPB_OK.SetPosPixel(Point(m_pImpl->m_aPB_OK.GetPosPixel().X(),aPos.Y()));
- m_pImpl->m_aPB_CANCEL.SetPosPixel(Point(m_pImpl->m_aPB_CANCEL.GetPosPixel().X(),aPos.Y()));
- m_pImpl->m_aPB_HELP.SetPosPixel(Point(m_pImpl->m_aPB_HELP.GetPosPixel().X(),aPos.Y()));
+ m_pImpl->m_pTitle->SetText(m_pImpl->m_aName);
+ m_pImpl->m_pTitle->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
sal_Int32 nLength = m_pImpl->m_xMetaData.is() ? m_pImpl->m_xMetaData->getMaxTableNameLength() : 0;
nLength = nLength ? nLength : EDIT_NOLIMIT;
- m_pImpl->m_aTitle.SetMaxTextLen(nLength);
- m_pImpl->m_aSchema.SetMaxTextLen(nLength);
- m_pImpl->m_aCatalog.SetMaxTextLen(nLength);
+ m_pImpl->m_pTitle->SetMaxTextLen(nLength);
+ m_pImpl->m_pSchema->SetMaxTextLen(nLength);
+ m_pImpl->m_pCatalog->SetMaxTextLen(nLength);
sal_Bool bCheck = _xConnection.is() && isSQL92CheckEnabled(_xConnection);
- m_pImpl->m_aTitle.setCheck(bCheck); // enable non valid sql chars as well
- m_pImpl->m_aSchema.setCheck(bCheck); // enable non valid sql chars as well
- m_pImpl->m_aCatalog.setCheck(bCheck); // enable non valid sql chars as well
-
- Size aSize = GetSizePixel();
- aSize.Height() =
- aPos.Y() + m_pImpl->m_aPB_OK.GetSizePixel().Height() + m_pImpl->m_aTitle.GetSizePixel().Height() / 2;
- SetSizePixel(aSize);
+ m_pImpl->m_pTitle->setCheck(bCheck); // enable non valid sql chars as well
+ m_pImpl->m_pSchema->setCheck(bCheck); // enable non valid sql chars as well
+ m_pImpl->m_pCatalog->setCheck(bCheck); // enable non valid sql chars as well
}
break;
@@ -303,8 +275,8 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
const OUString& _sLabel,
const IObjectNameCheck& _rObjectNameCheck,
sal_Int32 _nFlags)
- :ModalDialog( pParent, ModuleRes(DLG_SAVE_AS))
- ,m_xContext( _rxContext )
+ : ModalDialog(pParent, "SaveDialog", "dbaccess/ui/savedialog.ui")
+ , m_xContext( _rxContext )
{
m_pImpl = new OSaveAsDlgImpl(this,rDefault,_rObjectNameCheck,_nFlags);
implInitOnlyTitle(_sLabel);
@@ -318,9 +290,9 @@ OSaveAsDlg::~OSaveAsDlg()
IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton)
{
- if (pButton == &m_pImpl->m_aPB_OK)
+ if (pButton == m_pImpl->m_pPB_OK)
{
- m_pImpl->m_aName = m_pImpl->m_aTitle.GetText();
+ m_pImpl->m_aName = m_pImpl->m_pTitle->GetText();
OUString sNameToCheck( m_pImpl->m_aName );
@@ -341,41 +313,28 @@ IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton)
EndDialog( RET_OK );
showError( aNameError, this, m_xContext );
- m_pImpl->m_aTitle.GrabFocus();
+ m_pImpl->m_pTitle->GrabFocus();
}
return 0;
}
IMPL_LINK(OSaveAsDlg, EditModifyHdl, Edit *, pEdit )
{
- if (pEdit == &m_pImpl->m_aTitle)
- m_pImpl->m_aPB_OK.Enable(!m_pImpl->m_aTitle.GetText().isEmpty());
+ if (pEdit == m_pImpl->m_pTitle)
+ m_pImpl->m_pPB_OK->Enable(!m_pImpl->m_pTitle->GetText().isEmpty());
return 0;
}
void OSaveAsDlg::implInitOnlyTitle(const OUString& _rLabel)
{
- m_pImpl->m_aLabel.SetText(_rLabel);
- m_pImpl->m_aCatalogLbl.Hide();
- m_pImpl->m_aCatalog.Hide();
- m_pImpl->m_aSchemaLbl.Hide();
- m_pImpl->m_aSchema.Hide();
-
- Point aPos(m_pImpl->m_aSchemaLbl.GetPosPixel());
- m_pImpl->m_aLabel.SetPosPixel(m_pImpl->m_aCatalogLbl.GetPosPixel());
- m_pImpl->m_aTitle.SetPosPixel(m_pImpl->m_aCatalog.GetPosPixel());
-
- m_pImpl->m_aPB_OK.SetPosPixel(Point(m_pImpl->m_aPB_OK.GetPosPixel().X(),aPos.Y()));
- m_pImpl->m_aPB_CANCEL.SetPosPixel(Point(m_pImpl->m_aPB_CANCEL.GetPosPixel().X(),aPos.Y()));
- m_pImpl->m_aPB_HELP.SetPosPixel(Point(m_pImpl->m_aPB_HELP.GetPosPixel().X(),aPos.Y()));
-
- sal_Int32 nNewHeight =
- aPos.Y() + m_pImpl->m_aPB_OK.GetSizePixel().Height() + m_pImpl->m_aTitle.GetSizePixel().Height() / 2;
-
- SetSizePixel(Size(GetSizePixel().Width(), nNewHeight));
-
- m_pImpl->m_aTitle.SetText(m_pImpl->m_aName);
- m_pImpl->m_aTitle.setCheck(sal_False); // enable non valid sql chars as well
+ m_pImpl->m_pLabel->SetText(_rLabel);
+ m_pImpl->m_pCatalogLbl->Hide();
+ m_pImpl->m_pCatalog->Hide();
+ m_pImpl->m_pSchemaLbl->Hide();
+ m_pImpl->m_pSchema->Hide();
+
+ m_pImpl->m_pTitle->SetText(m_pImpl->m_aName);
+ m_pImpl->m_pTitle->setCheck(sal_False); // enable non valid sql chars as well
}
void OSaveAsDlg::implInit()
@@ -383,47 +342,21 @@ void OSaveAsDlg::implInit()
if ( 0 == ( m_pImpl->m_nFlags & SAD_ADDITIONAL_DESCRIPTION ) )
{
// hide the description window
- m_pImpl->m_aDescription.Hide();
-
- // the number of pixels we have to move the other controls
- sal_Int32 nMoveUp = m_pImpl->m_aCatalog.GetPosPixel().Y() - m_pImpl->m_aDescription.GetPosPixel().Y();
-
- // loop to all controls and move them ...
- for ( Window* pChildControl = GetWindow( WINDOW_FIRSTCHILD );
- pChildControl;
- pChildControl= pChildControl->GetWindow( WINDOW_NEXT )
- )
- {
- if ( &m_pImpl->m_aDescription != pChildControl )
- {
- Point aPos = pChildControl->GetPosPixel();
- aPos.Y() -= nMoveUp;
- pChildControl->SetPosPixel(aPos);
- }
- }
-
- // change our own size accordingly
- Size aSize = GetSizePixel();
- aSize.Height() -= nMoveUp;
- SetSizePixel(aSize);
+ m_pImpl->m_pDescription->Hide();
}
if ( SAD_TITLE_PASTE_AS == ( m_pImpl->m_nFlags & SAD_TITLE_PASTE_AS ) )
SetText( ModuleRes( STR_TITLE_PASTE_AS ) );
else if ( SAD_TITLE_RENAME == ( m_pImpl->m_nFlags & SAD_TITLE_RENAME ) )
- {
SetText( ModuleRes( STR_TITLE_RENAME ) );
- m_pImpl->m_aTitle.SetHelpId(HID_DLG_RENAME);
- }
- m_pImpl->m_aPB_OK.SetClickHdl(LINK(this,OSaveAsDlg,ButtonClickHdl));
- m_pImpl->m_aTitle.SetModifyHdl(LINK(this,OSaveAsDlg,EditModifyHdl));
- m_pImpl->m_aTitle.GrabFocus();
- FreeResource();
+ m_pImpl->m_pPB_OK->SetClickHdl(LINK(this,OSaveAsDlg,ButtonClickHdl));
+ m_pImpl->m_pTitle->SetModifyHdl(LINK(this,OSaveAsDlg,EditModifyHdl));
+ m_pImpl->m_pTitle->GrabFocus();
}
OUString OSaveAsDlg::getName() const { return m_pImpl->m_aName; }
-OUString OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : OUString(); }
-OUString OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : OUString(); }
+OUString OSaveAsDlg::getCatalog() const { return m_pImpl->m_pCatalog->IsVisible() ? m_pImpl->m_pCatalog->GetText() : OUString(); }
+OUString OSaveAsDlg::getSchema() const { return m_pImpl->m_pSchema->IsVisible() ? m_pImpl->m_pSchema->GetText() : OUString(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgsave.hrc b/dbaccess/source/ui/dlg/dlgsave.hrc
deleted file mode 100644
index 21d7a67..0000000
--- a/dbaccess/source/ui/dlg/dlgsave.hrc
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-
-#ifndef DBAUI_DLGSAVE_HRC
-#define DBAUI_DLGSAVE_HRC
-
-// defines ------------------------------------------------------------------
-
-#define PB_OK 1
-#define PB_CANCEL 1
-#define PB_HELP 1
-
-#define ET_CATALOG 1
-#define ET_SCHEMA 2
-#define ET_TITLE 3
-
-#define FT_DESCRIPTION 1
-#define FT_CATALOG 2
-#define FT_SCHEMA 3
-#define FT_TITLE 4
-
-#define STR_TBL_LABEL 1
-#define STR_VW_LABEL 2
-#define STR_QRY_LABEL 3
-#define STR_TITLE_RENAME 4
-#define STR_TITLE_PASTE_AS 6
-
-#endif // DBAUI_DLGSAVE_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgsave.src b/dbaccess/source/ui/dlg/dlgsave.src
deleted file mode 100644
index 44fd740..0000000
--- a/dbaccess/source/ui/dlg/dlgsave.src
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-
-#include "dlgsave.hrc"
-#include "dbu_dlg.hrc"
-#include "dbaccess_helpid.hrc"
-
-ModalDialog DLG_SAVE_AS
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpId = HID_DLG_SAVE_AS ;
- Size = MAP_APPFONT ( 174 , 75 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "Save As" ;
-
- FixedText FT_DESCRIPTION
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 174 - 12 , 16 ) ;
- WordBreak=TRUE;
- Text [ en-US ] = "Please enter a name for the object to be created:";
- };
-
- FixedText FT_CATALOG
- {
- Pos = MAP_APPFONT ( 6 , 26 ) ;
- Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "~Catalog";
- };
- ComboBox ET_CATALOG
- {
- HelpID = "dbaccess:ComboBox:DLG_SAVE_AS:ET_CATALOG";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 77 , 25 ) ;
- Size = MAP_APPFONT ( 89 , 12 ) ;
- SVLook = TRUE ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- AutoHScroll = TRUE ;
- };
- FixedText FT_SCHEMA
- {
- Pos = MAP_APPFONT ( 6 , 43 ) ;
- Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "~Schema";
- };
- ComboBox ET_SCHEMA
- {
- HelpID = "dbaccess:ComboBox:DLG_SAVE_AS:ET_SCHEMA";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 77 , 42 ) ;
- Size = MAP_APPFONT ( 89 , 12 ) ;
- SVLook = TRUE ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- AutoHScroll = TRUE ;
- };
- FixedText FT_TITLE
- {
- Pos = MAP_APPFONT ( 6 , 60 ) ;
- Size = MAP_APPFONT ( 70 , 10 ) ;
- };
- Edit ET_TITLE
- {
- HelpID = "dbaccess:Edit:DLG_SAVE_AS:ET_TITLE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 77 , 59 ) ;
- Size = MAP_APPFONT ( 89 , 12 ) ;
- TabStop = TRUE ;
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 6 , 77 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 62 , 77 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 118 , 77 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- // String Resourcen ------------------------------------------------------------------
- String STR_TBL_LABEL
- {
- Text [ en-US ] = "~Table Name" ;
- };
- String STR_VW_LABEL
- {
- Text [ en-US ] = "~Name of table view" ;
- };
- String STR_QRY_LABEL
- {
- Text [ en-US ] = "~Query name" ;
- };
- String STR_TITLE_RENAME
- {
- Text [ en-US ] = "Rename to";
- };
- String STR_TITLE_PASTE_AS
- {
- Text [ en-US ] = "Insert as";
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 17aca78..1532133 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -81,7 +81,6 @@
#define DLG_DATASOURCE_SELECTION RID_DIALOG_START + 4
#define DLG_PARAMETERS RID_DIALOG_START + 5
-#define DLG_SAVE_AS RID_DIALOG_START + 11
#define DLG_JOIN_TABADD RID_DIALOG_START + 14
#define DLG_QRY_JOIN RID_DIALOG_START + 15
#define WIZ_RTFCOPYTABLE RID_DIALOG_START + 16
@@ -267,6 +266,11 @@
#define STR_PAGETITLE_ADVANCED RID_STR_GEN_START + 39
#define RID_STR_EXTENSION_NOT_PRESENT RID_STR_GEN_START + 40
#define STR_PAGETITLE_CONNECTION RID_STR_GEN_START + 41
+#define STR_TBL_LABEL RID_STR_GEN_START + 42
+#define STR_VW_LABEL RID_STR_GEN_START + 43
+#define STR_QRY_LABEL RID_STR_GEN_START + 44
+#define STR_TITLE_RENAME RID_STR_GEN_START + 45
+#define STR_TITLE_PASTE_AS RID_STR_GEN_START + 46
//========================================================================
// untyped resources
diff --git a/dbaccess/uiconfig/ui/savedialog.ui b/dbaccess/uiconfig/ui/savedialog.ui
new file mode 100644
index 0000000..1127462
--- /dev/null
+++ b/dbaccess/uiconfig/ui/savedialog.ui
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Tue Feb 4 11:57:25 2014 -->
+<interface>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="SaveDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Save As</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="descriptionft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Please enter a name for the object to be created:</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">52</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="catalogft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Catalog</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">catalog</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="schemaft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Schema</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">schema</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="dbulo-OSQLNameComboBox" id="schema">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="titleft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">title</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="dbulo-OSQLNameEdit" id="title">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="dbulo-OSQLNameComboBox" id="catalog">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 0685ecb..a509729 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -33,6 +33,9 @@
<glade-widget-class title="Hyphen Edit" name="cuilo-HyphenEdit"
generic-name="ReplaceEdit" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
+ <glade-widget-class title="OSQL NameEdit" name="dbulo-OSQLNameEdit"
+ generic-name="OSQLNameEdit" parent="GtkEntry"
+ icon-name="widget-gtk-textentry"/>
<glade-widget-class title="VclComboBoxText" name="VclComboBoxText"
generic-name="ComboBoxText" parent="GtkComboBoxText"
@@ -214,6 +217,11 @@
<glade-widget-class title="Limit ListBox" name="dbulo-LimitBox"
generic-name="LimitBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
+
+ <glade-widget-class title="OSQL NameComboBox" name="dbulo-OSQLNameComboBox"
+ generic-name="OSQLNameComboBox" parent="GtkComboBox"
+ icon-name="widget-gtk-combobox"/>
+
<glade-widget-class title="Font Preview" name="svxlo-SvxFontPrevWindow"
generic-name="Font Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea">
commit c234d4c2cd63bcd8fb7e4a39b8f36226c289373d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 4 10:14:00 2014 +0000
swap arguments around to smooth .ui conversions
Change-Id: Ifa2a1b30db70063521c156a1d416fbad45890546
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
index b0392e8..0fb95c0 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -62,7 +62,7 @@ namespace dbaui
sal_uInt16 nHelpId,
short nPosition,
WinBits nWinStyle)
- :OSQLNameEdit(pParent, _rAllowedChars,nWinStyle)
+ :OSQLNameEdit(pParent, nWinStyle, _rAllowedChars)
,m_nPos(nPosition)
{
m_strHelpText = ModuleRes(nHelpId);
diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx
index d192fde..b3c32fe3 100644
--- a/dbaccess/source/ui/inc/SqlNameEdit.hxx
+++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx
@@ -56,7 +56,7 @@ namespace dbaui
,public OSQLNameChecker
{
public:
- OSQLNameEdit(Window* _pParent,const OUString& _rAllowedChars, WinBits nStyle = WB_BORDER)
+ OSQLNameEdit(Window* _pParent,WinBits nStyle = WB_BORDER, const OUString& _rAllowedChars = OUString())
: Edit(_pParent,nStyle)
,OSQLNameChecker(_rAllowedChars)
{
@@ -77,14 +77,14 @@ namespace dbaui
,public OSQLNameChecker
{
public:
- OSQLNameComboBox(Window* _pParent,const OUString& _rAllowedChars, WinBits nStyle = WB_BORDER)
+ OSQLNameComboBox(Window* _pParent,WinBits nStyle = WB_BORDER, const OUString& _rAllowedChars = OUString())
: ComboBox(_pParent,nStyle)
- ,OSQLNameChecker(_rAllowedChars)
+ , OSQLNameChecker(_rAllowedChars)
{
}
OSQLNameComboBox(Window* _pParent,const ResId& _rRes,const OUString& _rAllowedChars = OUString())
: ComboBox(_pParent,_rRes)
- ,OSQLNameChecker(_rAllowedChars)
+ , OSQLNameChecker(_rAllowedChars)
{
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 2a5cd9a..7f5cc44 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -229,7 +229,7 @@ void OTableEditorCtrl::InitCellController()
OSL_FAIL("getMaxColumnNameLength");
}
- pNameCell = new OSQLNameEdit( &GetDataWindow(), sExtraNameChars,WB_LEFT );
+ pNameCell = new OSQLNameEdit(&GetDataWindow(), WB_LEFT, sExtraNameChars);
pNameCell->SetMaxTextLen( nMaxTextLen );
pNameCell->setCheck( isSQL92CheckEnabled(xCon) );
commit 8bc81f6f16a842ccb9f2dba01165d0c62697736c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 4 11:37:14 2014 +0000
Related: fdo#69645 don't know if mxParent could become invalid..
after get and before call through mpParent. Probably can't, but
I don't know for sure.
Change-Id: Ib40e0709f1966687a37cc5b84bae1d554a5b4474
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index 089c868..3b927ea 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -2060,9 +2060,13 @@ void AnimationNode::fireChangeListener()
}
}
- //fdo#69645 use get() on WeakReference of mxParent to test if mpParent is still valid
- if( mpParent && mxParent.get().is() )
- mpParent->fireChangeListener();
+ //fdo#69645 use WeakReference of mxParent to test if mpParent is still valid
+ if (mpParent)
+ {
+ Reference<XInterface> xGuard(mxParent);
+ if (xGuard.is())
+ mpParent->fireChangeListener();
+ }
}
// --------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list