[Libreoffice-commits] core.git: 22 commits - avmedia/source basctl/source chart2/source dbaccess/source desktop/source include/sfx2 include/vcl offapi/com oovbaapi/ooo sc/qa scripting/source sc/source sfx2/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk test/source vcl/source xmlsecurity/source
Caolán McNamara
caolanm at redhat.com
Tue Sep 2 04:15:24 PDT 2014
avmedia/source/opengl/oglwindow.cxx | 2
basctl/source/basicide/basobj3.cxx | 2
basctl/source/inc/basobj.hxx | 2
chart2/source/view/charttypes/GL3DBarChart.cxx | 5 +
chart2/source/view/main/GL3DRenderer.cxx | 7 +
dbaccess/source/ui/app/AppController.hxx | 2
dbaccess/source/ui/app/AppControllerGen.cxx | 2
desktop/source/deployment/registry/dp_backend.cxx | 5 -
desktop/source/deployment/registry/inc/dp_backend.h | 4
desktop/source/deployment/registry/package/dp_package.cxx | 7 -
include/sfx2/basedlgs.hxx | 4
include/vcl/dialog.hxx | 5 -
include/vcl/floatwin.hxx | 5 -
include/vcl/syswin.hxx | 11 +-
offapi/com/sun/star/deployment/XPackage.idl | 3
offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl | 1
oovbaapi/ooo/vba/word/XParagraphFormat.idl | 7 +
oovbaapi/ooo/vba/word/XView.idl | 7 +
sc/qa/unit/subsequent_export-test.cxx | 2
sc/source/ui/vba/vbaaxes.cxx | 2
sc/source/ui/vba/vbaaxes.hxx | 3
sc/source/ui/vba/vbaaxis.cxx | 2
scripting/source/provider/ActiveMSPList.cxx | 47 +++++-----
scripting/source/provider/ActiveMSPList.hxx | 1
sfx2/source/dialog/basedlgs.cxx | 19 ++++
sfx2/source/view/viewfrm.cxx | 8 +
sw/UIConfig_swriter.mk | 1
sw/inc/envelp.hrc | 2
sw/inc/helpid.h | 1
sw/source/core/docnode/node.cxx | 2
sw/source/ui/envelp/label.src | 21 ----
sw/source/ui/uno/swdetect.cxx | 17 ++-
sw/source/ui/vba/vbaparagraphformat.cxx | 2
sw/source/ui/vba/vbaparagraphformat.hxx | 2
sw/source/ui/vba/vbaview.cxx | 2
sw/source/ui/vba/vbaview.hxx | 2
sw/source/uibase/envelp/label.hrc | 4
sw/source/uibase/envelp/syncbtn.cxx | 16 +--
sw/source/uibase/inc/syncbtn.hxx | 8 -
sw/uiconfig/swriter/ui/floatingsync.ui | 42 +++++++++
test/source/primitive2dxmldump.cxx | 3
vcl/source/uipreviewer/previewer.cxx | 19 ++--
vcl/source/window/builder.cxx | 53 ++++++++++--
vcl/source/window/dialog.cxx | 23 ++---
vcl/source/window/floatwin.cxx | 22 ++++
vcl/source/window/keycod.cxx | 17 ++-
vcl/source/window/syswin.cxx | 17 +--
xmlsecurity/source/component/documentdigitalsignatures.cxx | 2
xmlsecurity/source/component/documentdigitalsignatures.hxx | 2
49 files changed, 294 insertions(+), 151 deletions(-)
New commits:
commit 09b667d155e8ea6963ede60ae5860952af20de4f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 2 11:26:34 2014 +0100
widget leak on filling non-existing infobar in help
Window () with live children destroyed: PushButton (Edit document)
Change-Id: I2aa05f59f08cfa78ba895933ef298908a9cbb675
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 40d4b67..1e70bd6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3346,6 +3346,14 @@ void SfxViewFrame::AppendInfoBar( const OUString& sId, const OUString& sMessage,
pInfoBars->appendInfoBar( sId, sMessage, aButtons );
ShowChildWindow( nId );
}
+ else
+ {
+ SAL_WARN( "sfx.view", "No consumer for InfoBar buttons, so deleting them instead" );
+ for (std::vector< PushButton* >::iterator it = aButtons.begin(); it != aButtons.end(); ++it)
+ {
+ delete *it;
+ }
+ }
}
void SfxViewFrame::RemoveInfoBar( const OUString& sId )
commit 2f76c093f5e7150914c27d49d5275c885a6ff8dc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 1 22:26:37 2014 +0100
map deletable to WB_CLOSEABLE
Change-Id: I13fd6878c3443055428f01bb946caaaf7e6dddb0
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 804de4a..14d303c 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -65,7 +65,7 @@ protected:
public:
SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; }
- virtual void doDeferredInit(bool bResizable) SAL_OVERRIDE;
+ virtual void doDeferredInit(bool bResizable, bool bCloseable) SAL_OVERRIDE;
protected:
explicit Dialog( WindowType nType );
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 6762627..02ae4ca 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -117,7 +117,7 @@ public:
SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 );
SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect();
SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
- virtual void doDeferredInit(bool bResizable) SAL_OVERRIDE;
+ virtual void doDeferredInit(bool bResizable, bool bCloseable) SAL_OVERRIDE;
public:
explicit FloatingWindow(Window* pParent, WinBits nStyle = WB_STDFLOATWIN);
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 168a0eb..d901ccd 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -276,7 +276,7 @@ public:
SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutTimer.IsActive(); }
- virtual void doDeferredInit(bool bResizable);
+ virtual void doDeferredInit(bool bResizable, bool bCloseable);
};
#endif // INCLUDED_VCL_SYSWIN_HXX
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 3016ea6..ed310f0 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -595,6 +595,18 @@ namespace
return bResizable;
}
+ bool extractCloseable(VclBuilder::stringmap &rMap)
+ {
+ bool bCloseable = true;
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("deletable"));
+ if (aFind != rMap.end())
+ {
+ bCloseable = toBool(aFind->second);
+ rMap.erase(aFind);
+ }
+ return bCloseable;
+ }
+
bool extractEntry(VclBuilder::stringmap &rMap)
{
bool bHasEntry = false;
@@ -1694,7 +1706,7 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass,
if (pParent->IsSystemWindow())
{
SystemWindow *pSysWin = static_cast<SystemWindow*>(pCurrentChild);
- pSysWin->doDeferredInit(extractResizable(rProps));
+ pSysWin->doDeferredInit(extractResizable(rProps), extractCloseable(rProps));
m_bToplevelHasDeferredInit = false;
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index d23d2af..5f04074 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -477,11 +477,13 @@ OUString VclBuilderContainer::getUIRootDir()
//we can't change sizeable after the fact, so need to defer until we know and then
//do the init. Find the real parent stashed in mpDialogParent.
-void Dialog::doDeferredInit(bool bResizable)
+void Dialog::doDeferredInit(bool bResizable, bool bCloseable)
{
WinBits nBits = WB_3DLOOK|WB_CLOSEABLE|WB_MOVEABLE;
if (bResizable)
nBits |= WB_SIZEABLE;
+ if (bCloseable)
+ nBits |= WB_CLOSEABLE;
Window *pParent = mpDialogParent;
mpDialogParent = NULL;
ImplInit(pParent, nBits);
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 5b35585..37e7a22 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -171,11 +171,13 @@ FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUStri
}
//Find the real parent stashed in mpDialogParent.
-void FloatingWindow::doDeferredInit(bool bResizable)
+void FloatingWindow::doDeferredInit(bool bResizable, bool bCloseable)
{
WinBits nBits = WB_MOVEABLE|WB_3DLOOK;
if (bResizable)
nBits |= WB_SIZEABLE;
+ if (bCloseable)
+ nBits |= WB_CLOSEABLE;
Window *pParent = mpDialogParent;
mpDialogParent = NULL;
ImplInit(pParent, nBits);
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index db072cc..1cf207c 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -1104,7 +1104,7 @@ void SystemWindow::DoInitialLayout()
}
}
-void SystemWindow::doDeferredInit(bool /*bResizable*/)
+void SystemWindow::doDeferredInit(bool /*bResizable*/, bool /*bCloseable*/)
{
SAL_WARN("vcl.layout", "SystemWindow in layout without doDeferredInit impl");
}
commit 05d4077b724f91fca736d3c3fd64f28e304d7172
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 1 07:17:09 2014 +0100
rearrange matters to get FloatingWindows working loaded from .ui
Change-Id: I099c810533c4590ee3182e1edf27e9038ed44f30
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 94ea7d6..804de4a 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -39,7 +39,6 @@ class VclButtonBox;
class VCL_DLLPUBLIC Dialog : public SystemWindow
{
private:
- Window* mpDialogParent;
Dialog* mpPrevExecuteDlg;
DialogImpl* mpDialogImpl;
long mnMousePositioned;
@@ -47,7 +46,6 @@ private:
bool mbOldSaveBack;
bool mbInClose;
bool mbModalMode;
- bool mbIsDefferedInit;
VclButtonBox* mpActionArea;
VclBox* mpContentArea;
@@ -67,8 +65,7 @@ protected:
public:
SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; }
- SAL_DLLPRIVATE void doDeferredInit(bool bResizable);
- SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDefferedInit; }
+ virtual void doDeferredInit(bool bResizable) SAL_OVERRIDE;
protected:
explicit Dialog( WindowType nType );
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 75dc561..6762627 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -117,9 +117,10 @@ public:
SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 );
SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect();
SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
+ virtual void doDeferredInit(bool bResizable) SAL_OVERRIDE;
public:
- explicit FloatingWindow( Window* pParent, WinBits nStyle = WB_STDFLOATWIN );
+ explicit FloatingWindow(Window* pParent, WinBits nStyle = WB_STDFLOATWIN);
explicit FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
explicit FloatingWindow( Window* pParent, const ResId& );
virtual ~FloatingWindow();
@@ -131,7 +132,7 @@ public:
virtual void PopupModeEnd();
void SetTitleType( sal_uInt16 nTitle );
- sal_uInt16 GetTitleType() const { return mnTitle; }
+ sal_uInt16 GetTitleType() const { return mnTitle; }
void StartPopupMode( const Rectangle& rRect, sal_uLong nFlags = 0 );
void StartPopupMode( ToolBox* pBox, sal_uLong nFlags = 0 );
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 033018b..168a0eb 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -147,17 +147,19 @@ private:
bool mbDockBtn;
bool mbHideBtn;
bool mbSysChild;
- bool mbIsDefferedInit;
bool mbIsCalculatingInitialLayoutSize;
bool mbInitialLayoutDone;
sal_uInt16 mnMenuBarMode;
sal_uInt16 mnIcon;
ImplData* mpImplData;
Timer maLayoutTimer;
-
+protected:
+ bool mbIsDefferedInit;
+ Window* mpDialogParent;
public:
using Window::ImplIsInTaskPaneList;
SAL_DLLPRIVATE bool ImplIsInTaskPaneList( Window* pWin );
+ SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDefferedInit; }
private:
SAL_DLLPRIVATE void Init();
@@ -168,7 +170,7 @@ private:
protected:
// Single argument ctors shall be explicit.
explicit SystemWindow(WindowType nType);
- explicit SystemWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, WindowType nType);
+ void loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
void SetWindowStateData( const WindowStateData& rData );
@@ -187,7 +189,6 @@ public:
virtual void Resizing( Size& rSize );
virtual void Resize() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
- virtual void StateChanged(StateChangedType nStateChange) SAL_OVERRIDE;
virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE;
bool isLayoutEnabled() const;
void setOptimalLayoutSize();
@@ -274,6 +275,8 @@ public:
const Link& GetCloseHdl() const;
SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutTimer.IsActive(); }
+
+ virtual void doDeferredInit(bool bResizable);
};
#endif // INCLUDED_VCL_SYSWIN_HXX
diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx
index 346f4d3..8040059 100644
--- a/vcl/source/uipreviewer/previewer.cxx
+++ b/vcl/source/uipreviewer/previewer.cxx
@@ -70,17 +70,22 @@ int UIPreviewApp::Main()
{
VclBuilder aBuilder(pDialog, OUString(), uifiles[0]);
- Dialog *pRealDialog = dynamic_cast<Dialog*>(aBuilder.get_widget_root());
+ Window *pRoot = aBuilder.get_widget_root();
+ Dialog *pRealDialog = dynamic_cast<Dialog*>(pRoot);
if (!pRealDialog)
pRealDialog = pDialog;
- if (pRealDialog)
- {
- pRealDialog->SetText(OUString("LibreOffice ui-previewer"));
- pRealDialog->SetStyle(pDialog->GetStyle()|WB_CLOSEABLE);
- pRealDialog->Execute();
- }
+ pRealDialog->SetText(OUString("LibreOffice ui-previewer"));
+ pRealDialog->SetStyle(pDialog->GetStyle()|WB_CLOSEABLE);
+ /*
+ Force a new STATE_CHANGE_INITSHOW for the edge case where pRoot
+ is not a dialog or contents of a dialog, but instead a visible floating window
+ which may have had initshow already done before it was given children
+ */
+ pRoot->Hide();
+ pRoot->Show();
+ pRealDialog->Execute();
}
delete pDialog;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 636e227..3016ea6 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -176,7 +176,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString&
, m_pParserState(new ParserState)
, m_xFrame(rFrame)
{
- m_bToplevelHasDeferredInit = pParent && pParent->IsDialog() && static_cast<Dialog*>(pParent)->isDeferredInit();
+ m_bToplevelHasDeferredInit = pParent && pParent->IsSystemWindow() && static_cast<SystemWindow*>(pParent)->isDeferredInit();
m_bToplevelHasDeferredProperties = m_bToplevelHasDeferredInit;
sal_Int32 nIdx = m_sHelpRoot.lastIndexOf('.');
@@ -571,6 +571,18 @@ OString VclBuilder::extractCustomProperty(VclBuilder::stringmap &rMap)
namespace
{
+ OString extractTypeHint(VclBuilder::stringmap &rMap)
+ {
+ OString sRet("normal");
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("type-hint"));
+ if (aFind != rMap.end())
+ {
+ sRet = aFind->second;
+ rMap.erase(aFind);
+ }
+ return sRet;
+ }
+
bool extractResizable(VclBuilder::stringmap &rMap)
{
bool bResizable = true;
@@ -1571,6 +1583,21 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
return NULL; // no widget to be created
}
}
+ else if (name == "GtkWindow")
+ {
+ WinBits nBits = WB_SYSTEMWINDOW|WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE|WB_HIDE;
+ if (extractResizable(rMap))
+ nBits |= WB_SIZEABLE;
+ OString sType(extractTypeHint(rMap));
+ if (sType == "utility")
+ {
+ pWindow = new FloatingWindow(pParent, nBits);
+ }
+ else
+ {
+ SAL_WARN("vcl.layout", "no mapping yet for GtkWindow of type " << sType.getStr() << " yet");
+ }
+ }
else
{
sal_Int32 nDelim = name.indexOf('-');
@@ -1660,13 +1687,17 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass,
if (m_pParent && !isConsideredGtkPseudo(m_pParent) && !m_sID.isEmpty() && rID.equals(m_sID))
{
pCurrentChild = m_pParent;
- //toplevels default to resizable
- if (pCurrentChild->IsDialog())
+
+ //toplevels default to resizable and apparently you can't change them
+ //afterwards, so we need to wait until now before we can truly
+ //initialize the dialog.
+ if (pParent->IsSystemWindow())
{
- Dialog *pDialog = static_cast<Dialog*>(pCurrentChild);
- pDialog->doDeferredInit(extractResizable(rProps));
+ SystemWindow *pSysWin = static_cast<SystemWindow*>(pCurrentChild);
+ pSysWin->doDeferredInit(extractResizable(rProps));
m_bToplevelHasDeferredInit = false;
}
+
if (pCurrentChild->GetHelpId().isEmpty())
{
pCurrentChild->SetHelpId(m_sHelpRoot + m_sID);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 1fa6f40..d23d2af 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -339,7 +339,6 @@ struct DialogImpl
void Dialog::ImplInitDialogData()
{
mpWindowImpl->mbDialog = true;
- mpDialogParent = NULL;
mpPrevExecuteDlg = NULL;
mbInExecute = false;
mbOldSaveBack = false;
@@ -450,7 +449,6 @@ void Dialog::ImplInitSettings()
Dialog::Dialog( WindowType nType )
: SystemWindow( nType )
- , mbIsDefferedInit(false)
{
ImplInitDialogData();
}
@@ -491,26 +489,21 @@ void Dialog::doDeferredInit(bool bResizable)
}
Dialog::Dialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
- : SystemWindow( WINDOW_DIALOG )
- , mbIsDefferedInit(true)
+ : SystemWindow(WINDOW_DIALOG)
{
ImplInitDialogData();
- mpDialogParent = pParent; //will be unset in doDeferredInit
- m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID);
+ loadUI(pParent, rID, rUIXMLDescription);
}
Dialog::Dialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, WindowType nType)
- : SystemWindow( nType )
- , mbIsDefferedInit(true)
+ : SystemWindow(nType)
{
ImplInitDialogData();
- mpDialogParent = pParent; //will be unset in doDeferredInit
- m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID);
+ loadUI(pParent, rID, rUIXMLDescription);
}
-Dialog::Dialog( Window* pParent, WinBits nStyle )
- : SystemWindow( WINDOW_DIALOG )
- , mbIsDefferedInit(false)
+Dialog::Dialog(Window* pParent, WinBits nStyle)
+ : SystemWindow(WINDOW_DIALOG)
{
ImplInitDialogData();
ImplInit( pParent, nStyle );
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index cda5def..5b35585 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -165,8 +165,21 @@ FloatingWindow::FloatingWindow( Window* pParent, const ResId& rResId ) :
}
FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
- : SystemWindow(pParent, rID, rUIXMLDescription, WINDOW_FLOATINGWINDOW)
+ : SystemWindow(WINDOW_FLOATINGWINDOW)
{
+ loadUI(pParent, rID, rUIXMLDescription);
+}
+
+//Find the real parent stashed in mpDialogParent.
+void FloatingWindow::doDeferredInit(bool bResizable)
+{
+ WinBits nBits = WB_MOVEABLE|WB_3DLOOK;
+ if (bResizable)
+ nBits |= WB_SIZEABLE;
+ Window *pParent = mpDialogParent;
+ mpDialogParent = NULL;
+ ImplInit(pParent, nBits);
+ mbIsDefferedInit = false;
}
void FloatingWindow::ImplLoadRes( const ResId& rResId )
@@ -554,6 +567,11 @@ bool FloatingWindow::Notify( NotifyEvent& rNEvt )
void FloatingWindow::StateChanged( StateChangedType nType )
{
+ if (nType == STATE_CHANGE_INITSHOW)
+ {
+ DoInitialLayout();
+ }
+
SystemWindow::StateChanged( nType );
if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index a3e6ef7..db072cc 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -81,6 +81,7 @@ void SystemWindow::Init()
mbInitialLayoutDone = false;
mnMenuBarMode = MENUBAR_MODE_NORMAL;
mnIcon = 0;
+ mpDialogParent = NULL;
//To-Do, reuse maResizeTimer
maLayoutTimer.SetTimeout(50);
@@ -89,14 +90,15 @@ void SystemWindow::Init()
SystemWindow::SystemWindow(WindowType nType)
: Window(nType)
+ , mbIsDefferedInit(false)
{
Init();
}
-SystemWindow::SystemWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, WindowType nType)
- : Window(pParent, nType)
+void SystemWindow::loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
{
- Init();
+ mbIsDefferedInit = true;
+ mpDialogParent = pParent; //should be unset in doDeferredInit
m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID);
}
@@ -1102,14 +1104,9 @@ void SystemWindow::DoInitialLayout()
}
}
-void SystemWindow::StateChanged( StateChangedType nType )
+void SystemWindow::doDeferredInit(bool /*bResizable*/)
{
- Window::StateChanged(nType);
-
- if (nType == STATE_CHANGE_INITSHOW && !mbInitialLayoutDone)
- {
- DoInitialLayout();
- }
+ SAL_WARN("vcl.layout", "SystemWindow in layout without doDeferredInit impl");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 2f1eed483930a96a40a7013a9338a7e0869fc960
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 16:20:38 2014 +0100
createNonDocMSPs->ensureNonDocMSPs
put the double-lockery into ensureNonDocMSPs and
the contents into a new createNonDocMSPs
Change-Id: Id09c933396e1a6ae1c45be79131a75729b16932b
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index 7805114..5bfbb39 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -105,7 +105,7 @@ ActiveMSPList::getMSPFromAnyContext( const Any& aContext )
return msp;
}
- createNonDocMSPs();
+ ensureNonDocMSPs();
return m_hMsps[ shareDirString ];
}
@@ -264,10 +264,32 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception )
}
}
-
void
ActiveMSPList::createNonDocMSPs()
{
+ // do creation of user and share MSPs here
+ OUString serviceName("com.sun.star.script.provider.MasterScriptProvider");
+ Sequence< Any > args(1);
+
+ args[ 0 ] <<= userDirString;
+ Reference< provider::XScriptProvider > userMsp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( serviceName, args, m_xContext ), UNO_QUERY );
+ // should check if provider reference is valid
+ m_hMsps[ userDirString ] = userMsp;
+
+ args[ 0 ] <<= shareDirString;
+ Reference< provider::XScriptProvider > shareMsp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( serviceName, args, m_xContext ), UNO_QUERY );
+ // should check if provider reference is valid
+ m_hMsps[ shareDirString ] = shareMsp;
+
+ args[ 0 ] <<= bundledDirString;
+ Reference< provider::XScriptProvider > bundledMsp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( serviceName, args, m_xContext ), UNO_QUERY );
+ // should check if provider reference is valid
+ m_hMsps[ bundledDirString ] = bundledMsp;
+}
+
+void
+ActiveMSPList::ensureNonDocMSPs()
+{
static bool created = false;
if ( created )
{
@@ -280,28 +302,9 @@ ActiveMSPList::createNonDocMSPs()
{
return;
}
- // do creation of user and share MSPs here
- OUString serviceName("com.sun.star.script.provider.MasterScriptProvider");
- Sequence< Any > args(1);
-
- args[ 0 ] <<= userDirString;
- Reference< provider::XScriptProvider > userMsp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( serviceName, args, m_xContext ), UNO_QUERY );
- // should check if provider reference is valid
- m_hMsps[ userDirString ] = userMsp;
-
- args[ 0 ] <<= shareDirString;
- Reference< provider::XScriptProvider > shareMsp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( serviceName, args, m_xContext ), UNO_QUERY );
- // should check if provider reference is valid
- m_hMsps[ shareDirString ] = shareMsp;
-
- args[ 0 ] <<= bundledDirString;
- Reference< provider::XScriptProvider > bundledMsp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( serviceName, args, m_xContext ), UNO_QUERY );
- // should check if provider reference is valid
- m_hMsps[ bundledDirString ] = bundledMsp;
-
+ createNonDocMSPs();
created = true;
}
-
}
diff --git a/scripting/source/provider/ActiveMSPList.hxx b/scripting/source/provider/ActiveMSPList.hxx
index cd3dc11..a50b6e5 100644
--- a/scripting/source/provider/ActiveMSPList.hxx
+++ b/scripting/source/provider/ActiveMSPList.hxx
@@ -88,6 +88,7 @@ private:
return createNewMSP( css::uno::makeAny( context ) );
}
+ void ensureNonDocMSPs();
void createNonDocMSPs();
Msp_hash m_hMsps;
ScriptComponent_map m_mScriptComponents;
commit 316a5574ed28317219b557a0ebbcae73bf168d76
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 15:10:47 2014 +0100
coverity#706501 Uncaught exception
Change-Id: Ic5d95b87428284113f543427b417453dd361b354
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 1b3cd1e..cdf0c1d 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -562,12 +562,12 @@ Reference<deployment::XPackageTypeInfo> Package::getPackageType()
return m_xPackageType;
}
-
void Package::exportTo(
OUString const & destFolderURL, OUString const & newTitle,
sal_Int32 nameClashAction, Reference<XCommandEnvironment> const & xCmdEnv )
throw (deployment::ExtensionRemovedException,
- CommandFailedException, CommandAbortedException, RuntimeException, std::exception)
+ CommandFailedException, CommandAbortedException, ContentCreationException,
+ RuntimeException, std::exception)
{
if (m_bRemoved)
throw deployment::ExtensionRemovedException();
@@ -580,7 +580,6 @@ void Package::exportTo(
throw RuntimeException( "UCB transferContent() failed!", 0 );
}
-
void Package::fireModified()
{
::cppu::OInterfaceContainerHelper * container = rBHelper.getContainer(
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index 24a55fd..c1e2df9 100644
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -249,8 +249,8 @@ public:
sal_Int32 nameClashAction,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv )
throw (css::deployment::ExtensionRemovedException,
- css::ucb::CommandFailedException,
- css::ucb::CommandAbortedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ css::ucb::CommandFailedException, css::ucb::CommandAbortedException,
+ css::ucb::ContentCreationException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getRepositoryName()
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::beans::Optional< OUString > SAL_CALL getRegistrationDataURL()
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index b8501b7..c9646b4 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -193,6 +193,7 @@ class BackendImpl : public ImplBaseT
throw (deployment::ExtensionRemovedException,
ucb::CommandFailedException,
ucb::CommandAbortedException,
+ ucb::ContentCreationException,
RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::sal_Int32 SAL_CALL checkPrerequisites(
@@ -1030,9 +1031,9 @@ OUString BackendImpl::PackageImpl::getLicenseText()
void BackendImpl::PackageImpl::exportTo(
OUString const & destFolderURL, OUString const & newTitle,
sal_Int32 nameClashAction, Reference<ucb::XCommandEnvironment> const & xCmdEnv )
- throw (ucb::CommandFailedException,
- deployment::ExtensionRemovedException,
- ucb::CommandAbortedException, RuntimeException, std::exception)
+ throw (deployment::ExtensionRemovedException,
+ ucb::CommandFailedException, ucb::CommandAbortedException,
+ ucb::ContentCreationException, RuntimeException, std::exception)
{
if (m_bRemoved)
throw deployment::ExtensionRemovedException();
diff --git a/offapi/com/sun/star/deployment/XPackage.idl b/offapi/com/sun/star/deployment/XPackage.idl
index c44e12f..557a730 100644
--- a/offapi/com/sun/star/deployment/XPackage.idl
+++ b/offapi/com/sun/star/deployment/XPackage.idl
@@ -315,7 +315,8 @@ interface XPackage
raises (
ExtensionRemovedException,
com::sun::star::ucb::CommandFailedException,
- com::sun::star::ucb::CommandAbortedException);
+ com::sun::star::ucb::CommandAbortedException,
+ com::sun::star::ucb::ContentCreationException);
/** returns an icon for a package.
commit 3284daa3ab56502ab5ec3e9cf2c02ae17e5e5d6c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 15:39:09 2014 +0100
coverity#704947 Dereference after null check
Change-Id: Iea0a789b842b9bb05e4c774460e56e2ed0f5f74e
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index bfb6d2c..5f490f1 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -970,7 +970,7 @@ void SwCntntNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewV
//FEATURE::CONDCOLL
case RES_CONDCOLL_CONDCHG:
- if( ((SwCondCollCondChg*)pNewValue)->pChangedFmt == GetRegisteredIn() &&
+ if( pNewValue && ((SwCondCollCondChg*)pNewValue)->pChangedFmt == GetRegisteredIn() &&
&GetNodes() == &GetDoc()->GetNodes() )
{
ChkCondColl();
commit 2e89739715d245d491f6dacfc89cf878f23b8abf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 15:26:50 2014 +0100
coverity#706482 Uncaught exception
Change-Id: I457e05ddbc13a9b3ff911da56a0a607de944f8f2
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 38a2176..18fdb41 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -457,7 +457,7 @@ namespace dbaui
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponent( ::sal_Int32 ObjectType, const OUString& ObjectName, sal_Bool ForEditing ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponentWithArguments( ::sal_Int32 ObjectType, const OUString& ObjectName, sal_Bool ForEditing, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponent( ::sal_Int32 ObjectType, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponentWithArguments( ::sal_Int32 ObjectType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponentWithArguments( ::sal_Int32 ObjectType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XContextMenuInterception
virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index fe73e16..06f060e 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -472,7 +472,7 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponent( ::sal_
return createComponentWithArguments( i_nObjectType, Sequence< PropertyValue >(), o_DocumentDefinition );
}
-Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArguments( ::sal_Int32 i_nObjectType, const Sequence< PropertyValue >& i_rArguments, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException, std::exception)
+Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArguments( ::sal_Int32 i_nObjectType, const Sequence< PropertyValue >& i_rArguments, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException, std::exception)
{
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
diff --git a/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl
index 1c86caa..d420a6b 100644
--- a/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl
+++ b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl
@@ -307,6 +307,7 @@ interface XDatabaseDocumentUI
[in] sequence< ::com::sun::star::beans::PropertyValue > Arguments,
[out] ::com::sun::star::lang::XComponent DocumentDefinition )
raises ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
::com::sun::star::sdbc::SQLException );
};
commit 26cfb09f2dabe65ac3001b0134f10650219e2af9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 15:04:49 2014 +0100
coverity#706935 Uncaught exception
Change-Id: I0b543ec0b520e1c79ef7b85c679ae1420d089baf
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 46d9672..8427e14 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -159,7 +159,7 @@ ScVbaAxes::createEnumeration() throw (css::uno::RuntimeException)
}
uno::Any SAL_CALL
-ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) throw (css::uno::RuntimeException)
+ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) throw (css::script::BasicErrorException, css::uno::RuntimeException)
{
// #TODO map the possible index combinations to a container::XIndexAccess wrapper impl
// using a vector of valid std::pair maybe?
diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx
index a74ce6c..70fe594 100644
--- a/sc/source/ui/vba/vbaaxes.hxx
+++ b/sc/source/ui/vba/vbaaxes.hxx
@@ -32,7 +32,8 @@ public:
// XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) SAL_OVERRIDE;
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) SAL_OVERRIDE;
- css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& aIndex2 ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
+ // XCollection
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& aIndex2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE;
virtual css::uno::Any createCollectionObject(const css::uno::Any&) SAL_OVERRIDE;
// XHelperInterface
virtual OUString getServiceImplName() SAL_OVERRIDE;
commit 67cba3af55e94debe8eb6392bc8d0b2f00a7a199
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 15:00:16 2014 +0100
coverity#707318 Uncaught exception
Change-Id: Ib2d4b2e6c4df70da1d8a4b5bf39f69efea45ad5e
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 4304b67b..c37e9fc 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -86,12 +86,19 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
if ( pInStrm->remainingSize() == 0 )
return OUString();
- SotStorageRef aStorage = new SotStorage ( pInStrm, false );
- if ( !aStorage->GetError() )
+ try
{
- bIsDetected = aStorage->IsContained( "WordDocument" );
- if ( bIsDetected && aTypeName.startsWith( "writer_MS_Word_97" ) )
- bIsDetected = ( aStorage->IsContained("0Table") || aStorage->IsContained("1Table") );
+ SotStorageRef aStorage = new SotStorage ( pInStrm, false );
+ if ( !aStorage->GetError() )
+ {
+ bIsDetected = aStorage->IsContained( "WordDocument" );
+ if ( bIsDetected && aTypeName.startsWith( "writer_MS_Word_97" ) )
+ bIsDetected = ( aStorage->IsContained("0Table") || aStorage->IsContained("1Table") );
+ }
+ }
+ catch (...)
+ {
+ bIsDetected = false;
}
}
commit 3fa329f6108c47b9e86724ed2d6e7d294239107e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:58:27 2014 +0100
coverity#707382 Uncaught exception
Change-Id: Idad4fbff404c23b74a83c2d3e745363c52c3d90a
diff --git a/oovbaapi/ooo/vba/word/XParagraphFormat.idl b/oovbaapi/ooo/vba/word/XParagraphFormat.idl
index 693eb0c..61b9478 100644
--- a/oovbaapi/ooo/vba/word/XParagraphFormat.idl
+++ b/oovbaapi/ooo/vba/word/XParagraphFormat.idl
@@ -20,16 +20,19 @@
#define __ooo_vba_word_XParagraphFormat_idl__
#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/script/BasicErrorException.idl>
#include <ooo/vba/XHelperInterface.idl>
-
module ooo { module vba { module word {
interface XParagraphFormat
{
interface ooo::vba::XHelperInterface;
- [attribute] long Alignment;
+ [attribute] long Alignment
+ {
+ get raises ( com::sun::star::script::BasicErrorException );
+ };
[attribute] float FirstLineIndent;
[attribute] any KeepTogether;
[attribute] any KeepWithNext;
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index 976200d..6edd55a 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -44,7 +44,7 @@ SwVbaParagraphFormat::~SwVbaParagraphFormat()
{
}
-sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() throw (uno::RuntimeException, std::exception)
+sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() throw (uno::RuntimeException, css::script::BasicErrorException, std::exception)
{
style::ParagraphAdjust aParaAdjust = style::ParagraphAdjust_LEFT;
mxParaProps->getPropertyValue("ParaAdjust") >>= aParaAdjust;
diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx
index e4f4071..3911e05 100644
--- a/sw/source/ui/vba/vbaparagraphformat.hxx
+++ b/sw/source/ui/vba/vbaparagraphformat.hxx
@@ -47,7 +47,7 @@ public:
virtual ~SwVbaParagraphFormat();
// Attributes
- virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException, css::script::BasicErrorException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual float SAL_CALL getFirstLineIndent() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFirstLineIndent( float _firstlineindent ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
commit 9ed8e1f19c3d9cffc1052350a5854c3097639874
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:50:32 2014 +0100
coverity#707409 Uncaught exception
Change-Id: I0f19cd6411c7008a4698fc81fd2ce9c4108ce8eb
diff --git a/oovbaapi/ooo/vba/word/XView.idl b/oovbaapi/ooo/vba/word/XView.idl
index d33cc78..788aa3d 100644
--- a/oovbaapi/ooo/vba/word/XView.idl
+++ b/oovbaapi/ooo/vba/word/XView.idl
@@ -20,6 +20,7 @@
#define __ooo_vba_word_XView_idl__
#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/script/BasicErrorException.idl>
#include <ooo/vba/XHelperInterface.idl>
module ooo { module vba { module word {
@@ -28,7 +29,11 @@ interface XView
{
interface ooo::vba::XHelperInterface;
- [attribute] long SeekView;
+ [attribute] long SeekView
+ {
+ set raises ( com::sun::star::script::BasicErrorException );
+ };
+
[attribute] long SplitSpecial;
[attribute] boolean TableGridLines;
[attribute] long Type;
diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx
index 3cf95f4..bca5ca6 100644
--- a/sw/source/ui/vba/vbaview.cxx
+++ b/sw/source/ui/vba/vbaview.cxx
@@ -115,7 +115,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException, std::exception)
}
void SAL_CALL
-SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException, std::exception)
+SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException, css::script::BasicErrorException, std::exception)
{
// FIXME: save the current cursor position, if the cursor is in the main
// document, so we can jump back to this position, if the macro sets
diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx
index c2962a8..2074cc8 100644
--- a/sw/source/ui/vba/vbaview.hxx
+++ b/sw/source/ui/vba/vbaview.hxx
@@ -45,7 +45,7 @@ public:
// XView
virtual ::sal_Int32 SAL_CALL getSeekView() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual void SAL_CALL setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException, css::script::BasicErrorException, std::exception) SAL_OVERRIDE;
virtual ::sal_Int32 SAL_CALL getSplitSpecial() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setSplitSpecial( ::sal_Int32 _splitspecial ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL getTableGridLines() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
commit 62962557bacb6f90c9c23ec787fe83e0b0ea35fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:46:25 2014 +0100
coverity#1215310 Uncaught exception
Change-Id: Ie08163875b1190532b9892c60829bb0ade56cbd7
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index c97779b..20d6fae 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -189,7 +189,7 @@ OUString DocumentDigitalSignatures::getPackageSignatureDefaultStreamName( )
bool DocumentDigitalSignatures::ImplViewSignatures(
const Reference< css::embed::XStorage >& rxStorage,
const Reference< css::io::XInputStream >& xSignStream,
- DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException)
+ DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException, std::exception)
{
Reference< io::XStream > xStream;
if ( xSignStream.is() )
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx
index b1a5b5e..7102f6e 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.hxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.hxx
@@ -51,7 +51,7 @@ private:
bool m_bHasDocumentSignature;
bool ImplViewSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (css::uno::RuntimeException, std::exception);
- bool ImplViewSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (::com::sun::star::uno::RuntimeException);
+ bool ImplViewSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (::com::sun::star::uno::RuntimeException, std::exception);
com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation > ImplVerifySignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignStream, DocumentSignatureMode eMode ) throw (::com::sun::star::uno::RuntimeException);
public:
commit f8843226c3487d1521ab8435552323b942897709
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:42:30 2014 +0100
coverity#1219805 Uninitialized scalar field
Change-Id: I6dde5a126e57f34705c2fe9189a49d7964b3d65f
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index f745927..cd03a38 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -486,6 +486,11 @@ GL3DBarChart::GL3DBarChart(
mbBenchMarkMode(false),
maHistoryCounter(0)
{
+ maFPSRenderStartTime.Seconds = maFPSRenderStartTime.Nanosec = 0;
+ maFPSRenderEndTime.Seconds = maFPSRenderEndTime.Nanosec = 0;
+ maDataUpdateStartTime.Seconds = maDataUpdateStartTime.Nanosec = 0;
+ maDataUpdateEndTime.Seconds = maDataUpdateEndTime.Nanosec = 0;
+
static const char *aBenchMark = getenv("BENCHMARK_MODE");
if (aBenchMark)
{
commit cba672f2c593f002ea13fba01e9f43ff955f97e4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:38:38 2014 +0100
coverity#1215398 Uninitialized scalar field
Change-Id: I190cafda21a9e5969d8a353b272a0e92b5b65903
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index cde4356..9d34ea7 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -150,6 +150,9 @@ OpenGL3DRenderer::ShaderResources::ShaderResources()
, m_3DNormalMatrixID(0)
, m_3DVertexID(0)
, m_3DNormalID(0)
+ , m_3DMinCoordXID(0)
+ , m_3DMaxCoordXID(0)
+ , m_3DUndrawID(0)
, m_3DMaterialAmbientID(0)
, m_3DMaterialDiffuseID(0)
, m_3DMaterialSpecularID(0)
@@ -183,6 +186,10 @@ OpenGL3DRenderer::ShaderResources::ShaderResources()
, m_3DBatchVertexID(0)
, m_3DBatchNormalID(0)
, m_3DBatchColorID(0)
+ , m_3DBatchTransMatrixID(0)
+ , m_3DBatchMinCoordXID(0)
+ , m_3DBatchMaxCoordXID(0)
+ , m_3DBatchUndrawID(0)
, mbTexBatchSupport(false)
, m_BatchTextProID(0)
, m_BatchTextMatrixID(0)
commit d3cd290491f77db35e63d79d94baaaaffb10cd15
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:33:10 2014 +0100
coverity#1233508 Uncaught exception
Change-Id: Ia77a94a486b8e5203617eb00cb5189359798482f
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 1ac3d3d..97008a1 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -161,7 +161,7 @@ bool RenameDialog (
OUString const& rOldName,
OUString const& rNewName
)
- throw (ElementExistException, NoSuchElementException, RuntimeException)
+ throw (ElementExistException, NoSuchElementException, RuntimeException, std::exception)
{
if ( !rDocument.hasDialog( rLibName, rOldName ) )
{
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index 576078a..0c6af6c 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -92,7 +92,7 @@ namespace basctl
*/
bool RenameDialog(
Window* pErrorParent, const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rOldName, const OUString& rNewName )
- throw (css::container::ElementExistException, css::container::NoSuchElementException, css::uno::RuntimeException);
+ throw (css::container::ElementExistException, css::container::NoSuchElementException, css::uno::RuntimeException, std::exception);
bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName );
commit 3101a60751a220f4192f0d0e3df4096217f4a16c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:29:20 2014 +0100
coverity#1233506 Use of untrusted scalar value
Change-Id: I843f688b47489db90edcdb75a15403c66aad55af
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 8cb9909..dd111f6 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -49,14 +49,23 @@ static const sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] =
0, 0, 0, 0 // KEYFUNC_FRONT
};
-void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 )
+bool ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 )
{
- sal_uInt16 nIndex = (sal_uInt16)eFunc;
+ size_t nIndex = static_cast<size_t>(eFunc);
nIndex *= 4;
+
+ assert(nIndex + 3 < SAL_N_ELEMENTS(aImplKeyFuncTab) && "bad key code index");
+ if (nIndex + 3 >= SAL_N_ELEMENTS(aImplKeyFuncTab))
+ {
+ rCode1 = rCode2 = rCode3 = rCode4 = 0;
+ return false;
+ }
+
rCode1 = aImplKeyFuncTab[nIndex];
rCode2 = aImplKeyFuncTab[nIndex+1];
rCode3 = aImplKeyFuncTab[nIndex+2];
- rCode4 = aImplKeyFuncTab[nIndex+3];
+ rCode4 = aImplKeyFuncTab[nIndex+3];
+ return true;
}
vcl::KeyCode::KeyCode( KeyFuncType eFunction )
@@ -112,7 +121,7 @@ KeyFuncType vcl::KeyCode::GetFunction() const
sal_uInt16 nKeyCode1;
sal_uInt16 nKeyCode2;
sal_uInt16 nKeyCode3;
- sal_uInt16 nKeyCode4;
+ sal_uInt16 nKeyCode4;
ImplGetKeyCode( (KeyFuncType)i, nKeyCode1, nKeyCode2, nKeyCode3, nKeyCode4 );
if ( (nCompCode == nKeyCode1) || (nCompCode == nKeyCode2) || (nCompCode == nKeyCode3) || (nCompCode == nKeyCode4) )
return (KeyFuncType)i;
commit 54ceedfb4d3c0e6df67b86fb422ec3209582fbfa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:23:26 2014 +0100
coverity#1233491 Dereference null return value
Change-Id: Ia02749585cb9694bddb21e4f040cf6e025046be1
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 432bc75..61c2afc 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -1959,8 +1959,8 @@ namespace {
void testSheetProtection_Impl(ScDocument& rDoc)
{
CPPUNIT_ASSERT(rDoc.IsTabProtected(0));
-
ScTableProtection* pTabProtection = rDoc.GetTabProtection(0);
+ CPPUNIT_ASSERT(pTabProtection);
CPPUNIT_ASSERT(pTabProtection->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS));
CPPUNIT_ASSERT(!pTabProtection->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS));
}
commit 9432b8d400dd38c2a96fce6aad77d4876072dd8c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:22:19 2014 +0100
coverity#1233488 Unchecked dynamic_cast
Change-Id: I9599fb4473a43a4624d64c48e8768761fcbd266f
diff --git a/test/source/primitive2dxmldump.cxx b/test/source/primitive2dxmldump.cxx
index 9d3ad11..0fdf896 100644
--- a/test/source/primitive2dxmldump.cxx
+++ b/test/source/primitive2dxmldump.cxx
@@ -94,7 +94,8 @@ void Primitive2dXmlDump::decomposeAndWrite(
{
drawinglayer::primitive2d::Primitive2DReference xPrimitive2DReference = rPrimitive2DSequence[i];
const BasePrimitive2D* pBasePrimitive = dynamic_cast<const BasePrimitive2D* >(xPrimitive2DReference.get());
-
+ if (!pBasePrimitive)
+ continue;
sal_uInt32 nId = pBasePrimitive->getPrimitive2DID();
if (maFilter[nId])
continue;
commit 4edb725ebb3809448ce18b8566b9812617d3bb79
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:11:15 2014 +0100
coverity#1233484 Division or modulo by float zero
0.0001 is as good as 0 according to reading
CPhysicalCamera::moveCamera
Change-Id: I70649ef6246154a112db414ccf4c15fcd30ea801
diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx
index 1cbc86c..6c1c9f1 100644
--- a/avmedia/source/opengl/oglwindow.cxx
+++ b/avmedia/source/opengl/oglwindow.cxx
@@ -291,7 +291,7 @@ IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent*, pEvent)
}
}
}
- gltf_renderer_move_camera(&m_rHandle, vMoveBy.x, vMoveBy.y, vMoveBy.z, 0.0);
+ gltf_renderer_move_camera(&m_rHandle, vMoveBy.x, vMoveBy.y, vMoveBy.z, 0.0001);
if( m_bIsOrbitMode )
{
commit d8463f95ea9b129ea64ea96a228abf4bc68557cf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 31 14:05:04 2014 +0100
catch by const
Change-Id: I4d51552a28ecd169a03e6c3dad992c9b2217dc74
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index a7779b3..b7baad8 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -141,7 +141,7 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio
}
mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(false) );
}
- catch (uno::Exception& )
+ catch (const uno::Exception&)
{
DebugHelper::basicexception(SbERR_METHOD_FAILED, OUString());
}
commit 20df064c7d0efd653bb0c3a7c5174485ed9f2176
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 30 21:14:57 2014 +0100
convert DLG_SYNC_BTN FloatingWindow to .ui
not much of a test, its just a single button
Change-Id: I42f73ad0ad00e2af392bc6ab8bc827c3719b0304
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 4a2a448..23f9523 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -112,6 +112,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/fldfuncpage \
sw/uiconfig/swriter/ui/fldrefpage \
sw/uiconfig/swriter/ui/fldvarpage \
+ sw/uiconfig/swriter/ui/floatingsync \
sw/uiconfig/swriter/ui/formatsectiondialog \
sw/uiconfig/swriter/ui/formattablepage \
sw/uiconfig/swriter/ui/footendnotedialog \
diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc
index e5d6e24..d9e73c3 100644
--- a/sw/inc/envelp.hrc
+++ b/sw/inc/envelp.hrc
@@ -26,8 +26,6 @@
#define DLG_MAILMERGE (RC_ENVELP_BEGIN + 8)
-#define DLG_SYNC_BTN (RC_ENVELP_BEGIN + 9)
-
// Bereiche -------------------------------------------------------------------
#define RC_ENVLOP_BEGIN (RC_ENVELP_BEGIN )
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 1e4a640..d2f79e3 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -116,7 +116,6 @@
#define HID_SORT_DATE "SW_HID_SORT_DATE"
#define HID_SORT_COMMENT "SW_HID_SORT_COMMENT"
#define HID_SW_SORT_POSITION "SW_HID_SW_SORT_POSITION"
-#define HID_SYNC_BTN "SW_HID_SYNC_BTN"
#define HID_EDIT_COMMENT "SW_HID_EDIT_COMMENT"
#define HID_DLG_FLDEDT_NEXT "SW_HID_DLG_FLDEDT_NEXT"
#define HID_DLG_FLDEDT_PREV "SW_HID_DLG_FLDEDT_PREV"
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index b0ff5f0..b7123b1 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -21,27 +21,6 @@
#include "globals.hrc"
#include "helpid.h"
-#define WIDTH 100
-#define HEIGHT 16
-FloatingWindow DLG_SYNC_BTN
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( WIDTH , HEIGHT ) ;
- Moveable = TRUE ;
- Closeable = FALSE ;
- Sizeable = FALSE ;
- Zoomable = TRUE ;
- HelpID = HID_SYNC_BTN ;
- Hide = TRUE ;
- PushButton BTN_SYNC
- {
- HelpID = "sw:PushButton:DLG_SYNC_BTN:BTN_SYNC";
- Pos = MAP_APPFONT ( 1 , 1 ) ;
- Size = MAP_APPFONT ( WIDTH - 1 , HEIGHT - 1 ) ;
- Text [ en-US ] = "Synchronize Labels" ;
- };
-};
String STR_CUSTOM
{
Text [ en-US ] = "[User]";
diff --git a/sw/source/uibase/envelp/label.hrc b/sw/source/uibase/envelp/label.hrc
index 702c3db..a2fe56c 100644
--- a/sw/source/uibase/envelp/label.hrc
+++ b/sw/source/uibase/envelp/label.hrc
@@ -22,10 +22,6 @@
#include "envelp.hrc"
-// local resources *********************************************************
-
-#define BTN_SYNC 20
-
// global resources ********************************************************
#define STR_CUSTOM (RC_LABEL_BEGIN + 1)
diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx
index b3882f0..53911fa 100644
--- a/sw/source/uibase/envelp/syncbtn.cxx
+++ b/sw/source/uibase/envelp/syncbtn.cxx
@@ -26,7 +26,6 @@
#include "edtwin.hxx"
#include "label.hrc"
-#define _SYNCDLG
#include "syncbtn.hxx"
#include "swtypes.hxx"
@@ -61,16 +60,13 @@ SwSyncChildWin::SwSyncChildWin( Window* _pParent,
SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
SfxChildWindow* pChild,
- Window *pParent) :
- SfxFloatingWindow(_pBindings, pChild, pParent, SW_RES(DLG_SYNC_BTN)),
- aSyncBtn (this, SW_RES(BTN_SYNC ))
-{
- FreeResource();
- aSyncBtn.SetClickHdl(LINK(this, SwSyncBtnDlg, BtnHdl));
-}
-
-SwSyncBtnDlg::~SwSyncBtnDlg()
+ Window *pParent)
+ : SfxFloatingWindow(_pBindings, pChild, pParent, "FloatingSync", "modules/swriter/ui/floatingsync.ui")
{
+ get(m_pSyncBtn, "sync");
+ m_pSyncBtn->SetClickHdl(LINK(this, SwSyncBtnDlg, BtnHdl));
+ fprintf(stderr, "SwSyncBtnDlg::SwSyncBtnDlg %p\n", this);
+ Show();
}
IMPL_LINK_NOARG(SwSyncBtnDlg, BtnHdl)
diff --git a/sw/source/uibase/inc/syncbtn.hxx b/sw/source/uibase/inc/syncbtn.hxx
index 451e6af..ed0a4e9 100644
--- a/sw/source/uibase/inc/syncbtn.hxx
+++ b/sw/source/uibase/inc/syncbtn.hxx
@@ -18,24 +18,20 @@
*/
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SYNCBTN_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_SYNCBTN_HXX
-#include <sfx2/childwin.hxx>
-#ifdef _SYNCDLG
#include <sfx2/basedlgs.hxx>
-
+#include <sfx2/childwin.hxx>
#include <vcl/button.hxx>
class SwSyncBtnDlg : public SfxFloatingWindow
{
- PushButton aSyncBtn;
+ PushButton* m_pSyncBtn;
DECL_LINK( BtnHdl, void* );
public:
SwSyncBtnDlg(SfxBindings*, SfxChildWindow*, Window *pParent);
- virtual ~SwSyncBtnDlg();
};
-#endif
class SwSyncChildWin : public SfxChildWindow
{
diff --git a/sw/uiconfig/swriter/ui/floatingsync.ui b/sw/uiconfig/swriter/ui/floatingsync.ui
new file mode 100644
index 0000000..b6b24a5
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/floatingsync.ui
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkWindow" id="FloatingSync">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Synchronize</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">utility</property>
+ <property name="deletable">False</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkButton" id="sync">
+ <property name="label" translatable="yes">Synchronize Labels</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="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
commit 724b48d877fc157affb2b935f1bbeb37745bc683
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 30 21:06:04 2014 +0100
extent .ui loading to SfxFloatingWindows
Change-Id: I3e16ef8455b35faf14838509f315cb2f70e7cb9a
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 6d46b7a..2e4c14a 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -138,6 +138,10 @@ protected:
SfxChildWindow *pCW,
Window* pParent,
const ResId& rResId);
+ SfxFloatingWindow( SfxBindings *pBindings,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const OString& rID, const OUString& rUIXMLDescription);
virtual ~SfxFloatingWindow();
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index b3cce37..e17c77f 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -480,7 +480,26 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
}
+SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const OString& rID, const OUString& rUIXMLDescription) :
+ FloatingWindow(pParent, rID, rUIXMLDescription),
+ pBindings(pBindinx),
+ pImp( new SfxFloatingWindow_Impl )
+{
+ pImp->pMgr = pCW;
+ pImp->bConstructed = false;
+ //do we really need this odd helpid/uniqueid dance ?
+ SetUniqueId( GetHelpId() );
+ SetHelpId("");
+
+ if ( pBindinx )
+ pImp->StartListening( *pBindinx );
+ pImp->aMoveTimer.SetTimeout(50);
+ pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
+}
bool SfxFloatingWindow::Close()
More information about the Libreoffice-commits
mailing list