Skip to content

Commit

Permalink
Show buttons disabled instead of hiding them in Writer
Browse files Browse the repository at this point in the history
(like we do in Calc)

(cherry picked from commit b993da4)
  • Loading branch information
Pilot-Pirx committed Jan 28, 2023
1 parent f497121 commit 1d7f0aa
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions main/cui/source/dialogs/postdlg.cxx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/**************************************************************
*
*
* 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
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*
*************************************************************/


Expand All @@ -35,8 +35,8 @@
#include <unotools/useroptions.hxx>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/processfactory.hxx>
#include <svx/svxids.hrc> // SID_ATTR_...
#include <svx/dialogs.hrc> // RID_SVXDLG_POSTIT
#include <svx/svxids.hrc> // SID_ATTR_...
#include <svx/dialogs.hrc> // RID_SVXDLG_POSTIT

#define _SVX_POSTDLG_CXX

Expand Down Expand Up @@ -66,24 +66,24 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,

SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_POSTIT ) ),

aPostItFL ( this, CUI_RES( FL_POSTIT ) ),
aLastEditLabelFT( this, CUI_RES( FT_LASTEDITLABEL ) ),
aPostItFL ( this, CUI_RES( FL_POSTIT ) ),
aLastEditLabelFT( this, CUI_RES( FT_LASTEDITLABEL ) ),
aLastEditFT ( this, CUI_RES( FT_LASTEDIT ) ),
aEditFT ( this, CUI_RES( FT_EDIT ) ),
aEditED ( this, CUI_RES( ED_EDIT ) ),
aAuthorFT ( this, CUI_RES( FT_AUTHOR) ),
aAuthorBtn ( this, CUI_RES( BTN_AUTHOR ) ),
aOKBtn ( this, CUI_RES( BTN_POST_OK ) ),
aAuthorFT ( this, CUI_RES( FT_AUTHOR) ),
aAuthorBtn ( this, CUI_RES( BTN_AUTHOR ) ),
aOKBtn ( this, CUI_RES( BTN_POST_OK ) ),
aCancelBtn ( this, CUI_RES( BTN_POST_CANCEL ) ),
aHelpBtn ( this, CUI_RES( BTN_POST_HELP ) ),
aPrevBtn ( this, CUI_RES( BTN_PREV ) ),
aHelpBtn ( this, CUI_RES( BTN_POST_HELP ) ),
aPrevBtn ( this, CUI_RES( BTN_PREV ) ),
aNextBtn ( this, CUI_RES( BTN_NEXT ) ),

rSet ( rCoreSet ),
pOutSet ( 0 )

{
if (bRedline) // HelpIDs fuer Redlining
if (bRedline) // HelpIDs for Redlining
{
SetHelpId(HID_REDLINING_DLG);
aEditED.SetHelpId(HID_REDLINING_EDIT);
Expand All @@ -105,8 +105,8 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,

if ( !bPrevNext )
{
aPrevBtn.Hide();
aNextBtn.Hide();
aPrevBtn.Disable();
aNextBtn.Disable();
}

nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR );
Expand Down Expand Up @@ -248,12 +248,11 @@ IMPL_LINK( SvxPostItDialog, OKHdl, Button *, EMPTYARG )
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
pOutSet = new SfxItemSet( rSet );
pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
pOutSet->Put( SvxPostItDateItem( aLocaleWrapper.getDate( Date() ),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) );
pOutSet->Put( SvxPostItTextItem( aEditED.GetText(),
rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) );
EndDialog( RET_OK );
return 0;
}

0 comments on commit 1d7f0aa

Please sign in to comment.