Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

einige Melodien

Quelle  SidebarTxtControl.cxx   Sprache: C

 


/*
 * 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/.
*
 * <Officejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 *   java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
 * aBgColor = .()
 *  withthis work  additional information regarding copyright
    ownership.The ASF    toyouundertheApache
 *   Licensejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 License. You may  a copy 
         const &rOutDev =->(;
 */


#    

#include "java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23

#include        caseSwPostItHelper::pResId =STR_REDLINE_DELETE; ;
#include<doc.hxx>

#include <PostItMgr.

#include  SwContentAtPosaContentAtPosIsAttrAtPos:Redline)
#nclude stringshrc>

# mrDocView.etWrtShell)GetContentAtPos(mrSidebarWin.etAnchorPos(,aContentAtPos )java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
include <fficecfg/ffice/ommon.xx>

#include <sfx2/viewfrm.hxx>
#    aContentAtPos..java.lang.StringIndexOutOfBoundsException: Range [74, 49) out of bounds for length 74

#include <sfx2/sfxhelp.hxx>

#include <vcl/commandevent.hxx>
#includejava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 51
java.lang.NullPointerException
# vcl.hxx
#include <vcl/weld.hxx{
#include <vcl/gradient.hxx>
#include <vcl/settings.hxxb   mrSidebarWin.etScrollbar();

#include <editeng/
#include <editeng/voidSidebarTextControl:DrawForPageOutputDevice ,constPoint rPtjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Range [17, 8) out of bounds for length 31
java.lang.NullPointerException

#nclude<itool.xx>
#include <view.hxx>
#include
#include  -(.GetChangeColor);
#include <IDocumentDeviceAccess.hxx>
#if ENABLE_YRS
     aBottomRight(Pt)
#include <swmodule.(Size)
#endif
 <java.lang.StringIndexOutOfBoundsException: Range [21, 17) out of bounds for length 46
# m>

namespace sw::java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0

SidebarTextControl::SidebarTextControl(sw::annotation::java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 5
                                       SwView        
                                       SwPostItMgr)
    : mrSidebarWin(rSidebarWin)
    , mrDocView(rDocView)
    , mrPostItMgr(rPostItMgr)
    , mbMouseDownGainingFocus(false)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

EditView*         forautoconst  :rects)
{
    OutlinerView*             :td:size_t const authorId{::et(-InsertRedlineAuthori.first;
    if()
        return nullptr;
    return;
}

EditEngine* SidebarTextControl:   rRenderContextSetLineColor.GetChangeColor);
{
    OutlinerView* pOutlinerView = mrSidebarWin.GetOutlinerView rRenderContext.DrawLinerRenderContext.ixelToLogic(Pos)
    if (!pOutlinerView)
        return nullptr;
    return &pOutlinerView->GetEditView().                                                                     aSizeHeight 0))java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
}

