icon-themes/sifr/cmd/32/connector.png |binary icon-themes/sifr/cmd/32/selectobject.png |binary icon-themes/sifr/cmd/lc_absoluterecord.png |binary icon-themes/sifr/cmd/lc_addwatch.png |binary icon-themes/sifr/cmd/lc_basicstepinto.png |binary icon-themes/sifr/cmd/lc_basicstepout.png |binary icon-themes/sifr/cmd/lc_basicstepover.png |binary icon-themes/sifr/cmd/lc_basicstop.png |binary icon-themes/sifr/cmd/lc_choosemacro.png |binary icon-themes/sifr/cmd/lc_matchgroup.png |binary icon-themes/sifr/cmd/lc_showtrackedchanges.png |binary icon-themes/sifr/cmd/sc_addwatch.png |binary icon-themes/sifr/cmd/sc_showtrackedchanges.png |binary include/sfx2/app.hxx | 3 include/sfx2/sfx.hrc | 3 include/sfx2/sfxbasecontroller.hxx | 2 officecfg/registry/schema/org/openoffice/Office/Common.xcs | 12 sc/source/filter/oox/formulabase.cxx | 2 sc/source/ui/app/inputwin.cxx | 3 sfx2/Library_sfx.mk | 1 sfx2/UIConfig_sfx.mk | 1 sfx2/source/appl/appdata.cxx | 3 sfx2/source/appl/appmisc.cxx | 21 sfx2/source/dialog/ApplicationStartupDialog.cxx | 125 +++ sfx2/source/inc/ApplicationStartupDialog.hxx | 40 + sfx2/source/inc/appdata.hxx | 1 sfx2/source/view/sfxbasecontroller.cxx | 26 sfx2/source/view/view.src | 12 sfx2/uiconfig/ui/applicationstartupdialog.ui | 362 ++++++++++ solenv/gbuild/platform/macosx.mk | 2 vcl/opengl/gdiimpl.cxx | 130 ++- vcl/source/filter/GraphicNativeMetadata.cxx | 4 writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-5.rtf |binary writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 34 files changed, 714 insertions(+), 43 deletions(-)
New commits: commit 078530bc4c572e21e34d828b443025c43bd582bd Author: Tor Lillqvist <t...@collabora.com> Date: Tue Aug 2 13:27:43 2016 +0300 Seems that Clang in Xcode 7.3.1 produces broken code with -O2 in some cases For instance CppunitTest_sw_mailmerge crashes when dbaccess is compiled with -O2, but works fine with -O1. Did not bother with any closer checks for Clang version for now in this branch. Change-Id: I7941e89af312f3102d8b2f4476e29deaaa4d966c (cherry picked from commit 52393273558a68fb8e8e8b7a5da233c5e5c712f1) diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 763c9785..361e202 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -22,6 +22,8 @@ export VCL_HIDE_WINDOWS=1 gb_SDKDIR := $(MACOSX_SDK_PATH) +gb_COMPILEROPTFLAGS := -O1 + include $(GBUILDDIR)/platform/com_GCC_defs.mk # Darwin mktemp -t expects a prefix, not a pattern commit 8ed25e930372187c0564a2bd895db6a0bcdcbc8a Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 7 16:58:22 2016 +0100 fftester: guard against empty table manager stack Change-Id: Ibb4cadb58aa17eacfc9741f7f13c780be347cd8b (cherry picked from commit 145e2dfc4501cb3fa01a1771cb6829b5945df4a6) Reviewed-on: https://gerrit.libreoffice.org/27937 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: David Tardon <dtar...@redhat.com> (cherry picked from commit f6477e396da204e19a759c86c5addcc5d4f8b78b) diff --git a/writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-5.rtf b/writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-5.rtf new file mode 100644 index 0000000..a03be13 Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-5.rtf differ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 502f6ef..6bbef8d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1297,7 +1297,6 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper } } - void DomainMapper_Impl::appendTextContent( const uno::Reference< text::XTextContent >& xContent, const uno::Sequence< beans::PropertyValue >& xPropertyValues @@ -1308,7 +1307,7 @@ void DomainMapper_Impl::appendTextContent( return; uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( m_aTextAppendStack.top().xTextAppend, uno::UNO_QUERY ); OSL_ENSURE( xTextAppendAndConvert.is(), "trying to append a text content without XTextAppendAndConvert" ); - if(xTextAppendAndConvert.is() && ! getTableManager( ).isIgnore()) + if (xTextAppendAndConvert.is() && hasTableManager() && !getTableManager().isIgnore()) { try { @@ -1326,7 +1325,6 @@ void DomainMapper_Impl::appendTextContent( } } - void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const OLEHandlerPtr& pOLEHandler ) { static const char sEmbeddedService[] = "com.sun.star.text.TextEmbeddedObject"; commit 7738e15770d2cad532be6137f9cb97b7f798b7ba Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Thu Aug 4 16:21:47 2016 +0900 tdf#101008 fix XOR rendering Change-Id: Ied73966633e5ffd56faccea7ec1408bd83642b58 Reviewed-on: https://gerrit.libreoffice.org/27862 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/27922 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit c0f43368471a5844f10025d42a36b89d3a2cc184) diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 4f1da07..6c91013 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -222,6 +222,10 @@ void OpenGLSalGraphicsImpl::InitializePreDrawState(XOROption eOpt) CHECK_GL_ERROR(); glLogicOp(GL_XOR); + CHECK_GL_ERROR(); + + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + CHECK_GL_ERROR(); } } @@ -231,6 +235,8 @@ void OpenGLSalGraphicsImpl::PostDraw() { glDisable(GL_COLOR_LOGIC_OP); CHECK_GL_ERROR(); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + CHECK_GL_ERROR(); } if( mpProgram ) @@ -458,17 +464,43 @@ void OpenGLSalGraphicsImpl::SetFillColor( SalColor nSalColor ) // enable/disable XOR drawing void OpenGLSalGraphicsImpl::SetXORMode( bool bSet, bool ) { - mbXORMode = bSet; + if (mbXORMode != bSet) + { + FlushDeferredDrawing(); + mbXORMode = bSet; + } } -// set line color for raster operations -void OpenGLSalGraphicsImpl::SetROPLineColor( SalROPColor /*nROPColor*/ ) +void OpenGLSalGraphicsImpl::SetROPLineColor(SalROPColor nROPColor) { + switch (nROPColor) + { + case SalROPColor::N0: + mnLineColor = MAKE_SALCOLOR(0, 0, 0); + break; + case SalROPColor::N1: + mnLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff); + break; + case SalROPColor::Invert: + mnLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff); + break; + } } -// set fill color for raster operations -void OpenGLSalGraphicsImpl::SetROPFillColor( SalROPColor /*nROPColor*/ ) +void OpenGLSalGraphicsImpl::SetROPFillColor(SalROPColor nROPColor) { + switch (nROPColor) + { + case SalROPColor::N0: + mnFillColor = MAKE_SALCOLOR(0, 0, 0); + break; + case SalROPColor::N1: + mnFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff); + break; + case SalROPColor::Invert: + mnFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff); + break; + } } bool OpenGLSalGraphicsImpl::CheckOffscreenTexture() @@ -2274,15 +2306,21 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, { Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); - VCL_GL_INFO( "::drawGradient" ); + VCL_GL_INFO("::drawGradient " << rPolyPoly.GetBoundRect()); - if( aBoundRect.IsEmpty() ) + if (aBoundRect.IsEmpty()) + { + VCL_GL_INFO("::drawGradient nothing to draw"); return true; + } - if( rGradient.GetStyle() != GradientStyle_LINEAR && + if (rGradient.GetStyle() != GradientStyle_LINEAR && rGradient.GetStyle() != GradientStyle_AXIAL && rGradient.GetStyle() != GradientStyle_RADIAL ) + { + VCL_GL_INFO("::drawGradient unsupported gradient type"); return false; + } aBoundRect.Left()--; aBoundRect.Top()--; @@ -2296,14 +2334,14 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, ImplSetClipBit( vcl::Region( rPolyPoly ), 0x02 ); if( mbUseStencil ) { - glEnable( GL_STENCIL_TEST ); + mpContext->state()->stencil().enable(); CHECK_GL_ERROR(); glStencilFunc( GL_EQUAL, 3, 0xFF ); CHECK_GL_ERROR(); } else { - glEnable( GL_STENCIL_TEST ); + mpContext->state()->stencil().enable(); CHECK_GL_ERROR(); glStencilFunc( GL_EQUAL, 2, 0xFF ); CHECK_GL_ERROR(); @@ -2311,32 +2349,39 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, #endif // if border >= 100%, draw solid rectangle with start color - if( rGradient.GetBorder() >= 100.0 ) + if (rGradient.GetBorder() >= 100.0) { - Color aCol = rGradient.GetStartColor(); - long nF = rGradient.GetStartIntensity(); - if( UseSolid( MAKE_SALCOLOR( aCol.GetRed() * nF / 100, - aCol.GetGreen() * nF / 100, - aCol.GetBlue() * nF / 100 ) ) ) - DrawRect( aBoundRect ); + VCL_GL_INFO("::drawGradient -> DrawRect (no gradient)"); + + Color aColor = rGradient.GetStartColor(); + long nIntensity = rGradient.GetStartIntensity(); + if (UseSolid(MAKE_SALCOLOR(aColor.GetRed() * nIntensity / 100.0, + aColor.GetGreen()* nIntensity / 100.0, + aColor.GetBlue() * nIntensity / 100.0))) + { + DrawRect(aBoundRect); + } } - else if( rGradient.GetStyle() == GradientStyle_LINEAR ) + else if (rGradient.GetStyle() == GradientStyle_LINEAR) { - DrawLinearGradient( rGradient, aBoundRect ); + VCL_GL_INFO("::drawGradient -> DrawLinearGradient"); + DrawLinearGradient(rGradient, aBoundRect); } - else if( rGradient.GetStyle() == GradientStyle_AXIAL ) + else if (rGradient.GetStyle() == GradientStyle_AXIAL) { - DrawAxialGradient( rGradient, aBoundRect ); + VCL_GL_INFO("::drawGradient -> DrawAxialGradient"); + DrawAxialGradient(rGradient, aBoundRect); } - else if( rGradient.GetStyle() == GradientStyle_RADIAL ) + else if (rGradient.GetStyle() == GradientStyle_RADIAL) { - DrawRadialGradient( rGradient, aBoundRect ); + VCL_GL_INFO("::drawGradient -> DrawRadialGradient"); + DrawRadialGradient(rGradient, aBoundRect); } #if FIXME_BROKEN_STENCIL_FOR_GRADIENTS if( !mbUseStencil ) { - glDisable( GL_STENCIL_TEST ); + mpContext->state()->stencil().disable(); CHECK_GL_ERROR(); } #endif commit adf03d1e56093d1095926a4cc1c7c95d56bc4d00 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Sat Aug 6 14:27:55 2016 +0900 tdf#100915 draw antialiased line just for polygon outline To get the anti-aliased polygon we draw a anti-aliased line around every trapezoid. This works fine until we draw a transparent polygon where the lines become visible because of blending. A much better and faster way is to just draw the polygon outline with anti-aliased lines. This is done with this commit. Same fix as aeb0c407a620ea8c28903f61d9d53e6d9ae7c53a in master, but the code differs in 5.2 from master so much that it is generally a separate implementation. Change-Id: I95f98cc930caa7138a59048af68d4015046334d4 Reviewed-on: https://gerrit.libreoffice.org/27923 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 09fe869bf8ef14a6011317c8c494067c09951820) diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index b96ee67..4f1da07 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1142,14 +1142,13 @@ void OpenGLSalGraphicsImpl::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPt void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA ) { - const basegfx::B2DPolyPolygon& aSimplePolyPolygon = ::basegfx::tools::solveCrossovers( rPolyPolygon ); basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aSimplePolyPolygon ); + basegfx::tools::trapezoidSubdivide(aB2DTrapVector, rPolyPolygon); // draw tesselation result - if( aB2DTrapVector.size()) + if (aB2DTrapVector.size()) { - for(basegfx::B2DTrapezoid & i : aB2DTrapVector) - DrawTrapezoid( i, blockAA ); + for(basegfx::B2DTrapezoid & rTrapezoid : aB2DTrapVector) + DrawTrapezoid(rTrapezoid, blockAA); } } @@ -1838,20 +1837,32 @@ void OpenGLSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* bool OpenGLSalGraphicsImpl::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency ) { VCL_GL_INFO( "::drawPolyPolygon trans " << fTransparency ); + if( rPolyPolygon.count() <= 0 ) return true; - PreDraw( XOROption::IMPLEMENT_XOR ); + bool bUseAA = mrParent.getAntiAliasB2DDraw(); - if( UseSolid( mnFillColor, fTransparency ) ) - DrawPolyPolygon( rPolyPolygon ); + PreDraw(XOROption::IMPLEMENT_XOR); + + if (mnFillColor != SALCOLOR_NONE && UseSolid(mnFillColor, fTransparency)) + { + DrawPolyPolygon(rPolyPolygon, true); + } - if( mnLineColor != mnFillColor && UseSolid( mnLineColor, fTransparency )) + if (mnLineColor != SALCOLOR_NONE || bUseAA) { - basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::createLineTrapezoidFromB2DPolyPolygon( aB2DTrapVector, rPolyPolygon ); - for(basegfx::B2DTrapezoid & i : aB2DTrapVector) - DrawTrapezoid( i ); + SalColor nColor = (mnLineColor == SALCOLOR_NONE) ? mnFillColor : mnLineColor; + if (UseLine(nColor, fTransparency, 1.0, bUseAA)) + { + for (const basegfx::B2DPolygon& rPolygon : rPolyPolygon) + { + basegfx::B2DPolygon aPolygon(rPolygon); + if (rPolygon.areControlPointsUsed()) + aPolygon = rPolygon.getDefaultAdaptiveSubdivision(); + DrawPolyLine(aPolygon, 1.0f, basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, float(15.0 * F_PI180)); + } + } } PostDraw(); commit 6501d43c4c620427880e45d1af98f8c711d2d2d4 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Mon Aug 8 05:01:04 2016 +0200 GetInputHdl may return nullptr As can be seen in the other places we need to check for nullptr. See http://crashreport.libreoffice.org/stats/crash_details/553b9ef5-c85f-4cda-b432-472501795634 Change-Id: Ic5cab914f403fcae7f4e1e6f0e66c6295f7f56dd Reviewed-on: https://gerrit.libreoffice.org/27949 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 8b86768a9a72ce6ef326615cb7c9ad5c76172921) Reviewed-on: https://gerrit.libreoffice.org/27979 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit eca7f703490cef3f6d09fae5a2c9e01d8f553760) diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 86cf706..d64601f 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1056,7 +1056,8 @@ IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, void) TriggerToolboxLayout(); // Restore focus to input line(s) if necessary - if ( SC_MOD()->GetInputHdl()->IsTopMode() ) + ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); + if ( pHdl && pHdl->IsTopMode() ) maTextWnd->GrabFocus(); } commit b03ad9faafd6b4ef56a455302cb021b9077e2a11 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Mon Aug 8 04:52:28 2016 +0200 don't try to memcpy from and to a nullptr See e.g. http://crashreport.libreoffice.org/stats/crash_details/2218a489-b64c-4193-a7d4-cd01c6a607cb Change-Id: I6c123d3e9e5c6dbcb7756a686503904cbfd944a4 Reviewed-on: https://gerrit.libreoffice.org/27948 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 855df248c8a380e253a35feefec21ebc1dee1aca) Reviewed-on: https://gerrit.libreoffice.org/27978 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 8452bef1c2cc7585582875fd3216ed4003b817cc) diff --git a/vcl/source/filter/GraphicNativeMetadata.cxx b/vcl/source/filter/GraphicNativeMetadata.cxx index 532e2d4..8904577 100644 --- a/vcl/source/filter/GraphicNativeMetadata.cxx +++ b/vcl/source/filter/GraphicNativeMetadata.cxx @@ -37,7 +37,11 @@ bool GraphicNativeMetadata::read(Graphic& rGraphic) GfxLink aLink = rGraphic.GetLink(); if ( aLink.GetType() != GFX_LINK_TYPE_NATIVE_JPG ) return false; + sal_uInt32 aDataSize = aLink.GetDataSize(); + if (!aDataSize) + return false; + std::unique_ptr<sal_uInt8[]> aBuffer(new sal_uInt8[aDataSize]); memcpy(aBuffer.get(), aLink.GetData(), aDataSize); commit 3f3c5a1044d015a3a079ad271a8dea353737b710 Author: Eike Rathke <er...@redhat.com> Date: Fri Jul 15 13:43:09 2016 +0200 mapping ERROR.TYPE to ORG.OPENOFFICE.ERRORTYPE was always wrong Change-Id: I02b941a1a884a984b39632cad36579130cd71d6c (cherry picked from commit 3d70765218986abba8b6d7c8e3cadd83a62ee035) Reviewed-on: https://gerrit.libreoffice.org/27852 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit b7d7089392881575f0332bef4d6b1f4ed10537bc) diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index db721d5..3ac2dfc 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -488,7 +488,7 @@ static const FunctionData saFuncTableBiff4[] = { "RANK", "RANK", 216, 216, 2, 3, V, { VR, RO, VR }, 0 }, { "DB", "DB", 247, 247, 4, 5, V, { VR }, 0 }, { "FREQUENCY", "FREQUENCY", 252, 252, 2, 2, A, { RA }, 0 }, - { "ORG.OPENOFFICE.ERRORTYPE","ERROR.TYPE", 261, 261, 1, 1, V, { VR }, 0 }, + { "ERROR.TYPE", "ERROR.TYPE", 261, 261, 1, 1, V, { VR }, 0 }, { "AVEDEV", "AVEDEV", 269, 269, 1, MX, V, { RX }, 0 }, { "BETADIST", "BETADIST", 270, 270, 3, 5, V, { VR }, 0 }, { "GAMMALN", "GAMMALN", 271, 271, 1, 1, V, { VR }, 0 }, commit 6b550f8badf312962da30ec57d3e4582b96f79cd Author: Matthias Freund <matti...@secure.mailbox.org> Date: Wed Aug 3 21:19:14 2016 +0200 tdf#75256 Sifr icon update Change-Id: I6d08448056f42b80c9ba04a3b5d99a5679952c5e Reviewed-on: https://gerrit.libreoffice.org/27846 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> Tested-by: jan iversen <j...@documentfoundation.org> Reviewed-by: Yousuf Philips <philip...@hotmail.com> (cherry picked from commit 60df25f538f9acfb73c808776c75145a42fe7d36) diff --git a/icon-themes/sifr/cmd/32/connector.png b/icon-themes/sifr/cmd/32/connector.png new file mode 100644 index 0000000..1f99c9e Binary files /dev/null and b/icon-themes/sifr/cmd/32/connector.png differ diff --git a/icon-themes/sifr/cmd/32/selectobject.png b/icon-themes/sifr/cmd/32/selectobject.png index de10f5c..a7cf65a 100644 Binary files a/icon-themes/sifr/cmd/32/selectobject.png and b/icon-themes/sifr/cmd/32/selectobject.png differ diff --git a/icon-themes/sifr/cmd/lc_absoluterecord.png b/icon-themes/sifr/cmd/lc_absoluterecord.png new file mode 100644 index 0000000..41bfb8a Binary files /dev/null and b/icon-themes/sifr/cmd/lc_absoluterecord.png differ diff --git a/icon-themes/sifr/cmd/lc_addwatch.png b/icon-themes/sifr/cmd/lc_addwatch.png new file mode 100644 index 0000000..b3fa196 Binary files /dev/null and b/icon-themes/sifr/cmd/lc_addwatch.png differ diff --git a/icon-themes/sifr/cmd/lc_basicstepinto.png b/icon-themes/sifr/cmd/lc_basicstepinto.png new file mode 100644 index 0000000..e27e2a4 Binary files /dev/null and b/icon-themes/sifr/cmd/lc_basicstepinto.png differ diff --git a/icon-themes/sifr/cmd/lc_basicstepout.png b/icon-themes/sifr/cmd/lc_basicstepout.png new file mode 100644 index 0000000..ef0d8e1 Binary files /dev/null and b/icon-themes/sifr/cmd/lc_basicstepout.png differ diff --git a/icon-themes/sifr/cmd/lc_basicstepover.png b/icon-themes/sifr/cmd/lc_basicstepover.png new file mode 100644 index 0000000..41f5d13 Binary files /dev/null and b/icon-themes/sifr/cmd/lc_basicstepover.png differ diff --git a/icon-themes/sifr/cmd/lc_basicstop.png b/icon-themes/sifr/cmd/lc_basicstop.png new file mode 100644 index 0000000..4798dff Binary files /dev/null and b/icon-themes/sifr/cmd/lc_basicstop.png differ diff --git a/icon-themes/sifr/cmd/lc_choosemacro.png b/icon-themes/sifr/cmd/lc_choosemacro.png new file mode 100644 index 0000000..ae06762 Binary files /dev/null and b/icon-themes/sifr/cmd/lc_choosemacro.png differ diff --git a/icon-themes/sifr/cmd/lc_matchgroup.png b/icon-themes/sifr/cmd/lc_matchgroup.png new file mode 100644 index 0000000..c7ff153 Binary files /dev/null and b/icon-themes/sifr/cmd/lc_matchgroup.png differ diff --git a/icon-themes/sifr/cmd/lc_showtrackedchanges.png b/icon-themes/sifr/cmd/lc_showtrackedchanges.png new file mode 100644 index 0000000..dd61a3b Binary files /dev/null and b/icon-themes/sifr/cmd/lc_showtrackedchanges.png differ diff --git a/icon-themes/sifr/cmd/sc_addwatch.png b/icon-themes/sifr/cmd/sc_addwatch.png new file mode 100644 index 0000000..609cc3a Binary files /dev/null and b/icon-themes/sifr/cmd/sc_addwatch.png differ diff --git a/icon-themes/sifr/cmd/sc_showtrackedchanges.png b/icon-themes/sifr/cmd/sc_showtrackedchanges.png new file mode 100644 index 0000000..3afc460 Binary files /dev/null and b/icon-themes/sifr/cmd/sc_showtrackedchanges.png differ commit 9c25a941608b3d515edf1ffb816aeb1007b7fdd1 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Aug 2 15:27:47 2016 +0300 Update from Michael diff --git a/sfx2/uiconfig/ui/applicationstartupdialog.ui b/sfx2/uiconfig/ui/applicationstartupdialog.ui index a89f674..6abdd65 100644 --- a/sfx2/uiconfig/ui/applicationstartupdialog.ui +++ b/sfx2/uiconfig/ui/applicationstartupdialog.ui @@ -54,7 +54,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="label" translatable="yes">LibreOffice Vanilla is based on the most recent version of LibreOffice available. This build is provided for you by Collabora Productivity.</property> + <property name="label" translatable="yes">LibreOffice Vanilla is based on the most recent version of LibreOffice available. This build is provided for your convenience by Collabora Productivity.</property> <property name="justify">fill</property> <property name="wrap">True</property> <property name="max_width_chars">62</property> @@ -113,7 +113,10 @@ <property name="margin_bottom">3</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="label" translatable="no">Collabora Office</property> + <property name="label" translatable="yes">Collabora provides and maintains LibreOffice products in the Mac App Store. App Store purchases of Collabora Office support ongoing development and enhancement of LibreOffice for Mac. Get extended features and stability while funding LibreOffice for Mac development by buying Collabora Office today.</property> + <property name="wrap">True</property> + <property name="justify">fill</property> + <property name="max_width_chars">70</property> <attributes> <attribute name="weight" value="bold"/> <attribute name="size" value="12000"/> @@ -126,6 +129,42 @@ </packing> </child> <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Support development:</property> + <attributes> + <attribute name="style" value="italic"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="link"> + <property name="label" translatable="yes">Buy Collabora Office in the App Store</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="margin_left">12</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="uri">https://itunes.apple.com/us/app/libreoffice-from-collabora/id918120011</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> <object class="GtkLabel" id="label7"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -133,21 +172,19 @@ <property name="margin_bottom">3</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Collabora provides and maintains LibreOffice products in the Mac App Store. Collabora's enterprise-grade productivity suite Collabora Office for Mac delivers long term stability and support for demanding environments. Deployment and administration utilities together with fast-response bug-fix support are available for enterprise customers. - -App Store purchases of Collabora Office support ongoing development and enhancement of LibreOffice for Mac. Get extended features and stability while funding LibreOffice for Mac development by buying Collabora Office today.</property> + <property name="label" translatable="yes">Collabora's enterprise-grade productivity suite Collabora Office for Mac delivers stability and support for demanding environments. Deployment and administration utilities together with fast-response bug-fix support are available for enterprise customers.</property> <property name="justify">fill</property> <property name="wrap">True</property> <property name="max_width_chars">70</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">2</property> <property name="width">2</property> </packing> </child> <child> - <object class="GtkLabel" id="label4"> + <object class="GtkLabel" id="label8"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_top">3</property> @@ -160,12 +197,12 @@ App Store purchases of Collabora Office support ongoing development and enhancem </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> </packing> </child> <child> - <object class="GtkLinkButton" id="link"> - <property name="label" translatable="no">Collabora Office</property> + <object class="GtkLinkButton" id="linkbutton1"> + <property name="label" translatable="yes">Collabora Office Website</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -175,17 +212,17 @@ App Store purchases of Collabora Office support ongoing development and enhancem <property name="hexpand">True</property> <property name="relief">none</property> <property name="xalign">0</property> - <property name="uri">https://itunes.apple.com/us/app/libreoffice-from-collabora/id918120011</property> + <property name="uri">https://www.collaboraoffice.com/</property> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> </packing> </child> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -309,7 +346,7 @@ App Store purchases of Collabora Office support ongoing development and enhancem </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> </packing> </child> </object> commit fd7d1cdb41825ed4741f84979da6f07d6b57444e Author: Tor Lillqvist <t...@collabora.com> Date: Mon Aug 1 12:48:43 2016 +0300 Change LibreOffice-from-Collabora to Collabora Office Don't mark it as translatable. Also change "iTunes" to "Mac App Store". diff --git a/sfx2/uiconfig/ui/applicationstartupdialog.ui b/sfx2/uiconfig/ui/applicationstartupdialog.ui index ab6f768..a89f674 100644 --- a/sfx2/uiconfig/ui/applicationstartupdialog.ui +++ b/sfx2/uiconfig/ui/applicationstartupdialog.ui @@ -113,7 +113,7 @@ <property name="margin_bottom">3</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">LibreOffice-from-Collabora</property> + <property name="label" translatable="no">Collabora Office</property> <attributes> <attribute name="weight" value="bold"/> <attribute name="size" value="12000"/> @@ -133,9 +133,9 @@ <property name="margin_bottom">3</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Collabora provides and maintains LibreOffice products on iTunes. Collabora's enterprise-grade productivity suite LibreOffice-from-Collabora for Mac delivers long term stability and support for demanding environments. Deployment and administration utilities together with fast-response bug-fix support are available for enterprise customers. + <property name="label" translatable="yes">Collabora provides and maintains LibreOffice products in the Mac App Store. Collabora's enterprise-grade productivity suite Collabora Office for Mac delivers long term stability and support for demanding environments. Deployment and administration utilities together with fast-response bug-fix support are available for enterprise customers. -App Store purchases of LibreOffice-from-Collabora support ongoing development and enhancement of LibreOffice for Mac. Get extended features and stability while funding LibreOffice for Mac development by buying LibreOffice-from-Collabora today.</property> +App Store purchases of Collabora Office support ongoing development and enhancement of LibreOffice for Mac. Get extended features and stability while funding LibreOffice for Mac development by buying Collabora Office today.</property> <property name="justify">fill</property> <property name="wrap">True</property> <property name="max_width_chars">70</property> @@ -165,7 +165,7 @@ App Store purchases of LibreOffice-from-Collabora support ongoing development an </child> <child> <object class="GtkLinkButton" id="link"> - <property name="label" translatable="yes">LibreOffice-from-Collabora</property> + <property name="label" translatable="no">Collabora Office</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> commit edec57e05c3022eb39071b28efc391423b561a67 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.com> Date: Wed Apr 16 12:11:46 2014 +0200 Introducing "application startup message" Application startup message is an infobar which is shown on LO startup. The message can be dismissed when entering into "Details" dialog. The code to disable the dialog between restarts is also included in this commit. Conflicts: sfx2/source/view/sfxbasecontroller.cxx (cherry picked from commit 8a217da6e01cf55a41786945d955ae21741fd47b) Conflicts: include/sfx2/sfxbasecontroller.hxx sfx2/source/appl/appdata.cxx sfx2/source/inc/appdata.hxx sfx2/source/view/sfxbasecontroller.cxx Change-Id: I7bbf8edc87b3eec8ac9010e2c4f60fb0f4f06894 diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 4978bc7..a94d4ff 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -177,6 +177,9 @@ public: bool IsDowning() const; void ResetLastDir(); + bool shouldShowApplicationStartupMessage(); + void hideApplicationStartupMessage(); + SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl(); SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl(); diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 0c0921d..ecf7746 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -159,6 +159,9 @@ #define STR_CLASSIFIED_INTELLECTUAL_PROPERTY (RID_SFX_START+134) #define STR_CLASSIFIED_NATIONAL_SECURITY (RID_SFX_START+135) #define STR_CLASSIFIED_EXPORT_CONTROL (RID_SFX_START+136) +#define BT_APPLICATION_STARTUP (RID_SFX_START+137) +#define STR_APPLICATION_STARTUP_MESSAGE (RID_SFX_START+138) + #define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157) #define SFX_THUMBNAIL_TEXT (RID_SFX_START+158) diff --git a/include/sfx2/sfxbasecontroller.hxx b/include/sfx2/sfxbasecontroller.hxx index f6260c5..3668763 100644 --- a/include/sfx2/sfxbasecontroller.hxx +++ b/include/sfx2/sfxbasecontroller.hxx @@ -195,7 +195,7 @@ private: SAL_DLLPRIVATE void ShowInfoBars( ); DECL_LINK_TYPED( CheckOutHandler, Button*, void ); - + DECL_LINK_TYPED( ApplicationStartupHandler, Button*, void ); IMPL_SfxBaseController_DataContainer* m_pData ; } ; // class SfxBaseController diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 32c3cd7..dc034d5 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -6599,6 +6599,18 @@ <desc>Uses cfg package Jobs instead of this component.</desc> </info> </set> + <prop oor:name="StartupMessage" oor:type="xs:boolean" oor:nillable="false"> + <info> + <desc>Specifies whether to display startup message in LibreOffice Vanilla from Apple App Store</desc> + </info> + <value>true</value> + </prop> + <prop oor:name="StartupMessageLastShown" oor:type="xs:long" oor:nillable="false"> + <info> + <desc>Specifies the Date value when startup message in LibreOffice Vanilla from Apple App Store was last shown.</desc> + </info> + <value>20150930</value> + </prop> </group> <group oor:name="SmartTags"> <info> diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 9aca9d7..2c52916 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -161,6 +161,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/control/thumbnailviewacc \ sfx2/source/control/thumbnailview \ sfx2/source/control/unoctitm \ + sfx2/source/dialog/ApplicationStartupDialog \ sfx2/source/dialog/alienwarn \ sfx2/source/dialog/backingcomp \ sfx2/source/dialog/backingwindow \ diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk index a7f532d..470c9d2 100644 --- a/sfx2/UIConfig_sfx.mk +++ b/sfx2/UIConfig_sfx.mk @@ -10,6 +10,7 @@ $(eval $(call gb_UIConfig_UIConfig,sfx)) $(eval $(call gb_UIConfig_add_uifiles,sfx,\ + sfx2/uiconfig/ui/applicationstartupdialog \ sfx2/uiconfig/ui/alienwarndialog \ sfx2/uiconfig/ui/bookmarkdialog \ sfx2/uiconfig/ui/checkin \ diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index 92a315b..81ac742 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -50,6 +50,8 @@ #include <basic/basicmanagerrepository.hxx> #include <basic/basmgr.hxx> +#include <officecfg/Office/Common.hxx> + using ::basic::BasicManagerRepository; using ::basic::BasicManagerCreationListener; using ::com::sun::star::uno::Reference; @@ -122,6 +124,7 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) , nInterfaces( 0 ) , bDowning( true ) , bInQuit( false ) + , bShowApplicationStartupMessage(officecfg::Office::Common::Startup::StartupMessage::get()) { #if HAVE_FEATURE_SCRIPTING diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 3e3b419..251e516 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/uno/Reference.h> +#include <tools/date.hxx> #include <tools/rcid.h> #include <osl/mutex.hxx> #include <unotools/configmgr.hxx> @@ -49,6 +50,7 @@ #include <osl/file.hxx> #include <osl/process.h> #include <rtl/bootstrap.hxx> +#include <officecfg/Office/Common.hxx> #include <sfx2/sfxresid.hxx> #include <sfx2/app.hxx> @@ -222,4 +224,23 @@ BitmapEx SfxApplication::GetApplicationLogo(long nWidth) return aBitmap; } +bool SfxApplication::shouldShowApplicationStartupMessage() +{ + if(pAppData_Impl->bShowApplicationStartupMessage) + return true; + + ::Date aLastShownDate(officecfg::Office::Common::Startup::StartupMessageLastShown::get()); + aLastShownDate.SetMonth(aLastShownDate.GetMonth()+1); + aLastShownDate.Normalize(); + if(aLastShownDate < ::Date(::Date::SYSTEM)) + return true; + + return false; +} + +void SfxApplication::hideApplicationStartupMessage() +{ + pAppData_Impl->bShowApplicationStartupMessage = false; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/ApplicationStartupDialog.cxx b/sfx2/source/dialog/ApplicationStartupDialog.cxx new file mode 100644 index 0000000..7650def --- /dev/null +++ b/sfx2/source/dialog/ApplicationStartupDialog.cxx @@ -0,0 +1,125 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#include <com/sun/star/system/SystemShellExecuteFlags.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> + +#include <comphelper/anytostring.hxx> +#include <comphelper/processfactory.hxx> +#include <cppuhelper/exc_hlp.hxx> +#include <tools/date.hxx> +#include <vcl/svapp.hxx> +#include <vcl/msgbox.hxx> + +#include <officecfg/Office/Common.hxx> + +#include "ApplicationStartupDialog.hxx" + +using namespace css::system; +using namespace css::uno; +using namespace comphelper; + +SfxApplicationStartupDialog::SfxApplicationStartupDialog(Window* pParent) : + SfxModalDialog(pParent, "ApplicationStartupDialog", "sfx/ui/applicationstartupdialog.ui") +{ + get(mpDontShowAgainCB, "checkbutton1"); + get(mpOkButton, "ok"); + get(mpLinkButton, "link"); + get(mpLinkButton1, "linkbutton1"); + get(mpLinkButton2, "linkbutton2"); + mpOkButton->SetClickHdl(LINK(this, SfxApplicationStartupDialog, OkButtonClick)); + mpLinkButton->SetClickHdl(LINK(this, SfxApplicationStartupDialog, LinkClick)); + mpLinkButton1->SetClickHdl(LINK(this, SfxApplicationStartupDialog, LinkButton1Click)); + mpLinkButton2->SetClickHdl(LINK(this, SfxApplicationStartupDialog, LinkButton2Click)); +} + +SfxApplicationStartupDialog::~SfxApplicationStartupDialog() +{ + disposeOnce(); +} + +void SfxApplicationStartupDialog::dispose() +{ + mpDontShowAgainCB.clear(); + mpOkButton.clear(); + mpLinkButton.clear(); + mpLinkButton1.clear(); + mpLinkButton2.clear(); + SfxModalDialog::dispose(); +} + +IMPL_LINK_NOARG_TYPED(SfxApplicationStartupDialog, OkButtonClick, Button*, void) +{ + if( mpDontShowAgainCB->IsChecked() ) + { + std::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() ); + officecfg::Office::Common::Startup::StartupMessage::set(false, batch); + officecfg::Office::Common::Startup::StartupMessageLastShown::set(::Date(::Date::SYSTEM).GetDate(), batch); + batch->commit(); + } + + EndDialog( RET_OK ); +} + +IMPL_LINK_NOARG_TYPED(SfxApplicationStartupDialog, LinkClick, FixedHyperlink&, void) +{ + try + { + Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create(comphelper::getProcessComponentContext())); + xSystemShellExecute->execute(mpLinkButton->GetURL(), OUString(), SystemShellExecuteFlags::URIS_ONLY ); + } + catch (const Exception&) + { + Any aException(cppu::getCaughtException()); + OUString aMessage(comphelper::anyToString(aException)); + const SolarMutexGuard guard; + ErrorBox aErrorBox( NULL, WB_OK, aMessage); + aErrorBox.SetText(GetText()); + aErrorBox.Execute(); + } +} + +IMPL_LINK_NOARG_TYPED(SfxApplicationStartupDialog, LinkButton1Click, FixedHyperlink&, void) +{ + try + { + Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create(comphelper::getProcessComponentContext())); + xSystemShellExecute->execute(mpLinkButton1->GetURL(), OUString(), SystemShellExecuteFlags::URIS_ONLY ); + } + catch (const Exception&) + { + Any aException(cppu::getCaughtException()); + OUString aMessage(comphelper::anyToString(aException)); + const SolarMutexGuard guard; + ErrorBox aErrorBox( NULL, WB_OK, aMessage); + aErrorBox.SetText(GetText()); + aErrorBox.Execute(); + } +} + +IMPL_LINK_NOARG_TYPED(SfxApplicationStartupDialog, LinkButton2Click, FixedHyperlink&, void) +{ + try + { + Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create(comphelper::getProcessComponentContext())); + xSystemShellExecute->execute(mpLinkButton2->GetURL(), OUString(), SystemShellExecuteFlags::URIS_ONLY ); + } + catch (const Exception&) + { + Any aException(cppu::getCaughtException()); + OUString aMessage(comphelper::anyToString(aException)); + const SolarMutexGuard guard; + ErrorBox aErrorBox( NULL, WB_OK, aMessage); + aErrorBox.SetText(GetText()); + aErrorBox.Execute(); + } +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/ApplicationStartupDialog.hxx b/sfx2/source/inc/ApplicationStartupDialog.hxx new file mode 100644 index 0000000..8b2ac53 --- /dev/null +++ b/sfx2/source/inc/ApplicationStartupDialog.hxx @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ +#ifndef INCLUDED_SFX2_SOURCE_INC_APPLICATIONSTARTUPDIALOG_HXX +#define INCLUDED_SFX2_SOURCE_INC_APPLICATIONSTARTUPDIALOG_HXX + +#include <vcl/button.hxx> +#include <vcl/fixedhyper.hxx> +#include <vcl/layout.hxx> +#include <sfx2/basedlgs.hxx> + +class SfxApplicationStartupDialog : public SfxModalDialog +{ +private: + VclPtr<CheckBox> mpDontShowAgainCB; + VclPtr<PushButton> mpOkButton; + VclPtr<FixedHyperlink> mpLinkButton; + VclPtr<FixedHyperlink> mpLinkButton1; + VclPtr<FixedHyperlink> mpLinkButton2; + + DECL_LINK_TYPED(OkButtonClick, Button*, void); + DECL_LINK_TYPED(LinkClick, FixedHyperlink&, void); + DECL_LINK_TYPED(LinkButton1Click, FixedHyperlink&, void); + DECL_LINK_TYPED(LinkButton2Click, FixedHyperlink&, void); + +public: + SfxApplicationStartupDialog(Window* pParent); + virtual ~SfxApplicationStartupDialog(); + virtual void dispose() SAL_OVERRIDE; +}; + +#endif // INCLUDED_SFX2_SOURCE_INC_APPLICATIONENTRYDIALOG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index 696b138..6c25b15 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -127,6 +127,7 @@ public: bool bDowning:1; // sal_True on Exit and afterwards bool bInQuit : 1; + bool bShowApplicationStartupMessage : 1; SfxAppData_Impl( SfxApplication* ); ~SfxAppData_Impl(); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index eca3f8a..ee5baa7 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -81,6 +81,7 @@ #include <com/sun/star/ui/XSidebarProvider.hpp> #include <sfx2/sidebar/UnoSidebar.hxx> +#include "ApplicationStartupDialog.hxx" #define TIMEOUT_START_RESCHEDULE 10L /* 10th s */ @@ -1437,6 +1438,18 @@ void SfxBaseController::ShowInfoBars( ) { if ( m_pData->m_pViewShell ) { + if (SfxGetpApp()->shouldShowApplicationStartupMessage()) + { + SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame(); + SfxInfoBarWindow* pInfoBar = pViewFrame->AppendInfoBar( "application-startup", SfxResId( STR_APPLICATION_STARTUP_MESSAGE ) ); + if (pInfoBar) + { + VclPtrInstance<PushButton> pBtn( &pViewFrame->GetWindow(), SfxResId( BT_APPLICATION_STARTUP ) ); + pBtn->SetClickHdl( LINK( this, SfxBaseController, ApplicationStartupHandler ) ); + pInfoBar->addButton(pBtn); + } + } + // CMIS verifications Reference< document::XCmisDocument > xCmisDoc( m_pData->m_pViewShell->GetObjectShell()->GetModel(), uno::UNO_QUERY ); if ( xCmisDoc.is( ) && xCmisDoc->canCheckOut( ) ) @@ -1485,6 +1498,19 @@ IMPL_LINK_NOARG_TYPED ( SfxBaseController, CheckOutHandler, Button*, void ) m_pData->m_pViewShell->GetObjectShell()->CheckOut( ); } +IMPL_LINK_NOARG_TYPED ( SfxBaseController, ApplicationStartupHandler, Button*, void ) +{ + if (!m_pData->m_pViewShell) + return; + + SfxApplicationStartupDialog aDialog(NULL); + if (aDialog.Execute() == RET_OK) + { + SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame(); + SfxGetpApp()->hideApplicationStartupMessage(); + pViewFrame->RemoveInfoBar("application-startup"); + } +} Reference< frame::XTitle > SfxBaseController::impl_getTitleHelper () { diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src index 8f0d6c6..d4ad01f 100644 --- a/sfx2/source/view/view.src +++ b/sfx2/source/view/view.src @@ -134,4 +134,16 @@ PushButton BT_READONLY_EDIT Text[ en-US ] = "Edit Document"; }; +PushButton BT_APPLICATION_STARTUP +{ + Pos = MAP_APPFONT( 0 , 0 ); + Size = MAP_APPFONT( 30 , 0 ); + Text[ en-US ] = "Details"; +}; + +String STR_APPLICATION_STARTUP_MESSAGE +{ + Text [ en-US ] = "Find out about LibreOffice Vanilla..." ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/uiconfig/ui/applicationstartupdialog.ui b/sfx2/uiconfig/ui/applicationstartupdialog.ui new file mode 100644 index 0000000..ab6f768 --- /dev/null +++ b/sfx2/uiconfig/ui/applicationstartupdialog.ui @@ -0,0 +1,325 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> +<interface> + <requires lib="gtk+" version="3.10"/> + <object class="GtkDialog" id="ApplicationStartupDialog"> + <property name="can_focus">False</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="margin_right">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <property name="baseline_row">1</property> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">LibreOffice Vanilla is based on the most recent version of LibreOffice available. This build is provided for you by Collabora Productivity.</property> + <property name="justify">fill</property> + <property name="wrap">True</property> + <property name="max_width_chars">62</property> + <property name="track_visited_links">False</property> + <attributes> + <attribute name="style" value="italic"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">LibreOffice Vanilla</property> + <attributes> + <attribute name="size" value="20000"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton1"> + <property name="label" translatable="yes">Hide this message for a month</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="margin_right">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">LibreOffice-from-Collabora</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="size" value="12000"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Collabora provides and maintains LibreOffice products on iTunes. Collabora's enterprise-grade productivity suite LibreOffice-from-Collabora for Mac delivers long term stability and support for demanding environments. Deployment and administration utilities together with fast-response bug-fix support are available for enterprise customers. + +App Store purchases of LibreOffice-from-Collabora support ongoing development and enhancement of LibreOffice for Mac. Get extended features and stability while funding LibreOffice for Mac development by buying LibreOffice-from-Collabora today.</property> + <property name="justify">fill</property> + <property name="wrap">True</property> + <property name="max_width_chars">70</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">More information:</property> + <attributes> + <attribute name="style" value="italic"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="link"> + <property name="label" translatable="yes">LibreOffice-from-Collabora</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="margin_left">12</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="uri">https://itunes.apple.com/us/app/libreoffice-from-collabora/id918120011</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="margin_right">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">The Document Foundation</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="size" value="12000"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">The Document Foundation provides oversight and governance for the LibreOffice community, and supports the work of thousands of LibreOffice volunteers and contributors. Please consider donating to support their work.</property> + <property name="justify">fill</property> + <property name="wrap">True</property> + <property name="max_width_chars">70</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">More information:</property> + <attributes> + <attribute name="style" value="italic"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="linkbutton1"> + <property name="label" translatable="yes">The Document Foundation</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="margin_left">12</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="uri">https://www.documentfoundation.org/</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Donate:</property> + <attributes> + <attribute name="style" value="italic"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="linkbutton2"> + <property name="label" translatable="yes">Document Foundation Website</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="margin_left">12</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + <property name="hexpand">True</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="uri">https://www.libreoffice.org/donate/nonav/</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> +</interface>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits