no need to allocate these on the heap

Change-Id: Ie4077a86523d623e1913c4f97971ab81d04abd4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116368
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 723cd08..6bf54c6 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -213,7 +213,7 @@ sal_uInt16 SwDoc::CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCall
            }
            else if( EXTENDED_STYPE == rMacro.GetScriptType() )
            {
                std::unique_ptr<Sequence<Any> > pUnoArgs(new Sequence<Any>());
                Sequence<Any> aUnoArgs;

                Any aRet;
                Sequence< sal_Int16 > aOutArgsIndex;
@@ -222,7 +222,7 @@ sal_uInt16 SwDoc::CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCall
                SAL_INFO("sw", "SwDoc::CallEvent URL is " << rMacro.GetMacName() );

                nRet += ERRCODE_NONE == mpDocShell->CallXScript(
                    rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, aOutArgs) ? 1 : 0;
                    rMacro.GetMacName(), aUnoArgs, aRet, aOutArgsIndex, aOutArgs) ? 1 : 0;
            }
            // JavaScript calls are ignored
        }
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 2c3ed69..a8916a1 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1717,7 +1717,9 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
                                    const SwTOXInternational& rIntl )
{
    // collect starts end ends of main entry character style
    std::unique_ptr< std::vector<sal_uInt16> > xCharStyleIdx(pMainEntryNums ? new std::vector<sal_uInt16> : nullptr);
    std::optional< std::vector<sal_uInt16> > xCharStyleIdx;
    if (pMainEntryNums)
        xCharStyleIdx.emplace();

    OUString sSrchStr
        = OUStringChar(C_NUM_REPL) + SwTOXMark::S_PAGE_DELI + OUStringChar(C_NUM_REPL);
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 646e4fe9..e74de06 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7560,11 +7560,11 @@ Graphic SwDrawFrameFormat::MakeGraphic( ImageMap* )
    if ( pMod )
    {
        SdrObject *pObj = FindSdrObject();
        std::unique_ptr<SdrView> pView( new SdrView( *pMod ) );
        SdrPageView *pPgView = pView->ShowSdrPage(pView->GetModel()->GetPage(0));
        pView->MarkObj( pObj, pPgView );
        aRet = pView->GetMarkedObjBitmapEx();
        pView->HideSdrPage();
        SdrView aView( *pMod );
        SdrPageView *pPgView = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
        aView.MarkObj( pObj, pPgView );
        aRet = aView.GetMarkedObjBitmapEx();
        aView.HideSdrPage();
    }
    return aRet;
}