Rebased ref, commits from common ancestor: commit 786c4d2f8096f0d423ff89c453f45b6d812579ac Author: Andrzej Hunt <andr...@ahunt.org> Date: Tue Nov 25 11:16:26 2014 +0000
Add sc.units to log area. Change-Id: Ia921b3e7aef905b3132f59be35282357bf5ec3b7 diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index ca9482f..cb4640b 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -115,6 +115,7 @@ certain functionality. @li @c sc.core @li @c sc.filter - Calc filter @li @c sc.ui - Calc UI +@li @c sc.units - Calc Unit-Verification @section desktop commit 8674500c0da0c45179503f185706fa92f2b44fd8 Author: Andrzej Hunt <andr...@ahunt.org> Date: Tue Nov 25 11:16:14 2014 +0000 SC_DIMAN: PROTOTYPE: detect add/subtract operations. This is all a quick hack demo, could easily be refactored to 1/2 the size but will be discarded anyways. Change-Id: I99d533489d47b440f9688381380ca2806d8b25bb diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index d9fc03a..8502974 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -462,6 +462,98 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, } } } + + if ( pArr->GetLen() != 3 ) + { + SAL_INFO("sc.units", "not checking -- doesn't have 3 tokens"); + continue; + } + + formula::FormulaToken* pTokenCheck = pArr->First(); + assert( pTokenCheck ); + + SCROW nRow1, nRow2; + SCCOL nCol1, nCol2; + SCTAB nTab1, nTab2; + + // ScSingleRefData can return data in terms of a relative address, + // but we need absolute addresses for retrieving the formats later. + // Hence we need to get the formula's address first and use it + // to determine the absolute addresses of the input cells later. + const ScAddress aFormulaAddress( nCol, nRow, nTab ); + + if ( pTokenCheck && pTokenCheck->GetType() == formula::svSingleRef ) + { + ScSingleRefData* pRef = pTokenCheck->GetSingleRef(); + assert(pRef); + + ScAddress aInput = pRef->toAbs( aFormulaAddress ); + + nRow1 = aInput.Row(); + nCol1 = aInput.Col(); + nTab1 = aInput.Tab(); + } + else + { + continue; + } + + pTokenCheck = pArr->Next(); + assert(pTokenCheck); + + if ( pTokenCheck->GetType() == formula::svByte && + (pTokenCheck->GetOpCode() == ocAdd || + pTokenCheck->GetOpCode() == ocSub)) + { + SAL_INFO("sc.units","Dimension checking an add/subtract operation."); + } + else + { + SAL_INFO("sc.units", "not an add/subtract operation -- ignoring"); + continue; + } + + + pTokenCheck = pArr->Next(); + assert(pTokenCheck); + + // TODO: refactor out + if ( pTokenCheck && pTokenCheck->GetType() == formula::svSingleRef ) + { + ScSingleRefData* pRef = pTokenCheck->GetSingleRef(); + assert(pRef); + + // ScSingleRefData can return data in terms of a relative address, + // but we need absolute addresses for retrieving the formats later. + ScAddress aInput = pRef->toAbs( aFormulaAddress ); + + nRow2 = aInput.Row(); + nCol2 = aInput.Col(); + nTab2 = aInput.Tab(); + } + else + { + continue; + } + + sal_uInt32 nFormat1, nFormat2; + pDoc->GetNumberFormat( nCol1, nRow1, nTab1, nFormat1 ); + pDoc->GetNumberFormat( nCol2, nRow2, nTab2, nFormat2 ); + + if ( nFormat1 == nFormat2 ) + { + SAL_INFO("sc.units", "formats match+++++++++++++++++++++++++++++++++++++++++++++++++++++++"); + } + else + { + SAL_INFO("sc.units", "formats don't match----------------------------------------------------------"); + + SfxViewFrame* pFrame = GetViewData().GetViewShell()->GetViewFrame(); + pFrame->AppendInfoBar( "diman", "Units are invalid", std::vector< PushButton* >() ); + } + + // TODO: this only is fired when we create the formula, but not if input data has changed. + } while ( bAgain ); // to be used in multiple tabs, the formula must be compiled anew // via ScFormulaCell copy-ctor because of RangeNames, commit 82c998977b62b5fb7a01b5e9838d7f6868d697bf Author: Yousuf Philips <philip...@hotmail.com> Date: Fri Nov 21 19:46:05 2014 +0400 fdo#86132 add tooltips to calc xcu file Change-Id: I9c643e72cb0e925c2d4e5283c6811ef73306c76b Reviewed-on: https://gerrit.libreoffice.org/13023 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index ab712a4..120d1f6 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -1626,6 +1626,9 @@ </node> <node oor:name=".uno:NumberFormatCurrency" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Format as Currency</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Currency</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1634,6 +1637,9 @@ </node> <node oor:name=".uno:NumberFormatPercent" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Format as Percent</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Percent</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1642,6 +1648,9 @@ </node> <node oor:name=".uno:NumberFormatStandard" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Format as General</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">General</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1650,6 +1659,9 @@ </node> <node oor:name=".uno:NumberFormatDate" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Format as Date</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Date</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1658,6 +1670,9 @@ </node> <node oor:name=".uno:NumberFormatDecimal" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Format as Number</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Number</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1666,6 +1681,9 @@ </node> <node oor:name=".uno:NumberFormatScientific" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Format as Scientific</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Scientific</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> diff --git a/sc/uiconfig/scalc/toolbar/formatobjectbar.xml b/sc/uiconfig/scalc/toolbar/formatobjectbar.xml index 1077e09..ab547e6 100644 --- a/sc/uiconfig/scalc/toolbar/formatobjectbar.xml +++ b/sc/uiconfig/scalc/toolbar/formatobjectbar.xml @@ -54,12 +54,12 @@ <toolbar:toolbaritem xlink:href=".uno:AlignVCenter" toolbar:style="radio auto"/> <toolbar:toolbaritem xlink:href=".uno:AlignBottom" toolbar:style="radio auto"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:NumberFormatStandard" toolbar:tooltip="Format as General" toolbar:visible="false"/> - <toolbar:toolbaritem xlink:href=".uno:NumberFormatCurrency" toolbar:tooltip="Format as Currency"/> - <toolbar:toolbaritem xlink:href=".uno:NumberFormatPercent" toolbar:tooltip="Format as Percent"/> - <toolbar:toolbaritem xlink:href=".uno:NumberFormatDecimal" toolbar:tooltip="Format as Number"/> - <toolbar:toolbaritem xlink:href=".uno:NumberFormatDate" toolbar:tooltip="Format as Date" toolbar:visible="false"/> - <toolbar:toolbaritem xlink:href=".uno:NumberFormatScientific" toolbar:tooltip="Format as Scientific" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:NumberFormatStandard" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:NumberFormatCurrency"/> + <toolbar:toolbaritem xlink:href=".uno:NumberFormatPercent"/> + <toolbar:toolbaritem xlink:href=".uno:NumberFormatDecimal"/> + <toolbar:toolbaritem xlink:href=".uno:NumberFormatDate" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:NumberFormatScientific" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:NumberFormatIncDecimals"/> <toolbar:toolbaritem xlink:href=".uno:NumberFormatDecDecimals"/> <toolbar:toolbarseparator/> commit 452db55f0a14a1f8c77cae7b54f1857498651c28 Author: Yousuf Philips <philip...@hotmail.com> Date: Fri Nov 21 21:11:56 2014 +0400 fdo#86440 move header and footer entry to insert menu Change-Id: Id3c81d50e504e3d2e29f921955a10ef00c2d3646 Reviewed-on: https://gerrit.libreoffice.org/13026 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml index 02f8779..56377a4 100644 --- a/sc/uiconfig/scalc/menubar/menubar.xml +++ b/sc/uiconfig/scalc/menubar/menubar.xml @@ -83,7 +83,6 @@ <menu:menuseparator/> <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/> <menu:menuitem menu:id=".uno:SearchDialog"/> - <menu:menuitem menu:id=".uno:EditHeaderAndFooter"/> <menu:menuseparator/> <menu:menu menu:id=".uno:ChangesMenu"> <menu:menupopup> @@ -200,6 +199,7 @@ </menu:menupopup> </menu:menu> <menu:menuitem menu:id=".uno:HyperlinkDialog"/> + <menu:menuitem menu:id=".uno:EditHeaderAndFooter"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:FunctionDialog"/> <menu:menuitem menu:id=".uno:FunctionBox"/> diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index ee0be14..a9667c5 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -147,7 +147,6 @@ <menu:menuitem menu:id=".uno:Gallery"/> <menu:menuitem menu:id=".uno:Navigator"/> <menu:menuseparator/> - <menu:menuitem menu:id=".uno:HeaderAndFooter"/> <menu:menu menu:id=".uno:ZoomMenu"> <menu:menupopup> <menu:menuitem menu:id=".uno:ZoomPage"/> @@ -186,6 +185,7 @@ <menu:menuitem menu:id=".uno:InsertFileField"/> </menu:menupopup> </menu:menu> + <menu:menuitem menu:id=".uno:HeaderAndFooter"/> <menu:menuitem menu:id=".uno:InsertAnnotation"/> <menu:menuitem menu:id=".uno:InsertSymbol"/> <menu:menu menu:id=".uno:FormattingMarkMenu"> commit db1a9ba11750fe8df475907f57a84f99f2f355de Author: Yousuf Philips <philip...@hotmail.com> Date: Fri Nov 21 18:24:54 2014 +0400 fdo#85594 enable conditional formatting button, add icons, and tooltips Change-Id: Ia6fa678fba21f48de183798bb33ee2e34598b03e Reviewed-on: https://gerrit.libreoffice.org/13021 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/icon-themes/galaxy/cmd/lc_colorscaleformatdialog.png b/icon-themes/galaxy/cmd/lc_colorscaleformatdialog.png new file mode 100644 index 0000000..7496144 Binary files /dev/null and b/icon-themes/galaxy/cmd/lc_colorscaleformatdialog.png differ diff --git a/icon-themes/galaxy/cmd/lc_conditionalformatdialog.png b/icon-themes/galaxy/cmd/lc_conditionalformatdialog.png new file mode 100644 index 0000000..feb733d Binary files /dev/null and b/icon-themes/galaxy/cmd/lc_conditionalformatdialog.png differ diff --git a/icon-themes/galaxy/cmd/lc_databarformatdialog.png b/icon-themes/galaxy/cmd/lc_databarformatdialog.png new file mode 100644 index 0000000..1148614 Binary files /dev/null and b/icon-themes/galaxy/cmd/lc_databarformatdialog.png differ diff --git a/icon-themes/galaxy/cmd/sc_conditionalformatmenu.png b/icon-themes/galaxy/cmd/sc_conditionalformatmenu.png index 9b28083..e34885a 100644 Binary files a/icon-themes/galaxy/cmd/sc_conditionalformatmenu.png and b/icon-themes/galaxy/cmd/sc_conditionalformatmenu.png differ diff --git a/icon-themes/tango/cmd/lc_colorscaleformatdialog.png b/icon-themes/tango/cmd/lc_colorscaleformatdialog.png new file mode 100644 index 0000000..7496144 Binary files /dev/null and b/icon-themes/tango/cmd/lc_colorscaleformatdialog.png differ diff --git a/icon-themes/tango/cmd/lc_conditionalformatdialog.png b/icon-themes/tango/cmd/lc_conditionalformatdialog.png new file mode 100644 index 0000000..feb733d Binary files /dev/null and b/icon-themes/tango/cmd/lc_conditionalformatdialog.png differ diff --git a/icon-themes/tango/cmd/lc_databarformatdialog.png b/icon-themes/tango/cmd/lc_databarformatdialog.png new file mode 100644 index 0000000..1148614 Binary files /dev/null and b/icon-themes/tango/cmd/lc_databarformatdialog.png differ diff --git a/icon-themes/tango/cmd/lc_datadatapilotrun.png b/icon-themes/tango/cmd/lc_datadatapilotrun.png new file mode 100644 index 0000000..3a5aaea Binary files /dev/null and b/icon-themes/tango/cmd/lc_datadatapilotrun.png differ diff --git a/icon-themes/tango/cmd/sc_conditionalformatmenu.png b/icon-themes/tango/cmd/sc_conditionalformatmenu.png index 9b28083..e34885a 100644 Binary files a/icon-themes/tango/cmd/sc_conditionalformatmenu.png and b/icon-themes/tango/cmd/sc_conditionalformatmenu.png differ diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index c3a2eaf..ab712a4 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -442,14 +442,21 @@ </node> <node oor:name=".uno:ConditionalFormatDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Conditional Formatting: Condition</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Condition...</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> <node oor:name=".uno:ColorScaleFormatDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Conditional Formatting: Color Scale</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Color Scale...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -458,6 +465,9 @@ </node> <node oor:name=".uno:DataBarFormatDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Conditional Formatting: Data Bar</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Data Bar...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -466,6 +476,9 @@ </node> <node oor:name=".uno:IconSetFormatDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Conditional Formatting: Icon Set</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Icon Set...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -474,6 +487,9 @@ </node> <node oor:name=".uno:CondDateFormatDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Conditional Formatting: Date</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> <value xml:lang="en-US">Date...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> diff --git a/sc/uiconfig/scalc/toolbar/formatobjectbar.xml b/sc/uiconfig/scalc/toolbar/formatobjectbar.xml index 1518587..1077e09 100644 --- a/sc/uiconfig/scalc/toolbar/formatobjectbar.xml +++ b/sc/uiconfig/scalc/toolbar/formatobjectbar.xml @@ -70,6 +70,10 @@ <toolbar:toolbaritem xlink:href=".uno:LineStyle"/> <toolbar:toolbaritem xlink:href=".uno:FrameLineColor" toolbar:visible="false"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:ConditionalFormatDialog" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:ConditionalFormatDialog"/> + <toolbar:toolbaritem xlink:href=".uno:ColorScaleFormatDialog" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:DataBarFormatDialog" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:IconSetFormatDialog" toolbar:visible="false"/> + <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ToggleSheetGrid" toolbar:visible="false"/> </toolbar:toolbar> commit 51a572f218cb49e2c3aabdc7e6a7dc47e56c4ded Author: Yousuf Philips <philip...@hotmail.com> Date: Mon Nov 24 10:32:02 2014 +0400 fdo#82969 add global shortcut for autospellcheck Change-Id: I02b933ac2080ddb46b06a525a0304833ec28acf8 Reviewed-on: https://gerrit.libreoffice.org/13088 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 58ee4bc..25ecc99 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -57,6 +57,12 @@ <value xml:lang="en-US">.uno:EditDoc</value> </prop> </node> + <node oor:name="F7_SHIFT" oor:op="replace"> + <prop oor:name="Command"> + <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">.uno:SpellOnline</value> + </prop> + </node> <node oor:name="K_MOD1" oor:op="replace"> <prop oor:name="Command"> <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> @@ -748,7 +754,7 @@ <value xml:lang="en-US">.uno:ThesaurusDialog</value> </prop> </node> - <node oor:name="F7_SHIFT" oor:op="replace"> + <node oor:name="F9_SHIFT" oor:op="replace"> <prop oor:name="Command"> <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="en-US">.uno:ShowPrecedents</value> commit 7a1cb6c3953bba26e58af0f292b1e6bf4bc4a61b Author: Michael Meeks <michael.me...@collabora.com> Date: Tue Nov 25 10:12:47 2014 +0000 vcl: misc. TODO comment expansion. Change-Id: Iac9e998c2737a370aff382f8c4ae68af8e59f521 diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index a794d15..295ac23 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -393,7 +393,7 @@ bool OpenGLSalGraphicsImpl::CheckOffscreenTexture() GLfloat fHeight = GetHeight(); SalTwoRect aPosAry(0, 0, fWidth, fHeight, 0,0, fWidth, fHeight); - // TODO: lfrb: User GL_ARB_copy_image? + // TODO: improve performance: lfrb: User GL_ARB_copy_image? OpenGLTexture aNewTex = OpenGLTexture( GetWidth(), GetHeight() ); glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, aNewTex.Id(), 0 ); glViewport( 0, 0, GetWidth(), GetHeight() ); @@ -1376,7 +1376,7 @@ void OpenGLSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* if( mnLineColor != SALCOLOR_NONE ) { - // TODO Use glMultiDrawElements or primitive restart + // TODO performance: Use glMultiDrawElements or primitive restart BeginSolid( mnLineColor ); for( sal_uInt32 i = 0; i < nPoly; i++ ) DrawLines( pPoints[i], pPtAry[i], true ); @@ -1562,7 +1562,8 @@ void OpenGLSalGraphicsImpl::DoCopyBits( const SalTwoRect& rPosAry, OpenGLSalGrap } SAL_WARN( "vcl.opengl", "*** NOT IMPLEMENTED *** copyBits" ); - // TODO Copy from one FBO to the other (glBlitFramebuffer) + // TODO: Copy from one FBO to the other (glBlitFramebuffer) + // ie. copying from one visible window to another visible window } void OpenGLSalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) commit 1452734589500a7c4da3ebf0e5946f976ad2e79d Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 24 21:05:12 2014 +0000 only use of SfxInterface::GetName is for debugging info where GetClasName is good enough Change-Id: I242d5792d3ce1323da59a354cae47933cf90569b diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx index a667c15..db88e6f 100644 --- a/include/sfx2/objface.hxx +++ b/include/sfx2/objface.hxx @@ -63,8 +63,6 @@ public: const char* GetClassName() const { return pName; } bool HasName() const { return 0 != aNameResId.GetId(); } - OUString GetName() const - { return HasName() ? aNameResId.toString() : OUString(); } const SfxInterface* GetGenoType() const { return pGenoType; } diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 1365b54..9a844cc 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -117,8 +117,6 @@ SfxShell::SfxShell( SfxViewShell *pViewSh ) SfxShell::~SfxShell() { - - delete pImp; } @@ -305,7 +303,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, bool bMDI ) #endif SAL_INFO( "sfx.control", - "SfxShell::DoActivate() " << this << " " << GetInterface()->GetName() + "SfxShell::DoActivate() " << this << " " << GetInterface()->GetClassName() << " bMDI " << (bMDI ? "MDI" : "")); if ( bMDI ) @@ -328,7 +326,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, bool bMDI ) #endif SAL_INFO( "sfx.control", - "SfxShell::DoDeactivate()" << this << " " << GetInterface()->GetName() + "SfxShell::DoDeactivate()" << this << " " << GetInterface()->GetClassName() << " bMDI " << (bMDI ? "MDI" : "")); // Only when it comes from a Frame commit 836a93e24e4b1db3aa508ed8554ab13bc8788e74 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Nov 25 10:38:12 2014 +0100 Simplify some #if Change-Id: I9d3239bdbb92f715b050fd91238add5588969bf0 diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp index 6dd8e7e..9da2e26 100644 --- a/scp2/source/ooo/ure.scp +++ b/scp2/source/ooo/ure.scp @@ -20,23 +20,18 @@ #include "AutoInstall/ure" -#ifndef MACOSX +#if !defined MACOSX + Directory gid_Dir_Common_Ure #ifdef WNT ParentID = gid_Dir_Brand_Root; - #else - ParentID = PREDEFINED_PROGDIR; - #endif - #ifdef WNT HostName = "URE"; #else + ParentID = PREDEFINED_PROGDIR; HostName = "ure"; #endif Styles = (UREDIRECTORY); End -#endif - -#if !defined MACOSX Directory gid_Dir_Ure_Bin ParentID = gid_Dir_Common_Ure; commit 34d464316872fec13fc024d630cbfcc26b77185a Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Nov 25 10:34:30 2014 +0100 -Werror,-Wuninitialized (in DummyRenderer ctor: base class 'comphelper::OBaseMutex' is uninitialized when used here to access 'comphelper::OBaseMutex::m_aMutex') Change-Id: I5b151176c676a58593933b3f2e33a3e2dfdcc630 diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 4d2b046..f3a52ca 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -107,9 +107,7 @@ namespace { typedef ::cppu::WeakComponentImplHelper1< graphic::XGraphicRenderer > DummyRenderer_Base; -class DummyRenderer : - public DummyRenderer_Base, - public cppu::BaseMutex +class DummyRenderer: public cppu::BaseMutex, public DummyRenderer_Base { public: DummyRenderer() : commit 761e40251f23b2e66dfe86d329ed6345b272bd89 Author: David Tardon <dtar...@redhat.com> Date: Tue Nov 25 10:29:10 2014 +0100 always use 1 as default for strip-components Change-Id: Id5f22ac0f9fcfd7ab064111aec9abb00707d3e67 diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk index b9070b5..e2e3ce1 100644 --- a/solenv/gbuild/UnpackedTarball.mk +++ b/solenv/gbuild/UnpackedTarball.mk @@ -15,28 +15,6 @@ # gb_UnpackedTarget_TARFILE_LOCATION # NOTE: only for commands; targets should use TARFILE_LOCATION directly -gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT := 1 - -# Note that because of a bug in -# gb_UnpackedTarget__get_strip_components, this _ZIP_DEFAULT is -# actually not used, but the above _TAR_DEFAULT is used for .zip -# archives, too. -gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT := 0 - -# gb_UnpackedTarget__get_strip_components target strip-components? -# Note: the suiffix function returns also the period, like ".zip", -# so the condition below is never true. I don't dare fix this as this -# stuff seems to work anyway by accident... -define gb_UnpackedTarget__get_strip_components -$(strip $(if $(2),\ - $(2),\ - $(if $(filter zip,$(suffix $(1))),\ - $(gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT),\ - $(gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT) \ - ) \ -)) -endef - define gb_UnpackedTarget__command_untar $(GNUTAR) \ -x \ @@ -96,7 +74,7 @@ $(call gb_UnpackedTarget_get_clean_target,%) : define gb_UnpackedTarget_UnpackedTarget $(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_DIR := $(2) $(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_TARBALL := $(gb_UnpackedTarget_TARFILE_LOCATION)/$(1) -$(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_STRIP_COMPONENTS := $(call gb_UnpackedTarget__get_strip_components,$(1),$(3)) +$(call gb_UnpackedTarget_get_target,$(1)) : UNPACKED_STRIP_COMPONENTS := $(if $(strip $(3)),$(strip $(3)),1) $(call gb_UnpackedTarget_get_target,$(1)) : $(TARFILE_LOCATION)/$(1) $(call gb_UnpackedTarget_get_target,$(1)) :| $(dir $(call gb_UnpackedTarget_get_target,$(1))).dir commit a9a81a23009b2fc9b1552f367cb04996a99bf704 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Nov 25 10:50:47 2014 +0200 Add comment about a bug but how this stuff still works by luck The 'suffix' GNU Make function returns the file name suffix including the period. The test comparing to the string 'zip' will thus never match, and gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT will not be used, but gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT. But as most of the Zip archives we unpack do have a top-level with a single directory anyway, that we want to "strip", that works out fine. Apparently those that don't have a such directory level pass a 0 as second argument to gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT which has the effect of avoiding the "stripping". Not sure what to actually do here, so I just commented the situation... Should the code be fixed to do what it thinks it is doing, but then to keep things working as before, should gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT be changed to 1? Change-Id: I6436865dafe47e21e1365a602889cedab3c09784 diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk index da2e967..b9070b5 100644 --- a/solenv/gbuild/UnpackedTarball.mk +++ b/solenv/gbuild/UnpackedTarball.mk @@ -16,9 +16,17 @@ # NOTE: only for commands; targets should use TARFILE_LOCATION directly gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT := 1 + +# Note that because of a bug in +# gb_UnpackedTarget__get_strip_components, this _ZIP_DEFAULT is +# actually not used, but the above _TAR_DEFAULT is used for .zip +# archives, too. gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT := 0 # gb_UnpackedTarget__get_strip_components target strip-components? +# Note: the suiffix function returns also the period, like ".zip", +# so the condition below is never true. I don't dare fix this as this +# stuff seems to work anyway by accident... define gb_UnpackedTarget__get_strip_components $(strip $(if $(2),\ $(2),\ commit 0c4e9e6b7e4f7155e00f40e31a73a928ce4fad38 Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 25 10:49:50 2014 +0200 java,wizards: forgot to commit some files Change-Id: Ie4532343cf964ade848454d89b44e381eadb6582 diff --git a/wizards/Jar_commonwizards.mk b/wizards/Jar_commonwizards.mk index 0958a71..ad1ac03 100644 --- a/wizards/Jar_commonwizards.mk +++ b/wizards/Jar_commonwizards.mk @@ -86,6 +86,11 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\ wizards/com/sun/star/wizards/ui/event/TaskEvent \ wizards/com/sun/star/wizards/ui/event/TaskListener \ wizards/com/sun/star/wizards/ui/event/UnoDataAware \ + wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter \ + wizards/com/sun/star/wizards/ui/event/XItemListenerAdapter \ + wizards/com/sun/star/wizards/ui/event/XMouseListenerAdapter \ + wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter \ + wizards/com/sun/star/wizards/ui/event/XWindowListenerAdapter \ wizards/com/sun/star/wizards/ui/AggregateComponent \ wizards/com/sun/star/wizards/ui/CommandFieldSelection \ wizards/com/sun/star/wizards/ui/ControlScroller \ diff --git a/wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java b/wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java new file mode 100644 index 0000000..b7dfddb --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java @@ -0,0 +1,32 @@ +/* + * 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 . + */ +package com.sun.star.wizards.ui.event; + +import com.sun.star.awt.ActionEvent; +import com.sun.star.awt.XActionListener; +import com.sun.star.lang.EventObject; + +public class XActionListenerAdapter implements XActionListener { + + public void disposing(EventObject event) { + } + + public void actionPerformed(ActionEvent event) { + } + +} diff --git a/wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java b/wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java new file mode 100644 index 0000000..af95771 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java @@ -0,0 +1,32 @@ +/* + * 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 . + */ +package com.sun.star.wizards.ui.event; + +import com.sun.star.awt.TextEvent; +import com.sun.star.awt.XTextListener; +import com.sun.star.lang.EventObject; + +public class XTextListenerAdapter implements XTextListener { + + public void disposing(EventObject event) { + } + + public void textChanged(TextEvent event) { + } + +} commit da9fd02a4d1a36cf9d22d5b36ba36240585284f6 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Nov 25 09:46:13 2014 +0100 -Werror,-Wuninitialized (in PropertyComposer ctor: base class 'comphelper::OBaseMutex' is uninitialized when used here to access 'comphelper::OBaseMutex::m_aMutex') Change-Id: I41ede9ab34e89c8dde23ce2e4fd6393b05c979c6 diff --git a/extensions/source/propctrlr/propertycomposer.hxx b/extensions/source/propctrlr/propertycomposer.hxx index 4c71696..159d437 100644 --- a/extensions/source/propctrlr/propertycomposer.hxx +++ b/extensions/source/propctrlr/propertycomposer.hxx @@ -50,8 +50,8 @@ namespace pcr /** implements an <type>XPropertyHandler</type> which composes it's information from a set of other property handlers */ - class PropertyComposer :public PropertyComposer_Base - ,public ::comphelper::OBaseMutex + class PropertyComposer :public ::comphelper::OBaseMutex + ,public PropertyComposer_Base ,public IPropertyExistenceCheck { public: commit 5d602146785669063af11a96c6f716c22e0208ee Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 25 10:31:08 2014 +0200 java: remove some comment noise Change-Id: I1c258b853097448d4a59334d915e94dba4c7eb34 diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java index 1ea9cd2..5a9bc8b 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * StorageAccess.java - * - * Created on 17. August 2004, 13:32 - */ - package com.sun.star.sdbcx.comp.hsqldb; public class NativeStorageAccess { diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java index 2f3d99b..0e0fff5 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java @@ -15,13 +15,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * StorageFileAccess.java - * - * Created on 31. August 2004, 11:56 - */ - package com.sun.star.sdbcx.comp.hsqldb; + import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileSystemRuntimeException; diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java index caeb103..cf147c9 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * StorageNativeInputStream.java - * - * Created on 9. September 2004, 11:52 - */ - package com.sun.star.sdbcx.comp.hsqldb; public class StorageNativeInputStream { diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java index 1f1e654..8cc6cb0 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * StorageNativeOutputStream.java - * - * Created on 1. September 2004, 10:20 - */ - package com.sun.star.sdbcx.comp.hsqldb; public class StorageNativeOutputStream { diff --git a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java b/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java index 905ddc1..66a252d 100644 --- a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java +++ b/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java @@ -15,14 +15,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * Class.java - * - * Created on June 23, 2003, 3:19 PM - */ - package complex.connectivity.hsqldb; + import complex.connectivity.HsqlDriverTest; import java.sql.*; import java.lang.reflect.Method; diff --git a/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java b/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java index 33a1b1d..bfc4ec2 100644 --- a/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java +++ b/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * TypeDetection6FileFormat.java - * - * Created on 26. April 2004, 10:37 - */ package complex.filter.misc; import com.sun.star.container.XNameAccess; diff --git a/forms/qa/integration/forms/CellBinding.java b/forms/qa/integration/forms/CellBinding.java index e71975a..f4258a8 100644 --- a/forms/qa/integration/forms/CellBinding.java +++ b/forms/qa/integration/forms/CellBinding.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * CellBinding.java - * - * Created on 12. Mai 2004, 15:15 - */ - package integration.forms; import com.sun.star.uno.*; diff --git a/forms/qa/integration/forms/ImageComparison.java b/forms/qa/integration/forms/ImageComparison.java index 034f4e5..e28771f 100644 --- a/forms/qa/integration/forms/ImageComparison.java +++ b/forms/qa/integration/forms/ImageComparison.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * ImageComparison.java - * - * Created on 23. September 2003, 17:40 - */ - package integration.forms; public final class ImageComparison implements com.sun.star.awt.XImageConsumer diff --git a/forms/qa/integration/forms/SpreadsheetView.java b/forms/qa/integration/forms/SpreadsheetView.java index 76934bc..22ff1c0 100644 --- a/forms/qa/integration/forms/SpreadsheetView.java +++ b/forms/qa/integration/forms/SpreadsheetView.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * SpreadsheetView.java - * - * Created on 2. Oktober 2003, 14:02 - */ - package integration.forms; import com.sun.star.uno.*; diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java index 19d5919..2d3e9a8 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * ByteArrayXInputStram.java - * - * Created on 10. April 2003, 15:45 - */ - package com.sun.star.lib.uno.adapter; import com.sun.star.io.XInputStream; diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java index 38dff37..4887127 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * ByteArrayXOutputStream.java - * - * Created on 11. April 2003, 14:20 - */ - package com.sun.star.lib.uno.adapter; import com.sun.star.io.*; diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java index 86d587e..7d99b0d 100644 --- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java +++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java @@ -31,16 +31,8 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *************************************************************************/ - package org.openoffice.comp.test; - -/* - * ImageShrink.java - * - * Created on 4. Mai 2002, 20:25 - */ - import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.comp.loader.FactoryHelper; diff --git a/odk/examples/DevelopersGuide/Database/OpenQuery.java b/odk/examples/DevelopersGuide/Database/OpenQuery.java index 0aa972a..71e47f6 100644 --- a/odk/examples/DevelopersGuide/Database/OpenQuery.java +++ b/odk/examples/DevelopersGuide/Database/OpenQuery.java @@ -37,14 +37,6 @@ import com.sun.star.uno.XComponentContext; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.beans.XPropertySet; - - -/* - * OpenQuery.java - * - * Created on 6. Juli 2002, 10:25 - */ - public class OpenQuery { /** diff --git a/odk/examples/DevelopersGuide/Drawing/Organigram.java b/odk/examples/DevelopersGuide/Drawing/Organigram.java index 67d183c..799aa89 100644 --- a/odk/examples/DevelopersGuide/Drawing/Organigram.java +++ b/odk/examples/DevelopersGuide/Drawing/Organigram.java @@ -43,12 +43,6 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.XComponentContext; -/* - * OpenQuery.java - * - * Created on 6. Juli 2002, 10:25 - */ - public class Organigram { private XComponentContext xRemoteContext = null; diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java index 6fb099b..7d4efca 100644 --- a/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java +++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java @@ -15,11 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * SpreadsheetView.java - * - * Created on 2. Oktober 2003, 14:02 - */ import com.sun.star.lang.*; import com.sun.star.frame.*; diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java index be749f0..510abe0 100644 --- a/odk/examples/DevelopersGuide/Text/TextDocuments.java +++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java @@ -100,11 +100,6 @@ import com.sun.star.uno.XComponentContext; import com.sun.star.util.XRefreshable; import com.sun.star.view.XPrintable; -/* - * TextDocuments.java - * - * Created on 11. April 2002, 08:47 - */ public class TextDocuments { // adjust these constant to your local printer! diff --git a/qadevOOo/runner/helper/WindowListener.java b/qadevOOo/runner/helper/WindowListener.java index 00395c6..064743c 100644 --- a/qadevOOo/runner/helper/WindowListener.java +++ b/qadevOOo/runner/helper/WindowListener.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * WindowListener.java - * - * Created on 30. Juli 2002, 12:36 - */ - package helper; /** diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java index 4297c6c..31fbdc1 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java @@ -15,13 +15,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * _XSingleLayerStratum.java - * - * Created on 23. March 2004, 16:37 - */ package ifc.configuration.backend; + import com.sun.star.configuration.backend.XLayer; import com.sun.star.configuration.backend.XSingleLayerStratum; import com.sun.star.configuration.backend.XUpdatableLayer; diff --git a/stoc/test/javavm/testapplet/TestApplet.java b/stoc/test/javavm/testapplet/TestApplet.java index 2618498..e271f4d 100644 --- a/stoc/test/javavm/testapplet/TestApplet.java +++ b/stoc/test/javavm/testapplet/TestApplet.java @@ -21,11 +21,6 @@ import java.io.File; import java.io.IOException; import java.net.URL; import java.net.MalformedURLException; -/* - * TestApplet.java - * - * Created on 21. November 2001, 09:37 - */ public class TestApplet extends java.applet.Applet { diff --git a/wizards/com/sun/star/wizards/common/Indexable.java b/wizards/com/sun/star/wizards/common/Indexable.java index d838c35..9bf6255 100644 --- a/wizards/com/sun/star/wizards/common/Indexable.java +++ b/wizards/com/sun/star/wizards/common/Indexable.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * Indexable.java - * - * Created on 16. September 2003, 11:38 - */ - package com.sun.star.wizards.common; public interface Indexable { diff --git a/wizards/com/sun/star/wizards/common/Properties.java b/wizards/com/sun/star/wizards/common/Properties.java index 4c4a69d..59e48e6 100644 --- a/wizards/com/sun/star/wizards/common/Properties.java +++ b/wizards/com/sun/star/wizards/common/Properties.java @@ -15,11 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* - * Properties.java - * - * Created on 1. Oktober 2003, 17:16 - */ package com.sun.star.wizards.common; import com.sun.star.beans.PropertyValue; diff --git a/wizards/com/sun/star/wizards/common/XMLHelper.java b/wizards/com/sun/star/wizards/common/XMLHelper.java index 5a49b28..10bc417 100644 --- a/wizards/com/sun/star/wizards/common/XMLHelper.java +++ b/wizards/com/sun/star/wizards/common/XMLHelper.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * XMLHelper.java - * - * Created on 30. September 2003, 15:38 - */ package com.sun.star.wizards.common; import org.w3c.dom.*; diff --git a/wizards/com/sun/star/wizards/common/XMLProvider.java b/wizards/com/sun/star/wizards/common/XMLProvider.java index 287e861..86eef1d 100644 --- a/wizards/com/sun/star/wizards/common/XMLProvider.java +++ b/wizards/com/sun/star/wizards/common/XMLProvider.java @@ -15,12 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * XMLSupplier.java - * - * Created on 19. September 2003, 11:52 - */ package com.sun.star.wizards.common; import org.w3c.dom.Node; commit d6d6903e61d368e03d039f78dc7130cfe0206695 Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 25 10:24:50 2014 +0200 java: remove now unused CommonListener class Change-Id: I2b3d73dc38ab4c5b7ac60bc8b4b3903c36579891 diff --git a/wizards/Jar_commonwizards.mk b/wizards/Jar_commonwizards.mk index f0945e3..0958a71 100644 --- a/wizards/Jar_commonwizards.mk +++ b/wizards/Jar_commonwizards.mk @@ -75,7 +75,6 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\ wizards/com/sun/star/wizards/db/TableDescriptor \ wizards/com/sun/star/wizards/db/SQLQueryComposer \ wizards/com/sun/star/wizards/db/DatabaseObjectWizard \ - wizards/com/sun/star/wizards/ui/event/CommonListener \ wizards/com/sun/star/wizards/ui/event/DataAware \ wizards/com/sun/star/wizards/ui/event/DataAwareFields \ wizards/com/sun/star/wizards/ui/event/EventNames \ diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 163a354..c9a50d9 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -71,7 +71,6 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private int selected = -1; private int pageStart = 0; public int helpURL = 0; - private final CommonListener uiEventListener = new CommonListener(); private IImageRenderer renderer; private ListModel listModel; public IRenderer counterRenderer = new SimpleCounterRenderer(); diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.java b/wizards/com/sun/star/wizards/ui/event/CommonListener.java deleted file mode 100644 index 477ae3d..0000000 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * 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 . - */ -package com.sun.star.wizards.ui.event; - -import java.lang.reflect.InvocationTargetException; -import java.util.HashMap; - -import com.sun.star.awt.*; -import com.sun.star.lang.EventObject; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.wizards.common.Helper; -import com.sun.star.wizards.common.PropertyNames; - -/** - * <p>It uses a hashtable to map between a ComponentName, EventName and a MethodInvokation Object. - * To use this class do the following:</p> - * <ul> - * <li>Write a subclass which implements the needed Listener(s).</li> - * <li>In the even methods, use invoke(...).</li> - * <li>When instantiating the component, register the subclass as the event listener.</li> - * <li>Write the methods which should be performed when the event occurs.</li> - * <li>call the "add" method, to define a component-event-action mapping.</li> - * </ul> - */ -public class CommonListener implements XActionListener, XItemListener, XTextListener, XWindowListener, XMouseListener, XFocusListener, XKeyListener -{ - - private final HashMap<String,MethodInvocation> mHashtable = new HashMap<String,MethodInvocation>(); - - public void add(String componentName, EventNames eventName, String methodName, Object target) - { - try - { - mHashtable.put(componentName + eventName, new MethodInvocation(methodName, target)); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - } - - private void invoke(String componentName, EventNames eventName, Object param) - { - try - { - MethodInvocation mi = mHashtable.get(componentName + eventName); - if (mi != null) - { - mi.invoke(param); - } - } - catch (InvocationTargetException ite) - { - - System.out.println("======================================================="); - System.out.println("=== Note: An Exception was thrown which should have ==="); - System.out.println("=== caused a crash. I caught it. Please report this ==="); - System.out.println("=== to https://www.libreoffice.org/get-help/bug/ ==="); - System.out.println("======================================================="); - - ite.printStackTrace(); - - } - catch (IllegalAccessException iae) - { - iae.printStackTrace(); - } - catch (Exception ex) - { - System.out.println("======================================================="); - System.out.println("=== Note: An Exception was thrown which should have ==="); - System.out.println("=== caused a crash. I caught it. Please report this ==="); - System.out.println("=== to https://www.libreoffice.org/get-help/bug/ ==="); - System.out.println("======================================================="); - ex.printStackTrace(); - } - } - - /** - * Returns the property "name" of the Object which is the source of the event. - */ - private static String getEventSourceName(EventObject eventObject) - { - XControl xControl = UnoRuntime.queryInterface(XControl.class, eventObject.Source); - return (String) Helper.getUnoPropertyValue(xControl.getModel(), PropertyNames.PROPERTY_NAME, String.class); - } - - /** - * Implementation of com.sun.star.awt.XActionListener - */ - public void actionPerformed(com.sun.star.awt.ActionEvent actionEvent) - { - invoke(getEventSourceName(actionEvent), EventNames.ACTION_PERFORMED, actionEvent); - } - - public void disposing(com.sun.star.lang.EventObject eventObject) - { - } - - /** - * Implementation of com.sun.star.awt.XItemListener - */ - public void itemStateChanged(ItemEvent itemEvent) - { - invoke(getEventSourceName(itemEvent), EventNames.ITEM_CHANGED, itemEvent); - } - - /** - * Implementation of com.sun.star.awt.XTextListener - */ - public void textChanged(TextEvent textEvent) - { - invoke(getEventSourceName(textEvent), EventNames.TEXT_CHANGED, textEvent); - } - - /** - * @see com.sun.star.awt.XWindowListener#windowResized(com.sun.star.awt.WindowEvent) - */ - public void windowResized(WindowEvent event) - { - invoke(getEventSourceName(event), EventNames.WINDOW_RESIZED, event); - } - - /** - * @see com.sun.star.awt.XWindowListener#windowMoved(com.sun.star.awt.WindowEvent) - */ - public void windowMoved(WindowEvent event) - { - invoke(getEventSourceName(event), EventNames.WINDOW_MOVED, event); - } - - /** - * @see com.sun.star.awt.XWindowListener#windowShown(com.sun.star.lang.EventObject) - */ - public void windowShown(EventObject event) - { - invoke(getEventSourceName(event), EventNames.WINDOW_SHOWN, event); - } - - /** - * @see com.sun.star.awt.XWindowListener#windowHidden(com.sun.star.lang.EventObject) - */ - public void windowHidden(EventObject event) - { - invoke(getEventSourceName(event), EventNames.WINDOW_HIDDEN, event); - } - - /** - * @see com.sun.star.awt.XMouseListener#mousePressed(com.sun.star.awt.MouseEvent) - */ - public void mousePressed(MouseEvent event) - { - invoke(getEventSourceName(event), EventNames.MOUSE_PRESSED, event); - } - - /** - * @see com.sun.star.awt.XMouseListener#mouseReleased(com.sun.star.awt.MouseEvent) - */ - public void mouseReleased(MouseEvent event) - { - invoke(getEventSourceName(event), EventNames.KEY_RELEASED, event); - } - - /** - * @see com.sun.star.awt.XMouseListener#mouseEntered(com.sun.star.awt.MouseEvent) - */ - public void mouseEntered(MouseEvent event) - { - invoke(getEventSourceName(event), EventNames.MOUSE_ENTERED, event); - } - - /** - * @see com.sun.star.awt.XMouseListener#mouseExited(com.sun.star.awt.MouseEvent) - */ - public void mouseExited(MouseEvent event) - { - invoke(getEventSourceName(event), EventNames.MOUSE_EXITED, event); - } - - /** - * @see com.sun.star.awt.XFocusListener#focusGained(com.sun.star.awt.FocusEvent) - */ - public void focusGained(FocusEvent event) - { - invoke(getEventSourceName(event), EventNames.FOCUS_GAINED, event); - } - - /** - * @see com.sun.star.awt.XFocusListener#focusLost(com.sun.star.awt.FocusEvent) - */ - public void focusLost(FocusEvent event) - { - invoke(getEventSourceName(event), EventNames.FOCUS_LOST, event); - } - - /** - * @see com.sun.star.awt.XKeyListener#keyPressed(com.sun.star.awt.KeyEvent) - */ - public void keyPressed(KeyEvent event) - { - invoke(getEventSourceName(event), EventNames.KEY_PRESSED, event); - } - - /** - * @see com.sun.star.awt.XKeyListener#keyReleased(com.sun.star.awt.KeyEvent) - */ - public void keyReleased(KeyEvent event) - { - invoke(getEventSourceName(event), EventNames.KEY_RELEASED, event); - } -} commit 207f6c7ee15742005b2b37f26a3e2de5cb010421 Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 25 10:22:47 2014 +0200 java,wizards: convert event listeners to inner classes Change-Id: I3c30d3865302741c7fbdc811e32686a921b6a4df diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index b9806b5..ee994b4 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -17,11 +17,13 @@ */ package com.sun.star.wizards.form; +import com.sun.star.awt.TextEvent; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.*; +import com.sun.star.wizards.ui.event.XTextListenerAdapter; /** * @@ -56,7 +58,12 @@ public class Finalizer { UIConsts.INTEGERS[8], slblFormName, 97, 25, UIConsts.INTEGERS[8], Short.valueOf(curtabindex++), 111 }); - txtFormName = CurUnoDialog.insertTextField("txtFormName", "toggleFinishButton", this, + txtFormName = CurUnoDialog.insertTextField("txtFormName", new XTextListenerAdapter() { + @Override + public void textChanged(TextEvent event) { + toggleFinishButton(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH @@ -106,7 +113,7 @@ public class Finalizer } } - public void toggleFinishButton() + private void toggleFinishButton() { CurUnoDialog.enableFinishButton(txtFormName.getText().length() > 0); } diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index 6cf03b6..8efe9ab 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -17,6 +17,7 @@ */ package com.sun.star.wizards.query; +import com.sun.star.awt.TextEvent; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; import com.sun.star.lang.IllegalArgumentException; @@ -28,6 +29,7 @@ import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; +import com.sun.star.wizards.ui.event.XTextListenerAdapter; import java.util.logging.Level; import java.util.logging.Logger; @@ -66,7 +68,12 @@ public class Finalizer { 8, reslblQueryTitle, 95, 27, Integer.valueOf(QueryWizard.SOSUMMARY_PAGE), Short.valueOf(curtabindex++), 52 }); - m_aTxtTitle = m_queryWizard.insertTextField("txtQueryTitle", "changeTitle", this, new String[] + m_aTxtTitle = m_queryWizard.insertTextField("txtQueryTitle", new XTextListenerAdapter() { + @Override + public void textChanged(TextEvent event) { + changeTitle(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, @@ -119,7 +126,7 @@ public class Finalizer }); } - public void changeTitle() + private void changeTitle() { final String TitleName = m_aTxtTitle.getText(); m_queryWizard.enableFinishButton( TitleName.length() > 0 ); diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index af3843a..af5ea07 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -16,15 +16,21 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ package com.sun.star.wizards.report; -import com.sun.star.uno.Exception; -import com.sun.star.wizards.common.*; -import com.sun.star.wizards.ui.*; -import com.sun.star.wizards.ui.event.XItemListenerAdapter; import com.sun.star.awt.ItemEvent; +import com.sun.star.awt.TextEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.Exception; +import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.RecordParser; +import com.sun.star.wizards.ui.UIConsts; +import com.sun.star.wizards.ui.WizardDialog; +import com.sun.star.wizards.ui.event.XItemListenerAdapter; +import com.sun.star.wizards.ui.event.XTextListenerAdapter; public class ReportFinalizer { @@ -33,7 +39,6 @@ public class ReportFinalizer XTextComponent xTitleTextBox; XTextComponent[] xSaveTextBox = new XTextComponent[2]; Object chkTemplate; - String CHANGEREPORTTITLE_FUNCNAME = "changeReportTitle"; String TemplatePath; String StoreName; boolean bfinalaskbeforeOverwrite; @@ -70,7 +75,12 @@ public class ReportFinalizer 8, sReportTitle, 95, 27, Integer.valueOf(ReportWizard.SOSTOREPAGE), Short.valueOf(curtabindex++), 68 }); - xTitleTextBox = CurUnoDialog.insertTextField("txtTitle", CHANGEREPORTTITLE_FUNCNAME, this, + xTitleTextBox = CurUnoDialog.insertTextField("txtTitle", new XTextListenerAdapter() { + @Override + public void textChanged(TextEvent arg0) { + changeReportTitle(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -211,7 +221,7 @@ public class ReportFinalizer return StorePath; } - public void changeReportTitle() + private void changeReportTitle() { final String TitleName = xTitleTextBox.getText(); CurReportDocument.liveupdate_updateReportTitle(TitleName); diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index cad7425..a9a41ca 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -20,6 +20,7 @@ package com.sun.star.wizards.table; import com.sun.star.awt.ActionEvent; import com.sun.star.awt.FontDescriptor; import com.sun.star.awt.ItemEvent; +import com.sun.star.awt.TextEvent; import com.sun.star.awt.XButton; import com.sun.star.awt.XItemListener; import com.sun.star.awt.XListBox; @@ -35,6 +36,7 @@ import com.sun.star.wizards.db.TableDescriptor; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.event.XActionListenerAdapter; +import com.sun.star.wizards.ui.event.XTextListenerAdapter; public class FieldFormatter implements XItemListener { @@ -49,10 +51,6 @@ public class FieldFormatter implements XItemListener XButton btnShiftUp; XButton btnShiftDown; short curtabindex; - String TOGGLEBUTTONS = "toggleButtons"; - String ADDFIELDNAME = "addFieldName"; - String REMOVEFIELDNAME = "removeFieldName"; - String MODIFYFIELDNAME = "modifyFieldName"; String[] fieldnames; String suntitled; Integer IFieldFormatStep; @@ -183,7 +181,12 @@ public class FieldFormatter implements XItemListener UIConsts.INTEGERS[8], sFieldName, 158, 39, IFieldFormatStep, Short.valueOf(curtabindex++), 94 }); - txtfieldname = CurUnoDialog.insertTextField("txtfieldname", MODIFYFIELDNAME, this, + txtfieldname = CurUnoDialog.insertTextField("txtfieldname", new XTextListenerAdapter() { + @Override + public void textChanged(TextEvent event) { + modifyFieldName(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java index 5d081ec..f4cb9d4 100644 --- a/wizards/com/sun/star/wizards/table/Finalizer.java +++ b/wizards/com/sun/star/wizards/table/Finalizer.java @@ -17,6 +17,7 @@ */ package com.sun.star.wizards.table; +import com.sun.star.awt.TextEvent; import com.sun.star.awt.XListBox; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; @@ -26,6 +27,7 @@ import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.TableDescriptor; import com.sun.star.wizards.ui.*; +import com.sun.star.wizards.ui.event.XTextListenerAdapter; public class Finalizer { @@ -39,7 +41,6 @@ public class Finalizer XListBox xCatalogListBox; XListBox xSchemaListBox; TableDescriptor curtabledescriptor; - public String SETCOMPLETIONFLAG = "setCompletionFlag"; public static int WORKWITHTABLEMODE = 0; public static int MODIFYTABLEMODE = 1; public static int STARTFORMWIZARDMODE = 2; @@ -76,7 +77,12 @@ public class Finalizer { UIConsts.INTEGERS[8], slblTableName, 97, 25, IFINALSTEP, 220 }); - txtTableName = CurUnoDialog.insertTextField("txtTableName", SETCOMPLETIONFLAG, this, + txtTableName = CurUnoDialog.insertTextField("txtTableName", new XTextListenerAdapter() { + @Override + public void textChanged(TextEvent event) { + setCompletionFlag(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH @@ -344,7 +350,7 @@ public class Finalizer return (txtTableName.getText().length() > 0); } - public void setCompletionFlag() + private void setCompletionFlag() { CurUnoDialog.setcompleted(TableWizard.SOFINALPAGE, iscompleted()); } diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.java b/wizards/com/sun/star/wizards/ui/PathSelection.java index 207c97b..7fa09c5 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.java +++ b/wizards/com/sun/star/wizards/ui/PathSelection.java @@ -18,6 +18,7 @@ package com.sun.star.wizards.ui; import com.sun.star.awt.ActionEvent; +import com.sun.star.awt.TextEvent; import com.sun.star.awt.XTextComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Exception; @@ -25,6 +26,7 @@ import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.ui.event.XActionListenerAdapter; +import com.sun.star.wizards.ui.event.XTextListenerAdapter; public class PathSelection { @@ -74,7 +76,13 @@ public class PathSelection Boolean.valueOf(Enabled), 8, LabelText, Integer.valueOf(XPos), Integer.valueOf(YPos), Integer.valueOf(DialogStep), Short.valueOf(CurTabIndex), Integer.valueOf(Width) }); - xSaveTextBox = CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", this, new String[] + xSaveTextBox = CurUnoDialog.insertTextField("txtSavePath", new XTextListenerAdapter() { + @Override + public void textChanged(TextEvent arg0) { + callXPathSelectionListener(); + } + }, + new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] @@ -174,7 +182,7 @@ public class PathSelection } } - public void callXPathSelectionListener() + private void callXPathSelectionListener() { if (xAction != null) { diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 5b4eefe..0726670 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -55,7 +55,6 @@ public class UnoDialog public Resource m_oResource; public XWindowPeer xWindowPeer = null; private PeerConfig m_oPeerConfig; - protected final CommonListener guiEventListener = new CommonListener(); public UnoDialog(XMultiServiceFactory xMSF) { diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index 0c91277..f91fbf9 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -27,6 +27,7 @@ import com.sun.star.awt.XProgressBar; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XScrollBar; import com.sun.star.awt.XTextComponent; +import com.sun.star.awt.XTextListener; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; @@ -34,7 +35,6 @@ import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; -import com.sun.star.wizards.ui.event.EventNames; /** * This class contains convenience methods for inserting components to a dialog. @@ -115,9 +115,9 @@ public class UnoDialog2 extends UnoDialog return UnoRuntime.queryInterface(XControl.class, oTitledBox); } - public XTextComponent insertTextField(String sName, String sTextChangedMethodName, Object eventTarget, String[] sPropNames, Object[] oPropValues) + public XTextComponent insertTextField(String sName, XTextListener textListener, String[] sPropNames, Object[] oPropValues) { - return (XTextComponent) insertEditField(sName, sTextChangedMethodName, eventTarget, "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues, XTextComponent.class); + return (XTextComponent) insertEditField(sName, textListener, "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues, XTextComponent.class); } public XControl insertImage(String sName, String[] sPropNames, Object[] oPropValues) @@ -144,13 +144,12 @@ public class UnoDialog2 extends UnoDialog * This method is used for creating Edit, Currency, Date, Formatted, Pattern, File * and Time edit components. */ - private Object insertEditField(String sName, String sTextChangedMethodName, Object eventTarget, String sModelClass, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type) + private Object insertEditField(String sName, XTextListener textListener, String sModelClass, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type) { XTextComponent xField = (XTextComponent) insertControlModel2(sModelClass, sName, sPropNames, oPropValues, XTextComponent.class); - if (sTextChangedMethodName != null) + if (textListener != null) { - xField.addTextListener(guiEventListener); - guiEventListener.add(sName, EventNames.TEXT_CHANGED, sTextChangedMethodName, eventTarget); + xField.addTextListener(textListener); } return UnoRuntime.queryInterface(type, xField); } commit 40f7f1cf749d788b328bd132ed4bbeb1a19ee90b Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 25 10:13:50 2014 +0200 java,wizards: convert event listeners to inner classes Change-Id: I01143a9f3a3b563bf5da58dc4a8ed38c440a5c62 diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index cc77d05..2a5288e 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -17,6 +17,7 @@ */ package com.sun.star.wizards.form; +import com.sun.star.awt.ActionEvent; import com.sun.star.awt.ItemEvent; import com.sun.star.awt.XCheckBox; import com.sun.star.awt.XFixedText; @@ -29,6 +30,7 @@ import com.sun.star.wizards.ui.CommandFieldSelection; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.WizardDialog; +import com.sun.star.wizards.ui.event.XActionListenerAdapter; import com.sun.star.wizards.ui.event.XItemListenerAdapter; /** @@ -48,7 +50,6 @@ public class FormConfiguration XListBox lstRelations; String[] sreferencedTables; CommandFieldSelection CurSubFormFieldSelection; - String SONEXISTINGRELATIONSELECTION = "onexistingRelationSelection"; boolean bsupportsRelations; RelationController oRelationController = null; @@ -115,7 +116,17 @@ public class FormConfiguration { Boolean.FALSE, 19, sSelectRelation, Boolean.TRUE, 119, 56, ISubFormStep, Short.valueOf(curtabindex++), 80 }); - lstRelations = CurUnoDialog.insertListBox("lstrelations", SONEXISTINGRELATIONSELECTION, SONEXISTINGRELATIONSELECTION, this, + lstRelations = CurUnoDialog.insertListBox("lstrelations", new XActionListenerAdapter() { + @Override + public void actionPerformed(ActionEvent event) { + onexistingRelationSelection(); + } + }, new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + onexistingRelationSelection(); + } + }, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -205,7 +216,7 @@ public class FormConfiguration return PropertyNames.EMPTY_STRING; } - public void onexistingRelationSelection() + private void onexistingRelationSelection() { String scurreferencedTableName = getreferencedTableName(); if (scurreferencedTableName.length() > 0) diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 8fa04b0..17abf91 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -39,7 +39,9 @@ import com.sun.star.wizards.document.DatabaseControl; import com.sun.star.wizards.document.GridControl; import com.sun.star.wizards.document.TimeStampControl; import com.sun.star.wizards.text.TextStyleHandler; -import com.sun.star.wizards.ui.*; +import com.sun.star.wizards.ui.UIConsts; +import com.sun.star.wizards.ui.UnoDialog; +import com.sun.star.wizards.ui.WizardDialog; import com.sun.star.wizards.ui.event.XItemListenerAdapter; public class StyleApplier @@ -52,7 +54,6 @@ public class StyleApplier private final XListBox lstStyles; private final FormDocument curFormDocument; private short iOldLayoutPos; - private static final String SCHANGELAYOUT = "changeLayout"; private String[] StyleNames; private String[] FileNames; private final static int SOBACKGROUNDCOLOR = 0; @@ -92,7 +93,12 @@ public class StyleApplier UIConsts.INTEGERS[8], sPageStyles, 92, 25, IStyleStep, Short.valueOf(curtabindex++), 90 }); - lstStyles = CurUnoDialog.insertListBox("lstStyles", null, SCHANGELAYOUT, this, + lstStyles = CurUnoDialog.insertListBox("lstStyles", null, new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + changeLayout(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -212,7 +218,7 @@ public class StyleApplier } } - public void changeLayout() + private void changeLayout() { short iPos = lstStyles.getSelectedItemPos(); if (iPos != iOldLayoutPos) diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index b99bd0b..d8fb8ee 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -17,6 +17,7 @@ */ package com.sun.star.wizards.table; +import com.sun.star.awt.ActionEvent; import com.sun.star.awt.ItemEvent; import com.sun.star.awt.XCheckBox; import com.sun.star.awt.XFixedText; @@ -34,6 +35,7 @@ import com.sun.star.wizards.ui.FieldSelection; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.XFieldSelectionListener; +import com.sun.star.wizards.ui.event.XActionListenerAdapter; import com.sun.star.wizards.ui.event.XItemListenerAdapter; public class PrimaryKeyHandler implements XFieldSelectionListener @@ -165,7 +167,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener Boolean.FALSE, UIConsts.INTEGERS[8], slblPrimeFieldName, 116, 117, IPRIMEKEYSTEP, Short.valueOf(curtabindex++), 46 }); - lstSinglePrimeKey = CurUnoDialog.insertListBox("lstSinglePrimeKey", "onPrimeKeySelected", null, this, + lstSinglePrimeKey = CurUnoDialog.insertListBox("lstSinglePrimeKey", new XActionListenerAdapter() { + @Override + public void actionPerformed(ActionEvent event) { + onPrimeKeySelected(); + } + }, null, new String[] { "Dropdown", @@ -363,7 +370,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener return bischecked; } - public void onPrimeKeySelected() + private void onPrimeKeySelected() { try { diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index bdcfbe8..0c91277 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -85,27 +85,20 @@ public class UnoDialog2 extends UnoDialog return xCheckBox; } - public XListBox insertListBox(String sName, String actionPerformedMethodName, String itemChangedMethodName, Object eventTarget, String[] sPropNames, Object[] oPropValues) + public XListBox insertListBox(String sName, XActionListener actionListener, XItemListener itemListener, String[] sPropNames, Object[] oPropValues) { XListBox xListBox = (XListBox) insertControlModel2("com.sun.star.awt.UnoControlListBoxModel", sName, sPropNames, oPropValues, XListBox.class); - if (actionPerformedMethodName != null) + if (actionListener != null) { - xListBox.addActionListener(guiEventListener); - guiEventListener.add(sName, EventNames.ACTION_PERFORMED, actionPerformedMethodName, eventTarget); + xListBox.addActionListener(actionListener); } - if (itemChangedMethodName != null) + if (itemListener != null) { - xListBox.addItemListener(guiEventListener); - guiEventListener.add(sName, EventNames.ITEM_CHANGED, itemChangedMethodName, eventTarget); + xListBox.addItemListener(itemListener); } return xListBox; } - public XListBox insertListBox(String sName, String actionPerformed, String itemChanged, String[] sPropNames, Object[] oPropValues) - { - return insertListBox(sName, actionPerformed, itemChanged, this, sPropNames, oPropValues); - } - public XRadioButton insertRadioButton(String sName, XItemListener itemListener, String[] sPropNames, Object[] oPropValues) { XRadioButton xRadioButton = (XRadioButton) insertControlModel2("com.sun.star.awt.UnoControlRadioButtonModel", sName, sPropNames, oPropValues, XRadioButton.class); commit 7af4d5e8c91cf7c57f8b5471ac8201a9fe1240dc Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 25 10:02:13 2014 +0200 java,wizards: convert event listeners to inner classes Change-Id: Ia95a07f798de01bfedcce6cd5e97090e165a7ca9 diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index f21817f..f653bf3 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -17,15 +17,17 @@ */ package com.sun.star.wizards.form; +import com.sun.star.awt.ItemEvent; import com.sun.star.awt.XCheckBox; import com.sun.star.awt.XRadioButton; import com.sun.star.beans.PropertyValue; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.WizardDialog; -import com.sun.star.wizards.ui.UIConsts; -import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.ui.event.XItemListenerAdapter; public class DataEntrySetter { @@ -46,7 +48,12 @@ public class DataEntrySetter String sNoAddition = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 49); // AlowInserts String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 45); - CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this, + CurUnoDialog.insertRadioButton("optNewDataOnly", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + toggleCheckBoxes(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -56,7 +63,12 @@ public class DataEntrySetter UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", sNewDataOnly, 98, 25, IDataStep, Short.valueOf(curtabindex++), 195 }); - optDisplayAllData = CurUnoDialog.insertRadioButton("optDisplayAllData", "toggleCheckBoxes", this, + optDisplayAllData = CurUnoDialog.insertRadioButton("optDisplayAllData", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + toggleCheckBoxes(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -125,7 +137,7 @@ public class DataEntrySetter } - public void toggleCheckBoxes() + private void toggleCheckBoxes() { boolean bdisplayalldata = optDisplayAllData.getState(); Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata)); diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index 0214a32..cc77d05 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -48,7 +48,6 @@ public class FormConfiguration XListBox lstRelations; String[] sreferencedTables; CommandFieldSelection CurSubFormFieldSelection; - String STOGGLESTEPS = "toggleSteps"; String SONEXISTINGRELATIONSELECTION = "onexistingRelationSelection"; boolean bsupportsRelations; RelationController oRelationController = null; @@ -79,7 +78,12 @@ public class FormConfiguration { UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", sSelectManually, 97, 26, ISubFormStep, Short.valueOf(curtabindex++), 160 }); - optOnExistingRelation = CurUnoDialog.insertRadioButton("optOnExistingRelation", STOGGLESTEPS, this, + optOnExistingRelation = CurUnoDialog.insertRadioButton("optOnExistingRelation", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + toggleSteps(); + } + }, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -88,7 +92,12 @@ public class FormConfiguration { Boolean.FALSE, UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", sOnExistingRelation, 107, 43, ISubFormStep, Short.valueOf(curtabindex++), 160 }); - optSelectManually = CurUnoDialog.insertRadioButton("optSelectManually", STOGGLESTEPS, this, + optSelectManually = CurUnoDialog.insertRadioButton("optSelectManually", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + toggleSteps(); + } + }, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 262fc4f..8fa04b0 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -17,6 +17,7 @@ */ package com.sun.star.wizards.form; +import com.sun.star.awt.ItemEvent; import com.sun.star.awt.XListBox; import com.sun.star.awt.XRadioButton; import com.sun.star.beans.XPropertySet; @@ -39,6 +40,7 @@ import com.sun.star.wizards.document.GridControl; import com.sun.star.wizards.document.TimeStampControl; import com.sun.star.wizards.text.TextStyleHandler; import com.sun.star.wizards.ui.*; +import com.sun.star.wizards.ui.event.XItemListenerAdapter; public class StyleApplier { @@ -51,7 +53,6 @@ public class StyleApplier private final FormDocument curFormDocument; private short iOldLayoutPos; private static final String SCHANGELAYOUT = "changeLayout"; - private static final String SCHANGEBORDERTYPE = "changeBorderLayouts"; private String[] StyleNames; private String[] FileNames; private final static int SOBACKGROUNDCOLOR = 0; @@ -101,7 +102,12 @@ public class StyleApplier 143, "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", 92, 35, SelLayoutPos, IStyleStep, this.StyleNames, Short.valueOf(curtabindex++), 90 }); - optNoBorder = CurUnoDialog.insertRadioButton("otpNoBorder", SCHANGEBORDERTYPE, this, + optNoBorder = CurUnoDialog.insertRadioButton("otpNoBorder", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + changeBorderLayouts(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH @@ -111,7 +117,12 @@ public class StyleApplier UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", sNoBorder, 196, 39, IStyleStep, Short.valueOf(curtabindex++), "0", 93 }); - opt3DLook = CurUnoDialog.insertRadioButton("otp3DLook", SCHANGEBORDERTYPE, this, + opt3DLook = CurUnoDialog.insertRadioButton("otp3DLook", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + changeBorderLayouts(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH @@ -121,7 +132,12 @@ public class StyleApplier UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", s3DLook, 196, 53, Short.valueOf((short) 1), IStyleStep, Short.valueOf(curtabindex++), "1", 93 }); - CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this, + CurUnoDialog.insertRadioButton("otpFlat", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + changeBorderLayouts(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH @@ -214,7 +230,7 @@ public class StyleApplier return IBorderValue; } - public void changeBorderLayouts() + private void changeBorderLayouts() { try { diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index 9c77005..0f70029 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -29,6 +29,7 @@ import com.sun.star.wizards.document.Control; import com.sun.star.wizards.ui.ButtonList; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; +import com.sun.star.wizards.ui.event.XItemListenerAdapter; import javax.swing.DefaultListModel; import javax.swing.ListModel; @@ -47,7 +48,6 @@ public class UIControlArranger private final Integer IControlStep; private static final int SOBASEIMAGEYPOSITION = 66; private static final int SOIMAGELISTHEIGHT = 60; - private static final String SOALIGNMETHOD = "alignLabelControls"; public UIControlArranger(FormWizard _CurUnoDialog, FormDocument _curFormDocument) { @@ -70,7 +70,12 @@ public class UIControlArranger UIConsts.INTEGERS[8], sLabelPlacment, 97, 25, IControlStep, Short.valueOf(curtabindex++), 207 }); // Radio Button "Align Left" - optAlignLeft = CurUnoDialog.insertRadioButton("optAlignLeft", SOALIGNMETHOD, this, + optAlignLeft = CurUnoDialog.insertRadioButton("optAlignLeft", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + alignLabelControls(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -80,7 +85,12 @@ public class UIControlArranger UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", sAlignLeft, 107, 38, Short.valueOf((short) 1), IControlStep, Short.valueOf(curtabindex++), 171 }); // Radio Button "Align Right" - optAlignRight = CurUnoDialog.insertRadioButton("optAlignRight", SOALIGNMETHOD, this, + optAlignRight = CurUnoDialog.insertRadioButton("optAlignRight", new XItemListenerAdapter() { + @Override + public void itemStateChanged(ItemEvent event) { + alignLabelControls(); + } + }, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH @@ -148,7 +158,7 @@ public class UIControlArranger return optAlignLeft.getState() ? (short)0 : (short)2; } - public void alignLabelControls() + private void alignLabelControls() { try { diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 4386d8a..af3843a 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -19,10 +19,13 @@ package com.sun.star.wizards.report; import com.sun.star.uno.Exception; import com.sun.star.wizards.common.*; import com.sun.star.wizards.ui.*; +import com.sun.star.wizards.ui.event.XItemListenerAdapter; +import com.sun.star.awt.ItemEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.db.RecordParser; + public class ReportFinalizer { @@ -31,7 +34,6 @@ public class ReportFinalizer XTextComponent[] xSaveTextBox = new XTextComponent[2]; Object chkTemplate; String CHANGEREPORTTITLE_FUNCNAME = "changeReportTitle"; - String TOGGLESUBTEMPLATECONTROLS_FUNCNAME = "toggleSubTemplateControls"; String TemplatePath; String StoreName; boolean bfinalaskbeforeOverwrite; @@ -88,7 +90,12 @@ public class ReportFinalizer ... etc. - the rest is truncated
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits