loplugin:singlevalfields
Change-Id: Ic74b400f0b929b4c57ad70d0b0936983a3d46360 Reviewed-on: https://gerrit.libreoffice.org/80154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
89c0b79911
commit
53df91adab
@ -165,7 +165,6 @@ TreeListBox::TreeListBox (vcl::Window* pParent, WinBits nStyle)
|
||||
{
|
||||
SetNodeDefaultImages();
|
||||
SetSelectionMode( SelectionMode::Single );
|
||||
nMode = BrowseMode::All; // everything
|
||||
}
|
||||
|
||||
VCL_BUILDER_FACTORY_CONSTRUCTOR(TreeListBox, WB_TABSTOP)
|
||||
@ -257,11 +256,7 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
|
||||
}
|
||||
|
||||
// create tree list box entry
|
||||
OUString sId;
|
||||
if ( ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules ) )
|
||||
sId = bLoaded ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_DLGLIBNOTLOADED);
|
||||
else
|
||||
sId = bLoaded ? OUStringLiteral(RID_BMP_MODLIB) : OUStringLiteral(RID_BMP_MODLIBNOTLOADED);
|
||||
OUString sId = bLoaded ? OUStringLiteral(RID_BMP_MODLIB) : OUStringLiteral(RID_BMP_MODLIBNOTLOADED);
|
||||
SvTreeListEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY );
|
||||
if ( pLibRootEntry )
|
||||
{
|
||||
@ -284,7 +279,6 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
|
||||
void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
|
||||
{
|
||||
// modules
|
||||
if ( nMode & BrowseMode::Modules )
|
||||
{
|
||||
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
|
||||
|
||||
@ -315,7 +309,6 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
|
||||
}
|
||||
|
||||
// methods
|
||||
if ( nMode & BrowseMode::Subs )
|
||||
{
|
||||
Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
|
||||
FillTreeListBox( pModuleEntry, aNames, OBJ_TYPE_METHOD, RID_BMP_MACRO );
|
||||
@ -331,7 +324,6 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
|
||||
}
|
||||
|
||||
// dialogs
|
||||
if ( nMode & BrowseMode::Dialogs )
|
||||
{
|
||||
Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_DIALOGS ) );
|
||||
|
||||
@ -440,7 +432,6 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
|
||||
}
|
||||
|
||||
// methods
|
||||
if ( nMode & BrowseMode::Subs )
|
||||
{
|
||||
Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
|
||||
FillTreeListBox( pModuleEntry, aNames, OBJ_TYPE_METHOD, RID_BMP_MACRO );
|
||||
@ -667,19 +658,9 @@ void TreeListBox::SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage
|
||||
SetCollapsedEntryBmp( pEntry, rImage );
|
||||
}
|
||||
|
||||
LibraryType TreeListBox::GetLibraryType() const
|
||||
OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation )
|
||||
{
|
||||
LibraryType eType = LibraryType::All;
|
||||
if ( ( nMode & BrowseMode::Modules ) && !( nMode & BrowseMode::Dialogs ) )
|
||||
eType = LibraryType::Module;
|
||||
else if ( !( nMode & BrowseMode::Modules ) && ( nMode & BrowseMode::Dialogs ) )
|
||||
eType = LibraryType::Dialog;
|
||||
return eType;
|
||||
}
|
||||
|
||||
OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
|
||||
{
|
||||
return rDocument.getTitle( eLocation, GetLibraryType() );
|
||||
return rDocument.getTitle( eLocation, LibraryType::All );
|
||||
}
|
||||
|
||||
void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage )
|
||||
|
@ -107,8 +107,7 @@ void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry )
|
||||
ImpCreateLibSubEntries( pEntry, aDocument, aOULibName );
|
||||
|
||||
// exchange image
|
||||
const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules);
|
||||
Image aImage(StockImage::Yes, bDlgMode ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_MODLIB));
|
||||
Image aImage(StockImage::Yes, OUStringLiteral(RID_BMP_MODLIB));
|
||||
SetEntryBitmaps( pEntry, aImage );
|
||||
}
|
||||
else
|
||||
|
@ -179,7 +179,6 @@ public:
|
||||
class TreeListBox : public SvTreeListBox, public DocumentEventListener
|
||||
{
|
||||
private:
|
||||
BrowseMode nMode;
|
||||
DocumentEventNotifier m_aNotifier;
|
||||
void SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage );
|
||||
virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
|
||||
@ -236,13 +235,10 @@ public:
|
||||
void RemoveEntry (SvTreeListEntry const *);
|
||||
void RemoveEntry (ScriptDocument const&);
|
||||
|
||||
OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const;
|
||||
static OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation );
|
||||
static void GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage );
|
||||
|
||||
void SetCurrentEntry (EntryDescriptor const &);
|
||||
|
||||
private:
|
||||
LibraryType GetLibraryType() const;
|
||||
};
|
||||
|
||||
class SbTreeListBox : public DocumentEventListener
|
||||
|
@ -494,7 +494,6 @@ DataBrowser::DataBrowser(const css::uno::Reference<css::awt::XWindow> &rParent,
|
||||
WB_BORDER | WB_TABSTOP, BrowserStdFlags ),
|
||||
m_nSeekRow( 0 ),
|
||||
m_bIsReadOnly( false ),
|
||||
m_bLiveUpdate( true ),
|
||||
m_bDataValid( true ),
|
||||
m_aNumberEditField( VclPtr<FormattedField>::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ),
|
||||
m_aTextEditField( VclPtr<Edit>::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ),
|
||||
@ -852,16 +851,7 @@ void DataBrowser::SetDataFromModel(
|
||||
const Reference< chart2::XChartDocument > & xChartDoc,
|
||||
const Reference< uno::XComponentContext > & xContext )
|
||||
{
|
||||
if( m_bLiveUpdate )
|
||||
{
|
||||
m_xChartDoc.set( xChartDoc );
|
||||
}
|
||||
else
|
||||
{
|
||||
Reference< util::XCloneable > xCloneable( xChartDoc, uno::UNO_QUERY );
|
||||
if( xCloneable.is())
|
||||
m_xChartDoc.set( xCloneable->createClone(), uno::UNO_QUERY );
|
||||
}
|
||||
m_xChartDoc.set( xChartDoc );
|
||||
|
||||
m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc, xContext ));
|
||||
m_spNumberFormatterWrapper.reset(
|
||||
|
@ -158,7 +158,6 @@ private:
|
||||
/// the row that is currently painted
|
||||
long m_nSeekRow;
|
||||
bool m_bIsReadOnly;
|
||||
bool m_bLiveUpdate;
|
||||
bool m_bDataValid;
|
||||
|
||||
VclPtr<FormattedField> m_aNumberEditField;
|
||||
|
@ -4,16 +4,19 @@ chart2/source/view/inc/PlottingPositionHelper.hxx:206
|
||||
connectivity/source/inc/dbase/dindexnode.hxx:125
|
||||
connectivity::dbase::ONDXPage bNoDelete
|
||||
unsigned int
|
||||
cui/source/inc/cfg.hxx:244
|
||||
cui/source/inc/cfg.hxx:231
|
||||
SvxConfigEntry nId
|
||||
sal_uInt16
|
||||
desktop/source/app/main.c:29
|
||||
/media/noel/disk2/libo4/desktop/source/app/main.c g_Exiting
|
||||
dbaccess/source/ui/inc/tabletree.hxx:149
|
||||
dbaui::TableTreeListBox m_nTextColumn
|
||||
int
|
||||
editeng/source/misc/hangulhanja.cxx:80
|
||||
desktop/source/app/main.c:29
|
||||
/media/disk2/libo4/desktop/source/app/main.c g_Exiting
|
||||
int
|
||||
editeng/source/misc/hangulhanja.cxx:79
|
||||
editeng::HangulHanjaConversion_Impl m_eConvType
|
||||
class HangulHanjaConversion::ConversionType
|
||||
editeng/source/misc/svxacorr.cxx:231
|
||||
editeng/source/misc/svxacorr.cxx:234
|
||||
GetIgnoreTranslWrapper bIsInit
|
||||
int
|
||||
filter/source/graphicfilter/eps/eps.cxx:142
|
||||
@ -40,7 +43,7 @@ include/vcl/headbar.hxx:213
|
||||
include/vcl/headbar.hxx:214
|
||||
HeaderBar mnBorderOff2
|
||||
long
|
||||
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:190
|
||||
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:191
|
||||
(anonymous) g_bInGetJavaVM
|
||||
sig_atomic_t
|
||||
libreofficekit/source/gtk/tilebuffer.hxx:219
|
||||
@ -55,26 +58,26 @@ sc/source/filter/inc/stylesbuffer.hxx:290
|
||||
sc/source/filter/inc/stylesbuffer.hxx:292
|
||||
oox::xls::ApiAlignmentData mnVerJustifyMethod
|
||||
sal_Int32
|
||||
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1080
|
||||
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1025
|
||||
ScPagePreviewCountData nHeaders
|
||||
long
|
||||
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1081
|
||||
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1026
|
||||
ScPagePreviewCountData nTables
|
||||
long
|
||||
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1083
|
||||
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1028
|
||||
ScPagePreviewCountData nFooters
|
||||
long
|
||||
sc/source/ui/vba/vbahyperlink.hxx:83
|
||||
ScVbaHyperlink mnType
|
||||
long
|
||||
sd/qa/unit/tiledrendering/tiledrendering.cxx:966
|
||||
sd/qa/unit/tiledrendering/tiledrendering.cxx:956
|
||||
ViewCallback m_nPart
|
||||
int
|
||||
soltools/cpp/_tokens.c:34
|
||||
/media/noel/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected
|
||||
int
|
||||
soltools/cpp/_tokens.c:35
|
||||
/media/noel/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected
|
||||
/media/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected
|
||||
int
|
||||
soltools/cpp/_tokens.c:36
|
||||
/media/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected
|
||||
int
|
||||
soltools/cpp/cpp.h:121
|
||||
includelist always
|
||||
@ -85,38 +88,35 @@ svx/source/inc/cell.hxx:205
|
||||
svx/source/table/tablertfimporter.cxx:55
|
||||
sdr::table::RTFCellDefault mnRowSpan
|
||||
sal_Int32
|
||||
sw/source/filter/ww8/docxexport.hxx:100
|
||||
sw/source/filter/ww8/docxexport.hxx:98
|
||||
DocxExport m_nHeadersFootersInSection
|
||||
sal_Int32
|
||||
sw/source/filter/ww8/ww8scan.hxx:65
|
||||
sw/source/filter/ww8/ww8scan.hxx:58
|
||||
SprmInfo nVari
|
||||
unsigned int
|
||||
sw/source/uibase/inc/tautofmt.hxx:48
|
||||
SwAutoFormatDlg m_nDfltStylePos
|
||||
sal_uInt8
|
||||
vcl/inc/canvasbitmap.hxx:57
|
||||
vcl::unotools::VclCanvasBitmap m_nEndianness
|
||||
sal_Int8
|
||||
vcl/inc/unx/i18n_ic.hxx:33
|
||||
vcl/inc/unx/i18n_ic.hxx:32
|
||||
SalI18N_InputContext mbUseable
|
||||
int
|
||||
vcl/inc/unx/salframe.h:130
|
||||
vcl/inc/unx/salframe.h:128
|
||||
X11SalFrame mbInputFocus
|
||||
int
|
||||
vcl/unx/generic/app/saldata.cxx:466
|
||||
vcl/unx/generic/app/saldata.cxx:449
|
||||
EmitFontpathWarning bOnce
|
||||
int
|
||||
vcl/unx/generic/app/saldata.cxx:519
|
||||
vcl/unx/generic/app/saldata.cxx:502
|
||||
X11SalData::XError bOnce
|
||||
int
|
||||
vcl/unx/generic/app/sm.cxx:186
|
||||
/media/noel/disk2/libo4/vcl/unx/generic/app/sm.cxx nSmDel
|
||||
vcl/unx/generic/app/sm.cxx:184
|
||||
/media/disk2/libo4/vcl/unx/generic/app/sm.cxx nSmDel
|
||||
int
|
||||
vcl/workben/icontest.cxx:145
|
||||
IconTestApp nRet
|
||||
int
|
||||
workdir/LexTarget/l10ntools/source/cfglex.cxx:2302
|
||||
/media/noel/disk2/libo4/workdir/LexTarget/l10ntools/source/cfglex.cxx bText
|
||||
workdir/LexTarget/l10ntools/source/cfglex.cxx:2293
|
||||
/media/disk2/libo4/workdir/LexTarget/l10ntools/source/cfglex.cxx bText
|
||||
int
|
||||
writerfilter/source/dmapper/PageBordersHandler.hxx:54
|
||||
writerfilter::dmapper::PageBordersHandler m_eOffsetFrom
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -222,7 +222,6 @@ class VCL_DLLPUBLIC SvTreeListBox
|
||||
DragDropMode nDragDropMode;
|
||||
DragDropMode nOldDragMode;
|
||||
SelectionMode eSelMode;
|
||||
sal_Int8 nDragOptions;
|
||||
sal_Int32 nMinWidthInChars;
|
||||
|
||||
SvTreeListEntry* pEdEntry;
|
||||
|
@ -285,7 +285,6 @@ struct ImplSVNWFData
|
||||
|
||||
/// entire drop down listbox resembles a button, no textarea/button parts (as currently on Windows)
|
||||
bool mbDDListBoxNoTextArea = false;
|
||||
bool mbEnableAccel = true; // whether or not accelerators are shown
|
||||
bool mbAutoAccel = false; // whether accelerators are only shown when Alt is held down
|
||||
bool mbRolloverMenubar = false; // theming engine supports rollover in menubar
|
||||
// gnome#768128 I cannot see a route under wayland at present to support
|
||||
|
@ -303,14 +303,12 @@ protected:
|
||||
std::vector< int > m_aXineramaScreenIndexMap;
|
||||
std::list<SalObject*> m_aSalObjects;
|
||||
|
||||
bool m_bUseRandRWrapper; // don't use randr on gtk, use gdk signals there
|
||||
|
||||
mutable Time m_nLastUserEventTime; // mutable because changed on first access
|
||||
|
||||
virtual bool Dispatch( XEvent *pEvent ) = 0;
|
||||
void InitXinerama();
|
||||
void InitRandR( ::Window aRoot ) const;
|
||||
void DeInitRandR();
|
||||
static void DeInitRandR();
|
||||
void processRandREvent( XEvent* );
|
||||
|
||||
void doDestruct();
|
||||
|
@ -436,10 +436,9 @@ tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const t
|
||||
OUString rPStr = _rStr;
|
||||
DrawTextFlags nPStyle = _nStyle;
|
||||
|
||||
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
|
||||
bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
|
||||
|
||||
if (!accel || (autoacc && !mbShowAccelerator))
|
||||
if (autoacc && !mbShowAccelerator)
|
||||
{
|
||||
rPStr = GetNonMnemonicString( _rStr );
|
||||
nPStyle &= ~DrawTextFlags::HideMnemonic;
|
||||
@ -462,10 +461,9 @@ tools::Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, cons
|
||||
OUString rPStr = _rStr;
|
||||
DrawTextFlags nPStyle = _nStyle;
|
||||
|
||||
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
|
||||
bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
|
||||
|
||||
if (!accel || (autoacc && !mbShowAccelerator))
|
||||
if (autoacc && !mbShowAccelerator)
|
||||
{
|
||||
rPStr = GetNonMnemonicString( _rStr );
|
||||
nPStyle &= ~DrawTextFlags::HideMnemonic;
|
||||
|
@ -142,7 +142,6 @@ struct ImpTextView
|
||||
bool mbHighlightSelection : 1;
|
||||
bool mbCursorEnabled : 1;
|
||||
bool mbClickedInSelection : 1;
|
||||
bool mbSupportProtectAttribute : 1;
|
||||
bool mbCursorAtEndOfLine;
|
||||
};
|
||||
|
||||
@ -162,8 +161,6 @@ TextView::TextView( ExtTextEngine* pEng, vcl::Window* pWindow ) :
|
||||
mpImpl->mbAutoIndent = false;
|
||||
mpImpl->mbCursorEnabled = true;
|
||||
mpImpl->mbClickedInSelection = false;
|
||||
mpImpl->mbSupportProtectAttribute = false;
|
||||
mpImpl->mbCursorAtEndOfLine = false;
|
||||
// mbInSelection = false;
|
||||
|
||||
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
|
||||
@ -579,28 +576,6 @@ bool TextView::KeyInput( const KeyEvent& rKeyEvent )
|
||||
}
|
||||
|
||||
mpImpl->mpTextEngine->UndoActionStart();
|
||||
if(mpImpl->mbSupportProtectAttribute)
|
||||
{
|
||||
//expand selection to include all protected content - if there is any
|
||||
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
||||
TextPaM(mpImpl->maSelection.GetStart().GetPara(),
|
||||
mpImpl->maSelection.GetStart().GetIndex()),
|
||||
TEXTATTR_PROTECTED );
|
||||
const TextCharAttrib* pEndAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
||||
TextPaM(mpImpl->maSelection.GetEnd().GetPara(),
|
||||
mpImpl->maSelection.GetEnd().GetIndex()),
|
||||
TEXTATTR_PROTECTED );
|
||||
if(pStartAttr && pStartAttr->GetStart() < mpImpl->maSelection.GetStart().GetIndex())
|
||||
{
|
||||
mpImpl->maSelection.GetStart().GetIndex() = pStartAttr->GetStart();
|
||||
aOldSel = mpImpl->maSelection; // update to deleted!
|
||||
}
|
||||
if(pEndAttr && pEndAttr->GetEnd() > mpImpl->maSelection.GetEnd().GetIndex())
|
||||
{
|
||||
mpImpl->maSelection.GetEnd().GetIndex() = pEndAttr->GetEnd();
|
||||
aOldSel = mpImpl->maSelection; // update to deleted!
|
||||
}
|
||||
}
|
||||
aCurSel = ImpDelete( nDel, nMode );
|
||||
mpImpl->mpTextEngine->UndoActionEnd();
|
||||
bModified = true;
|
||||
@ -761,24 +736,6 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
|
||||
TextSelection aNewSel( mpImpl->maSelection );
|
||||
aNewSel.GetStart().GetIndex() = aBoundary.startPos;
|
||||
aNewSel.GetEnd().GetIndex() = aBoundary.endPos;
|
||||
if(mpImpl->mbSupportProtectAttribute)
|
||||
{
|
||||
//expand selection to include all protected content - if there is any
|
||||
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
||||
TextPaM(aNewSel.GetStart().GetPara(), aBoundary.startPos),
|
||||
TEXTATTR_PROTECTED );
|
||||
const TextCharAttrib* pEndAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
||||
TextPaM(aNewSel.GetEnd().GetPara(), aBoundary.endPos),
|
||||
TEXTATTR_PROTECTED );
|
||||
if(pStartAttr && pStartAttr->GetStart() < aNewSel.GetStart().GetIndex())
|
||||
{
|
||||
aNewSel.GetStart().GetIndex() = pStartAttr->GetStart();
|
||||
}
|
||||
if(pEndAttr && pEndAttr->GetEnd() > aNewSel.GetEnd().GetIndex())
|
||||
{
|
||||
aNewSel.GetEnd().GetIndex() = pEndAttr->GetEnd();
|
||||
}
|
||||
}
|
||||
ImpSetSelection( aNewSel );
|
||||
ShowSelection();
|
||||
ShowCursor();
|
||||
@ -1911,19 +1868,10 @@ void TextView::drop( const css::datatransfer::dnd::DropTargetDropEvent& rDTDE )
|
||||
if ( !aText.isEmpty() && ( aText[ aText.getLength()-1 ] == LINE_SEP ) )
|
||||
aText = aText.copy(0, aText.getLength()-1);
|
||||
|
||||
TextPaM aTempStart = mpImpl->maSelection.GetStart();
|
||||
if ( ImplCheckTextLen( aText ) )
|
||||
ImpSetSelection( mpImpl->mpTextEngine->ImpInsertText( mpImpl->mpDDInfo->maDropPos, aText ) );
|
||||
if(mpImpl->mbSupportProtectAttribute)
|
||||
{
|
||||
mpImpl->mpTextEngine->SetAttrib( TextAttribProtect(),
|
||||
aTempStart.GetPara(),
|
||||
aTempStart.GetIndex(),
|
||||
mpImpl->maSelection.GetEnd().GetIndex(), false );
|
||||
}
|
||||
|
||||
if ( aPrevSel.HasRange() &&
|
||||
!mpImpl->mbSupportProtectAttribute && // don't remove currently selected element
|
||||
(( rDTDE.DropAction & css::datatransfer::dnd::DNDConstants::ACTION_MOVE ) || !bStarterOfDD) )
|
||||
{
|
||||
// adjust selection if necessary
|
||||
@ -1997,18 +1945,8 @@ void TextView::dragOver( const css::datatransfer::dnd::DropTargetDragEvent& rDTD
|
||||
Point aDocPos = GetDocPos( aMousePos );
|
||||
mpImpl->mpDDInfo->maDropPos = mpImpl->mpTextEngine->GetPaM( aDocPos );
|
||||
|
||||
bool bProtected = false;
|
||||
if(mpImpl->mbSupportProtectAttribute)
|
||||
{
|
||||
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
||||
mpImpl->mpDDInfo->maDropPos,
|
||||
TEXTATTR_PROTECTED );
|
||||
bProtected = pStartAttr != nullptr &&
|
||||
pStartAttr->GetStart() != mpImpl->mpDDInfo->maDropPos.GetIndex() &&
|
||||
pStartAttr->GetEnd() != mpImpl->mpDDInfo->maDropPos.GetIndex();
|
||||
}
|
||||
// Don't drop in selection or in read only engine
|
||||
if ( IsReadOnly() || IsInSelection( mpImpl->mpDDInfo->maDropPos ) || bProtected)
|
||||
if ( IsReadOnly() || IsInSelection( mpImpl->mpDDInfo->maDropPos ))
|
||||
{
|
||||
ImpHideDDCursor();
|
||||
rDTDE.Context->rejectDrag();
|
||||
|
@ -2128,7 +2128,6 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
|
||||
}
|
||||
}
|
||||
|
||||
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
|
||||
bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
|
||||
|
||||
if ( nStyle & DrawTextFlags::Disable && ! pVector )
|
||||
@ -2168,7 +2167,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
|
||||
|
||||
DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText );
|
||||
if (!(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics)
|
||||
&& accel && (!autoacc || !(nStyle & DrawTextFlags::HideMnemonic)) )
|
||||
&& (!autoacc || !(nStyle & DrawTextFlags::HideMnemonic)) )
|
||||
{
|
||||
if ( nMnemonicPos != -1 )
|
||||
ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth );
|
||||
@ -2181,7 +2180,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
|
||||
{
|
||||
DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText, pGlyphs );
|
||||
if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) && !pVector
|
||||
&& accel && (!autoacc || !(nStyle & DrawTextFlags::HideMnemonic)) )
|
||||
&& (!autoacc || !(nStyle & DrawTextFlags::HideMnemonic)) )
|
||||
{
|
||||
if ( nMnemonicPos != -1 )
|
||||
ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth );
|
||||
|
@ -374,7 +374,6 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
|
||||
nMinWidthInChars(0),
|
||||
mbCenterAndClipText(false)
|
||||
{
|
||||
nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK;
|
||||
nImpFlags = SvTreeListBoxFlags::NONE;
|
||||
pTargetEntry = nullptr;
|
||||
nDragDropMode = DragDropMode::NONE;
|
||||
@ -1201,7 +1200,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel )
|
||||
// (GetSourceListBox()->EnableSelectionAsDropTarget( true, true );)
|
||||
EnableSelectionAsDropTarget( false );
|
||||
|
||||
pContainer->StartDrag( this, nDragOptions, GetDragFinishedHdl() );
|
||||
pContainer->StartDrag( this, DND_ACTION_COPYMOVE | DND_ACTION_LINK, GetDragFinishedHdl() );
|
||||
}
|
||||
|
||||
void SvTreeListBox::DragFinished( sal_Int8
|
||||
|
@ -852,10 +852,9 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
|
||||
}
|
||||
}
|
||||
|
||||
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
|
||||
bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
|
||||
|
||||
if ( !bDone && ( bFromMenu || (rKEvent.GetKeyCode().IsMod2() && accel) ) )
|
||||
if ( !bDone && ( bFromMenu || rKEvent.GetKeyCode().IsMod2() ) )
|
||||
{
|
||||
sal_Unicode nCharCode = rKEvent.GetCharCode();
|
||||
if ( nCharCode )
|
||||
@ -876,7 +875,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
|
||||
{
|
||||
SetMBWMenuKey(bShowAccels);
|
||||
SetMBWHideAccel(!bShowAccels);
|
||||
if (accel && autoacc)
|
||||
if (autoacc)
|
||||
Invalidate(InvalidateFlags::Update);
|
||||
}
|
||||
|
||||
|
@ -1033,7 +1033,6 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
|
||||
{
|
||||
VclPtr<vcl::Window> xWindow = this;
|
||||
|
||||
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
|
||||
bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
|
||||
sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
|
||||
bKeyInput = true;
|
||||
@ -1161,7 +1160,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
|
||||
sal_Unicode nCharCode = rKEvent.GetCharCode();
|
||||
size_t nPos = 0;
|
||||
size_t nDuplicates = 0;
|
||||
MenuItemData* pData = (nCharCode && pMenu && accel) ?
|
||||
MenuItemData* pData = (nCharCode && pMenu) ?
|
||||
pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : nullptr;
|
||||
if (pData)
|
||||
{
|
||||
@ -1189,7 +1188,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
|
||||
{
|
||||
pMenuBar->getMenuBarWindow()->SetMBWMenuKey(bShowAccels);
|
||||
pMenuBar->getMenuBarWindow()->SetMBWHideAccel(!bShowAccels);
|
||||
if (accel && autoacc)
|
||||
if (autoacc)
|
||||
Invalidate(InvalidateFlags::Update);
|
||||
}
|
||||
}
|
||||
|
@ -1768,14 +1768,13 @@ void Window::SimulateKeyPress( sal_uInt16 nKeyCode ) const
|
||||
void Window::KeyInput( const KeyEvent& rKEvt )
|
||||
{
|
||||
KeyCode cod = rKEvt.GetKeyCode ();
|
||||
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
|
||||
bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
|
||||
|
||||
// do not respond to accelerators unless Alt is held */
|
||||
if (cod.GetCode () >= 0x200 && cod.GetCode () <= 0x219)
|
||||
{
|
||||
if (!accel) return;
|
||||
if (autoacc && cod.GetModifier () != KEY_MOD2) return;
|
||||
if (autoacc && cod.GetModifier () != KEY_MOD2)
|
||||
return;
|
||||
}
|
||||
|
||||
NotifyEvent aNEvt( MouseNotifyEvent::KEYINPUT, this, &rKEvt );
|
||||
|
@ -108,8 +108,7 @@ void RandRWrapper::releaseWrapper()
|
||||
void SalDisplay::InitRandR( ::Window aRoot ) const
|
||||
{
|
||||
#ifdef USE_RANDR
|
||||
if( m_bUseRandRWrapper )
|
||||
RandRWrapper::get( GetDisplay() ).XRRSelectInput( GetDisplay(), aRoot, RRScreenChangeNotifyMask );
|
||||
RandRWrapper::get( GetDisplay() ).XRRSelectInput( GetDisplay(), aRoot, RRScreenChangeNotifyMask );
|
||||
#else
|
||||
(void)this;
|
||||
(void)aRoot;
|
||||
@ -119,13 +118,10 @@ void SalDisplay::InitRandR( ::Window aRoot ) const
|
||||
void SalDisplay::DeInitRandR()
|
||||
{
|
||||
#ifdef USE_RANDR
|
||||
if( m_bUseRandRWrapper )
|
||||
RandRWrapper::releaseWrapper();
|
||||
RandRWrapper::releaseWrapper();
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
fprintf( stderr, "SalDisplay::DeInitRandR()\n" );
|
||||
#endif
|
||||
#else
|
||||
(void)this;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -133,7 +129,7 @@ void SalDisplay::processRandREvent( XEvent* pEvent )
|
||||
{
|
||||
#ifdef USE_RANDR
|
||||
XConfigureEvent* pCnfEvent=reinterpret_cast<XConfigureEvent*>(pEvent);
|
||||
if( m_bUseRandRWrapper && pWrapper && pWrapper->XRRRootToScreen(GetDisplay(),pCnfEvent->window) != -1 )
|
||||
if( pWrapper && pWrapper->XRRRootToScreen(GetDisplay(),pCnfEvent->window) != -1 )
|
||||
{
|
||||
int nRet = pWrapper->XRRUpdateConfiguration( pEvent );
|
||||
if( nRet == 1 && pEvent->type != ConfigureNotify) // this should then be a XRRScreenChangeNotifyEvent
|
||||
|
@ -278,7 +278,6 @@ SalDisplay::SalDisplay( Display *display ) :
|
||||
nCtrlKeySym_( 0 ),
|
||||
nMod1KeySym_( 0 ),
|
||||
m_bXinerama( false ),
|
||||
m_bUseRandRWrapper( true ),
|
||||
m_nLastUserEventTime( CurrentTime )
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
|
@ -3479,7 +3479,6 @@ void GtkSalData::initNWF()
|
||||
pSVData->maNWFData.mbNoFocusRects = true;
|
||||
pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
|
||||
pSVData->maNWFData.mbAutoAccel = true;
|
||||
pSVData->maNWFData.mbEnableAccel = true;
|
||||
|
||||
#if defined(GDK_WINDOWING_WAYLAND)
|
||||
//gnome#768128 for the car crash that is wayland
|
||||
|
Loading…
x
Reference in New Issue
Block a user