void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
    Size aSize( SidebarTextControl:eyInput constKeyEvent&rKeyEvt )
    pDrawingArea->    const vcl::KeyCode&  .(;

    aSize)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

    weld::CustomWidgetController::SetDrawingArea {

    EnableRTL(false);

    const mrSidebarWin()
    Color          =;

   OutputDevice&rDevice = pDrawingArea>()

    rDevice.etMapMode(MapUnit:);
    rDevice.SetBackground(aBgColor    else if  rKeyCode.()= KEY_INSERT)

    Size aOutputSize(rDevice.PixelToLogic(aSize));

    EditView*     {
    pEditViewmrSidebarWin.oggleInsMode(;

    EditEngine& rEditEngine = pEditView->getEditEngine();
    // For tdf#143443 note we want an 'infinite' height initially (which is the K rKeyCode()java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    // editengines default). For tdf#144686 it is helpful if the initial width
     text height is always meaningful
    // for layout in the sidebar.
            {
    rEditEngine
    rEditEngine. // write back data first when showing navigator

            if(nKey=KEY_F5
    pEditView->SetBackgroundColor(                .UpdateData);

    pDrawingArea-set_cursor(PointerStyle:ext

#if !ENABLE_WASM_STRIP_ACCESSIBILITY
    InitAccessible
#     bExecuteMod =::(:EOption::trlClickHyperlink);
}

void SidebarTextControl if(!| (MEvt.GetModifier( =KEY_MOD1)
{
    Point aMousePos =             const OutputDevice =pEditView-GetOutputDevice()
*(pField)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
}

void SidebarTextControl::GetFocus()
{
    WeldEditView::GetFocus                {
    if ( !mrSidebarWin.IsMouseOver() )
                    pEditView-MouseButtonDownrMEvt;
    mrSidebarWin
}

voidSidebarTextControl:LoseFocus(
{
    // write the visible text back into the SwField
   mrSidebarWinUpdateData)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

    WeldEditView::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
      mrSidebarWin.sMouseOver( java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    {
        te;
    }
    
    mrSidebarWin.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
}

OUString SidebarTextControl
{{
            (java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    {
        Point

        const OutputDevice rOutDev =pEditView>etOutputDevice;
        Point aLogicClick = rOutDev.PixelToLogic
        (aLogicClick);
        if (pItem)
        {
            const SvxFieldData* pField = pItem->GetField();
            * pURL dynamic_cast<onstSvxURLField* java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ifpURL)
            {
LinkSpellCallbackInfo&void>aLink =LINK(his,SidebarTextControl,OnlineSpellCallback
                return SfxHelpelse
            }
        }
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    TranslateId         true
    switch(}
    {
            else ifrCEvt.etCommand( =:Wheel)
        case SwPostItHelper::DELETED:   pResId = STR_REDLINE_DELETE; break;
        : breakjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    }

    SwContentAtPos aContentAtPos( IsAttrAtPos::Redline );
    if ( pResId &&
         GetWrtShell.GetContentAtPos(.(, aContentAtPos))
    {
        OUString sText =             if (pData->IsShift ->sMod1)|pData>()
                                        mrDocView.HandleWheelrCEvt)
                        GetAppLangDateTimeString( aContentAtPos.}
        return sText;
    }

    return OUString();
}

#if ENABLE_YRS
void SidebarTextControl::EditViewInvalidate(const tools::Rectangle& rRect)
{
    SAL_INFO("sw.yrs", "YRS EditViewInvalidate");
    mrDocView.GetDocShell()->GetDoc()->getIDocumentState().YrsNotifyCursorUpdate();
    mrDocView.GetDocShell()->GetDoc()->getIDocumentState().YrsCommitModified();
    return WeldEditView::EditViewInvalidate(rRect);
}

void SidebarTextControl::EditViewSelectionChange()
{
    SAL_INFO("sw.yrs", "YRS EditViewSelectionChange");
    mrDocView.GetDocShell()->GetDoc()->getIDocumentState().YrsNotifyCursorUpdate();
    return WeldEditView::EditViewSelectionChange();
}
#endif

void SidebarTextControl::EditViewScrollStateChange()
{
    mrSidebarWin.SetScrollbar();
}

void SidebarTextControl::DrawForPage(OutputDevice* pDev, const Point& rPt)
{
    //Take the control's height, but overwrite the scrollbar area if there was one
    OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
    Size aSize(rDevice.PixelToLogic(GetOutputSizePixel()));

    if (OutlinerView* pOutlinerView = mrSidebarWin.GetOutlinerView())
    {
        pOutlinerView->GetOutliner().Draw(*pDev, tools::Rectangle(rPt, aSize));
    }

    if ( mrSidebarWin.GetLayoutStatus()!=SwPostItHelper::DELETED )
        return;

    pDev->Push(vcl::PushFlags::LINECOLOR);

    pDev->SetLineColor(mrSidebarWin.GetChangeColor());
    Point aBottomRight(rPt);
    aBottomRight.Move(aSize);
    pDev->DrawLine(rPt,  aBottomRight);

    Point aTopRight(rPt);
    aTopRight.Move(Size(aSize.Width(), 0));

    Point aBottomLeft(rPt);
    aBottomLeft.Move(Size(0, aSize.Height()));

    pDev->DrawLine(aTopRight, aBottomLeft);

    pDev->Pop();
}

void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
    Size aSize = GetOutputSizePixel();
    Point aPos;

    if (!rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode())
    {
        if (mrSidebarWin.IsMouseOverSidebarWin() || HasFocus())
        {
            rRenderContext.DrawGradient(tools::Rectangle(aPos, rRenderContext.PixelToLogic(aSize)),
                                        Gradient(css::awt::GradientStyle_LINEAR, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark()));
        }
        else
        {
            rRenderContext.DrawGradient(tools::Rectangle(aPos, rRenderContext.PixelToLogic(aSize)),
                           Gradient(css::awt::GradientStyle_LINEAR, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark()));
        }
    }

    DoPaint(rRenderContext, rRect);

#if ENABLE_YRS
    if (EditView *const pEditView{GetEditView()})
    {
        rRenderContext.Push(vcl::PushFlags::ALL);
        rRenderContext.SetClipRegion();

        ::std::vector<::std::pair<OUString, ::std::vector<tools::Rectangle>>> rects;
        pEditView->YrsGetSelectionRectangles(rects);
        for (auto const& it : rects)
        {
            ::std::size_t const authorId{SwModule::get()->InsertRedlineAuthor(it.first)};
            Color const color{SwPostItMgr::GetColorAnchor(authorId)};
            PaintSelection(rRenderContext, rRect, it.second, color);
        }

        rRenderContext.Pop();
    }
#endif

    if (mrSidebarWin.GetLayoutStatus() != SwPostItHelper::DELETED)
        return;

    const AntialiasingFlags nFormerAntialiasing( rRenderContext.GetAntialiasing() );
    const bool bIsAntiAliasing = officecfg::Office::Common::Drawinglayer::AntiAliasing::get();
    if ( bIsAntiAliasing )
        rRenderContext.SetAntialiasing(AntialiasingFlags::Enable);
    rRenderContext.SetLineColor(mrSidebarWin.GetChangeColor());
    rRenderContext.DrawLine(rRenderContext.PixelToLogic(aPos),
                            rRenderContext.PixelToLogic(aPos + Point(aSize.Width(),
                                                                     aSize.Height() * 0.95)));
    rRenderContext.DrawLine(rRenderContext.PixelToLogic(aPos + Point(aSize.Width(),
                                                                     0)),
                            rRenderContext.PixelToLogic(aPos + Point(0,
                                                                     aSize.Height() * 0.95)));
    if ( bIsAntiAliasing )
        rRenderContext.SetAntialiasing(nFormerAntialiasing);
}

void SidebarTextControl::MakeVisible()
{
    //let's make sure we see our note
    mrPostItMgr.MakeVisible(&mrSidebarWin);
}

bool SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt )
{
    const vcl::KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
    const sal_uInt16 nKey = rKeyCode.GetCode();
    if (nKey == KEY_F12 && getenv("SW_DEBUG"))
    {
        if (rKeyEvt.GetKeyCode().IsShift())
        {
            mrDocView.GetDocShell()->GetDoc()->dumpAsXml();
            return true;
        }
    }

    bool bDone = false;

    if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) &&
         ( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) )
    {
        mrSidebarWin.SwitchToPostIt(nKey);
        bDone = true;
    }
    else if ( nKey == KEY_ESCAPE ||
              ( rKeyCode.IsMod1() &&
                ( nKey == KEY_PAGEUP ||
                  nKey == KEY_PAGEDOWN ) ) )
    {
        mrSidebarWin.SwitchToFieldPos();
        bDone = true;
    }
    else if ( rKeyCode.GetFullCode() == KEY_INSERT )
    {
        mrSidebarWin.ToggleInsMode();
        bDone = true;
    }
    else
    {
        MakeVisible();

        tools::Long aOldHeight = mrSidebarWin.GetPostItTextHeight();

        /// HACK: need to switch off processing of Undo/Redo in Outliner
        if ( !( (nKey == KEY_Z || nKey == KEY_Y) && rKeyCode.IsMod1()) )
        {
            bool bIsProtected = mrSidebarWin.IsReadOnlyOrProtected();
            if ( !bIsProtected || !EditEngine::DoesKeyChangeText(rKeyEvt) )
            {
                EditView* pEditView = GetEditView();
                bDone = pEditView && pEditView->PostKeyEvent(rKeyEvt);
            }
            else
                mrDocView.GetWrtShell().InfoReadOnlyDialog(false);
        }
        if (bDone)
            mrSidebarWin.ResizeIfNecessary( aOldHeight, mrSidebarWin.GetPostItTextHeight() );
        else
        {
            // write back data first when showing navigator
            if ( nKey==KEY_F5 )
                mrSidebarWin.UpdateData();
            bDone = mrDocView.KeyInput(rKeyEvt);
        }
    }

    mrDocView.GetViewFrame().GetBindings().InvalidateAll(false);

    return bDone;
}

bool SidebarTextControl::MouseButtonDown(const MouseEvent& rMEvt)
{
    if (EditView* pEditView = GetEditView())
    {
        bool bExecuteMod = SvtSecurityOptions::IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink);

        if ( !bExecuteMod || (rMEvt.GetModifier() == KEY_MOD1))
        {
            const OutputDevice& rOutDev = pEditView->GetOutputDevice();
            Point aLogicClick = rOutDev.PixelToLogic(rMEvt.GetPosPixel());
            if (const SvxFieldItem* pItem = pEditView->GetField(aLogicClick))
            {
                const SvxFieldData* pField = pItem->GetField();
                const SvxURLField* pURL = dynamic_cast<const SvxURLField*>( pField  );
                if ( pURL )
                {
                    pEditView->MouseButtonDown( rMEvt );
                    SwWrtShell &rSh = mrDocView.GetWrtShell();
                    const OUString& sURL( pURL->GetURL() );
                    const OUString& sTarget( pURL->GetTargetFrame() );
                    ::LoadURL(rSh, sURL, LoadUrlFlags::NONE, sTarget);
                    return true;
                }
            }
        }
    }

    mbMouseDownGainingFocus = !HasFocus();
    GrabFocus();

    bool bRet = WeldEditView::MouseButtonDown(rMEvt);

    mrDocView.GetViewFrame().GetBindings().InvalidateAll(false);

    return bRet;
}

bool SidebarTextControl::MouseButtonUp(const MouseEvent& rMEvt)
{
    bool bRet = WeldEditView::MouseButtonUp(rMEvt);

    if (mbMouseDownGainingFocus)
    {
        MakeVisible();
        mbMouseDownGainingFocus = false;
    }

    return bRet;
}

bool SidebarTextControl::MouseMove(const MouseEvent& rMEvt)
{
    if (rMEvt.IsEnterWindow())
        GetDrawingArea()->set_cursor(PointerStyle::Text);
    return WeldEditView::MouseMove(rMEvt);
}

IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void )
{
    if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
    {
        mrDocView.GetViewFrame().GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
    }
}

bool SidebarTextControl::Command( const CommandEvent& rCEvt )
{
    EditView* pEditView = GetEditView();

    if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
    {
        if (IsMouseCaptured())
            ReleaseMouse();
        if ( !mrSidebarWin.IsReadOnlyOrProtected() &&
             pEditView &&
             pEditView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(), true ))
        {
            Link<SpellCallbackInfo&,void> aLink = LINK(this, SidebarTextControl, OnlineSpellCallback);
            pEditView->ExecuteSpellPopup(rCEvt.GetMousePosPixel(), aLink);
        }
        else
        {
            Point aPos;
            if (rCEvt.IsMouseEvent())
                aPos = rCEvt.GetMousePosPixel();
            else
            {
                const Size aSize = GetOutputSizePixel();
                aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
            }

            // tdf#164072: don't use SwAnnotationWin itself as popup parent because it
            // may get disposed while the popup menu is still executed
            vcl::Window* pParentWin = mrSidebarWin.GetParent();
            assert(pParentWin);
            aPos += mrSidebarWin.GetWindowExtentsRelative(*pParentWin).TopLeft();
            SfxDispatcher::ExecutePopup(pParentWin, &aPos);
        }
        return true;
    }
    else if (rCEvt.GetCommand() == CommandEventId::Wheel)
    {
        // if no scrollbar, or extra keys held scroll the document and consume
        // this event, otherwise don't consume and let the event get to the
        // surrounding scrolled window
        if (!mrSidebarWin.IsScrollbarVisible())
        {
            mrDocView.HandleWheelCommands(rCEvt);
            return true;
        }
        else
        {
            const CommandWheelData* pData = rCEvt.GetWheelData();
            if (pData->IsShift() || pData->IsMod1() || pData->IsMod2())
            {
                mrDocView.HandleWheelCommands(rCEvt);
                return true;
            }
        }
    }

    return WeldEditView::Command(rCEvt);
}

} // end of namespace sw::sidebarwindows

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=90 H=97 G=93

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.19Bemerkung:  (vorverarbeitet am  2026-10-12) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....
    

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723